blob: e3e6dada2093915fa59aadb6e3183c3dec3d8eba [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Christian Heimes39258d32021-04-17 11:36:35 +02003# Generated by GNU Autoconf 2.69 for python 3.10.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Christian Heimes39258d32021-04-17 11:36:35 +02008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Christian Heimes39258d32021-04-17 11:36:35 +020019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Christian Heimes39258d32021-04-17 11:36:35 +020026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
Christian Heimes39258d32021-04-17 11:36:35 +020039# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
Christian Heimes39258d32021-04-17 11:36:35 +020075if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
Christian Heimes39258d32021-04-17 11:36:35 +020084# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" "" $as_nl"
90
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020099 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Christian Heimes39258d32021-04-17 11:36:35 +0200112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Christian Heimes39258d32021-04-17 11:36:35 +0200116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
Christian Heimes39258d32021-04-17 11:36:35 +0200157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
Christian Heimes39258d32021-04-17 11:36:35 +0200163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
Christian Heimes39258d32021-04-17 11:36:35 +0200170else
Matthias Kloseb9621712010-04-24 17:59:49 +0000171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Christian Heimes39258d32021-04-17 11:36:35 +0200190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000191
Christian Heimes39258d32021-04-17 11:36:35 +0200192else
Matthias Kloseb9621712010-04-24 17:59:49 +0000193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
Christian Heimes39258d32021-04-17 11:36:35 +0200202 if (eval "$as_required") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000203 as_have_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +0200204else
Matthias Kloseb9621712010-04-24 17:59:49 +0000205 as_have_required=no
206fi
Christian Heimes39258d32021-04-17 11:36:35 +0200207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000208
Christian Heimes39258d32021-04-17 11:36:35 +0200209else
Matthias Kloseb9621712010-04-24 17:59:49 +0000210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +0200215 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
Christian Heimes39258d32021-04-17 11:36:35 +0200221 as_shell=$as_dir/$as_base
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Christian Heimes39258d32021-04-17 11:36:35 +0200223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000224 CONFIG_SHELL=$as_shell as_have_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +0200225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
Christian Heimes39258d32021-04-17 11:36:35 +0200233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
Pablo Galindo53e55292021-04-05 17:38:40 +0100235 CONFIG_SHELL=$SHELL as_have_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +0200236fi; }
237IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +0000238
239
Christian Heimes39258d32021-04-17 11:36:35 +0200240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
Christian Heimes39258d32021-04-17 11:36:35 +0200258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
Christian Heimes39258d32021-04-17 11:36:35 +0200262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
Matthias Kloseb9621712010-04-24 17:59:49 +0000268 else
Christian Heimes39258d32021-04-17 11:36:35 +0200269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
Christian Heimes39258d32021-04-17 11:36:35 +0200328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +0000329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +0200337$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +0000338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
Christian Heimes39258d32021-04-17 11:36:35 +0200376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
Christian Heimes39258d32021-04-17 11:36:35 +0200381else
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
Christian Heimes39258d32021-04-17 11:36:35 +0200393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
Christian Heimes39258d32021-04-17 11:36:35 +0200398else
Matthias Kloseb9621712010-04-24 17:59:49 +0000399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +0200416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Christian Heimes39258d32021-04-17 11:36:35 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +0200445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Christian Heimes39258d32021-04-17 11:36:35 +0200489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100583PACKAGE_VERSION='3.10'
584PACKAGE_STRING='python 3.10'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
Christian Heimes39258d32021-04-17 11:36:35 +0200591#include <stdio.h>
592#ifdef HAVE_SYS_TYPES_H
593# include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000594#endif
Christian Heimes39258d32021-04-17 11:36:35 +0200595#ifdef HAVE_SYS_STAT_H
596# include <sys/stat.h>
597#endif
598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
Christian Heimes39258d32021-04-17 11:36:35 +0200600# include <stddef.h>
601#else
602# ifdef HAVE_STDLIB_H
603# include <stdlib.h>
604# endif
Martin v. Löwis11437992002-04-12 09:54:03 +0000605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
Christian Heimes39258d32021-04-17 11:36:35 +0200607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608# include <memory.h>
609# endif
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <string.h>
611#endif
Christian Heimes39258d32021-04-17 11:36:35 +0200612#ifdef HAVE_STRINGS_H
613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
pxinwr277ce302020-12-30 20:50:39 +0800626TEST_MODULES
Victor Stinner801bb0b2021-02-17 11:14:42 +0100627LIBRARY_DEPS
628STATIC_LIBPYTHON
Christian Heimes32eba612021-03-19 10:29:25 +0100629OPENSSL_RPATH
Christian Heimesff5be6e2018-01-20 13:19:21 +0100630OPENSSL_LDFLAGS
631OPENSSL_LIBS
632OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800633ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000634SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100636WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100637LIBPL
638PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100639PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200640BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200641LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700642EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200643ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000644SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000645LIBC
646LIBM
647HAVE_GETHOSTBYNAME
648HAVE_GETHOSTBYNAME_R
649HAVE_GETHOSTBYNAME_R_3_ARG
650HAVE_GETHOSTBYNAME_R_5_ARG
651HAVE_GETHOSTBYNAME_R_6_ARG
652LIBOBJS
653TRUE
654MACHDEP_OBJS
655DYNLOADFILE
656DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700657DTRACE_OBJS
658DTRACE_HEADERS
659DFLAGS
660DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700661TCLTK_LIBS
662TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000663LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800664PKG_CONFIG_LIBDIR
665PKG_CONFIG_PATH
666PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400667TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000668SHLIBS
669CFLAGSFORSHARED
670LINKFORSHARED
671CCSHARED
672BLDSHARED
673LDCXXSHARED
674LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700675SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000676LIBTOOL_CRUFT
677OTHER_LIBTOOL_OPT
678UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100679LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700680CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000681BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200682CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000683OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700684LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700685LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700686LLVM_PROF_ERR
687LLVM_PROF_FILE
688LLVM_PROF_MERGER
689PGO_PROF_USE_FLAG
690PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200691LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200692LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700693PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700694DEF_MAKE_RULE
695DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000696ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000697LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100698MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000699INSTALL_DATA
700INSTALL_SCRIPT
701INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200702ac_ct_READELF
703READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000704ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200705ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000706AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000707GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200708EXPORTSFROM
709EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000710LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000711LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000712RUNSHARED
713INSTSONAME
714LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000715PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000716BLDLIBRARY
717DLLLIBRARY
718LDLIBRARY
719LIBRARY
720BUILDEXEEXT
Christian Heimes39258d32021-04-17 11:36:35 +0200721EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200722NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200723MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200724PLATFORM_TRIPLET
725MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200726ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000727MAINCC
728CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700729SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200730GREP
731CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000732OBJEXT
733EXEEXT
734ac_ct_CC
735CPPFLAGS
736LDFLAGS
737CFLAGS
738CC
739EXPORT_MACOSX_DEPLOYMENT_TARGET
740CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200741_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000742MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000743FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000744FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800745FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000746FRAMEWORKALTINSTALLLAST
747FRAMEWORKALTINSTALLFIRST
748FRAMEWORKINSTALLLAST
749FRAMEWORKINSTALLFIRST
750PYTHONFRAMEWORKINSTALLDIR
751PYTHONFRAMEWORKPREFIX
752PYTHONFRAMEWORKDIR
753PYTHONFRAMEWORKIDENTIFIER
754PYTHONFRAMEWORK
Ned Deily0cb33da2021-05-02 04:48:29 -0400755LIPO_INTEL64_FLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000756LIPO_32BIT_FLAGS
757ARCH_RUN_32BIT
758UNIVERSALSDK
759CONFIG_ARGS
760SOVERSION
761VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200762PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200763PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100764host_os
765host_vendor
766host_cpu
767host
768build_os
769build_vendor
770build_cpu
771build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500772HAS_GIT
773GITBRANCH
774GITTAG
775GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400776BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000777target_alias
778host_alias
779build_alias
780LIBS
781ECHO_T
782ECHO_N
783ECHO_C
784DEFS
785mandir
786localedir
787libdir
788psdir
789pdfdir
790dvidir
791htmldir
792infodir
793docdir
794oldincludedir
795includedir
796localstatedir
797sharedstatedir
798sysconfdir
799datadir
800datarootdir
801libexecdir
802sbindir
803bindir
804program_transform_name
805prefix
806exec_prefix
807PACKAGE_URL
808PACKAGE_BUGREPORT
809PACKAGE_STRING
810PACKAGE_VERSION
811PACKAGE_TARNAME
812PACKAGE_NAME
813PATH_SEPARATOR
814SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000815ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000816ac_user_opts='
817enable_option_checking
818enable_universalsdk
819with_universal_archs
820with_framework_name
821enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_cxx_main
823with_suffix
824enable_shared
825enable_profiling
826with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200827with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200828with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000829enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700830with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100831with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400832with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100833with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800834with_memory_sanitizer
835with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_libs
837with_system_expat
838with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100839with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100840with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000841enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700842with_tcltk_includes
843with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000845enable_ipv6
846with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000847with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000848with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700850with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000851with_libm
852with_libc
853enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100854with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100855with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100856with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000857with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800858with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100859with_openssl
Christian Heimes32eba612021-03-19 10:29:25 +0100860with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100861with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200862with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200863with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100864with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800865enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000866'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 ac_precious_vars='build_alias
868host_alias
869target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100870MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871CC
872CFLAGS
873LDFLAGS
874LIBS
875CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800876CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700877PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800878PKG_CONFIG
879PKG_CONFIG_PATH
880PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881
Guido van Rossum627b2d71993-12-24 10:39:16 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000884ac_init_help=
885ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000886ac_unrecognized_opts=
887ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888# The variables have the same names as the options, with
889# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000890cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893no_recursion=
894prefix=NONE
895program_prefix=NONE
896program_suffix=NONE
897program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902x_includes=NONE
903x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000904
905# Installation directory options.
906# These are left unexpanded so users can "make install exec_prefix=/foo"
907# and all the variables that are supposed to be based on exec_prefix
908# by default will actually change.
909# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911bindir='${exec_prefix}/bin'
912sbindir='${exec_prefix}/sbin'
913libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914datarootdir='${prefix}/share'
915datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916sysconfdir='${prefix}/etc'
917sharedstatedir='${prefix}/com'
918localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919includedir='${prefix}/include'
920oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
922infodir='${datarootdir}/info'
923htmldir='${docdir}'
924dvidir='${docdir}'
925pdfdir='${docdir}'
926psdir='${docdir}'
927libdir='${exec_prefix}/lib'
928localedir='${datarootdir}/locale'
929mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000934do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935 # If the previous option needs an argument, assign it.
936 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 ac_prev=
939 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000940 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200943 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
944 *=) ac_optarg= ;;
945 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
Christian Heimes39258d32021-04-17 11:36:35 +0200948 # Accept the important Cygnus configure options, so we can diagnose typos.
949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 case $ac_dashdash$ac_option in
951 --)
952 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 -bindir | --bindir | --bindi | --bind | --bin | --bi)
955 ac_prev=bindir ;;
956 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 -cache-file | --cache-file | --cache-fil | --cache-fi \
965 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
966 ac_prev=cache_file ;;
967 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
968 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 cache_file=$ac_optarg ;;
970
971 --config-cache | -C)
972 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
980 | --dataroo | --dataro | --datar)
981 ac_prev=datarootdir ;;
982 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
983 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
984 datarootdir=$ac_optarg ;;
985
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +0200990 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +0200992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 case $ac_user_opts in
994 *"
995"enable_$ac_useropt"
996"*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001
1002 -docdir | --docdir | --docdi | --doc | --do)
1003 ac_prev=docdir ;;
1004 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1005 docdir=$ac_optarg ;;
1006
1007 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1008 ac_prev=dvidir ;;
1009 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1010 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001013 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001015 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001016 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001017 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001018 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001019 case $ac_user_opts in
1020 *"
1021"enable_$ac_useropt"
1022"*) ;;
1023 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1024 ac_unrecognized_sep=', ';;
1025 esac
1026 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1029 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1030 | --exec | --exe | --ex)
1031 ac_prev=exec_prefix ;;
1032 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1033 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1034 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 # Obsolete; use --with-gas.
1039 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 -help | --help | --hel | --he | -h)
1042 ac_init_help=long ;;
1043 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1044 ac_init_help=recursive ;;
1045 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1046 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
1048 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1054 ac_prev=htmldir ;;
1055 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1056 | --ht=*)
1057 htmldir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -includedir | --includedir | --includedi | --included | --include \
1060 | --includ | --inclu | --incl | --inc)
1061 ac_prev=includedir ;;
1062 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1063 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -infodir | --infodir | --infodi | --infod | --info | --inf)
1067 ac_prev=infodir ;;
1068 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
1071 -libdir | --libdir | --libdi | --libd)
1072 ac_prev=libdir ;;
1073 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1077 | --libexe | --libex | --libe)
1078 ac_prev=libexecdir ;;
1079 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1080 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001083 -localedir | --localedir | --localedi | --localed | --locale)
1084 ac_prev=localedir ;;
1085 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1086 localedir=$ac_optarg ;;
1087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001089 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 ac_prev=localstatedir ;;
1091 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001092 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
1095 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1096 ac_prev=mandir ;;
1097 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 # Obsolete; use --without-fp.
1102 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 no_create=yes ;;
1107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1109 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1110 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1113 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1114 | --oldin | --oldi | --old | --ol | --o)
1115 ac_prev=oldincludedir ;;
1116 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1117 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1118 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1122 ac_prev=prefix ;;
1123 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1127 | --program-pre | --program-pr | --program-p)
1128 ac_prev=program_prefix ;;
1129 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1130 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1134 | --program-suf | --program-su | --program-s)
1135 ac_prev=program_suffix ;;
1136 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1137 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -program-transform-name | --program-transform-name \
1141 | --program-transform-nam | --program-transform-na \
1142 | --program-transform-n | --program-transform- \
1143 | --program-transform | --program-transfor \
1144 | --program-transfo | --program-transf \
1145 | --program-trans | --program-tran \
1146 | --progr-tra | --program-tr | --program-t)
1147 ac_prev=program_transform_name ;;
1148 -program-transform-name=* | --program-transform-name=* \
1149 | --program-transform-nam=* | --program-transform-na=* \
1150 | --program-transform-n=* | --program-transform-=* \
1151 | --program-transform=* | --program-transfor=* \
1152 | --program-transfo=* | --program-transf=* \
1153 | --program-trans=* | --program-tran=* \
1154 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001157 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1158 ac_prev=pdfdir ;;
1159 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1160 pdfdir=$ac_optarg ;;
1161
1162 -psdir | --psdir | --psdi | --psd | --ps)
1163 ac_prev=psdir ;;
1164 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1165 psdir=$ac_optarg ;;
1166
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1168 | -silent | --silent | --silen | --sile | --sil)
1169 silent=yes ;;
1170
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1172 ac_prev=sbindir ;;
1173 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1174 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
1177 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1178 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1179 | --sharedst | --shareds | --shared | --share | --shar \
1180 | --sha | --sh)
1181 ac_prev=sharedstatedir ;;
1182 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1183 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1184 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1185 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 -site | --site | --sit)
1189 ac_prev=site ;;
1190 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1194 ac_prev=srcdir ;;
1195 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001198 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1199 | --syscon | --sysco | --sysc | --sys | --sy)
1200 ac_prev=sysconfdir ;;
1201 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1202 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001204
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1211 verbose=yes ;;
1212
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 -version | --version | --versio | --versi | --vers | -V)
1214 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001236 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 ac_useropt_orig=$ac_useropt
Christian Heimes39258d32021-04-17 11:36:35 +02001238 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001239 case $ac_user_opts in
1240 *"
1241"with_$ac_useropt"
1242"*) ;;
1243 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1244 ac_unrecognized_sep=', ';;
1245 esac
1246 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248 --x)
1249 # Obsolete; use --with-x.
1250 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251
1252 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1253 | --x-incl | --x-inc | --x-in | --x-i)
1254 ac_prev=x_includes ;;
1255 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1256 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258
1259 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1260 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1261 ac_prev=x_libraries ;;
1262 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1263 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1267Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ;;
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 *=*)
1271 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1272 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 case $ac_envvar in #(
1274 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 export $ac_envvar ;;
1279
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001280 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 # FIXME: should be removed in autoconf 3.0.
Christian Heimes39258d32021-04-17 11:36:35 +02001282 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Christian Heimes39258d32021-04-17 11:36:35 +02001284 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001285 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286 ;;
1287
1288 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289done
1290
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001292 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001293 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294fi
1295
Matthias Kloseb9621712010-04-24 17:59:49 +00001296if test -n "$ac_unrecognized_opts"; then
1297 case $enable_option_checking in
1298 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001299 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Christian Heimes39258d32021-04-17 11:36:35 +02001300 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 esac
1302fi
1303
1304# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1306 datadir sysconfdir sharedstatedir localstatedir includedir \
1307 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimes39258d32021-04-17 11:36:35 +02001308 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001311 # Remove trailing slashes.
1312 case $ac_val in
1313 */ )
1314 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1315 eval $ac_var=\$ac_val;;
1316 esac
1317 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319 [\\/$]* | ?:[\\/]* ) continue;;
1320 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001322 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001323done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325# There might be people who depend on the old broken behavior: `$host'
1326# used to hold the argument of --host etc.
1327# FIXME: To remove some day.
1328build=$build_alias
1329host=$host_alias
1330target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331
Martin v. Löwis11437992002-04-12 09:54:03 +00001332# FIXME: To remove some day.
1333if test "x$host_alias" != x; then
1334 if test "x$build_alias" = x; then
1335 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001336 elif test "x$build_alias" != "x$host_alias"; then
1337 cross_compiling=yes
1338 fi
1339fi
1340
1341ac_tool_prefix=
1342test -n "$host_alias" && ac_tool_prefix=$host_alias-
1343
1344test "$silent" = yes && exec 6>/dev/null
1345
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347ac_pwd=`pwd` && test -n "$ac_pwd" &&
1348ac_ls_di=`ls -di .` &&
1349ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001350 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001352 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353
1354
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355# Find the source files, if location was not specified.
1356if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001357 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001359 ac_confdir=`$as_dirname -- "$as_myself" ||
1360$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1361 X"$as_myself" : 'X\(//\)[^/]' \| \
1362 X"$as_myself" : 'X\(//\)$' \| \
1363 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +02001364$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1366 s//\1/
1367 q
1368 }
1369 /^X\(\/\/\)[^/].*/{
1370 s//\1/
1371 q
1372 }
1373 /^X\(\/\/\)$/{
1374 s//\1/
1375 q
1376 }
1377 /^X\(\/\).*/{
1378 s//\1/
1379 q
1380 }
1381 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001382 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001384 srcdir=..
1385 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386else
1387 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001389if test ! -r "$srcdir/$ac_unique_file"; then
1390 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001391 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001393ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1394ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001395 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 pwd)`
1397# When building in place, set srcdir=.
1398if test "$ac_abs_confdir" = "$ac_pwd"; then
1399 srcdir=.
1400fi
1401# Remove unnecessary trailing slashes from srcdir.
1402# Double slashes in file names in object file debugging info
1403# mess up M-x gdb in Emacs.
1404case $srcdir in
1405*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1406esac
1407for ac_var in $ac_precious_vars; do
1408 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1409 eval ac_env_${ac_var}_value=\$${ac_var}
1410 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1411 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1412done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001413
Martin v. Löwis11437992002-04-12 09:54:03 +00001414#
1415# Report the --help message.
1416#
1417if test "$ac_init_help" = "long"; then
1418 # Omit some internal or obsolete options to make the list less imposing.
1419 # This message is too long to be a string in the A/UX 3.1 sh.
1420 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001421\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
1423Usage: $0 [OPTION]... [VAR=VALUE]...
1424
1425To assign environment variables (e.g., CC, CFLAGS...), specify them as
1426VAR=VALUE. See below for descriptions of some of the useful variables.
1427
1428Defaults for the options are specified in brackets.
1429
1430Configuration:
1431 -h, --help display this help and exit
1432 --help=short display options specific to this package
1433 --help=recursive display the short help of all the included packages
1434 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001435 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 --cache-file=FILE cache test results in FILE [disabled]
1437 -C, --config-cache alias for \`--cache-file=config.cache'
1438 -n, --no-create do not create output files
1439 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1440
Martin v. Löwis11437992002-04-12 09:54:03 +00001441Installation directories:
1442 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447By default, \`make install' will install all the files in
1448\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1449an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1450for instance \`--prefix=\$HOME'.
1451
1452For better control, use the options below.
1453
1454Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 --bindir=DIR user executables [EPREFIX/bin]
1456 --sbindir=DIR system admin executables [EPREFIX/sbin]
1457 --libexecdir=DIR program executables [EPREFIX/libexec]
1458 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1459 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1460 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1461 --libdir=DIR object code libraries [EPREFIX/lib]
1462 --includedir=DIR C header files [PREFIX/include]
1463 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1464 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1465 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1466 --infodir=DIR info documentation [DATAROOTDIR/info]
1467 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1468 --mandir=DIR man documentation [DATAROOTDIR/man]
1469 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1470 --htmldir=DIR html documentation [DOCDIR]
1471 --dvidir=DIR dvi documentation [DOCDIR]
1472 --pdfdir=DIR pdf documentation [DOCDIR]
1473 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001474_ACEOF
1475
1476 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001477
1478System types:
1479 --build=BUILD configure for building on BUILD [guessed]
1480 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001481_ACEOF
1482fi
1483
1484if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001485 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001486 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001487 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 cat <<\_ACEOF
1489
1490Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1493 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001494 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001495 create a universal binary build. SDKDIR specifies
1496 which macOS SDK should be used to perform the build,
1497 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001499 create a Python.framework rather than a traditional
1500 Unix install. optional INSTALLDIR specifies the
1501 installation path. see Mac/README.rst (default is
1502 no)
1503 --enable-shared enable building a shared Python library (default is
1504 no)
1505 --enable-profiling enable C-level code profiling with gprof (default is
1506 no)
1507 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1508 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001509 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001510 support loadable extensions in _sqlite module, see
1511 Doc/library/sqlite3.rst (default is no)
1512 --enable-ipv6 enable ipv6 (with ipv4) support, see
1513 Doc/library/socket.rst (default is yes if supported)
1514 --enable-big-digits[=15|30]
1515 use big digits (30 or 15 bits) for Python longs
1516 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001517 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001518
1519Optional Packages:
1520 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1521 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001522 --with-universal-archs=ARCH
Ned Deily0cb33da2021-05-02 04:48:29 -04001523 specify the kind of macOS universal binary that
1524 should be created. This option is only valid when
Anthony Shaw2de064e2020-01-14 17:40:10 +11001525 --enable-universalsdk is set; options are:
Ned Deily0cb33da2021-05-02 04:48:29 -04001526 ("universal2", "intel-64", "intel-32", "intel",
1527 "32-bit", "64-bit", "3-way", or "all") see
1528 Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001529 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001530 specify the name for the python framework on macOS
1531 only valid when --enable-framework is set. see
1532 Mac/README.rst (default is 'Python')
1533 --with-cxx-main[=COMPILER]
1534 compile main() and link Python executable with C++
1535 compiler specified in COMPILER (default is $CXX)
1536 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1537 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001538 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001539 (default is no)
1540 --with-assertions build with C assertions enabled (default is no)
1541 --with-lto enable Link-Time-Optimization in any build (default
1542 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001543 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001544 select hash algorithm for use in Python/pyhash.c
1545 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001546 --with-tzpath=<list of absolute paths separated by pathsep>
1547 Select the default time zone search path for zoneinfo.TZPATH
1548
Charles-François Natalid30b0222014-05-08 23:08:51 +01001549 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001550 enable AddressSanitizer memory error detector,
1551 'asan' (default is no)
1552 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1553 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001554 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001555 enable UndefinedBehaviorSanitizer undefined
1556 behaviour detector, 'ubsan' (default is no)
1557 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001558 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001559 library, see Doc/library/pyexpat.rst (default is no)
1560 --with-system-ffi build _ctypes module using an installed ffi library,
1561 see Doc/library/ctypes.rst (default is
1562 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001563 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001564 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001565 --with-decimal-contextvar
1566 build _decimal module using a coroutine-local rather
1567 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001568 --with-tcltk-includes='-I...'
1569 override search for Tcl and Tk include files
1570 --with-tcltk-libs='-L...'
1571 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001572 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001573 override order to check db backends for dbm; a valid
1574 value is a colon separated string with the backend
1575 names `ndbm', `gdbm' and `bdb'.
1576 --with-doc-strings enable documentation strings (default is yes)
1577 --with-pymalloc enable specialized mallocs (default is yes)
1578 --with-c-locale-coercion
1579 enable C locale coercion to a UTF-8 based locale
1580 (default is yes)
1581 --with-valgrind enable Valgrind support (default is no)
1582 --with-dtrace enable DTrace support (default is no)
1583 --with-libm=STRING override libm math library to STRING (default is
1584 system-dependent)
1585 --with-libc=STRING override libc C library to STRING (default is
1586 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001587 --with-platlibdir=DIRNAME
1588 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001589 --with-wheel-pkg-dir=PATH
1590 Directory of wheel packages used by ensurepip
1591 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001592 --with(out)-readline[=editline]
1593 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001594 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001595 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001596 --with-ensurepip[=install|upgrade|no]
1597 "install" or "upgrade" using bundled pip (default is
1598 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001599 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001600 --with-openssl-rpath=[DIR|auto|no]
1601 Set runtime library directory (rpath) for OpenSSL
1602 libraries, no (default): don't set rpath, auto:
1603 auto-detect rpath from --with-openssl and
1604 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001605 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001606 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001607 Python's preferred selection (default), openssl:
1608 leave OpenSSL's defaults untouched, STRING: use a
Christian Heimese9832522021-05-01 20:53:10 +02001609 custom string, python and STRING also set TLS 1.2 as
1610 minimum TLS version
Christian Heimes9b60e552020-05-15 23:54:53 +02001611 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1612 builtin hash modules, md5, sha1, sha256, sha512,
1613 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001614 --with-experimental-isolated-subinterpreters
1615 better isolate subinterpreters, experimental build
1616 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001617 --without-static-libpython
1618 do not build libpythonMAJOR.MINOR.a and do not
1619 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001620
1621Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001622 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 CC C compiler command
1624 CFLAGS C compiler flags
1625 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1626 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001628 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001631 PROFILE_TASK
1632 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001633 PKG_CONFIG path to pkg-config utility
1634 PKG_CONFIG_PATH
1635 directories to add to pkg-config's search path
1636 PKG_CONFIG_LIBDIR
1637 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001638
1639Use these variables to override the choices made by `configure' or to help
1640it to find libraries and programs with nonstandard names/locations.
1641
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001642Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001643_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001645fi
1646
1647if test "$ac_init_help" = "recursive"; then
1648 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001650 test -d "$ac_dir" ||
1651 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1652 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 ac_builddir=.
1654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655case "$ac_dir" in
1656.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1657*)
Christian Heimes39258d32021-04-17 11:36:35 +02001658 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes39258d32021-04-17 11:36:35 +02001660 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661 case $ac_top_builddir_sub in
1662 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1663 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1664 esac ;;
1665esac
1666ac_abs_top_builddir=$ac_pwd
1667ac_abs_builddir=$ac_pwd$ac_dir_suffix
1668# for backward compatibility:
1669ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001670
1671case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001674 ac_top_srcdir=$ac_top_builddir_sub
1675 ac_abs_top_srcdir=$ac_pwd ;;
1676 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001677 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001678 ac_top_srcdir=$srcdir
1679 ac_abs_top_srcdir=$srcdir ;;
1680 *) # Relative name.
1681 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1682 ac_top_srcdir=$ac_top_build_prefix$srcdir
1683 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001684esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001685ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687 cd "$ac_dir" || { ac_status=$?; continue; }
Christian Heimes39258d32021-04-17 11:36:35 +02001688 # Check for guested configure.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001689 if test -f "$ac_srcdir/configure.gnu"; then
1690 echo &&
1691 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1692 elif test -f "$ac_srcdir/configure"; then
1693 echo &&
1694 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001695 else
Christian Heimes39258d32021-04-17 11:36:35 +02001696 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697 fi || ac_status=$?
1698 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 done
1700fi
1701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001703if $ac_init_version; then
1704 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001705python configure 3.10
Christian Heimes39258d32021-04-17 11:36:35 +02001706generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001707
Christian Heimes39258d32021-04-17 11:36:35 +02001708Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001709This configure script is free software; the Free Software Foundation
1710gives unlimited permission to copy, distribute and modify it.
1711_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001712 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001714
1715## ------------------------ ##
1716## Autoconf initialization. ##
1717## ------------------------ ##
1718
1719# ac_fn_c_try_compile LINENO
1720# --------------------------
1721# Try to compile conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_compile ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001725 rm -f conftest.$ac_objext
Matthias Kloseb9621712010-04-24 17:59:49 +00001726 if { { ac_try="$ac_compile"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001732$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001733 (eval "$ac_compile") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 test $ac_status = 0; } && {
1742 test -z "$ac_c_werror_flag" ||
1743 test ! -s conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02001744 } && test -s conftest.$ac_objext; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001745 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001746else
1747 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750 ac_retval=1
1751fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001753 as_fn_set_status $ac_retval
1754
1755} # ac_fn_c_try_compile
1756
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001757# ac_fn_c_try_cpp LINENO
1758# ----------------------
1759# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_cpp ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1763 if { { ac_try="$ac_cpp conftest.$ac_ext"
1764case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001769$as_echo "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001770 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1771 ac_status=$?
1772 if test -s conftest.err; then
1773 grep -v '^ *+' conftest.err >conftest.er1
1774 cat conftest.er1 >&5
1775 mv -f conftest.er1 conftest.err
1776 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001778 test $ac_status = 0; } > conftest.i && {
1779 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1780 test ! -s conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02001781 }; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001782 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001783else
1784 $as_echo "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001785sed 's/^/| /' conftest.$ac_ext >&5
1786
1787 ac_retval=1
1788fi
1789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1790 as_fn_set_status $ac_retval
1791
1792} # ac_fn_c_try_cpp
1793
Matthias Kloseb9621712010-04-24 17:59:49 +00001794# ac_fn_c_try_link LINENO
1795# -----------------------
1796# Try to link conftest.$ac_ext, and return whether this succeeded.
1797ac_fn_c_try_link ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001800 rm -f conftest.$ac_objext conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001801 if { { ac_try="$ac_link"
1802case "(($ac_try" in
1803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1804 *) ac_try_echo=$ac_try;;
1805esac
1806eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001807$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 (eval "$ac_link") 2>conftest.err
1809 ac_status=$?
1810 if test -s conftest.err; then
1811 grep -v '^ *+' conftest.err >conftest.er1
1812 cat conftest.er1 >&5
1813 mv -f conftest.er1 conftest.err
1814 fi
Christian Heimes39258d32021-04-17 11:36:35 +02001815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 test $ac_status = 0; } && {
1817 test -z "$ac_c_werror_flag" ||
1818 test ! -s conftest.err
1819 } && test -s conftest$ac_exeext && {
1820 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001821 test -x conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02001822 }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001824else
1825 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001826sed 's/^/| /' conftest.$ac_ext >&5
1827
1828 ac_retval=1
1829fi
1830 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1831 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1832 # interfere with the next link command; also delete a directory that is
1833 # left behind by Apple's compiler. We do this before executing the actions.
1834 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001836 as_fn_set_status $ac_retval
1837
1838} # ac_fn_c_try_link
1839
Christian Heimes39258d32021-04-17 11:36:35 +02001840# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001841# -------------------------------------------------------
Christian Heimes39258d32021-04-17 11:36:35 +02001842# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1843# the include files in INCLUDES and setting the cache variable VAR
1844# accordingly.
1845ac_fn_c_check_header_mongrel ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001846{
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02001848 if eval \${$3+:} false; then :
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850$as_echo_n "checking for $2... " >&6; }
1851if eval \${$3+:} false; then :
1852 $as_echo_n "(cached) " >&6
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857else
1858 # Is the header compilable?
1859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1860$as_echo_n "checking $2 usability... " >&6; }
1861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001862/* end confdefs.h. */
1863$4
1864#include <$2>
1865_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02001866if ac_fn_c_try_compile "$LINENO"; then :
1867 ac_header_compiler=yes
1868else
1869 ac_header_compiler=no
Matthias Kloseb9621712010-04-24 17:59:49 +00001870fi
Christian Heimes39258d32021-04-17 11:36:35 +02001871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1873$as_echo "$ac_header_compiler" >&6; }
1874
1875# Is the header present?
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1877$as_echo_n "checking $2 presence... " >&6; }
1878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880#include <$2>
1881_ACEOF
1882if ac_fn_c_try_cpp "$LINENO"; then :
1883 ac_header_preproc=yes
1884else
1885 ac_header_preproc=no
1886fi
1887rm -f conftest.err conftest.i conftest.$ac_ext
1888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1889$as_echo "$ac_header_preproc" >&6; }
1890
1891# So? What about this header?
1892case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1893 yes:no: )
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1895$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1897$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1898 ;;
1899 no:yes:* )
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1901$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1903$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1905$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1907$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1909$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1910( $as_echo "## --------------------------------------- ##
1911## Report this to https://bugs.python.org/ ##
1912## --------------------------------------- ##"
1913 ) | sed "s/^/$as_me: WARNING: /" >&2
1914 ;;
1915esac
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1917$as_echo_n "checking for $2... " >&6; }
1918if eval \${$3+:} false; then :
1919 $as_echo_n "(cached) " >&6
1920else
1921 eval "$3=\$ac_header_compiler"
Matthias Kloseb9621712010-04-24 17:59:49 +00001922fi
1923eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02001924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
1926fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001928
Christian Heimes39258d32021-04-17 11:36:35 +02001929} # ac_fn_c_check_header_mongrel
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931# ac_fn_c_try_run LINENO
1932# ----------------------
Christian Heimes39258d32021-04-17 11:36:35 +02001933# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1934# that executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001935ac_fn_c_try_run ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 if { { ac_try="$ac_link"
1939case "(($ac_try" in
1940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941 *) ac_try_echo=$ac_try;;
1942esac
1943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001944$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001945 (eval "$ac_link") 2>&5
1946 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02001947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001948 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1949 { { case "(($ac_try" in
1950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951 *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02001954$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001955 (eval "$ac_try") 2>&5
1956 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02001957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; }; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02001960else
1961 $as_echo "$as_me: program exited with status $ac_status" >&5
1962 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001963sed 's/^/| /' conftest.$ac_ext >&5
1964
1965 ac_retval=$ac_status
1966fi
1967 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001969 as_fn_set_status $ac_retval
1970
1971} # ac_fn_c_try_run
1972
Christian Heimes39258d32021-04-17 11:36:35 +02001973# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1974# -------------------------------------------------------
1975# Tests whether HEADER exists and can be compiled using the include files in
1976# INCLUDES, setting the cache variable VAR accordingly.
1977ac_fn_c_check_header_compile ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1981$as_echo_n "checking for $2... " >&6; }
1982if eval \${$3+:} false; then :
1983 $as_echo_n "(cached) " >&6
1984else
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$4
1988#include <$2>
1989_ACEOF
1990if ac_fn_c_try_compile "$LINENO"; then :
1991 eval "$3=yes"
1992else
1993 eval "$3=no"
1994fi
1995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1996fi
1997eval ac_res=\$$3
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999$as_echo "$ac_res" >&6; }
2000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001
2002} # ac_fn_c_check_header_compile
2003
Matthias Kloseb9621712010-04-24 17:59:49 +00002004# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2005# -------------------------------------------
2006# Tests whether TYPE exists after having included INCLUDES, setting cache
2007# variable VAR accordingly.
2008ac_fn_c_check_type ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2012$as_echo_n "checking for $2... " >&6; }
2013if eval \${$3+:} false; then :
2014 $as_echo_n "(cached) " >&6
2015else
Matthias Kloseb9621712010-04-24 17:59:49 +00002016 eval "$3=no"
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
Christian Heimes39258d32021-04-17 11:36:35 +02002021main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002022{
2023if (sizeof ($2))
2024 return 0;
2025 ;
2026 return 0;
2027}
2028_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002029if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
Christian Heimes39258d32021-04-17 11:36:35 +02002034main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002035{
2036if (sizeof (($2)))
2037 return 0;
2038 ;
2039 return 0;
2040}
2041_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002042if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002043
Christian Heimes39258d32021-04-17 11:36:35 +02002044else
Matthias Kloseb9621712010-04-24 17:59:49 +00002045 eval "$3=yes"
2046fi
Christian Heimes39258d32021-04-17 11:36:35 +02002047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002048fi
Christian Heimes39258d32021-04-17 11:36:35 +02002049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002050fi
2051eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002054 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002055
2056} # ac_fn_c_check_type
2057
Matthias Kloseb9621712010-04-24 17:59:49 +00002058# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2059# --------------------------------------------
2060# Tries to find the compile-time value of EXPR in a program that includes
2061# INCLUDES, setting VAR accordingly. Returns whether the value could be
2062# computed
2063ac_fn_c_compute_int ()
2064{
2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066 if test "$cross_compiling" = yes; then
2067 # Depending upon the size, compute the lo and hi bounds.
2068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
Christian Heimes39258d32021-04-17 11:36:35 +02002072main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002073{
2074static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002082if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002083 ac_lo=0 ac_mid=0
2084 while :; do
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
2087$4
2088int
Christian Heimes39258d32021-04-17 11:36:35 +02002089main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002090{
2091static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002092test_array [0] = 0;
2093return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002099if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002100 ac_hi=$ac_mid; break
Christian Heimes39258d32021-04-17 11:36:35 +02002101else
Matthias Kloseb9621712010-04-24 17:59:49 +00002102 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2103 if test $ac_lo -le $ac_mid; then
2104 ac_lo= ac_hi=
2105 break
2106 fi
2107 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2108fi
Christian Heimes39258d32021-04-17 11:36:35 +02002109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002110 done
Christian Heimes39258d32021-04-17 11:36:35 +02002111else
Matthias Kloseb9621712010-04-24 17:59:49 +00002112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115int
Christian Heimes39258d32021-04-17 11:36:35 +02002116main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002117{
2118static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002119test_array [0] = 0;
2120return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002121
2122 ;
2123 return 0;
2124}
2125_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002126if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002127 ac_hi=-1 ac_mid=-1
2128 while :; do
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132int
Christian Heimes39258d32021-04-17 11:36:35 +02002133main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002134{
2135static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002136test_array [0] = 0;
2137return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002138
2139 ;
2140 return 0;
2141}
2142_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002143if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002144 ac_lo=$ac_mid; break
Christian Heimes39258d32021-04-17 11:36:35 +02002145else
Matthias Kloseb9621712010-04-24 17:59:49 +00002146 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2147 if test $ac_mid -le $ac_hi; then
2148 ac_lo= ac_hi=
2149 break
2150 fi
2151 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2152fi
Christian Heimes39258d32021-04-17 11:36:35 +02002153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002154 done
Christian Heimes39258d32021-04-17 11:36:35 +02002155else
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 ac_lo= ac_hi=
2157fi
Christian Heimes39258d32021-04-17 11:36:35 +02002158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002159fi
Christian Heimes39258d32021-04-17 11:36:35 +02002160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002161# Binary search between lo and hi bounds.
2162while test "x$ac_lo" != "x$ac_hi"; do
2163 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167int
Christian Heimes39258d32021-04-17 11:36:35 +02002168main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002169{
2170static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002171test_array [0] = 0;
2172return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002173
2174 ;
2175 return 0;
2176}
2177_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002178if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 ac_hi=$ac_mid
Christian Heimes39258d32021-04-17 11:36:35 +02002180else
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2182fi
Christian Heimes39258d32021-04-17 11:36:35 +02002183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002184done
2185case $ac_lo in #((
2186?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2187'') ac_retval=1 ;;
2188esac
2189 else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192$4
Christian Heimes39258d32021-04-17 11:36:35 +02002193static long int longval () { return $2; }
2194static unsigned long int ulongval () { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002195#include <stdio.h>
2196#include <stdlib.h>
2197int
Christian Heimes39258d32021-04-17 11:36:35 +02002198main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002199{
2200
2201 FILE *f = fopen ("conftest.val", "w");
2202 if (! f)
2203 return 1;
2204 if (($2) < 0)
2205 {
2206 long int i = longval ();
2207 if (i != ($2))
2208 return 1;
2209 fprintf (f, "%ld", i);
2210 }
2211 else
2212 {
2213 unsigned long int i = ulongval ();
2214 if (i != ($2))
2215 return 1;
2216 fprintf (f, "%lu", i);
2217 }
2218 /* Do not output a trailing newline, as this causes \r\n confusion
2219 on some platforms. */
2220 return ferror (f) || fclose (f) != 0;
2221
2222 ;
2223 return 0;
2224}
2225_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002226if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002227 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Christian Heimes39258d32021-04-17 11:36:35 +02002228else
Matthias Kloseb9621712010-04-24 17:59:49 +00002229 ac_retval=1
2230fi
2231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2232 conftest.$ac_objext conftest.beam conftest.$ac_ext
2233rm -f conftest.val
2234
2235 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002236 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002237 as_fn_set_status $ac_retval
2238
2239} # ac_fn_c_compute_int
2240
2241# ac_fn_c_check_func LINENO FUNC VAR
2242# ----------------------------------
2243# Tests whether FUNC exists, setting the cache variable VAR accordingly
2244ac_fn_c_check_func ()
2245{
2246 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2248$as_echo_n "checking for $2... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
Matthias Kloseb9621712010-04-24 17:59:49 +00002252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2256#define $2 innocuous_$2
2257
2258/* System header to define __stub macros and hopefully few prototypes,
Christian Heimes39258d32021-04-17 11:36:35 +02002259 which can conflict with char $2 (); below.
2260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2261 <limits.h> exists even on freestanding compilers. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002262
Christian Heimes39258d32021-04-17 11:36:35 +02002263#ifdef __STDC__
2264# include <limits.h>
2265#else
2266# include <assert.h>
2267#endif
2268
Matthias Kloseb9621712010-04-24 17:59:49 +00002269#undef $2
2270
2271/* Override any GCC internal prototype to avoid an error.
2272 Use char because int might match the return type of a GCC
2273 builtin and then its argument prototype would still apply. */
2274#ifdef __cplusplus
2275extern "C"
2276#endif
2277char $2 ();
2278/* The GNU C library defines this for functions which it implements
2279 to always fail with ENOSYS. Some functions are actually named
2280 something starting with __ and the normal name is an alias. */
2281#if defined __stub_$2 || defined __stub___$2
2282choke me
2283#endif
2284
2285int
Christian Heimes39258d32021-04-17 11:36:35 +02002286main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002287{
2288return $2 ();
2289 ;
2290 return 0;
2291}
2292_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002293if ac_fn_c_try_link "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 eval "$3=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002295else
Matthias Kloseb9621712010-04-24 17:59:49 +00002296 eval "$3=no"
2297fi
Christian Heimes39258d32021-04-17 11:36:35 +02002298rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 conftest$ac_exeext conftest.$ac_ext
2300fi
2301eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002304 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002305
2306} # ac_fn_c_check_func
2307
Christian Heimes39258d32021-04-17 11:36:35 +02002308# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2309# ---------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002310# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Christian Heimes39258d32021-04-17 11:36:35 +02002311# accordingly.
2312ac_fn_c_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 as_decl_name=`echo $2|sed 's/ *(.*//'`
2316 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Christian Heimes39258d32021-04-17 11:36:35 +02002317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2318$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2319if eval \${$3+:} false; then :
2320 $as_echo_n "(cached) " >&6
2321else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$4
2325int
Christian Heimes39258d32021-04-17 11:36:35 +02002326main ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002327{
2328#ifndef $as_decl_name
2329#ifdef __cplusplus
2330 (void) $as_decl_use;
2331#else
2332 (void) $as_decl_name;
2333#endif
2334#endif
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002340if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002341 eval "$3=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002342else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002343 eval "$3=no"
2344fi
Christian Heimes39258d32021-04-17 11:36:35 +02002345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002346fi
2347eval ac_res=\$$3
Christian Heimes39258d32021-04-17 11:36:35 +02002348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2351
Christian Heimes39258d32021-04-17 11:36:35 +02002352} # ac_fn_c_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002353
Matthias Kloseb9621712010-04-24 17:59:49 +00002354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +02002361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
2363if eval \${$4+:} false; then :
2364 $as_echo_n "(cached) " >&6
2365else
Matthias Kloseb9621712010-04-24 17:59:49 +00002366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
Christian Heimes39258d32021-04-17 11:36:35 +02002370main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002379if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 eval "$4=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002381else
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
Christian Heimes39258d32021-04-17 11:36:35 +02002386main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02002395if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002396 eval "$4=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02002397else
Matthias Kloseb9621712010-04-24 17:59:49 +00002398 eval "$4=no"
2399fi
Christian Heimes39258d32021-04-17 11:36:35 +02002400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002401fi
Christian Heimes39258d32021-04-17 11:36:35 +02002402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002403fi
2404eval ac_res=\$$4
Christian Heimes39258d32021-04-17 11:36:35 +02002405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002408
2409} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002411This file contains any messages produced by compilers while
2412running configure, to aid debugging if configure makes a mistake.
2413
Pablo Galindod4fe0982020-05-19 03:33:01 +01002414It was created by python $as_me 3.10, which was
Christian Heimes39258d32021-04-17 11:36:35 +02002415generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
Christian Heimes39258d32021-04-17 11:36:35 +02002417 $ $0 $@
Martin v. Löwis11437992002-04-12 09:54:03 +00002418
2419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002421{
2422cat <<_ASUNAME
2423## --------- ##
2424## Platform. ##
2425## --------- ##
2426
2427hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431uname -v = `(uname -v) 2>/dev/null || echo unknown`
2432
2433/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2435
2436/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2437/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2438/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002440/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2441/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2442/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2443
2444_ASUNAME
2445
2446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447for as_dir in $PATH
2448do
2449 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002450 test -z "$as_dir" && as_dir=.
2451 $as_echo "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455} >&5
2456
2457cat >&5 <<_ACEOF
2458
2459
2460## ----------- ##
2461## Core tests. ##
2462## ----------- ##
2463
2464_ACEOF
2465
2466
2467# Keep a trace of the command line.
2468# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002471# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002472ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_configure_args0=
2474ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002475ac_must_keep_next=false
2476for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002477do
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 for ac_arg
2479 do
2480 case $ac_arg in
2481 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483 | -silent | --silent | --silen | --sile | --sil)
2484 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 *\'*)
Christian Heimes39258d32021-04-17 11:36:35 +02002486 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 esac
2488 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 case $ac_arg in
2496 *=* | --config-cache | -C | -disable-* | --disable-* \
2497 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499 | -with-* | --with-* | -without-* | --without-* | --x)
2500 case "$ac_configure_args0 " in
2501 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2502 esac
2503 ;;
2504 -* ) ac_must_keep_next=true ;;
2505 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 ;;
2509 esac
2510 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002511done
Matthias Kloseb9621712010-04-24 17:59:49 +00002512{ ac_configure_args0=; unset ac_configure_args0;}
2513{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002514
2515# When interrupted or exit'd, cleanup temporary files, and complete
2516# config.log. We remove comments because anyway the quotes in there
2517# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518# WARNING: Use '\'' to represent an apostrophe within the trap.
2519# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002520trap 'exit_status=$?
2521 # Save into config.log some information that might help in debugging.
2522 {
2523 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002524
Christian Heimes39258d32021-04-17 11:36:35 +02002525 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530(
2531 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532 eval ac_val=\$$ac_var
2533 case $ac_val in #(
2534 *${as_nl}*)
2535 case $ac_var in #(
Christian Heimes39258d32021-04-17 11:36:35 +02002536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac
2539 case $ac_var in #(
2540 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac ;;
2544 esac
2545 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 "s/'\''/'\''\\\\'\'''\''/g;
2551 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2552 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002555 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac |
2557 sort
2558)
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002560
Christian Heimes39258d32021-04-17 11:36:35 +02002561 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002562## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 echo
2565 for ac_var in $ac_subst_vars
2566 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 eval ac_val=\$$ac_var
2568 case $ac_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 esac
Christian Heimes39258d32021-04-17 11:36:35 +02002571 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 done | sort
2573 echo
2574
2575 if test -n "$ac_subst_files"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002576 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 echo
2580 for ac_var in $ac_subst_files
2581 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 eval ac_val=\$$ac_var
2583 case $ac_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 esac
Christian Heimes39258d32021-04-17 11:36:35 +02002586 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 done | sort
2588 echo
2589 fi
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 if test -s confdefs.h; then
Christian Heimes39258d32021-04-17 11:36:35 +02002592 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002593## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
2598 fi
2599 test "$ac_signal" != 0 &&
Christian Heimes39258d32021-04-17 11:36:35 +02002600 $as_echo "$as_me: caught signal $ac_signal"
2601 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 rm -f core *.core core.conftest.* &&
2604 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002607for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002609done
2610ac_signal=0
2611
2612# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
Christian Heimes39258d32021-04-17 11:36:35 +02002615$as_echo "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617# Predefined preprocessor variables.
2618
Christian Heimes39258d32021-04-17 11:36:35 +02002619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_NAME "$PACKAGE_NAME"
2621_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002622
Christian Heimes39258d32021-04-17 11:36:35 +02002623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2625_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
Christian Heimes39258d32021-04-17 11:36:35 +02002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_VERSION "$PACKAGE_VERSION"
2629_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002630
Christian Heimes39258d32021-04-17 11:36:35 +02002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_STRING "$PACKAGE_STRING"
2633_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
Christian Heimes39258d32021-04-17 11:36:35 +02002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2637_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002638
Christian Heimes39258d32021-04-17 11:36:35 +02002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_URL "$PACKAGE_URL"
2641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00002642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643
2644# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002645# Prefer an explicitly selected file to automatically selected ones.
Christian Heimes39258d32021-04-17 11:36:35 +02002646ac_site_file1=NONE
2647ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648if test -n "$CONFIG_SITE"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002649 # We do not want a PATH search for config.site.
2650 case $CONFIG_SITE in #((
2651 -*) ac_site_file1=./$CONFIG_SITE;;
2652 */*) ac_site_file1=$CONFIG_SITE;;
2653 *) ac_site_file1=./$CONFIG_SITE;;
2654 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655elif test "x$prefix" != xNONE; then
Christian Heimes39258d32021-04-17 11:36:35 +02002656 ac_site_file1=$prefix/share/config.site
2657 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658else
Christian Heimes39258d32021-04-17 11:36:35 +02002659 ac_site_file1=$ac_default_prefix/share/config.site
2660 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661fi
Christian Heimes39258d32021-04-17 11:36:35 +02002662for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663do
Christian Heimes39258d32021-04-17 11:36:35 +02002664 test "x$ac_site_file" = xNONE && continue
2665 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002669 . "$ac_site_file" \
Christian Heimes39258d32021-04-17 11:36:35 +02002670 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002672as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002673See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674 fi
2675done
2676
2677if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 # Some versions of bash will fail to source /dev/null (special files
2679 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2680 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002681 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 esac
2687 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688else
Christian Heimes39258d32021-04-17 11:36:35 +02002689 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 >$cache_file
2692fi
2693
2694# Check that the precious variables saved in the cache have kept the same
2695# value.
2696ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $ac_old_set,$ac_new_set in
2703 set,)
Christian Heimes39258d32021-04-17 11:36:35 +02002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 ac_cache_corrupted=: ;;
2707 ,set)
Christian Heimes39258d32021-04-17 11:36:35 +02002708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 ac_cache_corrupted=: ;;
2711 ,);;
2712 *)
2713 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 # differences in whitespace do not lead to failure.
2715 ac_old_val_w=`echo x $ac_old_val`
2716 ac_new_val_w=`echo x $ac_new_val`
2717 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 ac_cache_corrupted=:
2721 else
Christian Heimes39258d32021-04-17 11:36:35 +02002722 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002724 eval $ac_var=\$ac_old_val
2725 fi
Christian Heimes39258d32021-04-17 11:36:35 +02002726 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2727$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2729$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 fi;;
2731 esac
2732 # Pass precious variables to config.status.
2733 if test "$ac_new_set" = set; then
2734 case $ac_new_val in
Christian Heimes39258d32021-04-17 11:36:35 +02002735 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 *) ac_arg=$ac_var=$ac_new_val ;;
2737 esac
2738 case " $ac_configure_args " in
2739 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 esac
2742 fi
2743done
2744if $ac_cache_corrupted; then
Christian Heimes39258d32021-04-17 11:36:35 +02002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2749 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002751## -------------------- ##
2752## Main body of script. ##
2753## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754
Guido van Rossum7f43da71994-08-01 12:15:30 +00002755ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761
Michael W. Hudson54241132001-12-07 15:38:26 +00002762
Trent Nelson4d4ec652012-10-16 08:51:24 -04002763
Christian Heimesff5be6e2018-01-20 13:19:21 +01002764
2765
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002766if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002767 # If we're building out-of-tree, we need to make sure the following
2768 # resources get picked up before their $srcdir counterparts.
2769 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01002770 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002771 # Python/ -> importlib.h
2772 # (A side effect of this is that these resources will automatically be
2773 # regenerated when building out-of-tree, regardless of whether or not
2774 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2775 # off.)
2776 BASECPPFLAGS="-IObjects -IInclude -IPython"
2777else
2778 BASECPPFLAGS=""
2779fi
2780
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781
2782
2783
2784
Victor Stinner9ed34a82017-05-02 22:35:58 +02002785if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002786then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002787# Extract the first word of "git", so it can be a program name with args.
2788set dummy git; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02002789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2790$as_echo_n "checking for $ac_word... " >&6; }
2791if ${ac_cv_prog_HAS_GIT+:} false; then :
2792 $as_echo_n "(cached) " >&6
2793else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002794 if test -n "$HAS_GIT"; then
2795 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796else
2797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2798for as_dir in $PATH
2799do
2800 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002801 test -z "$as_dir" && as_dir=.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02002803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002804 ac_cv_prog_HAS_GIT="found"
Christian Heimes39258d32021-04-17 11:36:35 +02002805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002806 break 2
2807 fi
2808done
2809 done
2810IFS=$as_save_IFS
2811
Ned Deily5c4b0d02017-03-04 00:19:55 -05002812 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002813fi
2814fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002815HAS_GIT=$ac_cv_prog_HAS_GIT
2816if test -n "$HAS_GIT"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2818$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002819else
Christian Heimes39258d32021-04-17 11:36:35 +02002820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821$as_echo "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002822fi
2823
2824
2825else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002826HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002828if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002829then
Xiang Zhang4c855572018-08-20 22:36:19 +08002830 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2831 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2832 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002833else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002834 GITVERSION=""
2835 GITTAG=""
2836 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002837fi
2838
2839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002841
2842
Christian Heimes39258d32021-04-17 11:36:35 +02002843ac_aux_dir=
2844for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2845 if test -f "$ac_dir/install-sh"; then
2846 ac_aux_dir=$ac_dir
2847 ac_install_sh="$ac_aux_dir/install-sh -c"
2848 break
2849 elif test -f "$ac_dir/install.sh"; then
2850 ac_aux_dir=$ac_dir
2851 ac_install_sh="$ac_aux_dir/install.sh -c"
2852 break
2853 elif test -f "$ac_dir/shtool"; then
2854 ac_aux_dir=$ac_dir
2855 ac_install_sh="$ac_aux_dir/shtool install -c"
2856 break
2857 fi
2858done
2859if test -z "$ac_aux_dir"; then
2860 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2861fi
2862
2863# These three variables are undocumented and unsupported,
2864# and are intended to be withdrawn in a future Autoconf release.
2865# They can cause serious problems if a builder's source tree is in a directory
2866# whose full name contains unusual characters.
2867ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2868ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2869ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002870
2871
Christian Heimes39258d32021-04-17 11:36:35 +02002872# Make sure we can run config.sub.
2873$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2874 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002875
Christian Heimes39258d32021-04-17 11:36:35 +02002876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2877$as_echo_n "checking build system type... " >&6; }
2878if ${ac_cv_build+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002881 ac_build_alias=$build_alias
2882test "x$ac_build_alias" = x &&
Christian Heimes39258d32021-04-17 11:36:35 +02002883 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002884test "x$ac_build_alias" = x &&
2885 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Christian Heimes39258d32021-04-17 11:36:35 +02002886ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2887 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002888
2889fi
Christian Heimes39258d32021-04-17 11:36:35 +02002890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2891$as_echo "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002892case $ac_cv_build in
2893*-*-*) ;;
2894*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2895esac
2896build=$ac_cv_build
2897ac_save_IFS=$IFS; IFS='-'
2898set x $ac_cv_build
2899shift
2900build_cpu=$1
2901build_vendor=$2
2902shift; shift
2903# Remember, the first character of IFS is used to create $*,
2904# except with old shells:
2905build_os=$*
2906IFS=$ac_save_IFS
2907case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2908
2909
Christian Heimes39258d32021-04-17 11:36:35 +02002910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2911$as_echo_n "checking host system type... " >&6; }
2912if ${ac_cv_host+:} false; then :
2913 $as_echo_n "(cached) " >&6
2914else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002915 if test "x$host_alias" = x; then
2916 ac_cv_host=$ac_cv_build
2917else
Christian Heimes39258d32021-04-17 11:36:35 +02002918 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2919 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002920fi
2921
2922fi
Christian Heimes39258d32021-04-17 11:36:35 +02002923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2924$as_echo "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002925case $ac_cv_host in
2926*-*-*) ;;
2927*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2928esac
2929host=$ac_cv_host
2930ac_save_IFS=$IFS; IFS='-'
2931set x $ac_cv_host
2932shift
2933host_cpu=$1
2934host_vendor=$2
2935shift; shift
2936# Remember, the first character of IFS is used to create $*,
2937# except with old shells:
2938host_os=$*
2939IFS=$ac_save_IFS
2940case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2941
2942
2943
doko@python.orga10e4a92013-01-25 18:45:12 +01002944
2945
Ned Deilyfcbc2462014-08-22 13:32:49 -07002946# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2947rm -f pybuilddir.txt
2948
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002949for ac_prog in python$PACKAGE_VERSION python3 python
2950do
2951 # Extract the first word of "$ac_prog", so it can be a program name with args.
2952set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02002953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2954$as_echo_n "checking for $ac_word... " >&6; }
2955if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2956 $as_echo_n "(cached) " >&6
2957else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002958 if test -n "$PYTHON_FOR_REGEN"; then
2959 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002960else
2961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2962for as_dir in $PATH
2963do
2964 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02002965 test -z "$as_dir" && as_dir=.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002966 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02002967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002968 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02002969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002970 break 2
2971 fi
2972done
2973 done
2974IFS=$as_save_IFS
2975
2976fi
2977fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002978PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2979if test -n "$PYTHON_FOR_REGEN"; then
Christian Heimes39258d32021-04-17 11:36:35 +02002980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2981$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002982else
Christian Heimes39258d32021-04-17 11:36:35 +02002983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2984$as_echo "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002985fi
2986
2987
Victor Stinnera5c62a82017-05-03 18:21:48 +02002988 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002989done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002990test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002991
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002992
2993
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002994if test "$cross_compiling" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02002995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2996$as_echo_n "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002997 if test -z "$PYTHON_FOR_BUILD"; then
2998 for interp in python$PACKAGE_VERSION python3 python; do
2999 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003000 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003001 break
3002 fi
3003 interp=
3004 done
3005 if test x$interp = x; then
3006 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3007 fi
Christian Heimes39258d32021-04-17 11:36:35 +02003008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3009$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003010 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003011 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003012elif test "$cross_compiling" = maybe; then
3013 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003014else
3015 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3016fi
3017
3018
Martin v. Löwis11437992002-04-12 09:54:03 +00003019
Benjamin Petersond23f8222009-04-05 19:13:16 +00003020if test "$prefix" != "/"; then
3021 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3022fi
3023
3024
Martin v. Löwis11437992002-04-12 09:54:03 +00003025
3026
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003027# We don't use PACKAGE_ variables, and they cause conflicts
3028# with other autoconf-based packages that include Python.h
3029grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3030rm confdefs.h
3031mv confdefs.h.new confdefs.h
3032
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003033
Pablo Galindod4fe0982020-05-19 03:33:01 +01003034VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003035
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003036# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003037
3038SOVERSION=1.0
3039
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003040# The later defininition of _XOPEN_SOURCE disables certain features
3041# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3042
Christian Heimes39258d32021-04-17 11:36:35 +02003043$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003044
3045
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003046# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3047# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3048# them.
3049
Christian Heimes39258d32021-04-17 11:36:35 +02003050$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003051
3052
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003053# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3054# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3055# them.
3056
Christian Heimes39258d32021-04-17 11:36:35 +02003057$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003058
3059
Martin v. Löwisd6320502004-08-12 13:45:08 +00003060# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003061# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3062# them.
3063
Christian Heimes39258d32021-04-17 11:36:35 +02003064$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003065
3066
3067
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003068define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003069
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003070# Arguments passed to configure.
3071
3072CONFIG_ARGS="$ac_configure_args"
3073
Christian Heimes39258d32021-04-17 11:36:35 +02003074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3075$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076# Check whether --enable-universalsdk was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003077if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079 case $enableval in
3080 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003081 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003082 # information
3083 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003084 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003086 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3087 if test ! -d "${enableval}"
3088 then
3089 enableval=/
3090 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092 ;;
3093 esac
3094 case $enableval in
3095 no)
3096 UNIVERSALSDK=
3097 enable_universalsdk=
3098 ;;
3099 *)
3100 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003101 if test ! -d "${UNIVERSALSDK}"
3102 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003103 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003104 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003105 ;;
3106 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003107
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003108
Christian Heimes39258d32021-04-17 11:36:35 +02003109else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110
3111 UNIVERSALSDK=
3112 enable_universalsdk=
3113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003116if test -n "${UNIVERSALSDK}"
3117then
Christian Heimes39258d32021-04-17 11:36:35 +02003118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3119$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003120else
Christian Heimes39258d32021-04-17 11:36:35 +02003121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003123fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003126
Ned Deily87adb6e2013-10-18 21:09:56 -07003127ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003128
Ned Deilycbfb9a52012-06-23 16:02:19 -07003129# For backward compatibility reasons we prefer to select '32-bit' if available,
3130# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003132if test "`uname -s`" = "Darwin"
3133then
3134 if test -n "${UNIVERSALSDK}"
3135 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003136 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003137 then
3138 UNIVERSAL_ARCHS="intel"
3139 fi
3140 fi
3141fi
3142
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003143
Ned Deily0cb33da2021-05-02 04:48:29 -04003144
Christian Heimes39258d32021-04-17 11:36:35 +02003145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3146$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147
3148# Check whether --with-universal-archs was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003149if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003151 UNIVERSAL_ARCHS="$withval"
3152
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153fi
3154
Ned Deily87adb6e2013-10-18 21:09:56 -07003155if test -n "${UNIVERSALSDK}"
3156then
Christian Heimes39258d32021-04-17 11:36:35 +02003157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3158$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003159else
Christian Heimes39258d32021-04-17 11:36:35 +02003160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3161$as_echo "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003162fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003163
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003164
3165# Check whether --with-framework-name was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003166if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003167 withval=$with_framework_name;
3168 PYTHONFRAMEWORK=${withval}
3169 PYTHONFRAMEWORKDIR=${withval}.framework
3170 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3171
Christian Heimes39258d32021-04-17 11:36:35 +02003172else
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003173
3174 PYTHONFRAMEWORK=Python
3175 PYTHONFRAMEWORKDIR=Python.framework
3176 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3177
3178fi
3179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180# Check whether --enable-framework was given.
Christian Heimes39258d32021-04-17 11:36:35 +02003181if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003183 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003184 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003185 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 esac
3187 case $enableval in
3188 no)
3189 PYTHONFRAMEWORK=
3190 PYTHONFRAMEWORKDIR=no-framework
3191 PYTHONFRAMEWORKPREFIX=
3192 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193 FRAMEWORKINSTALLFIRST=
3194 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 FRAMEWORKALTINSTALLFIRST=
3196 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003197 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003198 if test "x${prefix}" = "xNONE"; then
3199 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3200 else
3201 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3202 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003204 ;;
3205 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003206 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003207 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003209 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003210 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3211 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003212 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 if test "x${prefix}" = "xNONE" ; then
3216 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003217
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003218 else
3219 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3220 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003221
3222 case "${enableval}" in
3223 /System*)
3224 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3225 if test "${prefix}" = "NONE" ; then
3226 # See below
3227 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3228 fi
3229 ;;
3230
3231 /Library*)
3232 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3233 ;;
3234
3235 */Library/Frameworks)
3236 MDIR="`dirname "${enableval}"`"
3237 MDIR="`dirname "${MDIR}"`"
3238 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3239
3240 if test "${prefix}" = "NONE"; then
3241 # User hasn't specified the
3242 # --prefix option, but wants to install
3243 # the framework in a non-default location,
3244 # ensure that the compatibility links get
3245 # installed relative to that prefix as well
3246 # instead of in /usr/local.
3247 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3248 fi
3249 ;;
3250
3251 *)
3252 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3253 ;;
3254 esac
3255
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003258 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003263
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003264 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3265
3266 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3267
Jack Jansene578a632001-08-15 01:27:14 +00003268 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003269
Christian Heimes39258d32021-04-17 11:36:35 +02003270else
Martin v. Löwis11437992002-04-12 09:54:03 +00003271
Jack Jansene578a632001-08-15 01:27:14 +00003272 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003273 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003274 PYTHONFRAMEWORKPREFIX=
3275 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003276 FRAMEWORKINSTALLFIRST=
3277 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003278 FRAMEWORKALTINSTALLFIRST=
3279 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003280 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003281 if test "x${prefix}" = "xNONE" ; then
3282 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3283 else
3284 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3285 fi
Jack Jansene578a632001-08-15 01:27:14 +00003286 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289fi
3290
Thomas Wouters477c8d52006-05-27 19:21:47 +00003291
3292
Michael W. Hudson54241132001-12-07 15:38:26 +00003293
3294
3295
3296
Jack Jansene578a632001-08-15 01:27:14 +00003297
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003298
3299
3300
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003301
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003302
Ned Deilyb8f944f2013-11-21 22:42:25 -08003303
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003304
Christian Heimes39258d32021-04-17 11:36:35 +02003305cat >>confdefs.h <<_ACEOF
3306#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
3307_ACEOF
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003308
3309
Jack Jansene578a632001-08-15 01:27:14 +00003310##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003311## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003312## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003313##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003314# Set name for machine-dependent library files
3315
Christian Heimes39258d32021-04-17 11:36:35 +02003316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3317$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318if test -z "$MACHDEP"
3319then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 # avoid using uname for cross builds
3321 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003322 # ac_sys_system and ac_sys_release are used for setting
3323 # a lot of different things including 'define_xopen_source'
3324 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003325 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003326 *-*-linux-android*)
3327 ac_sys_system=Linux-android
3328 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 *-*-linux*)
3330 ac_sys_system=Linux
3331 ;;
3332 *-*-cygwin*)
3333 ac_sys_system=Cygwin
3334 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003335 *-*-vxworks*)
3336 ac_sys_system=VxWorks
3337 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003338 *)
3339 # for now, limit cross builds to known configurations
3340 MACHDEP="unknown"
3341 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3342 esac
3343 ac_sys_release=
3344 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003345 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003346 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003347 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003348 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003349 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003350 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003351 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003352 fi
3353 ac_md_system=`echo $ac_sys_system |
3354 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3355 ac_md_release=`echo $ac_sys_release |
3356 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3357 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003358
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003359 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003360 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003361 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003362 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003363 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003364 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003365 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003366fi
Christian Heimes39258d32021-04-17 11:36:35 +02003367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3368$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003369
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003370
3371if test "$cross_compiling" = yes; then
3372 case "$host" in
3373 *-*-linux*)
3374 case "$host_cpu" in
3375 arm*)
3376 _host_cpu=arm
3377 ;;
3378 *)
3379 _host_cpu=$host_cpu
3380 esac
3381 ;;
3382 *-*-cygwin*)
3383 _host_cpu=
3384 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003385 *-*-vxworks*)
3386 _host_cpu=$host_cpu
3387 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003388 *)
3389 # for now, limit cross builds to known configurations
3390 MACHDEP="unknown"
3391 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3392 esac
3393 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3394fi
3395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3397# disable features if it is defined, without any means to access these
3398# features as extensions. For these systems, we skip the definition of
3399# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3400# some feature, make sure there is no alternative way to access this
3401# feature. Also, when using wildcards, make sure you have verified the
3402# need for not defining _XOPEN_SOURCE on all systems matching the
3403# wildcard, and that the wildcard does not include future systems
3404# (which may remove their limitations).
3405case $ac_sys_system/$ac_sys_release in
3406 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3407 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003408 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003409 # In addition, Stefan Krah confirms that issue #1244610 exists through
3410 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003411 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003412 define_xopen_source=no
3413 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3414 # also defined. This can be overridden by defining _BSD_SOURCE
3415 # As this has a different meaning on Linux, only define it on OpenBSD
3416
Christian Heimes39258d32021-04-17 11:36:35 +02003417$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003418
3419 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003420 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003421 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3422 # also defined. This can be overridden by defining _BSD_SOURCE
3423 # As this has a different meaning on Linux, only define it on OpenBSD
3424
Christian Heimes39258d32021-04-17 11:36:35 +02003425$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003426
3427 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003428 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3429 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3430 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003431 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003432 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003433 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3434 # request to enable features supported by the standard as a request
3435 # to disable features not supported by the standard. The best way
3436 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3437 # entirely and define __EXTENSIONS__ instead.
3438 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003439 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003440 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3441 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003442 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003443 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003444 define_xopen_source=no;;
3445 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003446 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003447 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003448 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003449 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3450 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3451 # identifies itself as Darwin/7.*
3452 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3453 # disables platform specific features beyond repair.
3454 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3455 # has no effect, don't bother defining them
3456 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003457 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003458 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003459 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003460 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3461 # defining NI_NUMERICHOST.
3462 QNX/6.3.2)
3463 define_xopen_source=no
3464 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003465 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3466 # in network headers still using system V types.
3467 VxWorks/*)
3468 define_xopen_source=no
3469 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003470
Ian Nortona9edf442020-02-14 03:09:11 +00003471 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3472 # chroot() and other functions
3473 hp*|HP*)
3474 define_xopen_source=no
3475 ;;
3476
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003477esac
3478
3479if test $define_xopen_source = yes
3480then
Victor Stinner14d098d2011-09-07 22:29:43 +02003481 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003482
Christian Heimes39258d32021-04-17 11:36:35 +02003483$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003484
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003485
3486 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3487 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3488 # several APIs are not declared. Since this is also needed in some
3489 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003490
Christian Heimes39258d32021-04-17 11:36:35 +02003491$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003492
3493
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003494
Christian Heimes39258d32021-04-17 11:36:35 +02003495$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003496
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003497fi
3498
Christian Heimes647cd872013-12-07 23:39:33 +01003499# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3500case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003501 hp*|HP*)
3502 define_stdc_a1=yes;;
3503 *)
3504 define_stdc_a1=no;;
3505esac
3506
3507if test $define_stdc_a1 = yes
3508then
Christian Heimes647cd872013-12-07 23:39:33 +01003509
Christian Heimes39258d32021-04-17 11:36:35 +02003510$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003511
Christian Heimesb02bcae2013-12-08 15:21:08 +01003512fi
Christian Heimes647cd872013-12-07 23:39:33 +01003513
Jack Jansen6b08a402004-06-03 12:41:45 +00003514# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3515# it may influence the way we can build extensions, so distutils
3516# needs to check it
3517
Thomas Wouters477c8d52006-05-27 19:21:47 +00003518
Jack Jansen6b08a402004-06-03 12:41:45 +00003519CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003520EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003521
Guido van Rossum627b2d71993-12-24 10:39:16 +00003522# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003523
3524# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3525# for debug/optimization stuff. BASECFLAGS is for flags that are required
3526# just to get things to compile and link. Users are free to override OPT
3527# when running configure or make. The build should not break if they do.
3528# BASECFLAGS should generally not be messed with, however.
3529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003547 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003557 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003558 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003559 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003560 fi
3561 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003562 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003563 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003564 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
Christian Heimes39258d32021-04-17 11:36:35 +02003574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
Christian Heimes39258d32021-04-17 11:36:35 +02003583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
Christian Heimes39258d32021-04-17 11:36:35 +02003593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
3613if ${ac_cv_prog_CC+:} false; then :
3614 $as_echo_n "(cached) " >&6
3615else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Christian Heimes39258d32021-04-17 11:36:35 +02003627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Christian Heimes39258d32021-04-17 11:36:35 +02003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
3653if ${ac_cv_prog_ac_ct_CC+:} false; then :
3654 $as_echo_n "(cached) " >&6
3655else
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Christian Heimes39258d32021-04-17 11:36:35 +02003667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Christian Heimes39258d32021-04-17 11:36:35 +02003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
3706if ${ac_cv_prog_CC+:} false; then :
3707 $as_echo_n "(cached) " >&6
3708else
Jack Jansendd19cf82001-12-06 22:36:17 +00003709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Christian Heimes39258d32021-04-17 11:36:35 +02003720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Christian Heimes39258d32021-04-17 11:36:35 +02003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
3746if ${ac_cv_prog_CC+:} false; then :
3747 $as_echo_n "(cached) " >&6
3748else
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Christian Heimes39258d32021-04-17 11:36:35 +02003765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Christian Heimes39258d32021-04-17 11:36:35 +02003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Christian Heimes39258d32021-04-17 11:36:35 +02003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
3805if ${ac_cv_prog_CC+:} false; then :
3806 $as_echo_n "(cached) " >&6
3807else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02003819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Christian Heimes39258d32021-04-17 11:36:35 +02003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
3849if ${ac_cv_prog_ac_ct_CC+:} false; then :
3850 $as_echo_n "(cached) " >&6
3851else
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02003859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02003863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Christian Heimes39258d32021-04-17 11:36:35 +02003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Christian Heimes39258d32021-04-17 11:36:35 +02003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Christian Heimes39258d32021-04-17 11:36:35 +02003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Christian Heimes39258d32021-04-17 11:36:35 +02003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003908set X $ac_compile
3909ac_compiler=$2
Christian Heimes39258d32021-04-17 11:36:35 +02003910for ac_option in --version -v -V -qversion; do
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02003917$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
Christian Heimes39258d32021-04-17 11:36:35 +02003927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
Christian Heimes39258d32021-04-17 11:36:35 +02003935main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00003936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Christian Heimes39258d32021-04-17 11:36:35 +02003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00003950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02003970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Christian Heimes39258d32021-04-17 11:36:35 +02003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Christian Heimes39258d32021-04-17 11:36:35 +02004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Christian Heimes39258d32021-04-17 11:36:35 +02004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Christian Heimes39258d32021-04-17 11:36:35 +02004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes39258d32021-04-17 11:36:35 +02004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Christian Heimes39258d32021-04-17 11:36:35 +02004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Christian Heimes39258d32021-04-17 11:36:35 +02004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Christian Heimes39258d32021-04-17 11:36:35 +02004058else
4059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02004065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
Christian Heimes39258d32021-04-17 11:36:35 +02004075main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00004076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
Christian Heimes39258d32021-04-17 11:36:35 +02004087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004096$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 (eval "$ac_link") 2>&5
4098 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004107$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 (eval "$ac_try") 2>&5
4109 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
Christian Heimes39258d32021-04-17 11:36:35 +02004117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
Christian Heimes39258d32021-04-17 11:36:35 +02004125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
Christian Heimes39258d32021-04-17 11:36:35 +02004130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
4132if ${ac_cv_objext+:} false; then :
4133 $as_echo_n "(cached) " >&6
4134else
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
Christian Heimes39258d32021-04-17 11:36:35 +02004139main ()
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Christian Heimes39258d32021-04-17 11:36:35 +02004153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Christian Heimes39258d32021-04-17 11:36:35 +02004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
Christian Heimes39258d32021-04-17 11:36:35 +02004166else
4167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Christian Heimes39258d32021-04-17 11:36:35 +02004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Christian Heimes39258d32021-04-17 11:36:35 +02004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Christian Heimes39258d32021-04-17 11:36:35 +02004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4183if ${ac_cv_c_compiler_gnu+:} false; then :
4184 $as_echo_n "(cached) " >&6
4185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
Christian Heimes39258d32021-04-17 11:36:35 +02004190main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
Christian Heimes39258d32021-04-17 11:36:35 +02004202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Christian Heimes39258d32021-04-17 11:36:35 +02004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Christian Heimes39258d32021-04-17 11:36:35 +02004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Christian Heimes39258d32021-04-17 11:36:35 +02004216ac_test_CFLAGS=${CFLAGS+set}
Martin v. Löwis11437992002-04-12 09:54:03 +00004217ac_save_CFLAGS=$CFLAGS
Christian Heimes39258d32021-04-17 11:36:35 +02004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
4220if ${ac_cv_prog_cc_g+:} false; then :
4221 $as_echo_n "(cached) " >&6
4222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
Christian Heimes39258d32021-04-17 11:36:35 +02004231main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Christian Heimes39258d32021-04-17 11:36:35 +02004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
Christian Heimes39258d32021-04-17 11:36:35 +02004246main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Christian Heimes39258d32021-04-17 11:36:35 +02004255else
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
Christian Heimes39258d32021-04-17 11:36:35 +02004262main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Christian Heimes39258d32021-04-17 11:36:35 +02004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Christian Heimes39258d32021-04-17 11:36:35 +02004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275fi
Christian Heimes39258d32021-04-17 11:36:35 +02004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Christian Heimes39258d32021-04-17 11:36:35 +02004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
4281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Christian Heimes39258d32021-04-17 11:36:35 +02004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4298if ${ac_cv_prog_cc_c89+:} false; then :
4299 $as_echo_n "(cached) " >&6
4300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004305#include <stdarg.h>
4306#include <stdio.h>
4307struct stat;
4308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
4326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
4330 as 'x'. The following induces an error, until -std is added to get
4331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
4333 that's true only with -std. */
4334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
4336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
4341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
Skip Montanaro6dead952003-09-25 14:50:04 +00004354_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Christian Heimes39258d32021-04-17 11:36:35 +02004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Christian Heimes39258d32021-04-17 11:36:35 +02004362rm -f core conftest.err conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
Christian Heimes32eba612021-03-19 10:29:25 +01004367
Pablo Galindo53e55292021-04-05 17:38:40 +01004368fi
Christian Heimes39258d32021-04-17 11:36:35 +02004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
4372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
4374 xno)
4375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
4377 *)
4378 CC="$CC $ac_cv_prog_cc_c89"
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4381esac
4382if test "x$ac_cv_prog_cc_c89" != xno; then :
4383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
Christian Heimes39258d32021-04-17 11:36:35 +02004397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4398$as_echo_n "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004399# On Suns, sometimes $CPP names a directory.
4400if test -n "$CPP" && test -d "$CPP"; then
4401 CPP=
4402fi
4403if test -z "$CPP"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004404 if ${ac_cv_prog_CPP+:} false; then :
4405 $as_echo_n "(cached) " >&6
4406else
4407 # Double quotes because CPP needs to be expanded
4408 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004409 do
4410 ac_preproc_ok=false
4411for ac_c_preproc_warn_flag in '' yes
4412do
4413 # Use a header file that comes with gcc, so configuring glibc
4414 # with a fresh cross-compiler works.
Christian Heimes39258d32021-04-17 11:36:35 +02004415 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4416 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004417 # On the NeXT, cc -E runs the code through the compiler's parser,
4418 # not just through cpp. "Syntax error" is here to catch this case.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004421#ifdef __STDC__
4422# include <limits.h>
4423#else
4424# include <assert.h>
4425#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004426 Syntax error
4427_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004428if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004429
Christian Heimes39258d32021-04-17 11:36:35 +02004430else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004431 # Broken: fails on valid input.
4432continue
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436 # OK, works on sane cases. Now check whether nonexistent headers
4437 # can be detected and how.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <ac_nonexistent.h>
4441_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004442if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004443 # Broken: success on invalid input.
4444continue
Christian Heimes39258d32021-04-17 11:36:35 +02004445else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004446 # Passes both tests.
4447ac_preproc_ok=:
4448break
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452done
4453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4454rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02004455if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004456 break
4457fi
4458
4459 done
4460 ac_cv_prog_CPP=$CPP
4461
4462fi
4463 CPP=$ac_cv_prog_CPP
4464else
4465 ac_cv_prog_CPP=$CPP
4466fi
Christian Heimes39258d32021-04-17 11:36:35 +02004467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4468$as_echo "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004469ac_preproc_ok=false
4470for ac_c_preproc_warn_flag in '' yes
4471do
4472 # Use a header file that comes with gcc, so configuring glibc
4473 # with a fresh cross-compiler works.
Christian Heimes39258d32021-04-17 11:36:35 +02004474 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4475 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004476 # On the NeXT, cc -E runs the code through the compiler's parser,
4477 # not just through cpp. "Syntax error" is here to catch this case.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +02004480#ifdef __STDC__
4481# include <limits.h>
4482#else
4483# include <assert.h>
4484#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004485 Syntax error
4486_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004487if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004488
Christian Heimes39258d32021-04-17 11:36:35 +02004489else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004490 # Broken: fails on valid input.
4491continue
4492fi
4493rm -f conftest.err conftest.i conftest.$ac_ext
4494
4495 # OK, works on sane cases. Now check whether nonexistent headers
4496 # can be detected and how.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <ac_nonexistent.h>
4500_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02004501if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004502 # Broken: success on invalid input.
4503continue
Christian Heimes39258d32021-04-17 11:36:35 +02004504else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004505 # Passes both tests.
4506ac_preproc_ok=:
4507break
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511done
4512# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4513rm -f conftest.i conftest.err conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02004514if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004515
Christian Heimes39258d32021-04-17 11:36:35 +02004516else
4517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4518$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004519as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4520See \`config.log' for more details" "$LINENO" 5; }
4521fi
4522
4523ac_ext=c
4524ac_cpp='$CPP $CPPFLAGS'
4525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4527ac_compiler_gnu=$ac_cv_c_compiler_gnu
4528
Christian Heimes39258d32021-04-17 11:36:35 +02004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4530$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4531if ${ac_cv_path_GREP+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004534 if test -z "$GREP"; then
4535 ac_path_GREP_found=false
4536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4539do
4540 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004541 test -z "$as_dir" && as_dir=.
4542 for ac_prog in grep ggrep; do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004543 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004544 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004545 as_fn_executable_p "$ac_path_GREP" || continue
4546# Check for GNU ac_path_GREP and select it if it is found.
4547 # Check for GNU $ac_path_GREP
4548case `"$ac_path_GREP" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4551*)
4552 ac_count=0
Christian Heimes39258d32021-04-17 11:36:35 +02004553 $as_echo_n 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
Christian Heimes39258d32021-04-17 11:36:35 +02004559 $as_echo 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004560 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562 as_fn_arith $ac_count + 1 && ac_count=$as_val
4563 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_GREP="$ac_path_GREP"
4566 ac_path_GREP_max=$ac_count
4567 fi
4568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574 $ac_path_GREP_found && break 3
4575 done
4576 done
4577 done
4578IFS=$as_save_IFS
4579 if test -z "$ac_cv_path_GREP"; then
4580 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4581 fi
4582else
4583 ac_cv_path_GREP=$GREP
4584fi
4585
4586fi
Christian Heimes39258d32021-04-17 11:36:35 +02004587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4588$as_echo "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004589 GREP="$ac_cv_path_GREP"
4590
4591
Christian Heimes39258d32021-04-17 11:36:35 +02004592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4593$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4594if ${ac_cv_path_SED+:} false; then :
4595 $as_echo_n "(cached) " >&6
4596else
Łukasz Langaa785c872016-09-09 17:37:37 -07004597 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4598 for ac_i in 1 2 3 4 5 6 7; do
4599 ac_script="$ac_script$as_nl$ac_script"
4600 done
4601 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4602 { ac_script=; unset ac_script;}
4603 if test -z "$SED"; then
4604 ac_path_SED_found=false
4605 # Loop through the user's path and test for each of PROGNAME-LIST
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004610 test -z "$as_dir" && as_dir=.
4611 for ac_prog in sed gsed; do
Łukasz Langaa785c872016-09-09 17:37:37 -07004612 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004613 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07004614 as_fn_executable_p "$ac_path_SED" || continue
4615# Check for GNU ac_path_SED and select it if it is found.
4616 # Check for GNU $ac_path_SED
4617case `"$ac_path_SED" --version 2>&1` in
4618*GNU*)
4619 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4620*)
4621 ac_count=0
Christian Heimes39258d32021-04-17 11:36:35 +02004622 $as_echo_n 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07004623 while :
4624 do
4625 cat "conftest.in" "conftest.in" >"conftest.tmp"
4626 mv "conftest.tmp" "conftest.in"
4627 cp "conftest.in" "conftest.nl"
Christian Heimes39258d32021-04-17 11:36:35 +02004628 $as_echo '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07004629 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4630 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4631 as_fn_arith $ac_count + 1 && ac_count=$as_val
4632 if test $ac_count -gt ${ac_path_SED_max-0}; then
4633 # Best one so far, save it but keep looking for a better one
4634 ac_cv_path_SED="$ac_path_SED"
4635 ac_path_SED_max=$ac_count
4636 fi
4637 # 10*(2^10) chars as input seems more than enough
4638 test $ac_count -gt 10 && break
4639 done
4640 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4641esac
4642
4643 $ac_path_SED_found && break 3
4644 done
4645 done
4646 done
4647IFS=$as_save_IFS
4648 if test -z "$ac_cv_path_SED"; then
4649 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4650 fi
4651else
4652 ac_cv_path_SED=$SED
4653fi
4654
4655fi
Christian Heimes39258d32021-04-17 11:36:35 +02004656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4657$as_echo "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07004658 SED="$ac_cv_path_SED"
4659 rm -f conftest.sed
4660
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004661
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663
Christian Heimes39258d32021-04-17 11:36:35 +02004664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4665$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667# Check whether --with-cxx_main was given.
Christian Heimes39258d32021-04-17 11:36:35 +02004668if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670
4671 case $withval in
4672 no) with_cxx_main=no
4673 MAINCC='$(CC)';;
4674 yes) with_cxx_main=yes
4675 MAINCC='$(CXX)';;
4676 *) with_cxx_main=yes
4677 MAINCC=$withval
4678 if test -z "$CXX"
4679 then
4680 CXX=$withval
4681 fi;;
4682 esac
Christian Heimes39258d32021-04-17 11:36:35 +02004683else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004684
4685 with_cxx_main=no
4686 MAINCC='$(CC)'
4687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004688fi
4689
Christian Heimes39258d32021-04-17 11:36:35 +02004690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4691$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004692
4693preset_cxx="$CXX"
4694if test -z "$CXX"
4695then
4696 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 gcc) if test -n "$ac_tool_prefix"; then
4698 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4699set dummy ${ac_tool_prefix}g++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4701$as_echo_n "checking for $ac_word... " >&6; }
4702if ${ac_cv_path_CXX+:} false; then :
4703 $as_echo_n "(cached) " >&6
4704else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004705 case $CXX in
4706 [\\/]* | ?:[\\/]*)
4707 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4708 ;;
4709 *)
4710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in notfound
4712do
4713 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004714 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004715 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4717 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004719 break 2
4720 fi
4721done
4722 done
4723IFS=$as_save_IFS
4724
4725 ;;
4726esac
4727fi
4728CXX=$ac_cv_path_CXX
4729if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4731$as_echo "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004732else
Christian Heimes39258d32021-04-17 11:36:35 +02004733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004735fi
4736
4737
4738fi
4739if test -z "$ac_cv_path_CXX"; then
4740 ac_pt_CXX=$CXX
4741 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742set dummy g++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
4745if ${ac_cv_path_ac_pt_CXX+:} false; then :
4746 $as_echo_n "(cached) " >&6
4747else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004748 case $ac_pt_CXX in
4749 [\\/]* | ?:[\\/]*)
4750 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4751 ;;
4752 *)
4753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in notfound
4755do
4756 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004757 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4760 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004762 break 2
4763 fi
4764done
4765 done
4766IFS=$as_save_IFS
4767
4768 ;;
4769esac
4770fi
4771ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4772if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4774$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775else
Christian Heimes39258d32021-04-17 11:36:35 +02004776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778fi
4779
4780 if test "x$ac_pt_CXX" = x; then
4781 CXX="g++"
4782 else
4783 case $cross_compiling:$ac_tool_warned in
4784yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787ac_tool_warned=yes ;;
4788esac
4789 CXX=$ac_pt_CXX
4790 fi
4791else
4792 CXX="$ac_cv_path_CXX"
4793fi
4794 ;;
4795 cc) if test -n "$ac_tool_prefix"; then
4796 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4797set dummy ${ac_tool_prefix}c++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
4800if ${ac_cv_path_CXX+:} false; then :
4801 $as_echo_n "(cached) " >&6
4802else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 case $CXX in
4804 [\\/]* | ?:[\\/]*)
4805 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4806 ;;
4807 *)
4808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in notfound
4810do
4811 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4815 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 break 2
4818 fi
4819done
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 ;;
4824esac
4825fi
4826CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4829$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830else
Christian Heimes39258d32021-04-17 11:36:35 +02004831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835
4836fi
4837if test -z "$ac_cv_path_CXX"; then
4838 ac_pt_CXX=$CXX
4839 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840set dummy c++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842$as_echo_n "checking for $ac_word... " >&6; }
4843if ${ac_cv_path_ac_pt_CXX+:} false; then :
4844 $as_echo_n "(cached) " >&6
4845else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 ;;
4850 *)
4851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4852for as_dir in notfound
4853do
4854 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004855 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4858 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 break 2
4861 fi
4862done
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004864IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866 ;;
4867esac
4868fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4870if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4872$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873else
Christian Heimes39258d32021-04-17 11:36:35 +02004874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004877
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004878 if test "x$ac_pt_CXX" = x; then
4879 CXX="c++"
4880 else
4881 case $cross_compiling:$ac_tool_warned in
4882yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004885ac_tool_warned=yes ;;
4886esac
4887 CXX=$ac_pt_CXX
4888 fi
4889else
4890 CXX="$ac_cv_path_CXX"
4891fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004892 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 clang|*/clang) if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}clang++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if ${ac_cv_path_CXX+:} false; then :
4899 $as_echo_n "(cached) " >&6
4900else
Ned Deilycbfb9a52012-06-23 16:02:19 -07004901 case $CXX in
4902 [\\/]* | ?:[\\/]*)
4903 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4904 ;;
4905 *)
4906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in notfound
4908do
4909 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004910 test -z "$as_dir" && as_dir=.
Ned Deilycbfb9a52012-06-23 16:02:19 -07004911 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4913 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07004915 break 2
4916 fi
4917done
4918 done
4919IFS=$as_save_IFS
4920
Ned Deilycbfb9a52012-06-23 16:02:19 -07004921 ;;
4922esac
4923fi
4924CXX=$ac_cv_path_CXX
4925if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4927$as_echo "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004928else
Christian Heimes39258d32021-04-17 11:36:35 +02004929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004931fi
4932
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004933
4934fi
4935if test -z "$ac_cv_path_CXX"; then
4936 ac_pt_CXX=$CXX
4937 # Extract the first word of "clang++", so it can be a program name with args.
4938set dummy clang++; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940$as_echo_n "checking for $ac_word... " >&6; }
4941if ${ac_cv_path_ac_pt_CXX+:} false; then :
4942 $as_echo_n "(cached) " >&6
4943else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004944 case $ac_pt_CXX in
4945 [\\/]* | ?:[\\/]*)
4946 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4947 ;;
4948 *)
4949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950for as_dir in notfound
4951do
4952 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02004953 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004954 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02004955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4956 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004958 break 2
4959 fi
4960done
4961 done
4962IFS=$as_save_IFS
4963
4964 ;;
4965esac
4966fi
4967ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4968if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02004969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4970$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004971else
Christian Heimes39258d32021-04-17 11:36:35 +02004972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4973$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004974fi
4975
4976 if test "x$ac_pt_CXX" = x; then
4977 CXX="clang++"
4978 else
4979 case $cross_compiling:$ac_tool_warned in
4980yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02004981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004983ac_tool_warned=yes ;;
4984esac
4985 CXX=$ac_pt_CXX
4986 fi
4987else
4988 CXX="$ac_cv_path_CXX"
4989fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004990 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004991 icc|*/icc) if test -n "$ac_tool_prefix"; then
4992 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4993set dummy ${ac_tool_prefix}icpc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02004994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4995$as_echo_n "checking for $ac_word... " >&6; }
4996if ${ac_cv_path_CXX+:} false; then :
4997 $as_echo_n "(cached) " >&6
4998else
Zachary Ware5af85642015-12-21 12:09:17 -06004999 case $CXX in
5000 [\\/]* | ?:[\\/]*)
5001 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5002 ;;
5003 *)
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005for as_dir in notfound
5006do
5007 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005008 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005009 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5011 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005013 break 2
5014 fi
5015done
5016 done
5017IFS=$as_save_IFS
5018
5019 ;;
5020esac
5021fi
5022CXX=$ac_cv_path_CXX
5023if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5025$as_echo "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005026else
Christian Heimes39258d32021-04-17 11:36:35 +02005027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5028$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005029fi
5030
5031
5032fi
5033if test -z "$ac_cv_path_CXX"; then
5034 ac_pt_CXX=$CXX
5035 # Extract the first word of "icpc", so it can be a program name with args.
5036set dummy icpc; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_ac_pt_CXX+:} false; then :
5040 $as_echo_n "(cached) " >&6
5041else
Zachary Ware5af85642015-12-21 12:09:17 -06005042 case $ac_pt_CXX in
5043 [\\/]* | ?:[\\/]*)
5044 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5045 ;;
5046 *)
5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in notfound
5049do
5050 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005051 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005052 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005056 break 2
5057 fi
5058done
5059 done
5060IFS=$as_save_IFS
5061
5062 ;;
5063esac
5064fi
5065ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5066if test -n "$ac_pt_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5068$as_echo "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005069else
Christian Heimes39258d32021-04-17 11:36:35 +02005070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005072fi
5073
5074 if test "x$ac_pt_CXX" = x; then
5075 CXX="icpc"
5076 else
5077 case $cross_compiling:$ac_tool_warned in
5078yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02005079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005081ac_tool_warned=yes ;;
5082esac
5083 CXX=$ac_pt_CXX
5084 fi
5085else
5086 CXX="$ac_cv_path_CXX"
5087fi
5088 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 esac
5090 if test "$CXX" = "notfound"
5091 then
5092 CXX=""
5093 fi
5094fi
5095if test -z "$CXX"
5096then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 if test -n "$ac_tool_prefix"; then
5098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5099 do
5100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5101set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
5104if ${ac_cv_prog_CXX+:} false; then :
5105 $as_echo_n "(cached) " >&6
5106else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107 if test -n "$CXX"; then
5108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005117 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02005118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119 break 2
5120 fi
5121done
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125fi
5126fi
5127CXX=$ac_cv_prog_CXX
5128if test -n "$CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131else
Christian Heimes39258d32021-04-17 11:36:35 +02005132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134fi
5135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 test -n "$CXX" && break
5138 done
5139fi
5140if test -z "$CXX"; then
5141 ac_ct_CXX=$CXX
5142 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5143do
5144 # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02005146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5149 $as_echo_n "(cached) " >&6
5150else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005151 if test -n "$ac_ct_CXX"; then
5152 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02005158 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005159 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02005160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005161 ac_cv_prog_ac_ct_CXX="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02005162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 break 2
5164 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005165done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005166 done
5167IFS=$as_save_IFS
5168
5169fi
5170fi
5171ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5172if test -n "$ac_ct_CXX"; then
Christian Heimes39258d32021-04-17 11:36:35 +02005173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5174$as_echo "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005175else
Christian Heimes39258d32021-04-17 11:36:35 +02005176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005178fi
5179
5180
5181 test -n "$ac_ct_CXX" && break
5182done
5183
5184 if test "x$ac_ct_CXX" = x; then
5185 CXX="notfound"
5186 else
5187 case $cross_compiling:$ac_tool_warned in
5188yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02005189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005191ac_tool_warned=yes ;;
5192esac
5193 CXX=$ac_ct_CXX
5194 fi
5195fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 if test "$CXX" = "notfound"
5198 then
5199 CXX=""
5200 fi
5201fi
5202if test "$preset_cxx" != "$CXX"
5203then
Christian Heimes39258d32021-04-17 11:36:35 +02005204 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005205
5206 By default, distutils will build C++ extension modules with \"$CXX\".
5207 If this is not intended, then set CXX on the configure command line.
5208 " >&5
Christian Heimes39258d32021-04-17 11:36:35 +02005209$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005210
5211 By default, distutils will build C++ extension modules with \"$CXX\".
5212 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005213 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005214fi
5215
5216
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5218
5219
Christian Heimes39258d32021-04-17 11:36:35 +02005220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5221$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef bfin
5224#undef cris
5225#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef hppa
5228#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005229#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005231#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005232#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005233#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005234#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005235 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005236#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005237# if defined(__x86_64__) && defined(__LP64__)
5238 x86_64-linux-gnu
5239# elif defined(__x86_64__) && defined(__ILP32__)
5240 x86_64-linux-gnux32
5241# elif defined(__i386__)
5242 i386-linux-gnu
5243# elif defined(__aarch64__) && defined(__AARCH64EL__)
5244# if defined(__ILP32__)
5245 aarch64_ilp32-linux-gnu
5246# else
5247 aarch64-linux-gnu
5248# endif
5249# elif defined(__aarch64__) && defined(__AARCH64EB__)
5250# if defined(__ILP32__)
5251 aarch64_be_ilp32-linux-gnu
5252# else
5253 aarch64_be-linux-gnu
5254# endif
5255# elif defined(__alpha__)
5256 alpha-linux-gnu
5257# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5258# if defined(__ARMEL__)
5259 arm-linux-gnueabihf
5260# else
5261 armeb-linux-gnueabihf
5262# endif
5263# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5264# if defined(__ARMEL__)
5265 arm-linux-gnueabi
5266# else
5267 armeb-linux-gnueabi
5268# endif
5269# elif defined(__hppa__)
5270 hppa-linux-gnu
5271# elif defined(__ia64__)
5272 ia64-linux-gnu
5273# elif defined(__m68k__) && !defined(__mcoldfire__)
5274 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005275# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5276# if _MIPS_SIM == _ABIO32
5277 mipsisa32r6el-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mipsisa64r6el-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mipsisa64r6el-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
5285# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5286# if _MIPS_SIM == _ABIO32
5287 mipsisa32r6-linux-gnu
5288# elif _MIPS_SIM == _ABIN32
5289 mipsisa64r6-linux-gnuabin32
5290# elif _MIPS_SIM == _ABI64
5291 mipsisa64r6-linux-gnuabi64
5292# else
5293# error unknown platform triplet
5294# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005295# elif defined(__mips_hard_float) && defined(_MIPSEL)
5296# if _MIPS_SIM == _ABIO32
5297 mipsel-linux-gnu
5298# elif _MIPS_SIM == _ABIN32
5299 mips64el-linux-gnuabin32
5300# elif _MIPS_SIM == _ABI64
5301 mips64el-linux-gnuabi64
5302# else
5303# error unknown platform triplet
5304# endif
5305# elif defined(__mips_hard_float)
5306# if _MIPS_SIM == _ABIO32
5307 mips-linux-gnu
5308# elif _MIPS_SIM == _ABIN32
5309 mips64-linux-gnuabin32
5310# elif _MIPS_SIM == _ABI64
5311 mips64-linux-gnuabi64
5312# else
5313# error unknown platform triplet
5314# endif
5315# elif defined(__or1k__)
5316 or1k-linux-gnu
5317# elif defined(__powerpc__) && defined(__SPE__)
5318 powerpc-linux-gnuspe
5319# elif defined(__powerpc64__)
5320# if defined(__LITTLE_ENDIAN__)
5321 powerpc64le-linux-gnu
5322# else
5323 powerpc64-linux-gnu
5324# endif
5325# elif defined(__powerpc__)
5326 powerpc-linux-gnu
5327# elif defined(__s390x__)
5328 s390x-linux-gnu
5329# elif defined(__s390__)
5330 s390-linux-gnu
5331# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5332 sh4-linux-gnu
5333# elif defined(__sparc__) && defined(__arch64__)
5334 sparc64-linux-gnu
5335# elif defined(__sparc__)
5336 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005337# elif defined(__riscv)
5338# if __riscv_xlen == 32
5339 riscv32-linux-gnu
5340# elif __riscv_xlen == 64
5341 riscv64-linux-gnu
5342# else
5343# error unknown platform triplet
5344# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345# else
5346# error unknown platform triplet
5347# endif
5348#elif defined(__FreeBSD_kernel__)
5349# if defined(__LP64__)
5350 x86_64-kfreebsd-gnu
5351# elif defined(__i386__)
5352 i386-kfreebsd-gnu
5353# else
5354# error unknown platform triplet
5355# endif
5356#elif defined(__gnu_hurd__)
5357 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005358#elif defined(__APPLE__)
5359 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005360#elif defined(__VXWORKS__)
5361 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362#else
5363# error unknown platform triplet
5364#endif
5365
5366EOF
5367
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005368if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Christian Heimes39258d32021-04-17 11:36:35 +02005370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5371$as_echo "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005372else
Christian Heimes39258d32021-04-17 11:36:35 +02005373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5374$as_echo "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005375fi
5376rm -f conftest.c conftest.out
5377
5378if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5379 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5380 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5381 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005382elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5383 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005384fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005385
doko@ubuntu.com55532312016-06-14 08:55:19 +02005386if test x$MULTIARCH != x; then
5387 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5388fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005389
5390
Christian Heimes39258d32021-04-17 11:36:35 +02005391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5392$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005393save_LDFLAGS="$LDFLAGS"
5394LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005395
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397/* end confdefs.h. */
5398
5399int
Christian Heimes39258d32021-04-17 11:36:35 +02005400main ()
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005401{
5402
5403 ;
5404 return 0;
5405}
5406_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005408 NO_AS_NEEDED="-Wl,--no-as-needed"
Christian Heimes39258d32021-04-17 11:36:35 +02005409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5410$as_echo "yes" >&6; }
5411else
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005412 NO_AS_NEEDED=""
Christian Heimes39258d32021-04-17 11:36:35 +02005413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5414$as_echo "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005415fi
Christian Heimes39258d32021-04-17 11:36:35 +02005416rm -f core conftest.err conftest.$ac_objext \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005417 conftest$ac_exeext conftest.$ac_ext
5418LDFLAGS="$save_LDFLAGS"
5419
5420
5421
5422# checks for UNIX variants that set C preprocessor variables
Christian Heimes39258d32021-04-17 11:36:35 +02005423
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5425$as_echo_n "checking for egrep... " >&6; }
5426if ${ac_cv_path_EGREP+:} false; then :
5427 $as_echo_n "(cached) " >&6
5428else
5429 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5430 then ac_cv_path_EGREP="$GREP -E"
5431 else
5432 if test -z "$EGREP"; then
5433 ac_path_EGREP_found=false
5434 # Loop through the user's path and test for each of PROGNAME-LIST
5435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437do
Christian Heimes39258d32021-04-17 11:36:35 +02005438 IFS=$as_save_IFS
5439 test -z "$as_dir" && as_dir=.
5440 for ac_prog in egrep; do
5441 for ac_exec_ext in '' $ac_executable_extensions; do
5442 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5443 as_fn_executable_p "$ac_path_EGREP" || continue
5444# Check for GNU ac_path_EGREP and select it if it is found.
5445 # Check for GNU $ac_path_EGREP
5446case `"$ac_path_EGREP" --version 2>&1` in
5447*GNU*)
5448 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5449*)
5450 ac_count=0
5451 $as_echo_n 0123456789 >"conftest.in"
5452 while :
5453 do
5454 cat "conftest.in" "conftest.in" >"conftest.tmp"
5455 mv "conftest.tmp" "conftest.in"
5456 cp "conftest.in" "conftest.nl"
5457 $as_echo 'EGREP' >> "conftest.nl"
5458 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5459 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5460 as_fn_arith $ac_count + 1 && ac_count=$as_val
5461 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5462 # Best one so far, save it but keep looking for a better one
5463 ac_cv_path_EGREP="$ac_path_EGREP"
5464 ac_path_EGREP_max=$ac_count
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 fi
Christian Heimes39258d32021-04-17 11:36:35 +02005466 # 10*(2^10) chars as input seems more than enough
5467 test $ac_count -gt 10 && break
5468 done
5469 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5470esac
5471
5472 $ac_path_EGREP_found && break 3
5473 done
5474 done
5475 done
5476IFS=$as_save_IFS
5477 if test -z "$ac_cv_path_EGREP"; then
5478 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 fi
Christian Heimes39258d32021-04-17 11:36:35 +02005480else
5481 ac_cv_path_EGREP=$EGREP
5482fi
5483
5484 fi
5485fi
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5487$as_echo "$ac_cv_path_EGREP" >&6; }
5488 EGREP="$ac_cv_path_EGREP"
5489
5490
5491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5492$as_echo_n "checking for ANSI C header files... " >&6; }
5493if ${ac_cv_header_stdc+:} false; then :
5494 $as_echo_n "(cached) " >&6
5495else
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497/* end confdefs.h. */
5498#include <stdlib.h>
5499#include <stdarg.h>
5500#include <string.h>
5501#include <float.h>
5502
5503int
5504main ()
5505{
5506
5507 ;
5508 return 0;
5509}
5510_ACEOF
5511if ac_fn_c_try_compile "$LINENO"; then :
5512 ac_cv_header_stdc=yes
5513else
5514 ac_cv_header_stdc=no
5515fi
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517
5518if test $ac_cv_header_stdc = yes; then
5519 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h. */
5522#include <string.h>
5523
5524_ACEOF
5525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5526 $EGREP "memchr" >/dev/null 2>&1; then :
5527
5528else
5529 ac_cv_header_stdc=no
5530fi
5531rm -f conftest*
5532
5533fi
5534
5535if test $ac_cv_header_stdc = yes; then
5536 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538/* end confdefs.h. */
5539#include <stdlib.h>
5540
5541_ACEOF
5542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5543 $EGREP "free" >/dev/null 2>&1; then :
5544
5545else
5546 ac_cv_header_stdc=no
5547fi
5548rm -f conftest*
5549
5550fi
5551
5552if test $ac_cv_header_stdc = yes; then
5553 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5554 if test "$cross_compiling" = yes; then :
5555 :
5556else
5557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5558/* end confdefs.h. */
5559#include <ctype.h>
5560#include <stdlib.h>
5561#if ((' ' & 0x0FF) == 0x020)
5562# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5563# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5564#else
5565# define ISLOWER(c) \
5566 (('a' <= (c) && (c) <= 'i') \
5567 || ('j' <= (c) && (c) <= 'r') \
5568 || ('s' <= (c) && (c) <= 'z'))
5569# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5570#endif
5571
5572#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5573int
5574main ()
5575{
5576 int i;
5577 for (i = 0; i < 256; i++)
5578 if (XOR (islower (i), ISLOWER (i))
5579 || toupper (i) != TOUPPER (i))
5580 return 2;
5581 return 0;
5582}
5583_ACEOF
5584if ac_fn_c_try_run "$LINENO"; then :
5585
5586else
5587 ac_cv_header_stdc=no
5588fi
5589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5590 conftest.$ac_objext conftest.beam conftest.$ac_ext
5591fi
5592
5593fi
5594fi
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5596$as_echo "$ac_cv_header_stdc" >&6; }
5597if test $ac_cv_header_stdc = yes; then
5598
5599$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5600
5601fi
5602
5603# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5604for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5605 inttypes.h stdint.h unistd.h
5606do :
5607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5608ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5609"
5610if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5611 cat >>confdefs.h <<_ACEOF
5612#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5613_ACEOF
5614
5615fi
5616
Matthias Kloseb9621712010-04-24 17:59:49 +00005617done
5618
5619
5620
Christian Heimes39258d32021-04-17 11:36:35 +02005621 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5622if test "x$ac_cv_header_minix_config_h" = xyes; then :
5623 MINIX=yes
5624else
5625 MINIX=
Matthias Kloseb9621712010-04-24 17:59:49 +00005626fi
5627
5628
Christian Heimes39258d32021-04-17 11:36:35 +02005629 if test "$MINIX" = yes; then
5630
5631$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005632
5633
Christian Heimes39258d32021-04-17 11:36:35 +02005634$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005635
5636
Christian Heimes39258d32021-04-17 11:36:35 +02005637$as_echo "#define _MINIX 1" >>confdefs.h
5638
5639 fi
5640
5641
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5643$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5644if ${ac_cv_safe_to_define___extensions__+:} false; then :
5645 $as_echo_n "(cached) " >&6
5646else
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5648/* end confdefs.h. */
5649
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005650# define __EXTENSIONS__ 1
5651 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005652int
Christian Heimes39258d32021-04-17 11:36:35 +02005653main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00005654{
5655
5656 ;
5657 return 0;
5658}
5659_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005660if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 ac_cv_safe_to_define___extensions__=yes
Christian Heimes39258d32021-04-17 11:36:35 +02005662else
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 ac_cv_safe_to_define___extensions__=no
5664fi
Christian Heimes39258d32021-04-17 11:36:35 +02005665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005666fi
Christian Heimes39258d32021-04-17 11:36:35 +02005667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5668$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5669 test $ac_cv_safe_to_define___extensions__ = yes &&
5670 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005671
Christian Heimes39258d32021-04-17 11:36:35 +02005672 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005673
Christian Heimes39258d32021-04-17 11:36:35 +02005674 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005675
Christian Heimes39258d32021-04-17 11:36:35 +02005676 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005677
Christian Heimes39258d32021-04-17 11:36:35 +02005678 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005679
5680
Christian Heimes39258d32021-04-17 11:36:35 +02005681
5682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5683$as_echo_n "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005684cat >> conftest.c <<EOF
5685#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005686android_api = __ANDROID_API__
5687arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005688#else
5689#error not Android
5690#endif
5691EOF
5692
5693if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005694 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5695 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Christian Heimes39258d32021-04-17 11:36:35 +02005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5697$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005698 if test -z "$ANDROID_API_LEVEL"; then
5699 echo 'Fatal: you must define __ANDROID_API__'
5700 exit 1
5701 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005702
Christian Heimes39258d32021-04-17 11:36:35 +02005703cat >>confdefs.h <<_ACEOF
5704#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5705_ACEOF
Xavier de Gaye95750b12016-07-09 11:05:42 +02005706
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005707
Christian Heimes39258d32021-04-17 11:36:35 +02005708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5709$as_echo_n "checking for the Android arm ABI... " >&6; }
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5711$as_echo "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005712 if test "$_arm_arch" = 7; then
5713 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5714 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5715 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005716else
Christian Heimes39258d32021-04-17 11:36:35 +02005717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5718$as_echo "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005719fi
5720rm -f conftest.c conftest.out
5721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722# Check for unsupported systems
5723case $ac_sys_system/$ac_sys_release in
5724atheos*|Linux*/1*)
5725 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5726 echo See README for details.
5727 exit 1;;
5728esac
5729
5730
Christian Heimes39258d32021-04-17 11:36:35 +02005731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5732$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734# Check whether --with-suffix was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005735if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 withval=$with_suffix;
5737 case $withval in
5738 no) EXEEXT=;;
5739 yes) EXEEXT=.exe;;
5740 *) EXEEXT=$withval;;
5741 esac
5742fi
5743
Christian Heimes39258d32021-04-17 11:36:35 +02005744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5745$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# Test whether we're running on a non-case-sensitive system, in which
5748# case we give a warning if no ext is given
5749
Christian Heimes39258d32021-04-17 11:36:35 +02005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5751$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752if test ! -d CaseSensitiveTestDir; then
5753mkdir CaseSensitiveTestDir
5754fi
5755
5756if test -d casesensitivetestdir
5757then
Christian Heimes39258d32021-04-17 11:36:35 +02005758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5759$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760 BUILDEXEEXT=.exe
5761else
Christian Heimes39258d32021-04-17 11:36:35 +02005762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5763$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764 BUILDEXEEXT=$EXEEXT
5765fi
5766rmdir CaseSensitiveTestDir
5767
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768case $ac_sys_system in
5769hp*|HP*)
5770 case $CC in
5771 cc|*/cc) CC="$CC -Ae";;
5772 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773esac
5774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
Christian Heimes39258d32021-04-17 11:36:35 +02005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5777$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778if test -z "$LIBRARY"
5779then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005780 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
Christian Heimes39258d32021-04-17 11:36:35 +02005782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5783$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784
5785# LDLIBRARY is the name of the library to link against (as opposed to the
5786# name of the library into which to insert object files). BLDLIBRARY is also
5787# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5788# is blank as the main program is not linked directly against LDLIBRARY.
5789# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5790# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5791# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5792# DLLLIBRARY is the shared (i.e., DLL) library.
5793#
5794# RUNSHARED is used to run shared python without installed libraries
5795#
5796# INSTSONAME is the name of the shared library that will be use to install
5797# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005798#
5799# LDVERSION is the shared library version number, normally the Python version
5800# with the ABI build flags appended.
5801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
5803
5804
5805
5806
5807
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809LDLIBRARY="$LIBRARY"
5810BLDLIBRARY='$(LDLIBRARY)'
5811INSTSONAME='$(LDLIBRARY)'
5812DLLLIBRARY=''
5813LDLIBRARYDIR=''
5814RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005815LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
5817# LINKCC is the command that links the python executable -- default is $(CC).
5818# If CXX is set, and if it is needed to link a main function that was
5819# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5820# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
Christian Heimes39258d32021-04-17 11:36:35 +02005822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5823$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824if test -z "$LINKCC"
5825then
5826 LINKCC='$(PURIFY) $(MAINCC)'
5827 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828 QNX*)
5829 # qcc must be used because the other compilers do not
5830 # support -N.
5831 LINKCC=qcc;;
5832 esac
5833fi
Christian Heimes39258d32021-04-17 11:36:35 +02005834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5835$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836
Stefan Krahe6dcd372020-08-29 17:00:08 +02005837# EXPORTSYMS holds the list of exported symbols for AIX.
5838# EXPORTSFROM holds the module name exporting symbols on AIX.
5839EXPORTSYMS=
5840EXPORTSFROM=
5841
5842
Christian Heimes39258d32021-04-17 11:36:35 +02005843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5844$as_echo_n "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005845case $ac_sys_system in
5846AIX*)
5847 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005848 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005849 ;;
5850esac
Christian Heimes39258d32021-04-17 11:36:35 +02005851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5852$as_echo "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5855# make sure we default having it set to "no": this is used by
5856# distutils.unixccompiler to know if it should add --enable-new-dtags
5857# to linker command lines, and failing to detect GNU ld simply results
5858# in the same bahaviour as before.
5859
Christian Heimes39258d32021-04-17 11:36:35 +02005860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5861$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862ac_prog=ld
5863if test "$GCC" = yes; then
5864 ac_prog=`$CC -print-prog-name=ld`
5865fi
5866case `"$ac_prog" -V 2>&1 < /dev/null` in
5867 *GNU*)
5868 GNULD=yes;;
5869 *)
5870 GNULD=no;;
5871esac
Christian Heimes39258d32021-04-17 11:36:35 +02005872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5873$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
Christian Heimes39258d32021-04-17 11:36:35 +02005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5876$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877# Check whether --enable-shared was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005878if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 enableval=$enable_shared;
5880fi
5881
5882
5883if test -z "$enable_shared"
5884then
5885 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005886 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 enable_shared="yes";;
5888 *)
5889 enable_shared="no";;
5890 esac
5891fi
Christian Heimes39258d32021-04-17 11:36:35 +02005892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5893$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894
Christian Heimes39258d32021-04-17 11:36:35 +02005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5896$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897# Check whether --enable-profiling was given.
Christian Heimes39258d32021-04-17 11:36:35 +02005898if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005899 enableval=$enable_profiling;
5900fi
5901
5902if test "x$enable_profiling" = xyes; then
5903 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005904 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906/* end confdefs.h. */
5907int main() { return 0; }
5908_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02005909if ac_fn_c_try_link "$LINENO"; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005910
Christian Heimes39258d32021-04-17 11:36:35 +02005911else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005912 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913fi
Christian Heimes39258d32021-04-17 11:36:35 +02005914rm -f core conftest.err conftest.$ac_objext \
doko@ubuntu.comba015832012-06-30 16:52:05 +02005915 conftest$ac_exeext conftest.$ac_ext
5916 CC="$ac_save_cc"
5917else
5918 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919fi
Christian Heimes39258d32021-04-17 11:36:35 +02005920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5921$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922
doko@ubuntu.comba015832012-06-30 16:52:05 +02005923if test "x$enable_profiling" = xyes; then
5924 BASECFLAGS="-pg $BASECFLAGS"
5925 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926fi
5927
Christian Heimes39258d32021-04-17 11:36:35 +02005928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5929$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930
5931# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5932# library that we build, but we do not want to link against it (we
5933# will find it with a -framework option). For this reason there is an
5934# extra variable BLDLIBRARY against which Python and the extension
5935# modules are linked, BLDLIBRARY. This is normally the same as
5936# LDLIBRARY, but empty for MacOSX framework builds.
5937if test "$enable_framework"
5938then
5939 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005940 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 BLDLIBRARY=''
5942else
5943 BLDLIBRARY='$(LDLIBRARY)'
5944fi
5945
5946# Other platforms follow
5947if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005948 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
Christian Heimes39258d32021-04-17 11:36:35 +02005950$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
5952 case $ac_sys_system in
5953 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).dll.a'
5955 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
5957 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).so'
5959 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005962 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005963 then
5964 PY3LIBRARY=libpython3.so
5965 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
pxinwrc1174262020-12-15 06:14:43 +08005967 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).so'
5969 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005970 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005972 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005973 then
5974 PY3LIBRARY=libpython3.so
5975 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 ;;
5977 hp*|HP*)
5978 case `uname -m` in
5979 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005980 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ;;
5982 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005983 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ;;
5985 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005986 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005987 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005990 LDLIBRARY='libpython$(LDVERSION).dylib'
5991 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005992 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005994 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005995 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005996 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005997 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998
5999 esac
6000else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006001 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 case $ac_sys_system in
6003 CYGWIN*)
6004 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006005 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 ;;
6007 esac
6008fi
6009
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006010if test "$cross_compiling" = yes; then
6011 RUNSHARED=
6012fi
6013
Christian Heimes39258d32021-04-17 11:36:35 +02006014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6015$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006018if test -n "$ac_tool_prefix"; then
6019 for ac_prog in ar aal
6020 do
6021 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6022set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024$as_echo_n "checking for $ac_word... " >&6; }
6025if ${ac_cv_prog_AR+:} false; then :
6026 $as_echo_n "(cached) " >&6
6027else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 if test -n "$AR"; then
6029 ac_cv_prog_AR="$AR" # Let the user override the test.
6030else
6031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006038 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040 break 2
6041 fi
6042done
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044IFS=$as_save_IFS
6045
6046fi
6047fi
6048AR=$ac_cv_prog_AR
6049if test -n "$AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6051$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052else
Christian Heimes39258d32021-04-17 11:36:35 +02006053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055fi
6056
6057
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006058 test -n "$AR" && break
6059 done
6060fi
6061if test -z "$AR"; then
6062 ac_ct_AR=$AR
6063 for ac_prog in ar aal
6064do
6065 # Extract the first word of "$ac_prog", so it can be a program name with args.
6066set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6068$as_echo_n "checking for $ac_word... " >&6; }
6069if ${ac_cv_prog_ac_ct_AR+:} false; then :
6070 $as_echo_n "(cached) " >&6
6071else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006072 if test -n "$ac_ct_AR"; then
6073 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6074else
6075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076for as_dir in $PATH
6077do
6078 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006079 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006080 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006082 ac_cv_prog_ac_ct_AR="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006084 break 2
6085 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006087 done
6088IFS=$as_save_IFS
6089
6090fi
6091fi
6092ac_ct_AR=$ac_cv_prog_ac_ct_AR
6093if test -n "$ac_ct_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6095$as_echo "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096else
Christian Heimes39258d32021-04-17 11:36:35 +02006097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006099fi
6100
6101
6102 test -n "$ac_ct_AR" && break
6103done
6104
6105 if test "x$ac_ct_AR" = x; then
6106 AR="ar"
6107 else
6108 case $cross_compiling:$ac_tool_warned in
6109yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006110{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6111$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006112ac_tool_warned=yes ;;
6113esac
6114 AR=$ac_ct_AR
6115 fi
6116fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117
6118
6119# tweak ARFLAGS only if the user didn't set it on the command line
6120
6121if test -z "$ARFLAGS"
6122then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006123 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124fi
6125
doko@ubuntu.com58844492012-06-30 18:25:32 +02006126if test -n "$ac_tool_prefix"; then
6127 for ac_prog in readelf
6128 do
6129 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6130set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132$as_echo_n "checking for $ac_word... " >&6; }
6133if ${ac_cv_prog_READELF+:} false; then :
6134 $as_echo_n "(cached) " >&6
6135else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006136 if test -n "$READELF"; then
6137 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6138else
6139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH
6141do
6142 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006143 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006144 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006146 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006148 break 2
6149 fi
6150done
6151 done
6152IFS=$as_save_IFS
6153
6154fi
6155fi
6156READELF=$ac_cv_prog_READELF
6157if test -n "$READELF"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6159$as_echo "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006160else
Christian Heimes39258d32021-04-17 11:36:35 +02006161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6162$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006163fi
6164
6165
6166 test -n "$READELF" && break
6167 done
6168fi
6169if test -z "$READELF"; then
6170 ac_ct_READELF=$READELF
6171 for ac_prog in readelf
6172do
6173 # Extract the first word of "$ac_prog", so it can be a program name with args.
6174set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6178 $as_echo_n "(cached) " >&6
6179else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006180 if test -n "$ac_ct_READELF"; then
6181 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6182else
6183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6184for as_dir in $PATH
6185do
6186 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006187 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006188 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006190 ac_cv_prog_ac_ct_READELF="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +02006191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006192 break 2
6193 fi
6194done
6195 done
6196IFS=$as_save_IFS
6197
6198fi
6199fi
6200ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6201if test -n "$ac_ct_READELF"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6203$as_echo "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006204else
Christian Heimes39258d32021-04-17 11:36:35 +02006205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006207fi
6208
6209
6210 test -n "$ac_ct_READELF" && break
6211done
6212
6213 if test "x$ac_ct_READELF" = x; then
6214 READELF=":"
6215 else
6216 case $cross_compiling:$ac_tool_warned in
6217yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006220ac_tool_warned=yes ;;
6221esac
6222 READELF=$ac_ct_READELF
6223 fi
6224fi
6225
6226if test "$cross_compiling" = yes; then
6227 case "$READELF" in
6228 readelf|:)
6229 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6230 ;;
6231 esac
6232fi
6233
6234
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006237hp*|HP*)
6238 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239 if test -z "$INSTALL"
6240 then
6241 INSTALL="${srcdir}/install-sh -c"
6242 fi
6243esac
Christian Heimes39258d32021-04-17 11:36:35 +02006244# Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245# so one script is as good as another. But avoid the broken or
6246# incompatible versions:
6247# SysV /etc/install, /usr/sbin/install
6248# SunOS /usr/etc/install
6249# IRIX /sbin/install
6250# AIX /bin/install
6251# AmigaOS /C/install, which installs bootblocks on floppy discs
6252# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6253# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6254# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6255# OS/2's system install, which has a completely different semantic
6256# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006257# Reject install programs that cannot install multiple files.
Christian Heimes39258d32021-04-17 11:36:35 +02006258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6259$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260if test -z "$INSTALL"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006261if ${ac_cv_path_install+:} false; then :
6262 $as_echo_n "(cached) " >&6
6263else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH
6266do
6267 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006268 test -z "$as_dir" && as_dir=.
6269 # Account for people who put trailing slashes in PATH elements.
6270case $as_dir/ in #((
6271 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274 /usr/ucb/* ) ;;
6275 *)
6276 # OSF1 and SCO ODT 3.0 have their own names for install.
6277 # Don't use installbsd from OSF since it installs stuff as root
6278 # by default.
6279 for ac_prog in ginstall scoinst install; do
6280 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006281 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282 if test $ac_prog = install &&
Christian Heimes39258d32021-04-17 11:36:35 +02006283 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284 # AIX install. It has an incompatible calling convention.
6285 :
6286 elif test $ac_prog = install &&
Christian Heimes39258d32021-04-17 11:36:35 +02006287 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288 # program-specific install script used by HP pwplus--don't use.
6289 :
6290 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006291 rm -rf conftest.one conftest.two conftest.dir
6292 echo one > conftest.one
6293 echo two > conftest.two
6294 mkdir conftest.dir
Christian Heimes39258d32021-04-17 11:36:35 +02006295 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 test -s conftest.one && test -s conftest.two &&
6297 test -s conftest.dir/conftest.one &&
6298 test -s conftest.dir/conftest.two
6299 then
Christian Heimes39258d32021-04-17 11:36:35 +02006300 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006301 break 3
6302 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303 fi
6304 fi
6305 done
6306 done
6307 ;;
6308esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006309
6310 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311IFS=$as_save_IFS
6312
Matthias Kloseb9621712010-04-24 17:59:49 +00006313rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315fi
Christian Heimes39258d32021-04-17 11:36:35 +02006316 if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 INSTALL=$ac_cv_path_install
6318 else
6319 # As a last resort, use the slow shell script. Don't cache a
6320 # value for INSTALL within a source directory, because that will
6321 # break other packages using the cache if that directory is
6322 # removed, or if the value is a relative name.
6323 INSTALL=$ac_install_sh
6324 fi
6325fi
Christian Heimes39258d32021-04-17 11:36:35 +02006326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6327$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328
6329# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6330# It thinks the first close brace ends the variable substitution.
6331test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6332
6333test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6334
6335test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6336
Christian Heimes39258d32021-04-17 11:36:35 +02006337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6338$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006339if test -z "$MKDIR_P"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006340 if ${ac_cv_path_mkdir+:} false; then :
6341 $as_echo_n "(cached) " >&6
6342else
Matthias Klose93a0ef12012-03-15 18:08:34 +01006343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6344for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6345do
6346 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006347 test -z "$as_dir" && as_dir=.
Matthias Klose93a0ef12012-03-15 18:08:34 +01006348 for ac_prog in mkdir gmkdir; do
6349 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006350 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6351 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6352 'mkdir (GNU coreutils) '* | \
6353 'mkdir (coreutils) '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006354 'mkdir (fileutils) '4.1*)
Christian Heimes39258d32021-04-17 11:36:35 +02006355 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006356 break 3;;
6357 esac
6358 done
6359 done
6360 done
6361IFS=$as_save_IFS
6362
6363fi
6364
6365 test -d ./--version && rmdir ./--version
Christian Heimes39258d32021-04-17 11:36:35 +02006366 if test "${ac_cv_path_mkdir+set}" = set; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006367 MKDIR_P="$ac_cv_path_mkdir -p"
6368 else
6369 # As a last resort, use the slow shell script. Don't cache a
6370 # value for MKDIR_P within a source directory, because that will
6371 # break other packages using the cache if that directory is
6372 # removed, or if the value is a relative name.
6373 MKDIR_P="$ac_install_sh -d"
6374 fi
6375fi
Christian Heimes39258d32021-04-17 11:36:35 +02006376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6377$as_echo "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006378
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379
6380# Not every filesystem supports hard links
6381
6382if test -z "$LN" ; then
6383 case $ac_sys_system in
6384 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385 *) LN=ln;;
6386 esac
6387fi
6388
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006389# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006390
6391ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006392
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393# Check for --with-pydebug
Christian Heimes39258d32021-04-17 11:36:35 +02006394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6395$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396
6397# Check whether --with-pydebug was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006398if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399 withval=$with_pydebug;
6400if test "$withval" != no
6401then
6402
Christian Heimes39258d32021-04-17 11:36:35 +02006403$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404
Christian Heimes39258d32021-04-17 11:36:35 +02006405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6406$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006408 ABIFLAGS="${ABIFLAGS}d"
Christian Heimes39258d32021-04-17 11:36:35 +02006409else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411fi
Christian Heimes39258d32021-04-17 11:36:35 +02006412else
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415fi
6416
6417
Victor Stinnerf4e47032019-04-25 00:56:28 +02006418# Check for --with-trace-refs
6419# --with-trace-refs
Christian Heimes39258d32021-04-17 11:36:35 +02006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6421$as_echo_n "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006422
6423# Check whether --with-trace-refs was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006424if test "${with_trace_refs+set}" = set; then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02006425 withval=$with_trace_refs;
Christian Heimes39258d32021-04-17 11:36:35 +02006426else
Victor Stinnerf4e47032019-04-25 00:56:28 +02006427 with_trace_refs=no
6428fi
6429
Christian Heimes39258d32021-04-17 11:36:35 +02006430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6431$as_echo "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006432
6433if test "$with_trace_refs" = "yes"
6434then
6435
Christian Heimes39258d32021-04-17 11:36:35 +02006436$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02006437
6438fi
6439
6440# Check for --with-assertions.
6441# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006442assertions='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6444$as_echo_n "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006445
6446# Check whether --with-assertions was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006447if test "${with_assertions+set}" = set; then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02006448 withval=$with_assertions;
6449if test "$withval" != no
6450then
6451 assertions='true'
6452fi
6453fi
6454
6455if test "$assertions" = 'true'; then
Christian Heimes39258d32021-04-17 11:36:35 +02006456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6457$as_echo "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006458elif test "$Py_DEBUG" = 'true'; then
6459 assertions='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6461$as_echo "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006462else
Christian Heimes39258d32021-04-17 11:36:35 +02006463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006465fi
6466
Brett Cannon63d98bc2016-09-06 17:12:40 -07006467# Enable optimization flags
6468
6469
6470Py_OPT='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6472$as_echo_n "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006473# Check whether --enable-optimizations was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006474if test "${enable_optimizations+set}" = set; then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006475 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006476if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006477then
6478 Py_OPT='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006481else
6482 Py_OPT='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006485fi
Christian Heimes39258d32021-04-17 11:36:35 +02006486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07006489fi
6490
6491if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006492 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6493 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006494 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006495 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006498 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006499 case $CC in
6500 *gcc*)
Christian Heimes39258d32021-04-17 11:36:35 +02006501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6502$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6503if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6504 $as_echo_n "(cached) " >&6
6505else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006506
6507 ax_check_save_flags=$CFLAGS
6508 CFLAGS="$CFLAGS -fno-semantic-interposition"
6509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6510/* end confdefs.h. */
6511
6512int
Christian Heimes39258d32021-04-17 11:36:35 +02006513main ()
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006514{
6515
6516 ;
6517 return 0;
6518}
6519_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02006520if ac_fn_c_try_compile "$LINENO"; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006521 ax_cv_check_cflags___fno_semantic_interposition=yes
Christian Heimes39258d32021-04-17 11:36:35 +02006522else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006523 ax_cv_check_cflags___fno_semantic_interposition=no
6524fi
Christian Heimes39258d32021-04-17 11:36:35 +02006525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006526 CFLAGS=$ax_check_save_flags
6527fi
Christian Heimes39258d32021-04-17 11:36:35 +02006528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6529$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6530if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006531
Pablo Galindob451b0e2020-10-21 22:46:52 +01006532 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6533 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006534
Christian Heimes39258d32021-04-17 11:36:35 +02006535else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006536 :
6537fi
6538
Pablo Galindob451b0e2020-10-21 22:46:52 +01006539 ;;
6540 esac
6541
6542
Brett Cannon63d98bc2016-09-06 17:12:40 -07006543else
6544 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006545 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006546 DEF_MAKE_RULE="all"
6547fi
6548
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006549
Christian Heimes39258d32021-04-17 11:36:35 +02006550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6551$as_echo_n "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006552if test -z "$PROFILE_TASK"
6553then
Victor Stinner67900052021-01-27 11:16:15 +01006554 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006555fi
Christian Heimes39258d32021-04-17 11:36:35 +02006556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6557$as_echo "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006558
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006559# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6560# normal names in the default $PATH (ie: Ubuntu). They exist under the
6561# non-suffixed name in their versioned llvm directory.
6562
6563llvm_bin_dir=''
6564llvm_path="${PATH}"
6565if test "${CC}" = "clang"
6566then
6567 clang_bin=`which clang`
6568 # Some systems install clang elsewhere as a symlink to the real path
6569 # which is where the related llvm tools are located.
6570 if test -L "${clang_bin}"
6571 then
6572 clang_dir=`dirname "${clang_bin}"`
6573 clang_bin=`readlink "${clang_bin}"`
6574 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6575 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6576 fi
6577fi
6578
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006579# Enable LTO flags
Christian Heimes39258d32021-04-17 11:36:35 +02006580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6581$as_echo_n "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006582
6583# Check whether --with-lto was given.
Christian Heimes39258d32021-04-17 11:36:35 +02006584if test "${with_lto+set}" = set; then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006585 withval=$with_lto;
6586if test "$withval" != no
6587then
6588 Py_LTO='true'
Christian Heimes39258d32021-04-17 11:36:35 +02006589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6590$as_echo "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006591else
6592 Py_LTO='false'
Christian Heimes39258d32021-04-17 11:36:35 +02006593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006595fi
Christian Heimes39258d32021-04-17 11:36:35 +02006596else
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6598$as_echo "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006599fi
6600
6601if test "$Py_LTO" = 'true' ; then
6602 case $CC in
6603 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006604
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006605 if test -n "$ac_tool_prefix"; then
6606 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6607set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6609$as_echo_n "checking for $ac_word... " >&6; }
6610if ${ac_cv_path_LLVM_AR+:} false; then :
6611 $as_echo_n "(cached) " >&6
6612else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006613 case $LLVM_AR in
6614 [\\/]* | ?:[\\/]*)
6615 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6616 ;;
6617 *)
6618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6619for as_dir in ${llvm_path}
6620do
6621 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006622 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006623 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6625 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006627 break 2
6628 fi
6629done
6630 done
6631IFS=$as_save_IFS
6632
6633 ;;
6634esac
6635fi
6636LLVM_AR=$ac_cv_path_LLVM_AR
6637if test -n "$LLVM_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6639$as_echo "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006640else
Christian Heimes39258d32021-04-17 11:36:35 +02006641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6642$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006643fi
6644
6645
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006646fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006647if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006648 ac_pt_LLVM_AR=$LLVM_AR
6649 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006650set dummy llvm-ar; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6652$as_echo_n "checking for $ac_word... " >&6; }
6653if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6654 $as_echo_n "(cached) " >&6
6655else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006656 case $ac_pt_LLVM_AR in
6657 [\\/]* | ?:[\\/]*)
6658 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6659 ;;
6660 *)
6661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6662for as_dir in ${llvm_path}
6663do
6664 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006665 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006666 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6668 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006670 break 2
6671 fi
6672done
6673 done
6674IFS=$as_save_IFS
6675
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006676 ;;
6677esac
6678fi
6679ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6680if test -n "$ac_pt_LLVM_AR"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6682$as_echo "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006683else
Christian Heimes39258d32021-04-17 11:36:35 +02006684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006686fi
6687
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006688 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006689 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006690 else
6691 case $cross_compiling:$ac_tool_warned in
6692yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006695ac_tool_warned=yes ;;
6696esac
6697 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006698 fi
6699else
6700 LLVM_AR="$ac_cv_path_LLVM_AR"
6701fi
6702
6703
6704 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6705 then
6706 LLVM_AR_FOUND="found"
6707 else
6708 LLVM_AR_FOUND="not-found"
6709 fi
6710 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6711 then
6712 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6713 if test -n "${found_llvm_ar}"
6714 then
6715 LLVM_AR='/usr/bin/xcrun llvm-ar'
6716 LLVM_AR_FOUND=found
Christian Heimes39258d32021-04-17 11:36:35 +02006717 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6718$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006719 fi
6720 fi
6721 if test $LLVM_AR_FOUND = not-found
6722 then
6723 LLVM_PROFR_ERR=yes
6724 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6725 else
6726 LLVM_AR_ERR=no
6727 fi
6728 AR="${LLVM_AR}"
6729 case $ac_sys_system in
6730 Darwin*)
6731 # Any changes made here should be reflected in the GCC+Darwin case below
6732 LTOFLAGS="-flto -Wl,-export_dynamic"
6733 ;;
6734 *)
6735 LTOFLAGS="-flto"
6736 ;;
6737 esac
6738 ;;
6739 *gcc*)
6740 case $ac_sys_system in
6741 Darwin*)
6742 LTOFLAGS="-flto -Wl,-export_dynamic"
6743 ;;
6744 *)
6745 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6746 ;;
6747 esac
6748 ;;
6749 esac
6750
6751 if test "$ac_cv_prog_cc_g" = "yes"
6752 then
6753 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6754 # to get debug symbols.
6755 LTOFLAGS="$LTOFLAGS -g"
6756 fi
6757
stratakisf92c7aa2018-12-04 15:54:01 +01006758 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006759 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006760fi
6761
6762# Enable PGO flags.
6763
6764
6765
6766
6767
6768
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006769if test -n "$ac_tool_prefix"; then
6770 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6771set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6773$as_echo_n "checking for $ac_word... " >&6; }
6774if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6775 $as_echo_n "(cached) " >&6
6776else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 case $LLVM_PROFDATA in
6778 [\\/]* | ?:[\\/]*)
6779 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6780 ;;
6781 *)
6782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6783for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784do
6785 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006786 test -z "$as_dir" && as_dir=.
Brett Cannon7188a3e2015-09-18 15:13:44 -07006787 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6789 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07006791 break 2
6792 fi
6793done
6794 done
6795IFS=$as_save_IFS
6796
Gregory P. Smith799520c2016-09-07 16:10:00 -07006797 ;;
6798esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006799fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6801if test -n "$LLVM_PROFDATA"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6803$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804else
Christian Heimes39258d32021-04-17 11:36:35 +02006805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6806$as_echo "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006807fi
6808
6809
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006810fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006811if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006812 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6813 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006814set dummy llvm-profdata; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +02006815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816$as_echo_n "checking for $ac_word... " >&6; }
6817if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6818 $as_echo_n "(cached) " >&6
6819else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 case $ac_pt_LLVM_PROFDATA in
6821 [\\/]* | ?:[\\/]*)
6822 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6823 ;;
6824 *)
6825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826for as_dir in ${llvm_path}
6827do
6828 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +02006829 test -z "$as_dir" && as_dir=.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006830 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +02006831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006834 break 2
6835 fi
6836done
6837 done
6838IFS=$as_save_IFS
6839
Gregory P. Smith799520c2016-09-07 16:10:00 -07006840 ;;
6841esac
6842fi
6843ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6844if test -n "$ac_pt_LLVM_PROFDATA"; then
Christian Heimes39258d32021-04-17 11:36:35 +02006845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6846$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006847else
Christian Heimes39258d32021-04-17 11:36:35 +02006848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849$as_echo "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006850fi
6851
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006852 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006853 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006854 else
6855 case $cross_compiling:$ac_tool_warned in
6856yes:)
Christian Heimes39258d32021-04-17 11:36:35 +02006857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006859ac_tool_warned=yes ;;
6860esac
6861 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006862 fi
6863else
6864 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6865fi
6866
6867
6868if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6869then
6870 LLVM_PROF_FOUND="found"
6871else
6872 LLVM_PROF_FOUND="not-found"
6873fi
6874if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6875then
6876 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6877 if test -n "${found_llvm_profdata}"
6878 then
6879 # llvm-profdata isn't directly in $PATH in some cases.
6880 # https://apple.stackexchange.com/questions/197053/
6881 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6882 LLVM_PROF_FOUND=found
Christian Heimes39258d32021-04-17 11:36:35 +02006883 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6884$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07006885 fi
6886fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006887LLVM_PROF_ERR=no
6888case $CC in
6889 *clang*)
6890 # Any changes made here should be reflected in the GCC+Darwin case below
6891 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6892 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006893 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006894 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6895 if test $LLVM_PROF_FOUND = not-found
6896 then
6897 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006898 if test "${REQUIRE_PGO}" = "yes"
6899 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006900 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006901 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006902 fi
6903 ;;
6904 *gcc*)
6905 case $ac_sys_system in
6906 Darwin*)
6907 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6908 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006909 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006910 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006911 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006912 then
6913 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006914 if test "${REQUIRE_PGO}" = "yes"
6915 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006916 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006917 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006918 fi
6919 ;;
6920 *)
6921 PGO_PROF_GEN_FLAG="-fprofile-generate"
6922 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6923 LLVM_PROF_MERGER="true"
6924 LLVM_PROF_FILE=""
6925 ;;
6926 esac
6927 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006928 *icc*)
6929 PGO_PROF_GEN_FLAG="-prof-gen"
6930 PGO_PROF_USE_FLAG="-prof-use"
6931 LLVM_PROF_MERGER="true"
6932 LLVM_PROF_FILE=""
6933 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006934esac
6935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6937# merged with this chunk of code?
6938
6939# Optimizer/debugger flags
6940# ------------------------
6941# (The following bit of code is complicated enough - please keep things
6942# indented properly. Just pretend you're editing Python code. ;-)
6943
6944# There are two parallel sets of case statements below, one that checks to
6945# see if OPT was set and one that does BASECFLAGS setting based upon
6946# compiler and platform. BASECFLAGS tweaks need to be made even if the
6947# user set OPT.
6948
Victor Stinner23a683a2019-04-12 21:27:37 +02006949case $CC in
6950 *clang*)
6951 cc_is_clang=1
6952 ;;
6953 *)
6954 if $CC --version 2>&1 | grep -q clang
6955 then
6956 cc_is_clang=1
6957 else
6958 cc_is_clang=
6959 fi
6960esac
6961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962# tweak OPT based on compiler and platform, only if the user didn't set
6963# it on the command line
6964
Victor Stinner9ed34a82017-05-02 22:35:58 +02006965
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006966if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967then
6968 case $GCC in
6969 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6971 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6972 WRAP="-fwrapv"
6973 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006974
Victor Stinner35f3d242017-04-21 12:35:24 +02006975 if test -n "${cc_is_clang}"
6976 then
6977 # Clang also needs -fwrapv
6978 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006979 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6980 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006981 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006982 fi
6983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 case $ac_cv_prog_cc_g in
6985 yes)
6986 if test "$Py_DEBUG" = 'true' ; then
6987 # Optimization messes up debuggers, so turn it off for
6988 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006989 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006990 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006991 else
Victor Stinner28205b22017-04-21 11:24:34 +02006992 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006993 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994 else
Victor Stinner28205b22017-04-21 11:24:34 +02006995 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996 fi
6997 ;;
6998 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006999 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 ;;
7001 esac
Victor Stinner28205b22017-04-21 11:24:34 +02007002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003 case $ac_sys_system in
7004 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7005 ;;
7006 esac
7007 ;;
7008
7009 *)
7010 OPT="-O"
7011 ;;
7012 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013fi
7014
7015
7016
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007017
stratakiscf10a752018-12-19 18:19:01 +01007018
Ronald Oussoren41761932020-11-08 10:05:27 +01007019# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007020UNIVERSAL_ARCH_FLAGS=
7021
7022
7023# tweak BASECFLAGS based on compiler and platform
7024case $GCC in
7025yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007026 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007027
Christian Heimes39258d32021-04-17 11:36:35 +02007028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7029$as_echo_n "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007030 ac_save_cc="$CC"
7031 CC="$CC -Wextra -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007032 if ${ac_cv_extra_warnings+:} false; then :
7033 $as_echo_n "(cached) " >&6
7034else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036/* end confdefs.h. */
7037
7038
7039int
Christian Heimes39258d32021-04-17 11:36:35 +02007040main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007041{
7042
7043 ;
7044 return 0;
7045}
7046
7047_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007048if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007049
7050 ac_cv_extra_warnings=yes
7051
Christian Heimes39258d32021-04-17 11:36:35 +02007052else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007053
7054 ac_cv_extra_warnings=no
7055
7056fi
Christian Heimes39258d32021-04-17 11:36:35 +02007057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007058fi
7059
7060 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7062$as_echo "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007063
7064 if test $ac_cv_extra_warnings = yes
7065 then
7066 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7067 fi
7068
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007069 # Python doesn't violate C99 aliasing rules, but older versions of
7070 # GCC produce warnings for legal Python code. Enable
7071 # -fno-strict-aliasing on versions of GCC that support but produce
7072 # warnings. See Issue3326
Christian Heimes39258d32021-04-17 11:36:35 +02007073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7074$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007075 ac_save_cc="$CC"
7076 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007077 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007078 if ${ac_cv_no_strict_aliasing+:} false; then :
7079 $as_echo_n "(cached) " >&6
7080else
Matthias Kloseb9621712010-04-24 17:59:49 +00007081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007082/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007083
Matthias Kloseb159a552010-04-25 21:00:44 +00007084
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007085int
Christian Heimes39258d32021-04-17 11:36:35 +02007086main ()
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007087{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007088
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007089 ;
7090 return 0;
7091}
Matthias Kloseb159a552010-04-25 21:00:44 +00007092
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007093_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007094if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007095
7096 CC="$ac_save_cc -fstrict-aliasing"
7097 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007099/* end confdefs.h. */
7100
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007101 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007102int
Christian Heimes39258d32021-04-17 11:36:35 +02007103main ()
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007104{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007105double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007106 ;
7107 return 0;
7108}
Matthias Kloseb159a552010-04-25 21:00:44 +00007109
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007110_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007111if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007112
7113 ac_cv_no_strict_aliasing=no
7114
Christian Heimes39258d32021-04-17 11:36:35 +02007115else
Matthias Kloseb159a552010-04-25 21:00:44 +00007116
7117 ac_cv_no_strict_aliasing=yes
7118
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007119fi
Christian Heimes39258d32021-04-17 11:36:35 +02007120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007121
Christian Heimes39258d32021-04-17 11:36:35 +02007122else
Matthias Kloseb159a552010-04-25 21:00:44 +00007123
7124 ac_cv_no_strict_aliasing=no
7125
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126fi
Christian Heimes39258d32021-04-17 11:36:35 +02007127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007128fi
7129
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007130 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007131 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7133$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007134 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135 then
7136 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7137 fi
7138
Zachary Ware5af85642015-12-21 12:09:17 -06007139 # ICC doesn't recognize the option, but only emits a warning
7140 ## XXX does it emit an unused result warning and can it be disabled?
7141 case "$CC" in
7142 *icc*)
7143 ac_cv_disable_unused_result_warning=no
7144 ;;
7145 *)
Christian Heimes39258d32021-04-17 11:36:35 +02007146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7147$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007148 ac_save_cc="$CC"
7149 CC="$CC -Wunused-result -Werror"
7150 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007151 if ${ac_cv_disable_unused_result_warning+:} false; then :
7152 $as_echo_n "(cached) " >&6
7153else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7155/* end confdefs.h. */
7156
7157
7158int
Christian Heimes39258d32021-04-17 11:36:35 +02007159main ()
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007160{
7161
7162 ;
7163 return 0;
7164}
7165
7166_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007167if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007168
7169 ac_cv_disable_unused_result_warning=yes
7170
Christian Heimes39258d32021-04-17 11:36:35 +02007171else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007172
7173 ac_cv_disable_unused_result_warning=no
7174
7175fi
Christian Heimes39258d32021-04-17 11:36:35 +02007176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007177fi
7178
7179 CFLAGS="$save_CFLAGS"
7180 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7182$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007183 ;;
7184 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007185
7186 if test $ac_cv_disable_unused_result_warning = yes
7187 then
7188 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007189 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7190 fi
7191
Christian Heimes39258d32021-04-17 11:36:35 +02007192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7193$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007194 ac_save_cc="$CC"
7195 CC="$CC -Wunused-parameter -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007196 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7197 $as_echo_n "(cached) " >&6
7198else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201
7202
7203int
Christian Heimes39258d32021-04-17 11:36:35 +02007204main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007205{
7206
7207 ;
7208 return 0;
7209}
7210
7211_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007212if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007213
7214 ac_cv_disable_unused_parameter_warning=yes
7215
Christian Heimes39258d32021-04-17 11:36:35 +02007216else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007217
7218 ac_cv_disable_unused_parameter_warning=no
7219
7220fi
Christian Heimes39258d32021-04-17 11:36:35 +02007221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007222fi
7223
7224 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7226$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007227
7228 if test $ac_cv_disable_unused_parameter_warning = yes
7229 then
7230 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7231 fi
7232
Christian Heimes39258d32021-04-17 11:36:35 +02007233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7234$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007235 ac_save_cc="$CC"
7236 CC="$CC -Wmissing-field-initializers -Werror"
Christian Heimes39258d32021-04-17 11:36:35 +02007237 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241/* end confdefs.h. */
7242
7243
7244int
Christian Heimes39258d32021-04-17 11:36:35 +02007245main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007246{
7247
7248 ;
7249 return 0;
7250}
7251
7252_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007253if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007254
7255 ac_cv_disable_missing_field_initializers=yes
7256
Christian Heimes39258d32021-04-17 11:36:35 +02007257else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007258
7259 ac_cv_disable_missing_field_initializers=no
7260
7261fi
Christian Heimes39258d32021-04-17 11:36:35 +02007262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007263fi
7264
7265 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7267$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007268
7269 if test $ac_cv_disable_missing_field_initializers = yes
7270 then
7271 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007272 fi
7273
Christian Heimes39258d32021-04-17 11:36:35 +02007274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7275$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007276 ac_save_cc="$CC"
7277 CC="$CC -Wsign-compare"
7278 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007279 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7280 $as_echo_n "(cached) " >&6
7281else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283/* end confdefs.h. */
7284
7285
7286int
Christian Heimes39258d32021-04-17 11:36:35 +02007287main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007288{
7289
7290 ;
7291 return 0;
7292}
7293
7294_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007295if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007296
7297 ac_cv_enable_sign_compare_warning=yes
7298
Christian Heimes39258d32021-04-17 11:36:35 +02007299else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007300
7301 ac_cv_enable_sign_compare_warning=no
7302
7303fi
Christian Heimes39258d32021-04-17 11:36:35 +02007304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007305fi
7306
7307 CFLAGS="$save_CFLAGS"
7308 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7310$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007311
7312 if test $ac_cv_enable_sign_compare_warning = yes
7313 then
7314 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7315 fi
7316
Christian Heimes39258d32021-04-17 11:36:35 +02007317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7318$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007319 ac_save_cc="$CC"
7320 CC="$CC -Wunreachable-code"
7321 save_CFLAGS="$CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02007322 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7323 $as_echo_n "(cached) " >&6
7324else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7326/* end confdefs.h. */
7327
7328
7329int
Christian Heimes39258d32021-04-17 11:36:35 +02007330main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007331{
7332
7333 ;
7334 return 0;
7335}
7336
7337_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007338if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007339
7340 ac_cv_enable_unreachable_code_warning=yes
7341
Christian Heimes39258d32021-04-17 11:36:35 +02007342else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007343
7344 ac_cv_enable_unreachable_code_warning=no
7345
7346fi
Christian Heimes39258d32021-04-17 11:36:35 +02007347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007348fi
7349
7350 CFLAGS="$save_CFLAGS"
7351 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007352
7353 # Don't enable unreachable code warning in debug mode, since it usually
7354 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007355 # Issue #24324: Unfortunately, the unreachable code warning does not work
7356 # correctly on gcc and has been silently removed from the compiler.
7357 # It is supported on clang but on OS X systems gcc may be an alias
7358 # for clang. Try to determine if the compiler is not really gcc and,
7359 # if so, only then enable the warning.
7360 if test $ac_cv_enable_unreachable_code_warning = yes && \
7361 test "$Py_DEBUG" != "true" && \
7362 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007363 then
7364 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007365 else
7366 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007367 fi
Christian Heimes39258d32021-04-17 11:36:35 +02007368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7369$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007370
Christian Heimes39258d32021-04-17 11:36:35 +02007371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7372$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007373 ac_save_cc="$CC"
7374 CC="$CC -Werror -Wstrict-prototypes"
Christian Heimes39258d32021-04-17 11:36:35 +02007375 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7376 $as_echo_n "(cached) " >&6
7377else
INADA Naokie3364842018-06-05 20:40:53 +09007378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7379/* end confdefs.h. */
7380
7381
7382int
Christian Heimes39258d32021-04-17 11:36:35 +02007383main ()
INADA Naokie3364842018-06-05 20:40:53 +09007384{
7385
7386 ;
7387 return 0;
7388}
7389
7390_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007391if ac_fn_c_try_compile "$LINENO"; then :
INADA Naokie3364842018-06-05 20:40:53 +09007392
7393 ac_cv_enable_strict_prototypes_warning=yes
7394
Christian Heimes39258d32021-04-17 11:36:35 +02007395else
INADA Naokie3364842018-06-05 20:40:53 +09007396
7397 ac_cv_enable_strict_prototypes_warning=no
7398
7399fi
Christian Heimes39258d32021-04-17 11:36:35 +02007400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09007401fi
7402
7403 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7405$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007406
7407 if test $ac_cv_enable_strict_prototypes_warning = yes
7408 then
7409 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7410 fi
7411
Christian Heimes39258d32021-04-17 11:36:35 +02007412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7413$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007414 ac_save_cc="$CC"
7415 CC="$CC -Werror=implicit-function-declaration"
Christian Heimes39258d32021-04-17 11:36:35 +02007416 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7417 $as_echo_n "(cached) " >&6
7418else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7420/* end confdefs.h. */
7421
7422
7423int
Christian Heimes39258d32021-04-17 11:36:35 +02007424main ()
Victor Stinner193ee0a2017-02-06 14:24:00 +01007425{
7426
7427 ;
7428 return 0;
7429}
7430
7431_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007432if ac_fn_c_try_compile "$LINENO"; then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01007433
7434 ac_cv_enable_implicit_function_declaration_error=yes
7435
Christian Heimes39258d32021-04-17 11:36:35 +02007436else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007437
7438 ac_cv_enable_implicit_function_declaration_error=no
7439
7440fi
Christian Heimes39258d32021-04-17 11:36:35 +02007441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01007442fi
7443
7444 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7446$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007447
7448 if test $ac_cv_enable_implicit_function_declaration_error = yes
7449 then
7450 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7451 fi
7452
Christian Heimes39258d32021-04-17 11:36:35 +02007453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7454$as_echo_n "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007455 ac_save_cc="$CC"
7456 CC="$CC -fvisibility=hidden"
Christian Heimes39258d32021-04-17 11:36:35 +02007457 if ${ac_cv_enable_visibility+:} false; then :
7458 $as_echo_n "(cached) " >&6
7459else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7461/* end confdefs.h. */
7462
7463
7464int
Christian Heimes39258d32021-04-17 11:36:35 +02007465main ()
Vinay Sajip0b60f642019-10-15 08:26:12 +01007466{
7467
7468 ;
7469 return 0;
7470}
7471
7472_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007473if ac_fn_c_try_compile "$LINENO"; then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01007474
7475 ac_cv_enable_visibility=yes
7476
Christian Heimes39258d32021-04-17 11:36:35 +02007477else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007478
7479 ac_cv_enable_visibility=no
7480
7481fi
Christian Heimes39258d32021-04-17 11:36:35 +02007482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01007483fi
7484
7485 CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +02007486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7487$as_echo "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007488
7489 if test $ac_cv_enable_visibility = yes
7490 then
7491 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7492 fi
7493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7495 # support. Without this, treatment of subnormals doesn't follow
7496 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007497 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498 alpha*)
7499 BASECFLAGS="$BASECFLAGS -mieee"
7500 ;;
7501 esac
7502
7503 case $ac_sys_system in
7504 SCO_SV*)
7505 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7506 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007507
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 Darwin*)
7509 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7510 # used to be here, but non-Apple gcc doesn't accept them.
7511 if test "${CC}" = gcc
7512 then
Christian Heimes39258d32021-04-17 11:36:35 +02007513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
7514$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007515 case "${UNIVERSALSDK}" in
7516 */MacOSX10.4u.sdk)
7517 # Build using 10.4 SDK, force usage of gcc when the
7518 # compiler is gcc, otherwise the user will get very
7519 # confusing error messages when building on OSX 10.6
7520 CC=gcc-4.0
7521 CPP=cpp-4.0
7522 ;;
7523 esac
Christian Heimes39258d32021-04-17 11:36:35 +02007524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7525$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007526 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527
Ned Deily0cb33da2021-05-02 04:48:29 -04007528 LIPO_INTEL64_FLAGS=""
Ned Deily87adb6e2013-10-18 21:09:56 -07007529 if test "${enable_universalsdk}"
7530 then
7531 case "$UNIVERSAL_ARCHS" in
7532 32-bit)
7533 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7534 LIPO_32BIT_FLAGS=""
7535 ARCH_RUN_32BIT=""
7536 ;;
7537 64-bit)
7538 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7539 LIPO_32BIT_FLAGS=""
7540 ARCH_RUN_32BIT="true"
7541 ;;
7542 all)
7543 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7544 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7545 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7546 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007547 universal2)
7548 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7549 LIPO_32BIT_FLAGS=""
Ned Deily0cb33da2021-05-02 04:48:29 -04007550 LIPO_INTEL64_FLAGS="-extract x86_64"
Ronald Oussoren41761932020-11-08 10:05:27 +01007551 ARCH_RUN_32BIT="true"
Ned Deily0cb33da2021-05-02 04:48:29 -04007552 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007553 intel)
7554 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7555 LIPO_32BIT_FLAGS="-extract i386"
7556 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7557 ;;
7558 intel-32)
7559 UNIVERSAL_ARCH_FLAGS="-arch i386"
7560 LIPO_32BIT_FLAGS=""
7561 ARCH_RUN_32BIT=""
7562 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007563 intel-64)
7564 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7565 LIPO_32BIT_FLAGS=""
7566 ARCH_RUN_32BIT="true"
7567 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007568 3-way)
7569 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7570 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7571 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7572 ;;
7573 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007574 as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007575 ;;
7576 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577
Ned Deily87adb6e2013-10-18 21:09:56 -07007578 if test "${UNIVERSALSDK}" != "/"
7579 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007580 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7581 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007582 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007583 else
7584 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7585 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007586 fi
7587 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588
Ned Deily87adb6e2013-10-18 21:09:56 -07007589 # Calculate an appropriate deployment target for this build:
7590 # The deployment target value is used explicitly to enable certain
7591 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007592 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007593 # component of the string returned by distutils.get_platform().
7594 #
7595 # Use the value from:
7596 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7597 # 2. the operating system version of the build machine if >= 10.6
7598 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7599 # below to pick either 10.3, 10.4, or 10.5 as the target.
7600 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601
Christian Heimes39258d32021-04-17 11:36:35 +02007602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7603$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007604 cur_target_major=`sw_vers -productVersion | \
7605 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7606 cur_target_minor=`sw_vers -productVersion | \
7607 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7608 cur_target="${cur_target_major}.${cur_target_minor}"
7609 if test ${cur_target_major} -eq 10 && \
7610 test ${cur_target_minor} -ge 3 && \
7611 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007612 then
Ned Deily36820b62014-06-25 13:44:22 -07007613 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007614 cur_target=10.3
7615 if test ${enable_universalsdk}
7616 then
7617 case "$UNIVERSAL_ARCHS" in
7618 all|3-way|intel|64-bit)
7619 # These configurations were first supported in 10.5
7620 cur_target='10.5'
7621 ;;
7622 esac
7623 else
7624 if test `/usr/bin/arch` = "i386"
7625 then
7626 # 10.4 was the first release to support Intel archs
7627 cur_target="10.4"
7628 fi
7629 fi
7630 fi
7631 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007632
Ned Deily87adb6e2013-10-18 21:09:56 -07007633 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7634 # environment with a value that is the same as what we'll use
7635 # in the Makefile to ensure that we'll get the same compiler
7636 # environment during configure and build time.
7637 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7638 export MACOSX_DEPLOYMENT_TARGET
7639 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Christian Heimes39258d32021-04-17 11:36:35 +02007640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7641$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007642
Christian Heimes39258d32021-04-17 11:36:35 +02007643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7644$as_echo_n "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7646/* end confdefs.h. */
7647#include <stdio.h>
7648int
Christian Heimes39258d32021-04-17 11:36:35 +02007649main ()
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007650{
7651printf("%d", 42);
7652 ;
7653 return 0;
7654}
7655_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007656if ac_fn_c_try_link "$LINENO"; then :
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7658$as_echo "yes" >&6; }
7659else
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7661$as_echo "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007662 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7663
7664fi
Christian Heimes39258d32021-04-17 11:36:35 +02007665rm -f core conftest.err conftest.$ac_objext \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007666 conftest$ac_exeext conftest.$ac_ext
7667
Ned Deily87adb6e2013-10-18 21:09:56 -07007668 # end of Darwin* tests
7669 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670 esac
7671 ;;
7672
7673*)
7674 case $ac_sys_system in
7675 OpenUNIX*|UnixWare*)
7676 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7677 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678 SCO_SV*)
7679 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7680 ;;
7681 esac
7682 ;;
7683esac
7684
Zachary Ware5af85642015-12-21 12:09:17 -06007685case "$CC" in
7686*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007687 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007688 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7689 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007690*xlc*)
7691 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7692 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007693esac
7694
T. Woutersddbfa2c2017-05-23 01:30:49 +02007695if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696 :
7697else
7698 OPT="-DNDEBUG $OPT"
7699fi
7700
7701if test "$ac_arch_flags"
7702then
7703 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7704fi
7705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706# On some compilers, pthreads are available without further options
7707# (e.g. MacOS X). On some of these systems, the compiler will not
7708# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7709# So we have to see first whether pthreads are available without
7710# options before we can check whether -Kpthread improves anything.
Christian Heimes39258d32021-04-17 11:36:35 +02007711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7712$as_echo_n "checking whether pthreads are available without options... " >&6; }
7713if ${ac_cv_pthread_is_default+:} false; then :
7714 $as_echo_n "(cached) " >&6
7715else
7716 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717 ac_cv_pthread_is_default=no
Christian Heimes39258d32021-04-17 11:36:35 +02007718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720/* end confdefs.h. */
7721
Stefan Krah7dba5942012-11-22 22:49:11 +01007722#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723#include <pthread.h>
7724
7725void* routine(void* p){return NULL;}
7726
7727int main(){
7728 pthread_t p;
7729 if(pthread_create(&p,NULL,routine,NULL)!=0)
7730 return 1;
7731 (void)pthread_detach(p);
7732 return 0;
7733}
7734
7735_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007736if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737
7738 ac_cv_pthread_is_default=yes
7739 ac_cv_kthread=no
7740 ac_cv_pthread=no
7741
Christian Heimes39258d32021-04-17 11:36:35 +02007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747fi
7748
7749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750fi
7751
Christian Heimes39258d32021-04-17 11:36:35 +02007752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7753$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754
7755
7756if test $ac_cv_pthread_is_default = yes
7757then
7758 ac_cv_kpthread=no
7759else
7760# -Kpthread, if available, provides the right #defines
7761# and linker options to make pthread_create available
7762# Some compilers won't report that they do not support -Kpthread,
7763# so we need to run a program to see whether it really made the
7764# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7766$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
7767if ${ac_cv_kpthread+:} false; then :
7768 $as_echo_n "(cached) " >&6
7769else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770 ac_save_cc="$CC"
7771CC="$CC -Kpthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007772if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773 ac_cv_kpthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776/* end confdefs.h. */
7777
Stefan Krah7dba5942012-11-22 22:49:11 +01007778#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779#include <pthread.h>
7780
7781void* routine(void* p){return NULL;}
7782
7783int main(){
7784 pthread_t p;
7785 if(pthread_create(&p,NULL,routine,NULL)!=0)
7786 return 1;
7787 (void)pthread_detach(p);
7788 return 0;
7789}
7790
7791_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007792if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793 ac_cv_kpthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007794else
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799fi
7800
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801CC="$ac_save_cc"
7802fi
7803
Christian Heimes39258d32021-04-17 11:36:35 +02007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7805$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806fi
7807
7808if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7809then
7810# -Kthread, if available, provides the right #defines
7811# and linker options to make pthread_create available
7812# Some compilers won't report that they do not support -Kthread,
7813# so we need to run a program to see whether it really made the
7814# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7816$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
7817if ${ac_cv_kthread+:} false; then :
7818 $as_echo_n "(cached) " >&6
7819else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820 ac_save_cc="$CC"
7821CC="$CC -Kthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007822if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823 ac_cv_kthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007824else
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007826/* end confdefs.h. */
7827
Stefan Krah7dba5942012-11-22 22:49:11 +01007828#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007829#include <pthread.h>
7830
7831void* routine(void* p){return NULL;}
7832
7833int main(){
7834 pthread_t p;
7835 if(pthread_create(&p,NULL,routine,NULL)!=0)
7836 return 1;
7837 (void)pthread_detach(p);
7838 return 0;
7839}
7840
7841_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007842if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843 ac_cv_kthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007844else
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849fi
7850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851CC="$ac_save_cc"
7852fi
7853
Christian Heimes39258d32021-04-17 11:36:35 +02007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7855$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856fi
7857
7858if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7859then
7860# -pthread, if available, provides the right #defines
7861# and linker options to make pthread_create available
7862# Some compilers won't report that they do not support -pthread,
7863# so we need to run a program to see whether it really made the
7864# function available.
Christian Heimes39258d32021-04-17 11:36:35 +02007865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7866$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
7867if ${ac_cv_pthread+:} false; then :
7868 $as_echo_n "(cached) " >&6
7869else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007870 ac_save_cc="$CC"
7871CC="$CC -pthread"
Christian Heimes39258d32021-04-17 11:36:35 +02007872if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007873 ac_cv_pthread=no
Christian Heimes39258d32021-04-17 11:36:35 +02007874else
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876/* end confdefs.h. */
7877
Stefan Krah7dba5942012-11-22 22:49:11 +01007878#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879#include <pthread.h>
7880
7881void* routine(void* p){return NULL;}
7882
7883int main(){
7884 pthread_t p;
7885 if(pthread_create(&p,NULL,routine,NULL)!=0)
7886 return 1;
7887 (void)pthread_detach(p);
7888 return 0;
7889}
7890
7891_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02007892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893 ac_cv_pthread=yes
Christian Heimes39258d32021-04-17 11:36:35 +02007894else
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007899fi
7900
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901CC="$ac_save_cc"
7902fi
7903
Christian Heimes39258d32021-04-17 11:36:35 +02007904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7905$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007906fi
7907
7908# If we have set a CC compiler flag for thread support then
7909# check if it works for CXX, too.
7910ac_cv_cxx_thread=no
7911if test ! -z "$CXX"
7912then
Christian Heimes39258d32021-04-17 11:36:35 +02007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7914$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007915ac_save_cxx="$CXX"
7916
7917if test "$ac_cv_kpthread" = "yes"
7918then
7919 CXX="$CXX -Kpthread"
7920 ac_cv_cxx_thread=yes
7921elif test "$ac_cv_kthread" = "yes"
7922then
7923 CXX="$CXX -Kthread"
7924 ac_cv_cxx_thread=yes
7925elif test "$ac_cv_pthread" = "yes"
7926then
7927 CXX="$CXX -pthread"
7928 ac_cv_cxx_thread=yes
7929fi
7930
7931if test $ac_cv_cxx_thread = yes
7932then
7933 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7934 $CXX -c conftest.$ac_ext 2>&5
7935 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7936 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7937 then
7938 ac_cv_cxx_thread=yes
7939 else
7940 ac_cv_cxx_thread=no
7941 fi
7942 rm -fr conftest*
7943fi
Christian Heimes39258d32021-04-17 11:36:35 +02007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7945$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007946fi
7947CXX="$ac_save_cxx"
7948
7949
7950# checks for header files
Christian Heimes39258d32021-04-17 11:36:35 +02007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7952$as_echo_n "checking for ANSI C header files... " >&6; }
7953if ${ac_cv_header_stdc+:} false; then :
7954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007955else
Christian Heimes39258d32021-04-17 11:36:35 +02007956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7957/* end confdefs.h. */
7958#include <stdlib.h>
7959#include <stdarg.h>
7960#include <string.h>
7961#include <float.h>
Pablo Galindocc128882021-03-01 16:47:53 +00007962
Christian Heimes39258d32021-04-17 11:36:35 +02007963int
7964main ()
7965{
Pablo Galindo53e55292021-04-05 17:38:40 +01007966
Christian Heimes39258d32021-04-17 11:36:35 +02007967 ;
7968 return 0;
7969}
7970_ACEOF
7971if ac_fn_c_try_compile "$LINENO"; then :
7972 ac_cv_header_stdc=yes
7973else
7974 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00007975fi
Christian Heimes39258d32021-04-17 11:36:35 +02007976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00007977
Christian Heimes39258d32021-04-17 11:36:35 +02007978if test $ac_cv_header_stdc = yes; then
7979 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7981/* end confdefs.h. */
7982#include <string.h>
Pablo Galindocc128882021-03-01 16:47:53 +00007983
Christian Heimes39258d32021-04-17 11:36:35 +02007984_ACEOF
7985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7986 $EGREP "memchr" >/dev/null 2>&1; then :
Pablo Galindocc128882021-03-01 16:47:53 +00007987
Christian Heimes39258d32021-04-17 11:36:35 +02007988else
7989 ac_cv_header_stdc=no
Pablo Galindocc128882021-03-01 16:47:53 +00007990fi
Christian Heimes39258d32021-04-17 11:36:35 +02007991rm -f conftest*
Pablo Galindocc128882021-03-01 16:47:53 +00007992
Pablo Galindo53e55292021-04-05 17:38:40 +01007993fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007994
Christian Heimes39258d32021-04-17 11:36:35 +02007995if test $ac_cv_header_stdc = yes; then
7996 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7998/* end confdefs.h. */
7999#include <stdlib.h>
Pablo Galindo53e55292021-04-05 17:38:40 +01008000
Christian Heimes39258d32021-04-17 11:36:35 +02008001_ACEOF
8002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8003 $EGREP "free" >/dev/null 2>&1; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008004
Christian Heimes39258d32021-04-17 11:36:35 +02008005else
8006 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008007fi
Christian Heimes39258d32021-04-17 11:36:35 +02008008rm -f conftest*
Pablo Galindo53e55292021-04-05 17:38:40 +01008009
8010fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008011
Christian Heimes39258d32021-04-17 11:36:35 +02008012if test $ac_cv_header_stdc = yes; then
8013 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8014 if test "$cross_compiling" = yes; then :
8015 :
8016else
8017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8018/* end confdefs.h. */
8019#include <ctype.h>
8020#include <stdlib.h>
8021#if ((' ' & 0x0FF) == 0x020)
8022# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8023# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8024#else
8025# define ISLOWER(c) \
8026 (('a' <= (c) && (c) <= 'i') \
8027 || ('j' <= (c) && (c) <= 'r') \
8028 || ('s' <= (c) && (c) <= 'z'))
8029# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8030#endif
Pablo Galindo53e55292021-04-05 17:38:40 +01008031
Christian Heimes39258d32021-04-17 11:36:35 +02008032#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8033int
8034main ()
8035{
8036 int i;
8037 for (i = 0; i < 256; i++)
8038 if (XOR (islower (i), ISLOWER (i))
8039 || toupper (i) != TOUPPER (i))
8040 return 2;
8041 return 0;
8042}
8043_ACEOF
8044if ac_fn_c_try_run "$LINENO"; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008045
Christian Heimes39258d32021-04-17 11:36:35 +02008046else
8047 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008048fi
Christian Heimes39258d32021-04-17 11:36:35 +02008049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01008051fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008052
8053fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008054fi
Christian Heimes39258d32021-04-17 11:36:35 +02008055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8056$as_echo "$ac_cv_header_stdc" >&6; }
8057if test $ac_cv_header_stdc = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01008058
Christian Heimes39258d32021-04-17 11:36:35 +02008059$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008060
8061fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008062
Christian Heimes39258d32021-04-17 11:36:35 +02008063for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
8064fcntl.h grp.h \
8065ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
8066sched.h shadow.h signal.h stropts.h termios.h \
8067utime.h \
8068poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
8069sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
8070sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
8071sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
8072sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
8073sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
8074libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
8075linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
8076sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8077sys/mman.h sys/eventfd.h
8078do :
8079 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8080ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8081if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8082 cat >>confdefs.h <<_ACEOF
8083#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8084_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008085
8086fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008087
Christian Heimes39258d32021-04-17 11:36:35 +02008088done
Guido van Rossum627b2d71993-12-24 10:39:16 +00008089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008090ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008091for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Heimes39258d32021-04-17 11:36:35 +02008092 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8094$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8095if eval \${$as_ac_Header+:} false; then :
8096 $as_echo_n "(cached) " >&6
8097else
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100#include <sys/types.h>
8101#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008102
Martin v. Löwis11437992002-04-12 09:54:03 +00008103int
Christian Heimes39258d32021-04-17 11:36:35 +02008104main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008105{
8106if ((DIR *) 0)
8107return 0;
8108 ;
8109 return 0;
8110}
8111_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 eval "$as_ac_Header=yes"
Christian Heimes39258d32021-04-17 11:36:35 +02008114else
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116fi
Christian Heimes39258d32021-04-17 11:36:35 +02008117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119eval ac_res=\$$as_ac_Header
Christian Heimes39258d32021-04-17 11:36:35 +02008120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8121$as_echo "$ac_res" >&6; }
8122if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 cat >>confdefs.h <<_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008124#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008125_ACEOF
8126
8127ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008130done
8131# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8132if test $ac_header_dirent = dirent.h; then
Christian Heimes39258d32021-04-17 11:36:35 +02008133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8134$as_echo_n "checking for library containing opendir... " >&6; }
8135if ${ac_cv_search_opendir+:} false; then :
8136 $as_echo_n "(cached) " >&6
8137else
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142/* Override any GCC internal prototype to avoid an error.
8143 Use char because int might match the return type of a GCC
8144 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02008145#ifdef __cplusplus
8146extern "C"
8147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008148char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008149int
Christian Heimes39258d32021-04-17 11:36:35 +02008150main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008153 ;
8154 return 0;
8155}
8156_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008157for ac_lib in '' dir; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 if test -z "$ac_lib"; then
8159 ac_res="none required"
8160 else
8161 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008162 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 fi
Christian Heimes39258d32021-04-17 11:36:35 +02008164 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008166fi
Christian Heimes39258d32021-04-17 11:36:35 +02008167rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02008169 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172done
Christian Heimes39258d32021-04-17 11:36:35 +02008173if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008174
Christian Heimes39258d32021-04-17 11:36:35 +02008175else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 ac_cv_search_opendir=no
8177fi
8178rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008179LIBS=$ac_func_search_save_LIBS
8180fi
Christian Heimes39258d32021-04-17 11:36:35 +02008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8182$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008183ac_res=$ac_cv_search_opendir
Christian Heimes39258d32021-04-17 11:36:35 +02008184if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008185 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
Michael W. Hudson54241132001-12-07 15:38:26 +00008189else
Christian Heimes39258d32021-04-17 11:36:35 +02008190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8191$as_echo_n "checking for library containing opendir... " >&6; }
8192if ${ac_cv_search_opendir+:} false; then :
8193 $as_echo_n "(cached) " >&6
8194else
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199/* Override any GCC internal prototype to avoid an error.
8200 Use char because int might match the return type of a GCC
8201 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02008202#ifdef __cplusplus
8203extern "C"
8204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008205char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
Christian Heimes39258d32021-04-17 11:36:35 +02008207main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ;
8211 return 0;
8212}
8213_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008214for ac_lib in '' x; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 if test -z "$ac_lib"; then
8216 ac_res="none required"
8217 else
8218 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008219 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 fi
Christian Heimes39258d32021-04-17 11:36:35 +02008221 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008223fi
Christian Heimes39258d32021-04-17 11:36:35 +02008224rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +02008226 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229done
Christian Heimes39258d32021-04-17 11:36:35 +02008230if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008231
Christian Heimes39258d32021-04-17 11:36:35 +02008232else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233 ac_cv_search_opendir=no
8234fi
8235rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008236LIBS=$ac_func_search_save_LIBS
8237fi
Christian Heimes39258d32021-04-17 11:36:35 +02008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8239$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240ac_res=$ac_cv_search_opendir
Christian Heimes39258d32021-04-17 11:36:35 +02008241if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008244fi
8245
8246fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008247
Christian Heimes39258d32021-04-17 11:36:35 +02008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8249$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
8250if ${ac_cv_header_sys_types_h_makedev+:} false; then :
8251 $as_echo_n "(cached) " >&6
8252else
8253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8254/* end confdefs.h. */
8255#include <sys/types.h>
8256int
8257main ()
8258{
8259return makedev(0, 0);
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264if ac_fn_c_try_link "$LINENO"; then :
8265 ac_cv_header_sys_types_h_makedev=yes
8266else
8267 ac_cv_header_sys_types_h_makedev=no
8268fi
8269rm -f core conftest.err conftest.$ac_objext \
8270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008271
Christian Heimes39258d32021-04-17 11:36:35 +02008272fi
8273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8274$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008275
Christian Heimes39258d32021-04-17 11:36:35 +02008276if test $ac_cv_header_sys_types_h_makedev = no; then
8277ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8278if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
8279
8280$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008281
8282fi
8283
8284
Christian Heimes39258d32021-04-17 11:36:35 +02008285
8286 if test $ac_cv_header_sys_mkdev_h = no; then
8287 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
8288if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
8289
8290$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008291
8292fi
8293
Christian Heimes39258d32021-04-17 11:36:35 +02008294
8295 fi
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008296fi
8297
Michael W. Hudson54241132001-12-07 15:38:26 +00008298
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008299# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8300# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8301SAVE_CFLAGS=$CFLAGS
8302CFLAGS="-std=c99 $CFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +02008303for ac_header in bluetooth/bluetooth.h
8304do :
8305 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8306if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8307 cat >>confdefs.h <<_ACEOF
8308#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8309_ACEOF
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008310
8311fi
8312
Christian Heimes39258d32021-04-17 11:36:35 +02008313done
8314
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008315CFLAGS=$SAVE_CFLAGS
8316
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008317# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Christian Heimes39258d32021-04-17 11:36:35 +02008318for ac_header in net/if.h
8319do :
8320 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008321#ifdef STDC_HEADERS
8322# include <stdlib.h>
8323# include <stddef.h>
8324#else
8325# ifdef HAVE_STDLIB_H
8326# include <stdlib.h>
8327# endif
8328#endif
8329#ifdef HAVE_SYS_SOCKET_H
8330# include <sys/socket.h>
8331#endif
8332
8333"
Christian Heimes39258d32021-04-17 11:36:35 +02008334if test "x$ac_cv_header_net_if_h" = xyes; then :
8335 cat >>confdefs.h <<_ACEOF
8336#define HAVE_NET_IF_H 1
8337_ACEOF
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008338
8339fi
8340
Christian Heimes39258d32021-04-17 11:36:35 +02008341done
8342
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008343
Martin v. Löwis11017b12006-01-14 18:12:57 +00008344# On Linux, netlink.h requires asm/types.h
Christian Heimes39258d32021-04-17 11:36:35 +02008345for ac_header in linux/netlink.h
8346do :
8347 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00008348#ifdef HAVE_ASM_TYPES_H
8349#include <asm/types.h>
8350#endif
8351#ifdef HAVE_SYS_SOCKET_H
8352#include <sys/socket.h>
8353#endif
8354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355"
Christian Heimes39258d32021-04-17 11:36:35 +02008356if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
8357 cat >>confdefs.h <<_ACEOF
8358#define HAVE_LINUX_NETLINK_H 1
8359_ACEOF
Martin v. Löwis11017b12006-01-14 18:12:57 +00008360
8361fi
8362
Christian Heimes39258d32021-04-17 11:36:35 +02008363done
8364
Martin v. Löwis11017b12006-01-14 18:12:57 +00008365
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008366# On Linux, qrtr.h requires asm/types.h
Christian Heimes39258d32021-04-17 11:36:35 +02008367for ac_header in linux/qrtr.h
8368do :
8369 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008370#ifdef HAVE_ASM_TYPES_H
8371#include <asm/types.h>
8372#endif
8373#ifdef HAVE_SYS_SOCKET_H
8374#include <sys/socket.h>
8375#endif
8376
8377"
Christian Heimes39258d32021-04-17 11:36:35 +02008378if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8379 cat >>confdefs.h <<_ACEOF
8380#define HAVE_LINUX_QRTR_H 1
8381_ACEOF
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008382
8383fi
8384
Christian Heimes39258d32021-04-17 11:36:35 +02008385done
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008386
Christian Heimes39258d32021-04-17 11:36:35 +02008387
8388for ac_header in linux/vm_sockets.h
8389do :
8390 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04008391#ifdef HAVE_SYS_SOCKET_H
8392#include <sys/socket.h>
8393#endif
8394
8395"
Christian Heimes39258d32021-04-17 11:36:35 +02008396if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8397 cat >>confdefs.h <<_ACEOF
8398#define HAVE_LINUX_VM_SOCKETS_H 1
8399_ACEOF
caaveryeffc12f2017-09-06 18:18:10 -04008400
8401fi
8402
Christian Heimes39258d32021-04-17 11:36:35 +02008403done
8404
caaveryeffc12f2017-09-06 18:18:10 -04008405
karl ding360371f2020-04-29 15:31:19 -07008406# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Christian Heimes39258d32021-04-17 11:36:35 +02008407for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
8408do :
8409 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8410ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
Charles-François Natali47413c12011-10-06 19:47:44 +02008411#ifdef HAVE_SYS_SOCKET_H
8412#include <sys/socket.h>
8413#endif
8414
8415"
Christian Heimes39258d32021-04-17 11:36:35 +02008416if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8417 cat >>confdefs.h <<_ACEOF
8418#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8419_ACEOF
Charles-François Natali47413c12011-10-06 19:47:44 +02008420
8421fi
8422
Christian Heimes39258d32021-04-17 11:36:35 +02008423done
Charles-François Natali47413c12011-10-06 19:47:44 +02008424
8425
Guido van Rossum627b2d71993-12-24 10:39:16 +00008426# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008427was_it_defined=no
Christian Heimes39258d32021-04-17 11:36:35 +02008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8429$as_echo_n "checking for clock_t in time.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008431/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008432#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008433
8434_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +02008436 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008437 was_it_defined=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008438else
Martin v. Löwis11437992002-04-12 09:54:03 +00008439
8440
Christian Heimes39258d32021-04-17 11:36:35 +02008441$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008442
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008443
Guido van Rossum627b2d71993-12-24 10:39:16 +00008444fi
Christian Heimes39258d32021-04-17 11:36:35 +02008445rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008446
Christian Heimes39258d32021-04-17 11:36:35 +02008447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8448$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008449
Christian Heimes39258d32021-04-17 11:36:35 +02008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8451$as_echo_n "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008454
Jesus Cea740f53a2010-04-28 11:35:30 +00008455#if defined(MAJOR_IN_MKDEV)
8456#include <sys/mkdev.h>
8457#elif defined(MAJOR_IN_SYSMACROS)
8458#include <sys/sysmacros.h>
8459#else
8460#include <sys/types.h>
8461#endif
8462
Neal Norwitz11690112002-07-30 01:08:28 +00008463int
Christian Heimes39258d32021-04-17 11:36:35 +02008464main ()
Neal Norwitz11690112002-07-30 01:08:28 +00008465{
Jesus Cea740f53a2010-04-28 11:35:30 +00008466
8467 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008468 ;
8469 return 0;
8470}
Matthias Kloseb159a552010-04-25 21:00:44 +00008471
Neal Norwitz11690112002-07-30 01:08:28 +00008472_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008473if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008474 ac_cv_has_makedev=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008477fi
Christian Heimes39258d32021-04-17 11:36:35 +02008478rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8481$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008482if test "$ac_cv_has_makedev" = "yes"; then
8483
Christian Heimes39258d32021-04-17 11:36:35 +02008484$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008485
8486fi
8487
Christian Heimes985ecdc2013-11-20 11:46:18 +01008488# byte swapping
Christian Heimes39258d32021-04-17 11:36:35 +02008489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8490$as_echo_n "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8492/* end confdefs.h. */
8493
8494#ifdef HAVE_ENDIAN_H
8495#include <endian.h>
8496#elif defined(HAVE_SYS_ENDIAN_H)
8497#include <sys/endian.h>
8498#endif
8499
8500int
Christian Heimes39258d32021-04-17 11:36:35 +02008501main ()
Christian Heimes985ecdc2013-11-20 11:46:18 +01008502{
8503
8504 le64toh(1)
8505 ;
8506 return 0;
8507}
8508
8509_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008510if ac_fn_c_try_link "$LINENO"; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01008511 ac_cv_has_le64toh=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008512else
Christian Heimes985ecdc2013-11-20 11:46:18 +01008513 ac_cv_has_le64toh=no
8514fi
Christian Heimes39258d32021-04-17 11:36:35 +02008515rm -f core conftest.err conftest.$ac_objext \
Christian Heimes985ecdc2013-11-20 11:46:18 +01008516 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +02008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8518$as_echo "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008519if test "$ac_cv_has_le64toh" = "yes"; then
8520
Christian Heimes39258d32021-04-17 11:36:35 +02008521$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01008522
8523fi
8524
Martin v. Löwis399a6892002-10-04 10:22:02 +00008525use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008526# Don't use largefile support for GNU/Hurd
8527case $ac_sys_system in GNU*)
8528 use_lfs=no
8529esac
8530
Martin v. Löwis399a6892002-10-04 10:22:02 +00008531if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008532# Two defines needed to enable largefile support on various platforms
8533# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008534case $ac_sys_system/$ac_sys_release in
8535AIX*)
8536
Christian Heimes39258d32021-04-17 11:36:35 +02008537$as_echo "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00008538
8539 ;;
8540esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008541
Christian Heimes39258d32021-04-17 11:36:35 +02008542$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
8544
Christian Heimes39258d32021-04-17 11:36:35 +02008545$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008546
Martin v. Löwis399a6892002-10-04 10:22:02 +00008547fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008548
Guido van Rossum84e7b241996-08-19 21:59:00 +00008549# Add some code to confdefs.h so that the test for off_t works on SCO
8550cat >> confdefs.h <<\EOF
8551#if defined(SCO_DS)
8552#undef _OFF_T
8553#endif
8554EOF
8555
Guido van Rossumef2255b2000-03-10 22:30:29 +00008556# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008557ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008558if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008559
Christian Heimes39258d32021-04-17 11:36:35 +02008560else
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
Christian Heimes39258d32021-04-17 11:36:35 +02008562cat >>confdefs.h <<_ACEOF
8563#define mode_t int
8564_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008565
8566fi
8567
Matthias Kloseb9621712010-04-24 17:59:49 +00008568ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008569if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008570
Christian Heimes39258d32021-04-17 11:36:35 +02008571else
Martin v. Löwis11437992002-04-12 09:54:03 +00008572
Christian Heimes39258d32021-04-17 11:36:35 +02008573cat >>confdefs.h <<_ACEOF
8574#define off_t long int
Christian Heimes32eba612021-03-19 10:29:25 +01008575_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02008576
Pablo Galindo53e55292021-04-05 17:38:40 +01008577fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008578
Christian Heimes39258d32021-04-17 11:36:35 +02008579ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8580if test "x$ac_cv_type_pid_t" = xyes; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01008581
Christian Heimes39258d32021-04-17 11:36:35 +02008582else
8583
8584cat >>confdefs.h <<_ACEOF
8585#define pid_t int
8586_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008587
8588fi
8589
8590
Christian Heimes39258d32021-04-17 11:36:35 +02008591cat >>confdefs.h <<_ACEOF
8592#define RETSIGTYPE void
8593_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008596if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008597
Christian Heimes39258d32021-04-17 11:36:35 +02008598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Christian Heimes39258d32021-04-17 11:36:35 +02008600cat >>confdefs.h <<_ACEOF
8601#define size_t unsigned int
8602_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
8604fi
8605
Christian Heimes39258d32021-04-17 11:36:35 +02008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8607$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8608if ${ac_cv_type_uid_t+:} false; then :
8609 $as_echo_n "(cached) " >&6
8610else
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008612/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008613#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +02008617 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008618 ac_cv_type_uid_t=yes
Christian Heimes39258d32021-04-17 11:36:35 +02008619else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008620 ac_cv_type_uid_t=no
8621fi
Christian Heimes39258d32021-04-17 11:36:35 +02008622rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008624fi
Christian Heimes39258d32021-04-17 11:36:35 +02008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8626$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008627if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008628
Christian Heimes39258d32021-04-17 11:36:35 +02008629$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008630
8631
Christian Heimes39258d32021-04-17 11:36:35 +02008632$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008633
8634fi
8635
Mark Dickinson983bc162012-12-02 12:11:38 +00008636
Matthias Kloseb9621712010-04-24 17:59:49 +00008637ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008638if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639
Christian Heimes39258d32021-04-17 11:36:35 +02008640$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008641
8642fi
8643
Stefan Krah1919b7e2012-03-21 18:25:23 +01008644ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +02008645if test "x$ac_cv_type___uint128_t" = xyes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01008646
Christian Heimes39258d32021-04-17 11:36:35 +02008647$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01008648
8649fi
8650
Jack Jansendd19cf82001-12-06 22:36:17 +00008651
Jessica Clarkedec07572021-03-31 11:12:39 +01008652# Sizes and alignments of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008653# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8659$as_echo_n "checking size of int... " >&6; }
8660if ${ac_cv_sizeof_int+:} false; then :
8661 $as_echo_n "(cached) " >&6
8662else
8663 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
Christian Heimes39258d32021-04-17 11:36:35 +02008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type_int" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 else
8672 ac_cv_sizeof_int=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676fi
Christian Heimes39258d32021-04-17 11:36:35 +02008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8678$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679
8680
8681
Christian Heimes39258d32021-04-17 11:36:35 +02008682cat >>confdefs.h <<_ACEOF
8683#define SIZEOF_INT $ac_cv_sizeof_int
8684_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008685
8686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687# The cast to long int works around a bug in the HP C Compiler
8688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8690# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8692$as_echo_n "checking size of long... " >&6; }
8693if ${ac_cv_sizeof_long+:} false; then :
8694 $as_echo_n "(cached) " >&6
8695else
8696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008697
Christian Heimes39258d32021-04-17 11:36:35 +02008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 if test "$ac_cv_type_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008702as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008703See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704 else
8705 ac_cv_sizeof_long=0
8706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709fi
Christian Heimes39258d32021-04-17 11:36:35 +02008710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8711$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712
8713
8714
Christian Heimes39258d32021-04-17 11:36:35 +02008715cat >>confdefs.h <<_ACEOF
8716#define SIZEOF_LONG $ac_cv_sizeof_long
8717_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008718
8719
Jessica Clarkedec07572021-03-31 11:12:39 +01008720# The cast to long int works around a bug in the HP C Compiler,
8721# see AC_CHECK_SIZEOF for more information.
Christian Heimes39258d32021-04-17 11:36:35 +02008722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
8723$as_echo_n "checking alignment of long... " >&6; }
8724if ${ac_cv_alignof_long+:} false; then :
8725 $as_echo_n "(cached) " >&6
8726else
Jessica Clarkedec07572021-03-31 11:12:39 +01008727 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
Christian Heimes39258d32021-04-17 11:36:35 +02008728#ifndef offsetof
8729# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
8730#endif
8731typedef struct { char x; long y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01008732
Christian Heimes39258d32021-04-17 11:36:35 +02008733else
Jessica Clarkedec07572021-03-31 11:12:39 +01008734 if test "$ac_cv_type_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01008737as_fn_error 77 "cannot compute alignment of long
8738See \`config.log' for more details" "$LINENO" 5; }
8739 else
8740 ac_cv_alignof_long=0
8741 fi
8742fi
8743
8744fi
Christian Heimes39258d32021-04-17 11:36:35 +02008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
8746$as_echo "$ac_cv_alignof_long" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01008747
8748
8749
Christian Heimes39258d32021-04-17 11:36:35 +02008750cat >>confdefs.h <<_ACEOF
8751#define ALIGNOF_LONG $ac_cv_alignof_long
8752_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01008753
8754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755# The cast to long int works around a bug in the HP C Compiler
8756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8758# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8760$as_echo_n "checking size of long long... " >&6; }
8761if ${ac_cv_sizeof_long_long+:} false; then :
8762 $as_echo_n "(cached) " >&6
8763else
8764 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008765
Christian Heimes39258d32021-04-17 11:36:35 +02008766else
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008767 if test "$ac_cv_type_long_long" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008770as_fn_error 77 "cannot compute sizeof (long long)
8771See \`config.log' for more details" "$LINENO" 5; }
8772 else
8773 ac_cv_sizeof_long_long=0
8774 fi
8775fi
8776
8777fi
Christian Heimes39258d32021-04-17 11:36:35 +02008778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8779$as_echo "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008780
8781
8782
Christian Heimes39258d32021-04-17 11:36:35 +02008783cat >>confdefs.h <<_ACEOF
8784#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8785_ACEOF
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008786
8787
8788# The cast to long int works around a bug in the HP C Compiler
8789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8791# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8793$as_echo_n "checking size of void *... " >&6; }
8794if ${ac_cv_sizeof_void_p+:} false; then :
8795 $as_echo_n "(cached) " >&6
8796else
8797 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Christian Heimes39258d32021-04-17 11:36:35 +02008799else
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 if test "$ac_cv_type_void_p" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008803as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008804See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805 else
8806 ac_cv_sizeof_void_p=0
8807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008809
Martin v. Löwis11437992002-04-12 09:54:03 +00008810fi
Christian Heimes39258d32021-04-17 11:36:35 +02008811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8812$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008813
8814
8815
Christian Heimes39258d32021-04-17 11:36:35 +02008816cat >>confdefs.h <<_ACEOF
8817#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8818_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008819
8820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821# The cast to long int works around a bug in the HP C Compiler
8822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8824# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8826$as_echo_n "checking size of short... " >&6; }
8827if ${ac_cv_sizeof_short+:} false; then :
8828 $as_echo_n "(cached) " >&6
8829else
8830 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008831
Christian Heimes39258d32021-04-17 11:36:35 +02008832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 if test "$ac_cv_type_short" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008836as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008837See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838 else
8839 ac_cv_sizeof_short=0
8840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843fi
Christian Heimes39258d32021-04-17 11:36:35 +02008844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8845$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846
8847
8848
Christian Heimes39258d32021-04-17 11:36:35 +02008849cat >>confdefs.h <<_ACEOF
8850#define SIZEOF_SHORT $ac_cv_sizeof_short
8851_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008852
8853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854# The cast to long int works around a bug in the HP C Compiler
8855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8857# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8859$as_echo_n "checking size of float... " >&6; }
8860if ${ac_cv_sizeof_float+:} false; then :
8861 $as_echo_n "(cached) " >&6
8862else
8863 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008864
Christian Heimes39258d32021-04-17 11:36:35 +02008865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 if test "$ac_cv_type_float" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008869as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008870See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871 else
8872 ac_cv_sizeof_float=0
8873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008875
Martin v. Löwis11437992002-04-12 09:54:03 +00008876fi
Christian Heimes39258d32021-04-17 11:36:35 +02008877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8878$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879
8880
8881
Christian Heimes39258d32021-04-17 11:36:35 +02008882cat >>confdefs.h <<_ACEOF
8883#define SIZEOF_FLOAT $ac_cv_sizeof_float
8884_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008885
8886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887# The cast to long int works around a bug in the HP C Compiler
8888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8890# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8892$as_echo_n "checking size of double... " >&6; }
8893if ${ac_cv_sizeof_double+:} false; then :
8894 $as_echo_n "(cached) " >&6
8895else
8896 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008897
Christian Heimes39258d32021-04-17 11:36:35 +02008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 if test "$ac_cv_type_double" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008902as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008903See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904 else
8905 ac_cv_sizeof_double=0
8906 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908
Martin v. Löwis11437992002-04-12 09:54:03 +00008909fi
Christian Heimes39258d32021-04-17 11:36:35 +02008910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8911$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912
8913
8914
Christian Heimes39258d32021-04-17 11:36:35 +02008915cat >>confdefs.h <<_ACEOF
8916#define SIZEOF_DOUBLE $ac_cv_sizeof_double
8917_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008918
8919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920# The cast to long int works around a bug in the HP C Compiler
8921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8923# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8925$as_echo_n "checking size of fpos_t... " >&6; }
8926if ${ac_cv_sizeof_fpos_t+:} false; then :
8927 $as_echo_n "(cached) " >&6
8928else
8929 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008930
Christian Heimes39258d32021-04-17 11:36:35 +02008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 if test "$ac_cv_type_fpos_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008935as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008936See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937 else
8938 ac_cv_sizeof_fpos_t=0
8939 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941
Martin v. Löwis11437992002-04-12 09:54:03 +00008942fi
Christian Heimes39258d32021-04-17 11:36:35 +02008943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8944$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945
8946
8947
Christian Heimes39258d32021-04-17 11:36:35 +02008948cat >>confdefs.h <<_ACEOF
8949#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
8950_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008951
Michael W. Hudson54241132001-12-07 15:38:26 +00008952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953# The cast to long int works around a bug in the HP C Compiler
8954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8956# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02008957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8958$as_echo_n "checking size of size_t... " >&6; }
8959if ${ac_cv_sizeof_size_t+:} false; then :
8960 $as_echo_n "(cached) " >&6
8961else
8962 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008963
Christian Heimes39258d32021-04-17 11:36:35 +02008964else
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 if test "$ac_cv_type_size_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02008966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008968as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008969See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970 else
8971 ac_cv_sizeof_size_t=0
8972 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974
Martin v. Löwis18e16552006-02-15 17:27:45 +00008975fi
Christian Heimes39258d32021-04-17 11:36:35 +02008976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8977$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978
8979
8980
Christian Heimes39258d32021-04-17 11:36:35 +02008981cat >>confdefs.h <<_ACEOF
8982#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8983_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00008984
8985
Jessica Clarkedec07572021-03-31 11:12:39 +01008986# The cast to long int works around a bug in the HP C Compiler,
8987# see AC_CHECK_SIZEOF for more information.
Christian Heimes39258d32021-04-17 11:36:35 +02008988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5
8989$as_echo_n "checking alignment of size_t... " >&6; }
8990if ${ac_cv_alignof_size_t+:} false; then :
8991 $as_echo_n "(cached) " >&6
8992else
Jessica Clarkedec07572021-03-31 11:12:39 +01008993 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
Christian Heimes39258d32021-04-17 11:36:35 +02008994#ifndef offsetof
8995# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
8996#endif
8997typedef struct { char x; size_t y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01008998
Christian Heimes39258d32021-04-17 11:36:35 +02008999else
Jessica Clarkedec07572021-03-31 11:12:39 +01009000 if test "$ac_cv_type_size_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01009003as_fn_error 77 "cannot compute alignment of size_t
9004See \`config.log' for more details" "$LINENO" 5; }
9005 else
9006 ac_cv_alignof_size_t=0
9007 fi
9008fi
9009
9010fi
Christian Heimes39258d32021-04-17 11:36:35 +02009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
9012$as_echo "$ac_cv_alignof_size_t" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01009013
9014
9015
Christian Heimes39258d32021-04-17 11:36:35 +02009016cat >>confdefs.h <<_ACEOF
9017#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t
9018_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01009019
9020
Christian Heimes400adb02008-02-01 08:12:03 +00009021# The cast to long int works around a bug in the HP C Compiler
9022# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9023# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9024# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
9026$as_echo_n "checking size of pid_t... " >&6; }
9027if ${ac_cv_sizeof_pid_t+:} false; then :
9028 $as_echo_n "(cached) " >&6
9029else
9030 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00009031
Christian Heimes39258d32021-04-17 11:36:35 +02009032else
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 if test "$ac_cv_type_pid_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009036as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009037See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00009038 else
9039 ac_cv_sizeof_pid_t=0
9040 fi
9041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009042
Christian Heimes400adb02008-02-01 08:12:03 +00009043fi
Christian Heimes39258d32021-04-17 11:36:35 +02009044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
9045$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00009046
9047
9048
Christian Heimes39258d32021-04-17 11:36:35 +02009049cat >>confdefs.h <<_ACEOF
9050#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
9051_ACEOF
Christian Heimes400adb02008-02-01 08:12:03 +00009052
9053
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009054# The cast to long int works around a bug in the HP C Compiler
9055# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9056# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9057# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
9059$as_echo_n "checking size of uintptr_t... " >&6; }
9060if ${ac_cv_sizeof_uintptr_t+:} false; then :
9061 $as_echo_n "(cached) " >&6
9062else
9063 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009064
Christian Heimes39258d32021-04-17 11:36:35 +02009065else
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009066 if test "$ac_cv_type_uintptr_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009069as_fn_error 77 "cannot compute sizeof (uintptr_t)
9070See \`config.log' for more details" "$LINENO" 5; }
9071 else
9072 ac_cv_sizeof_uintptr_t=0
9073 fi
9074fi
9075
9076fi
Christian Heimes39258d32021-04-17 11:36:35 +02009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
9078$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009079
9080
9081
Christian Heimes39258d32021-04-17 11:36:35 +02009082cat >>confdefs.h <<_ACEOF
9083#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
9084_ACEOF
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009085
9086
Michael W. Hudson54241132001-12-07 15:38:26 +00009087
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009088
Christian Heimes39258d32021-04-17 11:36:35 +02009089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
9090$as_echo_n "checking for long double... " >&6; }
9091if ${ac_cv_type_long_double+:} false; then :
9092 $as_echo_n "(cached) " >&6
9093else
Eitan Adler3055c942018-05-15 22:58:09 -07009094 if test "$GCC" = yes; then
9095 ac_cv_type_long_double=yes
9096 else
9097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9098/* end confdefs.h. */
9099/* The Stardent Vistra knows sizeof (long double), but does
9100 not support it. */
9101 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009102int
Christian Heimes39258d32021-04-17 11:36:35 +02009103main ()
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009104{
Eitan Adler3055c942018-05-15 22:58:09 -07009105static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9106 sizeof (double) <= sizeof (long double))];
9107test_array [0] = 0;
9108return test_array [0];
9109
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009110 ;
9111 return 0;
9112}
9113_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009114if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009115 ac_cv_type_long_double=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009116else
Eitan Adler3055c942018-05-15 22:58:09 -07009117 ac_cv_type_long_double=no
9118fi
Christian Heimes39258d32021-04-17 11:36:35 +02009119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -07009120 fi
9121fi
Christian Heimes39258d32021-04-17 11:36:35 +02009122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9123$as_echo "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -07009124 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009125
Christian Heimes39258d32021-04-17 11:36:35 +02009126$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009127
Eitan Adler3055c942018-05-15 22:58:09 -07009128 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009129
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009130# The cast to long int works around a bug in the HP C Compiler
9131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9133# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9135$as_echo_n "checking size of long double... " >&6; }
9136if ${ac_cv_sizeof_long_double+:} false; then :
9137 $as_echo_n "(cached) " >&6
9138else
9139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009140
Christian Heimes39258d32021-04-17 11:36:35 +02009141else
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 if test "$ac_cv_type_long_double" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009145as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009146See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009147 else
9148 ac_cv_sizeof_long_double=0
9149 fi
9150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009151
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009152fi
Christian Heimes39258d32021-04-17 11:36:35 +02009153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9154$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009155
9156
9157
Christian Heimes39258d32021-04-17 11:36:35 +02009158cat >>confdefs.h <<_ACEOF
9159#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9160_ACEOF
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009161
9162
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164# The cast to long int works around a bug in the HP C Compiler
9165# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9166# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9167# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9169$as_echo_n "checking size of _Bool... " >&6; }
9170if ${ac_cv_sizeof__Bool+:} false; then :
9171 $as_echo_n "(cached) " >&6
9172else
9173 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00009174
Christian Heimes39258d32021-04-17 11:36:35 +02009175else
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 if test "$ac_cv_type__Bool" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009179as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009180See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181 else
9182 ac_cv_sizeof__Bool=0
9183 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009185
Thomas Woutersb2137042007-02-01 18:02:27 +00009186fi
Christian Heimes39258d32021-04-17 11:36:35 +02009187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9188$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189
9190
9191
Christian Heimes39258d32021-04-17 11:36:35 +02009192cat >>confdefs.h <<_ACEOF
9193#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9194_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +00009195
9196
Thomas Woutersb2137042007-02-01 18:02:27 +00009197
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009198# The cast to long int works around a bug in the HP C Compiler
9199# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9200# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9201# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9203$as_echo_n "checking size of off_t... " >&6; }
9204if ${ac_cv_sizeof_off_t+:} false; then :
9205 $as_echo_n "(cached) " >&6
9206else
Matthias Kloseb9621712010-04-24 17:59:49 +00009207 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009208#ifdef HAVE_SYS_TYPES_H
9209#include <sys/types.h>
9210#endif
9211
Christian Heimes39258d32021-04-17 11:36:35 +02009212"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009213
Christian Heimes39258d32021-04-17 11:36:35 +02009214else
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 if test "$ac_cv_type_off_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009218as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009219See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009220 else
9221 ac_cv_sizeof_off_t=0
9222 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009224
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009225fi
Christian Heimes39258d32021-04-17 11:36:35 +02009226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9227$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009228
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009229
9230
Christian Heimes39258d32021-04-17 11:36:35 +02009231cat >>confdefs.h <<_ACEOF
9232#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
9233_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009234
Michael W. Hudson54241132001-12-07 15:38:26 +00009235
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009236
Christian Heimes39258d32021-04-17 11:36:35 +02009237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9238$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009239if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009240 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009241
Christian Heimes39258d32021-04-17 11:36:35 +02009242$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009243
Christian Heimes39258d32021-04-17 11:36:35 +02009244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9245$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009246else
Christian Heimes39258d32021-04-17 11:36:35 +02009247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9248$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009249fi
9250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009251# The cast to long int works around a bug in the HP C Compiler
9252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9254# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9256$as_echo_n "checking size of time_t... " >&6; }
9257if ${ac_cv_sizeof_time_t+:} false; then :
9258 $as_echo_n "(cached) " >&6
9259else
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009261#ifdef HAVE_SYS_TYPES_H
9262#include <sys/types.h>
9263#endif
9264#ifdef HAVE_TIME_H
9265#include <time.h>
9266#endif
9267
Christian Heimes39258d32021-04-17 11:36:35 +02009268"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009269
Christian Heimes39258d32021-04-17 11:36:35 +02009270else
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 if test "$ac_cv_type_time_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9273$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009274as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009275See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009276 else
9277 ac_cv_sizeof_time_t=0
9278 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009280
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009281fi
Christian Heimes39258d32021-04-17 11:36:35 +02009282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9283$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009284
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009285
9286
Christian Heimes39258d32021-04-17 11:36:35 +02009287cat >>confdefs.h <<_ACEOF
9288#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9289_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009290
Michael W. Hudson54241132001-12-07 15:38:26 +00009291
9292
Trent Mick635f6fb2000-08-23 21:33:05 +00009293# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009294ac_save_cc="$CC"
9295if test "$ac_cv_kpthread" = "yes"
9296then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009297elif test "$ac_cv_kthread" = "yes"
9298then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009299elif test "$ac_cv_pthread" = "yes"
9300then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009301fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009302
Christian Heimes39258d32021-04-17 11:36:35 +02009303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9304$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009305have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009307/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009308
9309 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009310int
Christian Heimes39258d32021-04-17 11:36:35 +02009311main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009312{
Guido van Rossum12580492000-09-24 16:47:19 +00009313pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 ;
9315 return 0;
9316}
Matthias Kloseb159a552010-04-25 21:00:44 +00009317
Martin v. Löwis11437992002-04-12 09:54:03 +00009318_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009319if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009320 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009321fi
Christian Heimes39258d32021-04-17 11:36:35 +02009322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9324$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009325if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9329# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9331$as_echo_n "checking size of pthread_t... " >&6; }
9332if ${ac_cv_sizeof_pthread_t+:} false; then :
9333 $as_echo_n "(cached) " >&6
9334else
Matthias Kloseb9621712010-04-24 17:59:49 +00009335 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009336#ifdef HAVE_PTHREAD_H
9337#include <pthread.h>
9338#endif
9339
Christian Heimes39258d32021-04-17 11:36:35 +02009340"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009341
Christian Heimes39258d32021-04-17 11:36:35 +02009342else
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 if test "$ac_cv_type_pthread_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009346as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009347See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009348 else
9349 ac_cv_sizeof_pthread_t=0
9350 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009352
Trent Mick635f6fb2000-08-23 21:33:05 +00009353fi
Christian Heimes39258d32021-04-17 11:36:35 +02009354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9355$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009357
9358
Christian Heimes39258d32021-04-17 11:36:35 +02009359cat >>confdefs.h <<_ACEOF
9360#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
9361_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009363
Trent Mick635f6fb2000-08-23 21:33:05 +00009364fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009365
9366# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9367# This checking will be unnecessary after removing deprecated TLS API.
9368# The cast to long int works around a bug in the HP C Compiler
9369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9371# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +02009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9373$as_echo_n "checking size of pthread_key_t... " >&6; }
9374if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9375 $as_echo_n "(cached) " >&6
9376else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009377 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Christian Heimes39258d32021-04-17 11:36:35 +02009378"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009379
Christian Heimes39258d32021-04-17 11:36:35 +02009380else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009381 if test "$ac_cv_type_pthread_key_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +02009382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009384as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9385See \`config.log' for more details" "$LINENO" 5; }
9386 else
9387 ac_cv_sizeof_pthread_key_t=0
9388 fi
9389fi
9390
9391fi
Christian Heimes39258d32021-04-17 11:36:35 +02009392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9393$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009394
9395
9396
Christian Heimes39258d32021-04-17 11:36:35 +02009397cat >>confdefs.h <<_ACEOF
9398#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9399_ACEOF
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009400
9401
Christian Heimes39258d32021-04-17 11:36:35 +02009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9403$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009404if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9406/* end confdefs.h. */
9407#include <pthread.h>
9408int
Christian Heimes39258d32021-04-17 11:36:35 +02009409main ()
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009410{
9411pthread_key_t k; k * 1;
9412 ;
9413 return 0;
9414}
9415_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009416if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009417 ac_pthread_key_t_is_arithmetic_type=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009418else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009419 ac_pthread_key_t_is_arithmetic_type=no
9420
9421fi
Christian Heimes39258d32021-04-17 11:36:35 +02009422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9424$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009425 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9426
Christian Heimes39258d32021-04-17 11:36:35 +02009427$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009428
9429 fi
9430else
Christian Heimes39258d32021-04-17 11:36:35 +02009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9432$as_echo "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009433fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009434CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009435
Michael W. Hudson54241132001-12-07 15:38:26 +00009436
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009437case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009438 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009439 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9440 ;;
9441 Darwin/*)
9442 OTHER_LIBTOOL_OPT=""
9443 ;;
9444esac
9445
9446
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009447
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009448case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009449 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009450 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9451 if test "${enable_universalsdk}"; then
9452 :
9453 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009454 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009455 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009456 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009457 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009458 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009459 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009460 if test ${gcc_version} '<' 4.0
9461 then
9462 LIBTOOL_CRUFT="-lcc_dynamic"
9463 else
9464 LIBTOOL_CRUFT=""
9465 fi
Christian Heimes39258d32021-04-17 11:36:35 +02009466 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009467 ac_osx_32bit=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009468else
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009470/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009471
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009472 #include <unistd.h>
9473 int main(int argc, char*argv[])
9474 {
9475 if (sizeof(long) == 4) {
9476 return 0;
9477 } else {
9478 return 1;
9479 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009480 }
9481
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009482_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009483if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009484 ac_osx_32bit=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009485else
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009490fi
9491
9492
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009493 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009494 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009495 i386)
9496 MACOSX_DEFAULT_ARCH="i386"
9497 ;;
9498 ppc)
9499 MACOSX_DEFAULT_ARCH="ppc"
9500 ;;
9501 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009502 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009503 ;;
9504 esac
9505 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009506 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009507 i386)
9508 MACOSX_DEFAULT_ARCH="x86_64"
9509 ;;
9510 ppc)
9511 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009512 ;;
9513 arm64)
9514 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009515 ;;
9516 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009517 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009518 ;;
9519 esac
9520
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009521 fi
9522
9523 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009524 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009525 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009526esac
Christian Heimes39258d32021-04-17 11:36:35 +02009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9528$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009529if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009530then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009531 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009533 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009534
Christian Heimes39258d32021-04-17 11:36:35 +02009535$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009536
Christian Heimes39258d32021-04-17 11:36:35 +02009537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9538$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009539 if test $enable_shared = "yes"
9540 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009541 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00009542 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009543else
Christian Heimes39258d32021-04-17 11:36:35 +02009544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009546fi
9547
Christian Heimes39258d32021-04-17 11:36:35 +02009548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9549$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009550case $ac_sys_system/$ac_sys_release in
9551 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009552
Christian Heimes39258d32021-04-17 11:36:35 +02009553$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
Christian Heimes39258d32021-04-17 11:36:35 +02009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9556$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009557 ;;
9558 *)
Christian Heimes39258d32021-04-17 11:36:35 +02009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009561 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009562esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009563
Guido van Rossum0a516c91994-09-12 10:58:40 +00009564# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009565
Michael W. Hudson54241132001-12-07 15:38:26 +00009566
9567
9568
9569
Benjamin Peterson99f03762010-04-11 22:15:28 +00009570
Thomas Wouters477c8d52006-05-27 19:21:47 +00009571
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009572# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9573# -- usually .so, .sl on HP-UX, .dll on Cygwin
Christian Heimes39258d32021-04-17 11:36:35 +02009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9575$as_echo_n "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009576if test -z "$SHLIB_SUFFIX"; then
9577 case $ac_sys_system in
9578 hp*|HP*)
9579 case `uname -m` in
9580 ia64) SHLIB_SUFFIX=.so;;
9581 *) SHLIB_SUFFIX=.sl;;
9582 esac
9583 ;;
9584 CYGWIN*) SHLIB_SUFFIX=.dll;;
9585 *) SHLIB_SUFFIX=.so;;
9586 esac
9587fi
Christian Heimes39258d32021-04-17 11:36:35 +02009588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9589$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009590
Guido van Rossum0a516c91994-09-12 10:58:40 +00009591# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009592# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009593# (Shared libraries in this instance are shared modules to be loaded into
9594# Python, as opposed to building Python itself as a shared library.)
Christian Heimes39258d32021-04-17 11:36:35 +02009595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9596$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009597if test -z "$LDSHARED"
9598then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009599 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009600 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009601 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009602 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009603 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009605 if test "$GCC" = "yes" ; then
9606 LDSHARED='$(CC) -shared'
9607 LDCXXSHARED='$(CXX) -shared'
9608 else
9609 LDSHARED='$(CC) -G'
9610 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009611 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009612 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009613 if test "$GCC" = "yes" ; then
9614 LDSHARED='$(CC) -shared'
9615 LDCXXSHARED='$(CXX) -shared'
9616 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009617 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009618 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009619 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009620 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009621 LDSHARED='$(CC) -bundle'
9622 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009623 if test "$enable_framework" ; then
9624 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009625 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9626 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009627 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009628 else
9629 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009630 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009631 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009633 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009634 LDSHARED='$(CC) -bundle'
9635 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009636 if test "$enable_framework" ; then
9637 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009638 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9639 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009640 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009641 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009642 # No framework, use the Python app as bundle-loader
9643 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009644 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009645 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009646 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009647 Darwin/*)
9648 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9649 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009650
Ned Deily36820b62014-06-25 13:44:22 -07009651 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9652 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9653 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9654 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9655 if test ${dep_target_major} -eq 10 && \
9656 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009657 then
Ned Deily36820b62014-06-25 13:44:22 -07009658 # building for OS X 10.0 through 10.2
Ned Deily87031782021-05-02 20:28:43 -04009659 as_fn_error $? "MACOSX_DEPLOYMENT_TARGET too old ($MACOSX_DEPLOYMENT_TARGET), only 10.3 or later is supported" "$LINENO" 5
Ned Deily36820b62014-06-25 13:44:22 -07009660 else
9661 # building for OS X 10.3 and later
9662 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9663 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9664 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009665 fi
9666 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009667 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009668 LDSHARED='$(CC) -shared'
9669 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009670 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009672 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009673 LDSHARED='$(CC) -shared'
9674 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009675 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009676 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009677 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009678 OpenBSD*)
9679 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9680 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009681 LDSHARED='$(CC) -shared $(CCSHARED)'
9682 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009683 else
9684 case `uname -r` in
9685 [01].* | 2.[0-7] | 2.[0-7].*)
9686 LDSHARED="ld -Bshareable ${LDFLAGS}"
9687 ;;
9688 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009689 LDSHARED='$(CC) -shared $(CCSHARED)'
9690 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009691 ;;
9692 esac
9693 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009694 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009695 LDSHARED='$(CC) -shared'
9696 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009697 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009698 if test "$GCC" = "yes" ; then
9699 LDSHARED='$(CC) -shared'
9700 LDCXXSHARED='$(CXX) -shared'
9701 else
9702 LDSHARED='$(CC) -G'
9703 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009704 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009705 SCO_SV*)
9706 LDSHARED='$(CC) -Wl,-G,-Bexport'
9707 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9708 CYGWIN*)
9709 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9710 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009711 *) LDSHARED="ld";;
9712 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009713fi
Christian Heimes39258d32021-04-17 11:36:35 +02009714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9715$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009716LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009717BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009718# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009719# library (module) -- this is only needed for a few systems
Christian Heimes39258d32021-04-17 11:36:35 +02009720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9721$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009722if test -z "$CCSHARED"
9723then
Guido van Rossum07397971997-04-29 21:49:50 +00009724 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009725 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009726 then CCSHARED="-fPIC";
9727 elif test `uname -p` = sparc;
9728 then CCSHARED="-xcode=pic32";
9729 else CCSHARED="-Kpic";
9730 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009731 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009732 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009733 else CCSHARED="+z";
9734 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009735 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009736 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009737 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009738 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009739 if test "$GCC" = "yes"
9740 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009741 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009742 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009743 SCO_SV*)
9744 if test "$GCC" = "yes"
9745 then CCSHARED="-fPIC"
9746 else CCSHARED="-Kpic -belf"
9747 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009748 VxWorks*)
9749 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009750 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009751fi
Christian Heimes39258d32021-04-17 11:36:35 +02009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9753$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009754# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009755# the python executable -- this is only needed for a few systems
Christian Heimes39258d32021-04-17 11:36:35 +02009756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9757$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009758if test -z "$LINKFORSHARED"
9759then
Guido van Rossum07397971997-04-29 21:49:50 +00009760 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009761 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009762 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009763 LINKFORSHARED="-Wl,-E -Wl,+s";;
9764# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009765 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009766 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009767 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009769 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009770
9771 # Issue #18075: the default maximum stack size (8MBytes) is too
9772 # small for the default recursion limit. Increase the stack size
9773 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009774 # Note: This matches the value of THREAD_STACK_SIZE in
9775 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009776 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9777
Jack Jansene578a632001-08-15 01:27:14 +00009778 if test "$enable_framework"
9779 then
Jack Jansenda49e192005-01-07 13:08:22 +00009780 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009781 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009782 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009783 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009784 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009785 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009786 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009787 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9788 then
9789 LINKFORSHARED="-Wl,--export-dynamic"
9790 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009791 SunOS/5*) case $CC in
9792 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009793 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009794 then
9795 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009796 fi;;
9797 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009798 CYGWIN*)
9799 if test $enable_shared = "no"
9800 then
9801 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9802 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009803 QNX*)
9804 # -Wl,-E causes the symbols to be added to the dynamic
9805 # symbol table so that they can be found when a module
9806 # is loaded. -N 2048K causes the stack size to be set
9807 # to 2048 kilobytes so that the stack doesn't overflow
9808 # when running test_compile.py.
9809 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009810 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009811 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009812 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009813fi
Christian Heimes39258d32021-04-17 11:36:35 +02009814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9815$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009816
Michael W. Hudson54241132001-12-07 15:38:26 +00009817
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009818
Christian Heimes39258d32021-04-17 11:36:35 +02009819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9820$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009821if test ! "$LIBRARY" = "$LDLIBRARY"
9822then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009823 case $ac_sys_system in
9824 CYGWIN*)
9825 # Cygwin needs CCSHARED when building extension DLLs
9826 # but not when building the interpreter DLL.
9827 CFLAGSFORSHARED='';;
9828 *)
9829 CFLAGSFORSHARED='$(CCSHARED)'
9830 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009831fi
Christian Heimes39258d32021-04-17 11:36:35 +02009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9833$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009834
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009835# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9836# library (with --enable-shared).
9837# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009838# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9839# if it is not required, since it creates a dependency of the shared library
9840# to LIBS. This, in turn, means that applications linking the shared libpython
9841# don't need to link LIBS explicitly. The default should be only changed
9842# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009843
Christian Heimes39258d32021-04-17 11:36:35 +02009844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9845$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009846case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009847 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009848 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009849esac
Christian Heimes39258d32021-04-17 11:36:35 +02009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9851$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009852
9853
Guido van Rossum627b2d71993-12-24 10:39:16 +00009854# checks for libraries
Christian Heimes39258d32021-04-17 11:36:35 +02009855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9856$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
9857if ${ac_cv_lib_sendfile_sendfile+:} false; then :
9858 $as_echo_n "(cached) " >&6
9859else
Georg Brandl941f9562011-02-25 15:21:47 +00009860 ac_check_lib_save_LIBS=$LIBS
9861LIBS="-lsendfile $LIBS"
9862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9863/* end confdefs.h. */
9864
9865/* Override any GCC internal prototype to avoid an error.
9866 Use char because int might match the return type of a GCC
9867 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009868#ifdef __cplusplus
9869extern "C"
9870#endif
Georg Brandl941f9562011-02-25 15:21:47 +00009871char sendfile ();
9872int
Christian Heimes39258d32021-04-17 11:36:35 +02009873main ()
Georg Brandl941f9562011-02-25 15:21:47 +00009874{
9875return sendfile ();
9876 ;
9877 return 0;
9878}
9879_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009880if ac_fn_c_try_link "$LINENO"; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009881 ac_cv_lib_sendfile_sendfile=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009882else
Georg Brandl941f9562011-02-25 15:21:47 +00009883 ac_cv_lib_sendfile_sendfile=no
9884fi
Christian Heimes39258d32021-04-17 11:36:35 +02009885rm -f core conftest.err conftest.$ac_objext \
Georg Brandl941f9562011-02-25 15:21:47 +00009886 conftest$ac_exeext conftest.$ac_ext
9887LIBS=$ac_check_lib_save_LIBS
9888fi
Christian Heimes39258d32021-04-17 11:36:35 +02009889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9890$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
9891if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
9892 cat >>confdefs.h <<_ACEOF
9893#define HAVE_LIBSENDFILE 1
9894_ACEOF
Georg Brandl941f9562011-02-25 15:21:47 +00009895
9896 LIBS="-lsendfile $LIBS"
9897
9898fi
9899
Christian Heimes39258d32021-04-17 11:36:35 +02009900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9901$as_echo_n "checking for dlopen in -ldl... " >&6; }
9902if ${ac_cv_lib_dl_dlopen+:} false; then :
9903 $as_echo_n "(cached) " >&6
9904else
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009906LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910/* Override any GCC internal prototype to avoid an error.
9911 Use char because int might match the return type of a GCC
9912 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009913#ifdef __cplusplus
9914extern "C"
9915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009916char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009917int
Christian Heimes39258d32021-04-17 11:36:35 +02009918main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 ;
9922 return 0;
9923}
9924_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009925if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 ac_cv_lib_dl_dlopen=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009927else
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009929fi
Christian Heimes39258d32021-04-17 11:36:35 +02009930rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009932LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009933fi
Christian Heimes39258d32021-04-17 11:36:35 +02009934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9935$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9936if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9937 cat >>confdefs.h <<_ACEOF
9938#define HAVE_LIBDL 1
9939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009941 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009943fi
9944 # Dynamic linking for SunOS/Solaris and SYSV
Christian Heimes39258d32021-04-17 11:36:35 +02009945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9946$as_echo_n "checking for shl_load in -ldld... " >&6; }
9947if ${ac_cv_lib_dld_shl_load+:} false; then :
9948 $as_echo_n "(cached) " >&6
9949else
Martin v. Löwis11437992002-04-12 09:54:03 +00009950 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009951LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955/* Override any GCC internal prototype to avoid an error.
9956 Use char because int might match the return type of a GCC
9957 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +02009958#ifdef __cplusplus
9959extern "C"
9960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009961char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009962int
Christian Heimes39258d32021-04-17 11:36:35 +02009963main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 ;
9967 return 0;
9968}
9969_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +02009970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 ac_cv_lib_dld_shl_load=yes
Christian Heimes39258d32021-04-17 11:36:35 +02009972else
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009974fi
Christian Heimes39258d32021-04-17 11:36:35 +02009975rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009977LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009978fi
Christian Heimes39258d32021-04-17 11:36:35 +02009979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9980$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9981if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
9982 cat >>confdefs.h <<_ACEOF
9983#define HAVE_LIBDLD 1
9984_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009985
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009986 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009988fi
9989 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009990
Michael Felt0d3ccb42017-12-30 22:39:20 +01009991# checks for uuid.h location
Christian Heimes39258d32021-04-17 11:36:35 +02009992for ac_header in uuid/uuid.h uuid.h
9993do :
9994 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9995ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9996if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9997 cat >>confdefs.h <<_ACEOF
9998#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9999_ACEOF
Michael Felt0d3ccb42017-12-30 22:39:20 +010010000
10001fi
10002
Christian Heimes39258d32021-04-17 11:36:35 +020010003done
Michael Felt0d3ccb42017-12-30 22:39:20 +010010004
Christian Heimes39258d32021-04-17 11:36:35 +020010005
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
10007$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10009/* end confdefs.h. */
10010#include <uuid/uuid.h>
10011int
Christian Heimes39258d32021-04-17 11:36:35 +020010012main ()
Berker Peksag9a10ff42017-11-08 23:09:16 +030010013{
10014
10015#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030010016void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030010017#endif
10018
10019 ;
10020 return 0;
10021}
10022_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010023if ac_fn_c_try_compile "$LINENO"; then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030010024
Christian Heimes39258d32021-04-17 11:36:35 +020010025$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030010026
Christian Heimes39258d32021-04-17 11:36:35 +020010027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10028$as_echo "yes" >&6; }
10029else
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10031$as_echo "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010032
10033fi
Christian Heimes39258d32021-04-17 11:36:35 +020010034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030010035
Michael Felt0d3ccb42017-12-30 22:39:20 +010010036# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000010037# FreeBSD and OpenBSD provides support as well
Christian Heimes39258d32021-04-17 11:36:35 +020010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
10039$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10041/* end confdefs.h. */
10042#include <uuid.h>
10043int
Christian Heimes39258d32021-04-17 11:36:35 +020010044main ()
Michael Felt0d3ccb42017-12-30 22:39:20 +010010045{
10046
10047#ifndef uuid_create
10048void *x = uuid_create
10049#endif
10050
10051 ;
10052 return 0;
10053}
10054_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010055if ac_fn_c_try_compile "$LINENO"; then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010010056
Christian Heimes39258d32021-04-17 11:36:35 +020010057$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010010058
Christian Heimes39258d32021-04-17 11:36:35 +020010059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10060$as_echo "yes" >&6; }
10061else
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010064
10065fi
Christian Heimes39258d32021-04-17 11:36:35 +020010066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010010067
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010068# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
10069# stream in big-endian byte-order
Christian Heimes39258d32021-04-17 11:36:35 +020010070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
10071$as_echo_n "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10073/* end confdefs.h. */
10074#include <uuid.h>
10075int
Christian Heimes39258d32021-04-17 11:36:35 +020010076main ()
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010077{
10078
10079#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010080void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010081#endif
10082
10083 ;
10084 return 0;
10085}
10086_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010087if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010088
Christian Heimes39258d32021-04-17 11:36:35 +020010089$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010090
Christian Heimes39258d32021-04-17 11:36:35 +020010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10092$as_echo "yes" >&6; }
10093else
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010096
10097fi
Christian Heimes39258d32021-04-17 11:36:35 +020010098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010099
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010100# 'Real Time' functions on Solaris
10101# posix4 on Solaris 2.6
10102# pthread (first!) on Linux
Christian Heimes39258d32021-04-17 11:36:35 +020010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
10104$as_echo_n "checking for library containing sem_init... " >&6; }
10105if ${ac_cv_search_sem_init+:} false; then :
10106 $as_echo_n "(cached) " >&6
10107else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010108 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112/* Override any GCC internal prototype to avoid an error.
10113 Use char because int might match the return type of a GCC
10114 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010115#ifdef __cplusplus
10116extern "C"
10117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010118char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010119int
Christian Heimes39258d32021-04-17 11:36:35 +020010120main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ;
10124 return 0;
10125}
10126_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010127for ac_lib in '' pthread rt posix4; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128 if test -z "$ac_lib"; then
10129 ac_res="none required"
10130 else
10131 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010132 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133 fi
Christian Heimes39258d32021-04-17 11:36:35 +020010134 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010136fi
Christian Heimes39258d32021-04-17 11:36:35 +020010137rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020010139 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142done
Christian Heimes39258d32021-04-17 11:36:35 +020010143if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010144
Christian Heimes39258d32021-04-17 11:36:35 +020010145else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146 ac_cv_search_sem_init=no
10147fi
10148rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010149LIBS=$ac_func_search_save_LIBS
10150fi
Christian Heimes39258d32021-04-17 11:36:35 +020010151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10152$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153ac_res=$ac_cv_search_sem_init
Christian Heimes39258d32021-04-17 11:36:35 +020010154if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010156
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010157fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010158
Martin v. Löwis519adae2003-09-20 10:47:47 +000010159
Martin v. Löwis19d17342003-06-14 21:03:05 +000010160# check if we need libintl for locale functions
Christian Heimes39258d32021-04-17 11:36:35 +020010161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10162$as_echo_n "checking for textdomain in -lintl... " >&6; }
10163if ${ac_cv_lib_intl_textdomain+:} false; then :
10164 $as_echo_n "(cached) " >&6
10165else
Martin v. Löwis19d17342003-06-14 21:03:05 +000010166 ac_check_lib_save_LIBS=$LIBS
10167LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171/* Override any GCC internal prototype to avoid an error.
10172 Use char because int might match the return type of a GCC
10173 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010174#ifdef __cplusplus
10175extern "C"
10176#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010177char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010178int
Christian Heimes39258d32021-04-17 11:36:35 +020010179main ()
Martin v. Löwis19d17342003-06-14 21:03:05 +000010180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010182 ;
10183 return 0;
10184}
10185_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010186if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010187 ac_cv_lib_intl_textdomain=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010188else
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010190fi
Christian Heimes39258d32021-04-17 11:36:35 +020010191rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010193LIBS=$ac_check_lib_save_LIBS
10194fi
Christian Heimes39258d32021-04-17 11:36:35 +020010195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10196$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
10197if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010198
Christian Heimes39258d32021-04-17 11:36:35 +020010199$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010200
Brett Cannonc6d936e2009-06-07 20:09:53 +000010201 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010202fi
10203
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010204
10205# checks for system dependent C++ extensions support
10206case "$ac_sys_system" in
Christian Heimes39258d32021-04-17 11:36:35 +020010207 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10208$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010211
Georg Brandl59e87bd2011-02-15 19:48:59 +000010212 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010213int
Christian Heimes39258d32021-04-17 11:36:35 +020010214main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010215{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010216loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ;
10218 return 0;
10219}
Matthias Kloseb159a552010-04-25 21:00:44 +000010220
Martin v. Löwis11437992002-04-12 09:54:03 +000010221_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010222if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010223
Matthias Kloseb159a552010-04-25 21:00:44 +000010224
Christian Heimes39258d32021-04-17 11:36:35 +020010225$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010226
Christian Heimes39258d32021-04-17 11:36:35 +020010227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10228$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010229
Christian Heimes39258d32021-04-17 11:36:35 +020010230else
Matthias Kloseb159a552010-04-25 21:00:44 +000010231
Christian Heimes39258d32021-04-17 11:36:35 +020010232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10233$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010234
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010235fi
Christian Heimes39258d32021-04-17 11:36:35 +020010236rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010237 conftest$ac_exeext conftest.$ac_ext
10238# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10239# of the AIX system used to build/package Python executable. This tag serves
10240# as a baseline for bdist module packages
Christian Heimes39258d32021-04-17 11:36:35 +020010241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10242$as_echo_n "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010243 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10244
Christian Heimes39258d32021-04-17 11:36:35 +020010245cat >>confdefs.h <<_ACEOF
10246#define AIX_BUILDDATE $AIX_BUILDDATE
10247_ACEOF
Michael Felt39afa2d2019-12-15 15:17:53 +010010248
Christian Heimes39258d32021-04-17 11:36:35 +020010249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10250$as_echo "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010251 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010252 *) ;;
10253esac
10254
Christian Heimes985ecdc2013-11-20 11:46:18 +010010255# check for systems that require aligned memory access
Christian Heimes39258d32021-04-17 11:36:35 +020010256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10257$as_echo_n "checking aligned memory access is required... " >&6; }
10258if ${ac_cv_aligned_required+:} false; then :
10259 $as_echo_n "(cached) " >&6
10260else
10261 if test "$cross_compiling" = yes; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010262 ac_cv_aligned_required=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010263else
Christian Heimes985ecdc2013-11-20 11:46:18 +010010264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10265/* end confdefs.h. */
10266
10267int main()
10268{
10269 char s[16];
10270 int i, *p1, *p2;
10271 for (i=0; i < 16; i++)
10272 s[i] = i;
10273 p1 = (int*)(s+1);
10274 p2 = (int*)(s+2);
10275 if (*p1 == *p2)
10276 return 1;
10277 return 0;
10278}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010279_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010280if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010281 ac_cv_aligned_required=no
Christian Heimes39258d32021-04-17 11:36:35 +020010282else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010283 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010284fi
10285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10286 conftest.$ac_objext conftest.beam conftest.$ac_ext
10287fi
10288
10289
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010290fi
10291
Christian Heimes39258d32021-04-17 11:36:35 +020010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10293$as_echo "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010294if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010295
Christian Heimes39258d32021-04-17 11:36:35 +020010296$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010297
10298fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010299
10300# str, bytes and memoryview hash algorithm
10301
10302
Christian Heimes39258d32021-04-17 11:36:35 +020010303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10304$as_echo_n "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010305
10306# Check whether --with-hash_algorithm was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010307if test "${with_hash_algorithm+set}" = set; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010010308 withval=$with_hash_algorithm;
Christian Heimes39258d32021-04-17 11:36:35 +020010309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10310$as_echo "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010311case "$withval" in
10312 siphash24)
Christian Heimes39258d32021-04-17 11:36:35 +020010313 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010314
10315 ;;
10316 fnv)
Christian Heimes39258d32021-04-17 11:36:35 +020010317 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010318
10319 ;;
10320 *)
10321 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10322 ;;
10323esac
10324
Christian Heimes39258d32021-04-17 11:36:35 +020010325else
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10327$as_echo "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010328fi
10329
10330
Paul Ganssle62972d92020-05-16 04:20:06 -040010331validate_tzpath() {
10332 # Checks that each element of hte path is an absolute path
10333 if test -z "$1"; then
10334 # Empty string is allowed: it indicates no system TZPATH
10335 return 0
10336 fi
10337
10338 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010339 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010340 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10341 return 1;
10342 fi
10343}
10344
10345TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Christian Heimes39258d32021-04-17 11:36:35 +020010346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10347$as_echo_n "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010348
10349# Check whether --with-tzpath was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010350if test "${with_tzpath+set}" = set; then :
Paul Ganssle62972d92020-05-16 04:20:06 -040010351 withval=$with_tzpath;
10352case "$withval" in
10353 yes)
10354 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10355 ;;
10356 *)
10357 validate_tzpath "$withval"
10358 TZPATH="$withval"
Christian Heimes39258d32021-04-17 11:36:35 +020010359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10360$as_echo "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010361 ;;
10362esac
10363
Christian Heimes39258d32021-04-17 11:36:35 +020010364else
Paul Ganssle62972d92020-05-16 04:20:06 -040010365 validate_tzpath "$TZPATH"
Christian Heimes39258d32021-04-17 11:36:35 +020010366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10367$as_echo "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010368fi
10369
10370
10371
Christian Heimes39258d32021-04-17 11:36:35 +020010372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10373$as_echo_n "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010374
10375# Check whether --with-address_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010376if test "${with_address_sanitizer+set}" = set; then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010010377 withval=$with_address_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10379$as_echo "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010380BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10381LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010382# ASan works by controlling memory allocation, our own malloc interferes.
10383with_pymalloc="no"
10384
Christian Heimes39258d32021-04-17 11:36:35 +020010385else
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010388fi
10389
10390
Christian Heimes39258d32021-04-17 11:36:35 +020010391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10392$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010393
10394# Check whether --with-memory_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010395if test "${with_memory_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010396 withval=$with_memory_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10398$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010399BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10400LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10401# MSan works by controlling memory allocation, our own malloc interferes.
10402with_pymalloc="no"
10403
Christian Heimes39258d32021-04-17 11:36:35 +020010404else
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010407fi
10408
10409
Christian Heimes39258d32021-04-17 11:36:35 +020010410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10411$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010412
10413# Check whether --with-undefined_behavior_sanitizer was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010414if test "${with_undefined_behavior_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010415 withval=$with_undefined_behavior_sanitizer;
Christian Heimes39258d32021-04-17 11:36:35 +020010416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10417$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010418BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10419LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010420
Christian Heimes39258d32021-04-17 11:36:35 +020010421else
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10423$as_echo "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010424fi
10425
10426
Guido van Rossum70c7f481998-03-26 18:44:10 +000010427# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Christian Heimes39258d32021-04-17 11:36:35 +020010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10429$as_echo_n "checking for t_open in -lnsl... " >&6; }
10430if ${ac_cv_lib_nsl_t_open+:} false; then :
10431 $as_echo_n "(cached) " >&6
10432else
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010434LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438/* Override any GCC internal prototype to avoid an error.
10439 Use char because int might match the return type of a GCC
10440 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010441#ifdef __cplusplus
10442extern "C"
10443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010444char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010445int
Christian Heimes39258d32021-04-17 11:36:35 +020010446main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ;
10450 return 0;
10451}
10452_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ac_cv_lib_nsl_t_open=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010455else
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010457fi
Christian Heimes39258d32021-04-17 11:36:35 +020010458rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010460LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010461fi
Christian Heimes39258d32021-04-17 11:36:35 +020010462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10463$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
10464if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010465 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010466fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010467 # SVR4
Christian Heimes39258d32021-04-17 11:36:35 +020010468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10469$as_echo_n "checking for socket in -lsocket... " >&6; }
10470if ${ac_cv_lib_socket_socket+:} false; then :
10471 $as_echo_n "(cached) " >&6
10472else
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010474LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478/* Override any GCC internal prototype to avoid an error.
10479 Use char because int might match the return type of a GCC
10480 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010481#ifdef __cplusplus
10482extern "C"
10483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010484char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010485int
Christian Heimes39258d32021-04-17 11:36:35 +020010486main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 ;
10490 return 0;
10491}
10492_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 ac_cv_lib_socket_socket=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010495else
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010497fi
Christian Heimes39258d32021-04-17 11:36:35 +020010498rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010500LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010501fi
Christian Heimes39258d32021-04-17 11:36:35 +020010502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10503$as_echo "$ac_cv_lib_socket_socket" >&6; }
10504if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010505 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010506fi
10507 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010508
Christian Heimes39258d32021-04-17 11:36:35 +020010509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10510$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010512# Check whether --with-libs was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010513if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514 withval=$with_libs;
Christian Heimes39258d32021-04-17 11:36:35 +020010515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10516$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010517LIBS="$withval $LIBS"
10518
Christian Heimes39258d32021-04-17 11:36:35 +020010519else
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522fi
10523
Guido van Rossum7f43da71994-08-01 12:15:30 +000010524
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010525
10526
10527
10528
10529
10530
Victor Stinnerb477d192020-01-22 22:48:16 +010010531
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010532if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10533 if test -n "$ac_tool_prefix"; then
10534 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10535set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020010536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10537$as_echo_n "checking for $ac_word... " >&6; }
10538if ${ac_cv_path_PKG_CONFIG+:} false; then :
10539 $as_echo_n "(cached) " >&6
10540else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010541 case $PKG_CONFIG in
10542 [\\/]* | ?:[\\/]*)
10543 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10544 ;;
10545 *)
10546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10547for as_dir in $PATH
10548do
10549 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020010550 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010551 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020010552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10553 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010555 break 2
10556 fi
10557done
10558 done
10559IFS=$as_save_IFS
10560
10561 ;;
10562esac
10563fi
10564PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10565if test -n "$PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020010566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10567$as_echo "$PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010568else
Christian Heimes39258d32021-04-17 11:36:35 +020010569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10570$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010571fi
10572
10573
10574fi
10575if test -z "$ac_cv_path_PKG_CONFIG"; then
10576 ac_pt_PKG_CONFIG=$PKG_CONFIG
10577 # Extract the first word of "pkg-config", so it can be a program name with args.
10578set dummy pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020010579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10580$as_echo_n "checking for $ac_word... " >&6; }
10581if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10582 $as_echo_n "(cached) " >&6
10583else
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010584 case $ac_pt_PKG_CONFIG in
10585 [\\/]* | ?:[\\/]*)
10586 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10587 ;;
10588 *)
10589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10590for as_dir in $PATH
10591do
10592 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020010593 test -z "$as_dir" && as_dir=.
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010594 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020010595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10596 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010598 break 2
10599 fi
10600done
10601 done
10602IFS=$as_save_IFS
10603
10604 ;;
10605esac
10606fi
10607ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10608if test -n "$ac_pt_PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020010609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10610$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010611else
Christian Heimes39258d32021-04-17 11:36:35 +020010612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10613$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010614fi
10615
10616 if test "x$ac_pt_PKG_CONFIG" = x; then
10617 PKG_CONFIG=""
10618 else
10619 case $cross_compiling:$ac_tool_warned in
10620yes:)
Christian Heimes39258d32021-04-17 11:36:35 +020010621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010623ac_tool_warned=yes ;;
10624esac
10625 PKG_CONFIG=$ac_pt_PKG_CONFIG
10626 fi
10627else
10628 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10629fi
10630
10631fi
10632if test -n "$PKG_CONFIG"; then
10633 _pkg_min_version=0.9.0
Christian Heimes39258d32021-04-17 11:36:35 +020010634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10635$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010636 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Christian Heimes39258d32021-04-17 11:36:35 +020010637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10638$as_echo "yes" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010639 else
Christian Heimes39258d32021-04-17 11:36:35 +020010640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010642 PKG_CONFIG=""
10643 fi
10644fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010645
10646# Check for use of the system expat library
Christian Heimes39258d32021-04-17 11:36:35 +020010647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10648$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010649
10650# Check whether --with-system_expat was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010651if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010652 withval=$with_system_expat;
Christian Heimes39258d32021-04-17 11:36:35 +020010653else
Benjamin Peterson79263252010-10-31 16:50:44 +000010654 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010655fi
10656
10657
Christian Heimes39258d32021-04-17 11:36:35 +020010658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10659$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010660
10661# Check for use of the system libffi library
Christian Heimes39258d32021-04-17 11:36:35 +020010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10663$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010664
10665# Check whether --with-system_ffi was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010666if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010667 withval=$with_system_ffi;
10668fi
10669
10670
Zachary Waref40d4dd2016-09-17 01:25:24 -050010671if test "$ac_sys_system" = "Darwin"
10672then
10673 case "$with_system_ffi" in
10674 "")
10675 with_system_ffi="no"
10676 ;;
10677 yes|no)
10678 ;;
10679 *)
10680 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10681 ;;
10682 esac
Christian Heimes39258d32021-04-17 11:36:35 +020010683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10684$as_echo "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010685else
Christian Heimes39258d32021-04-17 11:36:35 +020010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10687$as_echo "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010688 if test "$with_system_ffi" != ""
10689 then
Christian Heimes39258d32021-04-17 11:36:35 +020010690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10691$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050010692 fi
10693 with_system_ffi="yes"
10694fi
Zachary Ware935043d2016-09-09 17:01:21 -070010695
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010696if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010697 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10698else
10699 LIBFFI_INCLUDEDIR=""
10700fi
10701
10702
Stefan Krah60187b52012-03-23 19:06:27 +010010703# Check for use of the system libmpdec library
Christian Heimes39258d32021-04-17 11:36:35 +020010704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10705$as_echo_n "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010706
10707# Check whether --with-system_libmpdec was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010708if test "${with_system_libmpdec+set}" = set; then :
Stefan Krah60187b52012-03-23 19:06:27 +010010709 withval=$with_system_libmpdec;
Christian Heimes39258d32021-04-17 11:36:35 +020010710else
Stefan Krah60187b52012-03-23 19:06:27 +010010711 with_system_libmpdec="no"
10712fi
10713
10714
Christian Heimes39258d32021-04-17 11:36:35 +020010715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10716$as_echo "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010717
Stefan Krah815280e2020-02-29 19:43:42 +010010718# Check whether _decimal should use a coroutine-local or thread-local context
Christian Heimes39258d32021-04-17 11:36:35 +020010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10720$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010721
10722# Check whether --with-decimal_contextvar was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010723if test "${with_decimal_contextvar+set}" = set; then :
Stefan Krah815280e2020-02-29 19:43:42 +010010724 withval=$with_decimal_contextvar;
Christian Heimes39258d32021-04-17 11:36:35 +020010725else
Stefan Krah815280e2020-02-29 19:43:42 +010010726 with_decimal_contextvar="yes"
10727fi
10728
10729
10730if test "$with_decimal_contextvar" != "no"
10731then
10732
Christian Heimes39258d32021-04-17 11:36:35 +020010733$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010010734
10735fi
10736
Christian Heimes39258d32021-04-17 11:36:35 +020010737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10738$as_echo "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010739
Benjamin Peterson076ed002010-10-31 17:11:02 +000010740# Check for support for loadable sqlite extensions
Christian Heimes39258d32021-04-17 11:36:35 +020010741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10742$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010743# Check whether --enable-loadable-sqlite-extensions was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010744if test "${enable_loadable_sqlite_extensions+set}" = set; then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000010745 enableval=$enable_loadable_sqlite_extensions;
Christian Heimes39258d32021-04-17 11:36:35 +020010746else
Benjamin Peterson076ed002010-10-31 17:11:02 +000010747 enable_loadable_sqlite_extensions="no"
10748fi
10749
10750
Christian Heimes39258d32021-04-17 11:36:35 +020010751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10752$as_echo "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010753
Ned Deilyd819b932013-09-06 01:07:05 -070010754# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10755
10756
Christian Heimes39258d32021-04-17 11:36:35 +020010757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10758$as_echo_n "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010759
10760# Check whether --with-tcltk-includes was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010761if test "${with_tcltk_includes+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010762 withval=$with_tcltk_includes;
Christian Heimes39258d32021-04-17 11:36:35 +020010763else
Ned Deilyd819b932013-09-06 01:07:05 -070010764 with_tcltk_includes="default"
10765fi
10766
Christian Heimes39258d32021-04-17 11:36:35 +020010767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10768$as_echo "$with_tcltk_includes" >&6; }
10769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10770$as_echo_n "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010771
10772# Check whether --with-tcltk-libs was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010773if test "${with_tcltk_libs+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010774 withval=$with_tcltk_libs;
Christian Heimes39258d32021-04-17 11:36:35 +020010775else
Ned Deilyd819b932013-09-06 01:07:05 -070010776 with_tcltk_libs="default"
10777fi
10778
Christian Heimes39258d32021-04-17 11:36:35 +020010779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10780$as_echo "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010781if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10782then
10783 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10784 then
10785 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10786 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010010787 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
10788 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
10789 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
10790 else
10791 TCLTK_INCLUDES=""
10792 TCLTK_LIBS=""
10793 fi
Ned Deilyd819b932013-09-06 01:07:05 -070010794else
10795 TCLTK_INCLUDES="$with_tcltk_includes"
10796 TCLTK_LIBS="$with_tcltk_libs"
10797fi
10798
Matthias Klose55708cc2009-04-30 08:06:49 +000010799# Check for --with-dbmliborder
Christian Heimes39258d32021-04-17 11:36:35 +020010800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10801$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010802
10803# Check whether --with-dbmliborder was given.
Christian Heimes39258d32021-04-17 11:36:35 +020010804if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010805 withval=$with_dbmliborder;
10806if test x$with_dbmliborder = xyes
10807then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010808as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010809else
10810 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10811 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10812 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010813 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010814 fi
10815 done
10816fi
10817fi
10818
Christian Heimes39258d32021-04-17 11:36:35 +020010819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10820$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010821
Martin v. Löwis11437992002-04-12 09:54:03 +000010822# Templates for things AC_DEFINEd more than once.
10823# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010824
10825
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010826if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010827then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010828 # Defining _REENTRANT on system with POSIX threads should not hurt.
Christian Heimes39258d32021-04-17 11:36:35 +020010829 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010830
10831 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010832 if test "$ac_sys_system" = "SunOS"; then
10833 CFLAGS="$CFLAGS -D_REENTRANT"
10834 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010835elif test "$ac_cv_kpthread" = "yes"
10836then
10837 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010838 if test "$ac_cv_cxx_thread" = "yes"; then
10839 CXX="$CXX -Kpthread"
10840 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010841 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010842elif test "$ac_cv_kthread" = "yes"
10843then
10844 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010845 if test "$ac_cv_cxx_thread" = "yes"; then
10846 CXX="$CXX -Kthread"
10847 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010848 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010849elif test "$ac_cv_pthread" = "yes"
10850then
10851 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010852 if test "$ac_cv_cxx_thread" = "yes"; then
10853 CXX="$CXX -pthread"
10854 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010855 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010856else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010857 if test ! -z "$withval" -a -d "$withval"
10858 then LDFLAGS="$LDFLAGS -L$withval"
10859 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010860
10861 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010862 # define _POSIX_THREADS in unistd.h. Some apparently don't
10863 # (e.g. gnu pth with pthread emulation)
Christian Heimes39258d32021-04-17 11:36:35 +020010864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10865$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010867/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010868
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010869#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010870#ifdef _POSIX_THREADS
10871yes
10872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
10874_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020010876 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010877 unistd_defines_pthreads=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010878else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010879 unistd_defines_pthreads=no
10880fi
Christian Heimes39258d32021-04-17 11:36:35 +020010881rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010882
Christian Heimes39258d32021-04-17 11:36:35 +020010883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10884$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010885
Christian Heimes39258d32021-04-17 11:36:35 +020010886 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010887
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010888 # Just looking for pthread_create in libpthread is not enough:
10889 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10890 # So we really have to include pthread.h, and then link.
10891 _libs=$LIBS
10892 LIBS="$LIBS -lpthread"
Christian Heimes39258d32021-04-17 11:36:35 +020010893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10894$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010897
10898#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010899#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010900
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010901void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010902int
Christian Heimes39258d32021-04-17 11:36:35 +020010903main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010904{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010905
10906pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 ;
10908 return 0;
10909}
10910_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010911if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010912
Christian Heimes39258d32021-04-17 11:36:35 +020010913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10914$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010915 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010916
Christian Heimes39258d32021-04-17 11:36:35 +020010917else
Martin v. Löwis11437992002-04-12 09:54:03 +000010918
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010919 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Christian Heimes39258d32021-04-17 11:36:35 +020010921if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010922
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010923 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010924
Christian Heimes39258d32021-04-17 11:36:35 +020010925else
Guido van Rossumad678af1998-10-02 14:42:15 +000010926
Christian Heimes39258d32021-04-17 11:36:35 +020010927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10928$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
10929if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
10930 $as_echo_n "(cached) " >&6
10931else
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010933LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937/* Override any GCC internal prototype to avoid an error.
10938 Use char because int might match the return type of a GCC
10939 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010940#ifdef __cplusplus
10941extern "C"
10942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010943char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010944int
Christian Heimes39258d32021-04-17 11:36:35 +020010945main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 ;
10949 return 0;
10950}
10951_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010952if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 ac_cv_lib_pthreads_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010954else
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010956fi
Christian Heimes39258d32021-04-17 11:36:35 +020010957rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010959LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010960fi
Christian Heimes39258d32021-04-17 11:36:35 +020010961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10962$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
10963if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010964
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010965 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010966 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010967
Christian Heimes39258d32021-04-17 11:36:35 +020010968else
Greg Steinadf63d62000-07-05 10:38:09 +000010969
Christian Heimes39258d32021-04-17 11:36:35 +020010970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10971$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
10972if ${ac_cv_lib_c_r_pthread_create+:} false; then :
10973 $as_echo_n "(cached) " >&6
10974else
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010976LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980/* Override any GCC internal prototype to avoid an error.
10981 Use char because int might match the return type of a GCC
10982 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020010983#ifdef __cplusplus
10984extern "C"
10985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010986char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010987int
Christian Heimes39258d32021-04-17 11:36:35 +020010988main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 ;
10992 return 0;
10993}
10994_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020010995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 ac_cv_lib_c_r_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020010997else
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010999fi
Christian Heimes39258d32021-04-17 11:36:35 +020011000rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011002LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011003fi
Christian Heimes39258d32021-04-17 11:36:35 +020011004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
11005$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
11006if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000011007
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011008 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011009 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011010
Christian Heimes39258d32021-04-17 11:36:35 +020011011else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011012
Christian Heimes39258d32021-04-17 11:36:35 +020011013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
11014$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
11015if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
11016 $as_echo_n "(cached) " >&6
11017else
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011019LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023/* Override any GCC internal prototype to avoid an error.
11024 Use char because int might match the return type of a GCC
11025 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011026#ifdef __cplusplus
11027extern "C"
11028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011029char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011030int
Christian Heimes39258d32021-04-17 11:36:35 +020011031main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011032{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 ;
11035 return 0;
11036}
11037_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011038if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 ac_cv_lib_pthread___pthread_create_system=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011042fi
Christian Heimes39258d32021-04-17 11:36:35 +020011043rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011045LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011046fi
Christian Heimes39258d32021-04-17 11:36:35 +020011047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11048$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
11049if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011051 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011052 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011053
Christian Heimes39258d32021-04-17 11:36:35 +020011054else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011055
Christian Heimes39258d32021-04-17 11:36:35 +020011056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
11057$as_echo_n "checking for pthread_create in -lcma... " >&6; }
11058if ${ac_cv_lib_cma_pthread_create+:} false; then :
11059 $as_echo_n "(cached) " >&6
11060else
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011062LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066/* Override any GCC internal prototype to avoid an error.
11067 Use char because int might match the return type of a GCC
11068 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011069#ifdef __cplusplus
11070extern "C"
11071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011072char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
Christian Heimes39258d32021-04-17 11:36:35 +020011074main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 ;
11078 return 0;
11079}
11080_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011081if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011082 ac_cv_lib_cma_pthread_create=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011085fi
Christian Heimes39258d32021-04-17 11:36:35 +020011086rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011088LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011089fi
Christian Heimes39258d32021-04-17 11:36:35 +020011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11091$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
11092if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011093
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011094 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011095 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011096
Christian Heimes39258d32021-04-17 11:36:35 +020011097else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011098
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011099 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11100
Guido van Rossum2d38f911996-06-26 19:47:01 +000011101fi
11102
Guido van Rossum627b2d71993-12-24 10:39:16 +000011103
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011104fi
11105
Guido van Rossum0be3e491997-05-22 20:33:33 +000011106fi
11107
Guido van Rossum49545951997-12-02 19:28:29 +000011108fi
11109
Guido van Rossumb93a8621998-05-07 13:27:32 +000011110fi
11111
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011112fi
Christian Heimes39258d32021-04-17 11:36:35 +020011113rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011115
Christian Heimes39258d32021-04-17 11:36:35 +020011116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11117$as_echo_n "checking for usconfig in -lmpc... " >&6; }
11118if ${ac_cv_lib_mpc_usconfig+:} false; then :
11119 $as_echo_n "(cached) " >&6
11120else
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011122LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126/* Override any GCC internal prototype to avoid an error.
11127 Use char because int might match the return type of a GCC
11128 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020011129#ifdef __cplusplus
11130extern "C"
11131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011132char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011133int
Christian Heimes39258d32021-04-17 11:36:35 +020011134main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011136return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 ;
11138 return 0;
11139}
11140_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011141if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ac_cv_lib_mpc_usconfig=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011143else
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011145fi
Christian Heimes39258d32021-04-17 11:36:35 +020011146rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011148LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011149fi
Christian Heimes39258d32021-04-17 11:36:35 +020011150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11151$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
11152if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011153
Martin v. Löwis130fb172001-07-19 11:00:41 +000011154 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011155
Guido van Rossum627b2d71993-12-24 10:39:16 +000011156fi
11157
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011158
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011159fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011160
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011161if test "$posix_threads" = "yes"; then
11162 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011163
Christian Heimes39258d32021-04-17 11:36:35 +020011164$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011165
11166 fi
11167
11168 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11169 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011170 SunOS/5.6)
Christian Heimes39258d32021-04-17 11:36:35 +020011171$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011172
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011173 ;;
11174 SunOS/5.8)
Christian Heimes39258d32021-04-17 11:36:35 +020011175$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011176
11177 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011178 AIX/*)
Christian Heimes39258d32021-04-17 11:36:35 +020011179$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011180
11181 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011182 esac
11183
Christian Heimes39258d32021-04-17 11:36:35 +020011184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11185$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
11186 if ${ac_cv_pthread_system_supported+:} false; then :
11187 $as_echo_n "(cached) " >&6
11188else
11189 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011190 ac_cv_pthread_system_supported=no
Christian Heimes39258d32021-04-17 11:36:35 +020011191else
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011193/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011194
11195 #include <stdio.h>
11196 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011197 void *foo(void *parm) {
11198 return NULL;
11199 }
11200 main() {
11201 pthread_attr_t attr;
11202 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011203 if (pthread_attr_init(&attr)) return (-1);
11204 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11205 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11206 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011207 }
11208_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011209if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011210 ac_cv_pthread_system_supported=yes
Christian Heimes39258d32021-04-17 11:36:35 +020011211else
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011216fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219fi
11220
Christian Heimes39258d32021-04-17 11:36:35 +020011221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11222$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011223 if test "$ac_cv_pthread_system_supported" = "yes"; then
11224
Christian Heimes39258d32021-04-17 11:36:35 +020011225$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011226
11227 fi
Christian Heimes39258d32021-04-17 11:36:35 +020011228 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000011229do :
11230 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Christian Heimes39258d32021-04-17 11:36:35 +020011231if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
11232 cat >>confdefs.h <<_ACEOF
11233#define HAVE_PTHREAD_SIGMASK 1
11234_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011235 case $ac_sys_system in
11236 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011237
Christian Heimes39258d32021-04-17 11:36:35 +020011238$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011239
11240 ;;
11241 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011242fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011243done
Christian Heimes39258d32021-04-17 11:36:35 +020011244
11245 for ac_func in pthread_getcpuclockid
11246do :
11247 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11248if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11249 cat >>confdefs.h <<_ACEOF
11250#define HAVE_PTHREAD_GETCPUCLOCKID 1
11251_ACEOF
pdoxe14679c2017-10-05 00:01:56 -070011252
11253fi
Christian Heimes39258d32021-04-17 11:36:35 +020011254done
pdoxe14679c2017-10-05 00:01:56 -070011255
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011256fi
11257
11258
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011259# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Christian Heimes39258d32021-04-17 11:36:35 +020011261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11262$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263# Check whether --enable-ipv6 was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011264if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011266 no)
Christian Heimes39258d32021-04-17 11:36:35 +020011267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11268$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011269 ipv6=no
11270 ;;
Christian Heimes39258d32021-04-17 11:36:35 +020011271 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11272$as_echo "yes" >&6; }
11273 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011274
11275 ipv6=yes
11276 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011277 esac
Christian Heimes39258d32021-04-17 11:36:35 +020011278else
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011282 /* AF_INET6 available check */
11283#include <sys/types.h>
11284#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011285int
Christian Heimes39258d32021-04-17 11:36:35 +020011286main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011287{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011288int domain = AF_INET6;
11289 ;
11290 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011291}
Martin v. Löwis11437992002-04-12 09:54:03 +000011292_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011293if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011294
Christian Heimes39258d32021-04-17 11:36:35 +020011295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11296$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011297 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011298
Christian Heimes39258d32021-04-17 11:36:35 +020011299else
Matthias Kloseb159a552010-04-25 21:00:44 +000011300
Christian Heimes39258d32021-04-17 11:36:35 +020011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11302$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011303 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011304
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011305fi
Christian Heimes39258d32021-04-17 11:36:35 +020011306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011308if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11310$as_echo_n "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011313
11314 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011315#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011316int
Christian Heimes39258d32021-04-17 11:36:35 +020011317main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011318{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011319struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011320 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 ;
11322 return 0;
11323}
Matthias Kloseb159a552010-04-25 21:00:44 +000011324
Martin v. Löwis11437992002-04-12 09:54:03 +000011325_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011326if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011327
Christian Heimes39258d32021-04-17 11:36:35 +020011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11329$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011330 ipv6=yes
11331
Christian Heimes39258d32021-04-17 11:36:35 +020011332else
Matthias Kloseb159a552010-04-25 21:00:44 +000011333
Christian Heimes39258d32021-04-17 11:36:35 +020011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011336 ipv6=no
11337
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011338fi
Christian Heimes39258d32021-04-17 11:36:35 +020011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011340fi
11341
11342if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011343 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011344
11345fi
11346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011347fi
11348
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011349
11350ipv6type=unknown
11351ipv6lib=none
11352ipv6trylibc=no
11353
11354if test "$ipv6" = "yes"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11356$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011357 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11358 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011359 case $i in
11360 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011362/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011363
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011364#include <netinet/in.h>
11365#ifdef IPV6_INRIA_VERSION
11366yes
11367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011368_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011370 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011371 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011372fi
Christian Heimes39258d32021-04-17 11:36:35 +020011373rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011374
11375 ;;
11376 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011379
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011380#include <netinet/in.h>
11381#ifdef __KAME__
11382yes
11383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011384_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011386 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011387 ipv6type=$i;
11388 ipv6lib=inet6
11389 ipv6libdir=/usr/local/v6/lib
11390 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011391fi
Christian Heimes39258d32021-04-17 11:36:35 +020011392rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011393
11394 ;;
11395 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011398
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011399#include <features.h>
11400#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11401yes
11402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011403_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011405 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011406 ipv6type=$i;
11407 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011408fi
Christian Heimes39258d32021-04-17 11:36:35 +020011409rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011410
11411 ;;
11412 linux-inet6)
11413 if test -d /usr/inet6; then
11414 ipv6type=$i
11415 ipv6lib=inet6
11416 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011417 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011418 fi
11419 ;;
11420 solaris)
11421 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011422 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011423 ipv6type=$i
11424 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011425 fi
11426 fi
11427 ;;
11428 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011432#include <sys/param.h>
11433#ifdef _TOSHIBA_INET6
11434yes
11435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011436_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011438 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011439 ipv6type=$i;
11440 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011441 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011442fi
Christian Heimes39258d32021-04-17 11:36:35 +020011443rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011444
11445 ;;
11446 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011448/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011449
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011450#include </usr/local/v6/include/sys/v6config.h>
11451#ifdef __V6D__
11452yes
11453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011454_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011456 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011457 ipv6type=$i;
11458 ipv6lib=v6;
11459 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011460 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011461fi
Christian Heimes39258d32021-04-17 11:36:35 +020011462rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011463
11464 ;;
11465 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011468
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011469#include <sys/param.h>
11470#ifdef _ZETA_MINAMI_INET6
11471yes
11472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011473_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Heimes39258d32021-04-17 11:36:35 +020011475 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011476 ipv6type=$i;
11477 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011478 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011479fi
Christian Heimes39258d32021-04-17 11:36:35 +020011480rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011481
11482 ;;
11483 esac
11484 if test "$ipv6type" != "unknown"; then
11485 break
11486 fi
11487 done
Christian Heimes39258d32021-04-17 11:36:35 +020011488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11489$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011490fi
11491
11492if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11493 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11494 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11495 echo "using lib$ipv6lib"
11496 else
11497 if test $ipv6trylibc = "yes"; then
11498 echo "using libc"
11499 else
11500 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11501 echo "You need to fetch lib$ipv6lib.a from appropriate"
11502 echo 'ipv6 kit and compile beforehand.'
11503 exit 1
11504 fi
11505 fi
11506fi
11507
Christian Heimes39258d32021-04-17 11:36:35 +020011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11509$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11511/* end confdefs.h. */
11512 /* CAN_RAW_FD_FRAMES available check */
11513#include <linux/can/raw.h>
11514int
Christian Heimes39258d32021-04-17 11:36:35 +020011515main ()
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011516{
11517int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11518 ;
11519 return 0;
11520}
11521_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011522if ac_fn_c_try_compile "$LINENO"; then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011523
11524
Christian Heimes39258d32021-04-17 11:36:35 +020011525$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011526
Christian Heimes39258d32021-04-17 11:36:35 +020011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11528$as_echo "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011529
Christian Heimes39258d32021-04-17 11:36:35 +020011530else
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011531
Christian Heimes39258d32021-04-17 11:36:35 +020011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11533$as_echo "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011534
11535fi
Christian Heimes39258d32021-04-17 11:36:35 +020011536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011537
Christian Heimes39258d32021-04-17 11:36:35 +020011538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11539$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11541/* end confdefs.h. */
11542
11543#include <linux/can/raw.h>
11544int
Christian Heimes39258d32021-04-17 11:36:35 +020011545main ()
Zackery Spytz97e0de02020-04-09 06:03:49 -060011546{
11547int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11548 ;
11549 return 0;
11550}
11551_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011552if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060011553
11554
Christian Heimes39258d32021-04-17 11:36:35 +020011555$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060011556
Christian Heimes39258d32021-04-17 11:36:35 +020011557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11558$as_echo "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011559
Christian Heimes39258d32021-04-17 11:36:35 +020011560else
Zackery Spytz97e0de02020-04-09 06:03:49 -060011561
Christian Heimes39258d32021-04-17 11:36:35 +020011562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11563$as_echo "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011564
11565fi
Christian Heimes39258d32021-04-17 11:36:35 +020011566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060011567
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011568# Check for --with-doc-strings
Christian Heimes39258d32021-04-17 11:36:35 +020011569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11570$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572# Check whether --with-doc-strings was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011573if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574 withval=$with_doc_strings;
11575fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011576
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011577
11578if test -z "$with_doc_strings"
11579then with_doc_strings="yes"
11580fi
11581if test "$with_doc_strings" != "no"
11582then
11583
Christian Heimes39258d32021-04-17 11:36:35 +020011584$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011585
11586fi
Christian Heimes39258d32021-04-17 11:36:35 +020011587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11588$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011589
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011590# Check for Python-specific malloc support
Christian Heimes39258d32021-04-17 11:36:35 +020011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11592$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594# Check whether --with-pymalloc was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011595if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596 withval=$with_pymalloc;
11597fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011598
Neil Schemenauera35c6882001-02-27 04:45:05 +000011599
Neil Schemenauer16c22972002-03-22 15:34:49 +000011600if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011601then
11602 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011603fi
11604if test "$with_pymalloc" != "no"
11605then
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Christian Heimes39258d32021-04-17 11:36:35 +020011607$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011608
11609fi
Christian Heimes39258d32021-04-17 11:36:35 +020011610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11611$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011612
Nick Coghlan6ea41862017-06-11 13:16:15 +100011613# Check for --with-c-locale-coercion
Christian Heimes39258d32021-04-17 11:36:35 +020011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11615$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011616
11617# Check whether --with-c-locale-coercion was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011618if test "${with_c_locale_coercion+set}" = set; then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100011619 withval=$with_c_locale_coercion;
11620fi
11621
11622
11623if test -z "$with_c_locale_coercion"
11624then
11625 with_c_locale_coercion="yes"
11626fi
11627if test "$with_c_locale_coercion" != "no"
11628then
11629
Christian Heimes39258d32021-04-17 11:36:35 +020011630$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100011631
11632fi
Christian Heimes39258d32021-04-17 11:36:35 +020011633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11634$as_echo "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011635
Benjamin Peterson05159c42009-12-03 03:01:27 +000011636# Check for Valgrind support
Christian Heimes39258d32021-04-17 11:36:35 +020011637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11638$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011639
11640# Check whether --with-valgrind was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011641if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011642 withval=$with_valgrind;
Christian Heimes39258d32021-04-17 11:36:35 +020011643else
Benjamin Peterson05159c42009-12-03 03:01:27 +000011644 with_valgrind=no
11645fi
11646
Christian Heimes39258d32021-04-17 11:36:35 +020011647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11648$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011649if test "$with_valgrind" != no; then
Christian Heimes39258d32021-04-17 11:36:35 +020011650 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
11651if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011652
Christian Heimes39258d32021-04-17 11:36:35 +020011653$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011654
Christian Heimes39258d32021-04-17 11:36:35 +020011655else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011656 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011657
11658fi
11659
Christian Heimes39258d32021-04-17 11:36:35 +020011660
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011661 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011662fi
11663
Łukasz Langaa785c872016-09-09 17:37:37 -070011664# Check for DTrace support
Christian Heimes39258d32021-04-17 11:36:35 +020011665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11666$as_echo_n "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011667
11668# Check whether --with-dtrace was given.
Christian Heimes39258d32021-04-17 11:36:35 +020011669if test "${with_dtrace+set}" = set; then :
Łukasz Langaa785c872016-09-09 17:37:37 -070011670 withval=$with_dtrace;
Christian Heimes39258d32021-04-17 11:36:35 +020011671else
Łukasz Langaa785c872016-09-09 17:37:37 -070011672 with_dtrace=no
11673fi
11674
Christian Heimes39258d32021-04-17 11:36:35 +020011675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11676$as_echo "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011677
11678
11679
11680
11681
11682DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011683DTRACE_HEADERS=
11684DTRACE_OBJS=
11685
11686if test "$with_dtrace" = "yes"
11687then
11688 # Extract the first word of "dtrace", so it can be a program name with args.
11689set dummy dtrace; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020011690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11691$as_echo_n "checking for $ac_word... " >&6; }
11692if ${ac_cv_path_DTRACE+:} false; then :
11693 $as_echo_n "(cached) " >&6
11694else
Łukasz Langaa785c872016-09-09 17:37:37 -070011695 case $DTRACE in
11696 [\\/]* | ?:[\\/]*)
11697 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11698 ;;
11699 *)
11700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11701for as_dir in $PATH
11702do
11703 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020011704 test -z "$as_dir" && as_dir=.
Łukasz Langaa785c872016-09-09 17:37:37 -070011705 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020011706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11707 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070011709 break 2
11710 fi
11711done
11712 done
11713IFS=$as_save_IFS
11714
11715 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11716 ;;
11717esac
11718fi
11719DTRACE=$ac_cv_path_DTRACE
11720if test -n "$DTRACE"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11722$as_echo "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011723else
Christian Heimes39258d32021-04-17 11:36:35 +020011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011726fi
11727
11728
11729 if test "$DTRACE" = "not found"; then
11730 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11731 fi
11732
Christian Heimes39258d32021-04-17 11:36:35 +020011733$as_echo "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070011734
11735 DTRACE_HEADERS="Include/pydtrace_probes.h"
11736
11737 # On OS X, DTrace providers do not need to be explicitly compiled and
11738 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11739 # generation flag '-G'. We check for presence of this flag, rather than
11740 # hardcoding support by OS, in the interest of robustness.
Christian Heimes39258d32021-04-17 11:36:35 +020011741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11742$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11743if ${ac_cv_dtrace_link+:} false; then :
11744 $as_echo_n "(cached) " >&6
11745else
Łukasz Langaa785c872016-09-09 17:37:37 -070011746 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011747 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011748 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011749 ac_cv_dtrace_link=yes
11750
11751fi
Christian Heimes39258d32021-04-17 11:36:35 +020011752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11753$as_echo "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011754 if test "$ac_cv_dtrace_link" = "yes"; then
11755 DTRACE_OBJS="Python/pydtrace.o"
11756 fi
11757fi
11758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011759# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011760
Guido van Rossum98935bf2001-09-05 19:13:16 +000011761DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011762
Guido van Rossume97ee181999-12-20 21:27:22 +000011763# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011764# platforms have dlopen(), but don't want to use it.
Christian Heimes39258d32021-04-17 11:36:35 +020011765for ac_func in dlopen
11766do :
11767 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11768if test "x$ac_cv_func_dlopen" = xyes; then :
11769 cat >>confdefs.h <<_ACEOF
11770#define HAVE_DLOPEN 1
11771_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011772
Guido van Rossume97ee181999-12-20 21:27:22 +000011773fi
Christian Heimes39258d32021-04-17 11:36:35 +020011774done
Guido van Rossume97ee181999-12-20 21:27:22 +000011775
Michael W. Hudson54241132001-12-07 15:38:26 +000011776
Guido van Rossume97ee181999-12-20 21:27:22 +000011777# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11778# loading of modules.
11779
Christian Heimes39258d32021-04-17 11:36:35 +020011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11781$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011782if test -z "$DYNLOADFILE"
11783then
11784 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011785 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011786 *)
11787 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11788 # out any dynamic loading
11789 if test "$ac_cv_func_dlopen" = yes
11790 then DYNLOADFILE="dynload_shlib.o"
11791 else DYNLOADFILE="dynload_stub.o"
11792 fi
11793 ;;
11794 esac
11795fi
Christian Heimes39258d32021-04-17 11:36:35 +020011796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11797$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011798if test "$DYNLOADFILE" != "dynload_stub.o"
11799then
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Christian Heimes39258d32021-04-17 11:36:35 +020011801$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011802
11803fi
11804
Neil Schemenauer4e425612001-06-19 15:44:15 +000011805# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11806
Michael W. Hudson54241132001-12-07 15:38:26 +000011807
Christian Heimes39258d32021-04-17 11:36:35 +020011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11809$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011810if test -z "$MACHDEP_OBJS"
11811then
Jack Jansene578a632001-08-15 01:27:14 +000011812 MACHDEP_OBJS=$extra_machdep_objs
11813else
11814 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011815fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011816if test -z "$MACHDEP_OBJS"; then
Christian Heimes39258d32021-04-17 11:36:35 +020011817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11818$as_echo "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011819else
Christian Heimes39258d32021-04-17 11:36:35 +020011820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11821$as_echo "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011822fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011823
Guido van Rossum627b2d71993-12-24 10:39:16 +000011824# checks for library functions
Christian Heimes39258d32021-04-17 11:36:35 +020011825for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
11826 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11827 explicit_memset faccessat fchmod fchmodat fchown fchownat \
11828 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
11829 futimens futimes gai_strerror getentropy \
11830 getgrgid_r getgrnam_r \
11831 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
11832 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
11833 if_nameindex \
11834 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
11835 memrchr mbrtowc mkdirat mkfifo \
11836 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
11837 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
11838 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
11839 readlink readlinkat readv realpath renameat \
11840 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
11841 setgid sethostname \
11842 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
11843 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11844 sched_rr_get_interval \
11845 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
11846 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
11847 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
11848 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
11849 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
11850do :
11851 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11852ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11853if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11854 cat >>confdefs.h <<_ACEOF
11855#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11856_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011857
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011858fi
Christian Heimes39258d32021-04-17 11:36:35 +020011859done
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011860
Michael W. Hudson54241132001-12-07 15:38:26 +000011861
Benjamin Peterson40caa052018-09-12 15:52:40 -070011862# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11863# links. Some libc implementations have a stub lchmod implementation that always
11864# returns an error.
11865if test "$MACHDEP" != linux; then
Christian Heimes39258d32021-04-17 11:36:35 +020011866 for ac_func in lchmod
11867do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011868 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Christian Heimes39258d32021-04-17 11:36:35 +020011869if test "x$ac_cv_func_lchmod" = xyes; then :
11870 cat >>confdefs.h <<_ACEOF
11871#define HAVE_LCHMOD 1
Benjamin Petersoned709d52018-09-12 17:22:11 -070011872_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011873
11874fi
Christian Heimes39258d32021-04-17 11:36:35 +020011875done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011876
Christian Heimes39258d32021-04-17 11:36:35 +020011877fi
11878
11879ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011880 #include <dirent.h>
Christian Heimes39258d32021-04-17 11:36:35 +020011881"
11882if test "x$ac_cv_have_decl_dirfd" = xyes; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011883
Christian Heimes39258d32021-04-17 11:36:35 +020011884$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011885
11886fi
11887
Christian Heimes39258d32021-04-17 11:36:35 +020011888
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011889# For some functions, having a definition is not sufficient, since
11890# we want to take their address.
Christian Heimes39258d32021-04-17 11:36:35 +020011891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11892$as_echo_n "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011894/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011895#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011896int
Christian Heimes39258d32021-04-17 11:36:35 +020011897main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011898{
11899void *x=chroot
11900 ;
11901 return 0;
11902}
11903_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011904if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011905
Christian Heimes39258d32021-04-17 11:36:35 +020011906$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011907
Christian Heimes39258d32021-04-17 11:36:35 +020011908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11909$as_echo "yes" >&6; }
11910else
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11912$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011913
11914fi
Christian Heimes39258d32021-04-17 11:36:35 +020011915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11917$as_echo_n "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011919/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011920#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011921int
Christian Heimes39258d32021-04-17 11:36:35 +020011922main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011923{
11924void *x=link
11925 ;
11926 return 0;
11927}
11928_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011929if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011930
Christian Heimes39258d32021-04-17 11:36:35 +020011931$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011932
Christian Heimes39258d32021-04-17 11:36:35 +020011933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11934$as_echo "yes" >&6; }
11935else
11936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11937$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011938
11939fi
Christian Heimes39258d32021-04-17 11:36:35 +020011940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11942$as_echo_n "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011944/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011945#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011946int
Christian Heimes39258d32021-04-17 11:36:35 +020011947main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011948{
11949void *x=symlink
11950 ;
11951 return 0;
11952}
11953_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011954if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011955
Christian Heimes39258d32021-04-17 11:36:35 +020011956$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011957
Christian Heimes39258d32021-04-17 11:36:35 +020011958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11959$as_echo "yes" >&6; }
11960else
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011963
11964fi
Christian Heimes39258d32021-04-17 11:36:35 +020011965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11967$as_echo_n "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011969/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011970#include <unistd.h>
11971int
Christian Heimes39258d32021-04-17 11:36:35 +020011972main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011973{
11974void *x=fchdir
11975 ;
11976 return 0;
11977}
11978_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020011979if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011980
Christian Heimes39258d32021-04-17 11:36:35 +020011981$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011982
Christian Heimes39258d32021-04-17 11:36:35 +020011983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11984$as_echo "yes" >&6; }
11985else
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11987$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011988
11989fi
Christian Heimes39258d32021-04-17 11:36:35 +020011990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11992$as_echo_n "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011994/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011995#include <unistd.h>
11996int
Christian Heimes39258d32021-04-17 11:36:35 +020011997main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011998{
11999void *x=fsync
12000 ;
12001 return 0;
12002}
12003_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012005
Christian Heimes39258d32021-04-17 11:36:35 +020012006$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012007
Christian Heimes39258d32021-04-17 11:36:35 +020012008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12009$as_echo "yes" >&6; }
12010else
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12012$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012013
12014fi
Christian Heimes39258d32021-04-17 11:36:35 +020012015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
12017$as_echo_n "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012020#include <unistd.h>
12021int
Christian Heimes39258d32021-04-17 11:36:35 +020012022main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012023{
12024void *x=fdatasync
12025 ;
12026 return 0;
12027}
12028_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012030
Christian Heimes39258d32021-04-17 11:36:35 +020012031$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012032
Christian Heimes39258d32021-04-17 11:36:35 +020012033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12034$as_echo "yes" >&6; }
12035else
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12037$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012038
12039fi
Christian Heimes39258d32021-04-17 11:36:35 +020012040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
12042$as_echo_n "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012044/* end confdefs.h. */
12045#include <sys/epoll.h>
12046int
Christian Heimes39258d32021-04-17 11:36:35 +020012047main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012048{
12049void *x=epoll_create
12050 ;
12051 return 0;
12052}
12053_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012055
Christian Heimes39258d32021-04-17 11:36:35 +020012056$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012057
Christian Heimes39258d32021-04-17 11:36:35 +020012058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12059$as_echo "yes" >&6; }
12060else
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012063
12064fi
Christian Heimes39258d32021-04-17 11:36:35 +020012065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
12067$as_echo_n "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12069/* end confdefs.h. */
12070#include <sys/epoll.h>
12071int
Christian Heimes39258d32021-04-17 11:36:35 +020012072main ()
Benjamin Peterson95c16622011-12-27 15:36:32 -060012073{
12074void *x=epoll_create1
12075 ;
12076 return 0;
12077}
12078_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012079if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060012080
Christian Heimes39258d32021-04-17 11:36:35 +020012081$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060012082
Christian Heimes39258d32021-04-17 11:36:35 +020012083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12084$as_echo "yes" >&6; }
12085else
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12087$as_echo "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060012088
12089fi
Christian Heimes39258d32021-04-17 11:36:35 +020012090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12092$as_echo_n "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012094/* end confdefs.h. */
12095
12096#include <sys/types.h>
12097#include <sys/event.h>
12098
12099int
Christian Heimes39258d32021-04-17 11:36:35 +020012100main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012101{
12102int x=kqueue()
12103 ;
12104 return 0;
12105}
12106_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012107if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012108
Christian Heimes39258d32021-04-17 11:36:35 +020012109$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012110
Christian Heimes39258d32021-04-17 11:36:35 +020012111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12112$as_echo "yes" >&6; }
12113else
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012116
12117fi
Christian Heimes39258d32021-04-17 11:36:35 +020012118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12120$as_echo_n "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12122/* end confdefs.h. */
12123
12124#include <sys/time.h>
12125#include <sys/resource.h>
12126
12127int
Christian Heimes39258d32021-04-17 11:36:35 +020012128main ()
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012129{
12130void *x=prlimit
12131 ;
12132 return 0;
12133}
12134_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012135if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012136
Christian Heimes39258d32021-04-17 11:36:35 +020012137$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012138
Christian Heimes39258d32021-04-17 11:36:35 +020012139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12140$as_echo "yes" >&6; }
12141else
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12143$as_echo "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012144
12145fi
Christian Heimes39258d32021-04-17 11:36:35 +020012146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12148$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150/* end confdefs.h. */
12151#include <mach-o/dyld.h>
12152int
Christian Heimes39258d32021-04-17 11:36:35 +020012153main ()
Ronald Oussoren41761932020-11-08 10:05:27 +010012154{
12155void *x=_dyld_shared_cache_contains_path
12156 ;
12157 return 0;
12158}
12159_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012160if ac_fn_c_try_compile "$LINENO"; then :
Ronald Oussoren41761932020-11-08 10:05:27 +010012161
Christian Heimes39258d32021-04-17 11:36:35 +020012162$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010012163
Christian Heimes39258d32021-04-17 11:36:35 +020012164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12165$as_echo "yes" >&6; }
12166else
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12168$as_echo "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012169
12170fi
Christian Heimes39258d32021-04-17 11:36:35 +020012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012172
Christian Heimes39258d32021-04-17 11:36:35 +020012173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12174$as_echo_n "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12176/* end confdefs.h. */
12177
12178#ifdef HAVE_SYS_MMAN_H
12179#include <sys/mman.h>
12180#endif
12181#ifdef HAVE_SYS_MEMFD_H
12182#include <sys/memfd.h>
12183#endif
12184
12185int
Christian Heimes39258d32021-04-17 11:36:35 +020012186main ()
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012187{
12188void *x=memfd_create
12189 ;
12190 return 0;
12191}
12192_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012193if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012194
Christian Heimes39258d32021-04-17 11:36:35 +020012195$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012196
Christian Heimes39258d32021-04-17 11:36:35 +020012197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12198$as_echo "yes" >&6; }
12199else
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12201$as_echo "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012202
12203fi
Christian Heimes39258d32021-04-17 11:36:35 +020012204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012205
Christian Heimes39258d32021-04-17 11:36:35 +020012206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12207$as_echo_n "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12209/* end confdefs.h. */
12210
12211#ifdef HAVE_SYS_EVENTFD_H
12212#include <sys/eventfd.h>
12213#endif
12214
12215int
Christian Heimes39258d32021-04-17 11:36:35 +020012216main ()
Christian Heimescd9fed62020-11-13 19:48:52 +010012217{
12218int x = eventfd(0, EFD_CLOEXEC)
12219 ;
12220 return 0;
12221}
12222_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012223if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimescd9fed62020-11-13 19:48:52 +010012224
Christian Heimes39258d32021-04-17 11:36:35 +020012225$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010012226
Christian Heimes39258d32021-04-17 11:36:35 +020012227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12228$as_echo "yes" >&6; }
12229else
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12231$as_echo "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012232
12233fi
Christian Heimes39258d32021-04-17 11:36:35 +020012234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010012235
Martin v. Löwisd5843682002-11-21 20:41:28 +000012236# On some systems (eg. FreeBSD 5), we would find a definition of the
12237# functions ctermid_r, setgroups in the library, but no prototype
12238# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12239# address to avoid compiler warnings and potential miscompilations
12240# because of the missing prototypes.
12241
Christian Heimes39258d32021-04-17 11:36:35 +020012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12243$as_echo_n "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012245/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012246
Martin v. Löwisd5843682002-11-21 20:41:28 +000012247#include <stdio.h>
12248
Martin v. Löwisd5843682002-11-21 20:41:28 +000012249int
Christian Heimes39258d32021-04-17 11:36:35 +020012250main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012251{
12252void* p = ctermid_r
12253 ;
12254 return 0;
12255}
12256_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012258
Christian Heimes39258d32021-04-17 11:36:35 +020012259$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012260
Christian Heimes39258d32021-04-17 11:36:35 +020012261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12262$as_echo "yes" >&6; }
12263else
12264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012266
12267fi
Christian Heimes39258d32021-04-17 11:36:35 +020012268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269
Christian Heimes39258d32021-04-17 11:36:35 +020012270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12271$as_echo_n "checking for flock declaration... " >&6; }
12272if ${ac_cv_flock_decl+:} false; then :
12273 $as_echo_n "(cached) " >&6
12274else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012276/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012277#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012278int
Christian Heimes39258d32021-04-17 11:36:35 +020012279main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012280{
12281void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012282
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012283 ;
12284 return 0;
12285}
12286_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012287if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012288 ac_cv_flock_decl=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012289else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012290 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012291
12292fi
Christian Heimes39258d32021-04-17 11:36:35 +020012293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012294
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012295fi
Christian Heimes39258d32021-04-17 11:36:35 +020012296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12297$as_echo "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012298if test "x${ac_cv_flock_decl}" = xyes; then
12299 for ac_func in flock
12300do :
12301 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Christian Heimes39258d32021-04-17 11:36:35 +020012302if test "x$ac_cv_func_flock" = xyes; then :
12303 cat >>confdefs.h <<_ACEOF
12304#define HAVE_FLOCK 1
12305_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012306
Christian Heimes39258d32021-04-17 11:36:35 +020012307else
12308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
12309$as_echo_n "checking for flock in -lbsd... " >&6; }
12310if ${ac_cv_lib_bsd_flock+:} false; then :
12311 $as_echo_n "(cached) " >&6
12312else
Antoine Pitroua3000072010-09-07 14:52:42 +000012313 ac_check_lib_save_LIBS=$LIBS
12314LIBS="-lbsd $LIBS"
12315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12316/* end confdefs.h. */
12317
12318/* Override any GCC internal prototype to avoid an error.
12319 Use char because int might match the return type of a GCC
12320 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012321#ifdef __cplusplus
12322extern "C"
12323#endif
Antoine Pitroua3000072010-09-07 14:52:42 +000012324char flock ();
12325int
Christian Heimes39258d32021-04-17 11:36:35 +020012326main ()
Antoine Pitroua3000072010-09-07 14:52:42 +000012327{
12328return flock ();
12329 ;
12330 return 0;
12331}
12332_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012333if ac_fn_c_try_link "$LINENO"; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012334 ac_cv_lib_bsd_flock=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012335else
Antoine Pitroua3000072010-09-07 14:52:42 +000012336 ac_cv_lib_bsd_flock=no
12337fi
Christian Heimes39258d32021-04-17 11:36:35 +020012338rm -f core conftest.err conftest.$ac_objext \
Antoine Pitroua3000072010-09-07 14:52:42 +000012339 conftest$ac_exeext conftest.$ac_ext
12340LIBS=$ac_check_lib_save_LIBS
12341fi
Christian Heimes39258d32021-04-17 11:36:35 +020012342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12343$as_echo "$ac_cv_lib_bsd_flock" >&6; }
12344if test "x$ac_cv_lib_bsd_flock" = xyes; then :
12345 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012346
12347
Christian Heimes39258d32021-04-17 11:36:35 +020012348$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012349
12350
12351fi
12352
12353
12354fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012355done
Christian Heimes39258d32021-04-17 11:36:35 +020012356
Antoine Pitroua3000072010-09-07 14:52:42 +000012357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358
Christian Heimes39258d32021-04-17 11:36:35 +020012359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12360$as_echo_n "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012363
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012364#include <unistd.h>
12365
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012366int
Christian Heimes39258d32021-04-17 11:36:35 +020012367main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012368{
12369void* p = getpagesize
12370 ;
12371 return 0;
12372}
12373_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012375
Christian Heimes39258d32021-04-17 11:36:35 +020012376$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012377
Christian Heimes39258d32021-04-17 11:36:35 +020012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12379$as_echo "yes" >&6; }
12380else
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12382$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012383
12384fi
Christian Heimes39258d32021-04-17 11:36:35 +020012385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012386
Christian Heimes39258d32021-04-17 11:36:35 +020012387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12388$as_echo_n "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390/* end confdefs.h. */
12391
12392#include <stdlib.h>
12393
12394int
Christian Heimes39258d32021-04-17 11:36:35 +020012395main ()
Victor Stinner984890f2011-11-24 13:53:38 +010012396{
12397int res = unsetenv("DUMMY")
12398 ;
12399 return 0;
12400}
12401_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012402if ac_fn_c_try_compile "$LINENO"; then :
12403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12404$as_echo "no" >&6; }
12405else
Victor Stinner984890f2011-11-24 13:53:38 +010012406
Christian Heimes39258d32021-04-17 11:36:35 +020012407$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010012408
Christian Heimes39258d32021-04-17 11:36:35 +020012409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12410$as_echo "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012411
12412fi
Christian Heimes39258d32021-04-17 11:36:35 +020012413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010012414
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012415for ac_prog in true
12416do
12417 # Extract the first word of "$ac_prog", so it can be a program name with args.
12418set dummy $ac_prog; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020012419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12420$as_echo_n "checking for $ac_word... " >&6; }
12421if ${ac_cv_prog_TRUE+:} false; then :
12422 $as_echo_n "(cached) " >&6
12423else
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012424 if test -n "$TRUE"; then
12425 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12426else
12427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12428for as_dir in $PATH
12429do
12430 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020012431 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020012433 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012434 ac_cv_prog_TRUE="$ac_prog"
Christian Heimes39258d32021-04-17 11:36:35 +020012435 $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 +000012436 break 2
12437 fi
12438done
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012441
12442fi
12443fi
12444TRUE=$ac_cv_prog_TRUE
12445if test -n "$TRUE"; then
Christian Heimes39258d32021-04-17 11:36:35 +020012446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12447$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012448else
Christian Heimes39258d32021-04-17 11:36:35 +020012449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12450$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012451fi
12452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012454 test -n "$TRUE" && break
12455done
12456test -n "$TRUE" || TRUE="/bin/true"
12457
12458
Christian Heimes39258d32021-04-17 11:36:35 +020012459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12460$as_echo_n "checking for inet_aton in -lc... " >&6; }
12461if ${ac_cv_lib_c_inet_aton+:} false; then :
12462 $as_echo_n "(cached) " >&6
12463else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012464 ac_check_lib_save_LIBS=$LIBS
12465LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012467/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469/* Override any GCC internal prototype to avoid an error.
12470 Use char because int might match the return type of a GCC
12471 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012472#ifdef __cplusplus
12473extern "C"
12474#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012475char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012476int
Christian Heimes39258d32021-04-17 11:36:35 +020012477main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012480 ;
12481 return 0;
12482}
12483_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012485 ac_cv_lib_c_inet_aton=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012486else
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012488fi
Christian Heimes39258d32021-04-17 11:36:35 +020012489rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012491LIBS=$ac_check_lib_save_LIBS
12492fi
Christian Heimes39258d32021-04-17 11:36:35 +020012493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12494$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
12495if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012496 $ac_cv_prog_TRUE
Christian Heimes39258d32021-04-17 11:36:35 +020012497else
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12499$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
12500if ${ac_cv_lib_resolv_inet_aton+:} false; then :
12501 $as_echo_n "(cached) " >&6
12502else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012503 ac_check_lib_save_LIBS=$LIBS
12504LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508/* Override any GCC internal prototype to avoid an error.
12509 Use char because int might match the return type of a GCC
12510 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012511#ifdef __cplusplus
12512extern "C"
12513#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012514char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012515int
Christian Heimes39258d32021-04-17 11:36:35 +020012516main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012519 ;
12520 return 0;
12521}
12522_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012523if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012524 ac_cv_lib_resolv_inet_aton=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012525else
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012527fi
Christian Heimes39258d32021-04-17 11:36:35 +020012528rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012530LIBS=$ac_check_lib_save_LIBS
12531fi
Christian Heimes39258d32021-04-17 11:36:35 +020012532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12533$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
12534if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
12535 cat >>confdefs.h <<_ACEOF
12536#define HAVE_LIBRESOLV 1
12537_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012538
12539 LIBS="-lresolv $LIBS"
12540
12541fi
12542
12543
12544fi
12545
12546
Christian Heimesd0764e22007-12-04 15:00:33 +000012547# On Tru64, chflags seems to be present, but calling it will
12548# exit Python
Christian Heimes39258d32021-04-17 11:36:35 +020012549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12550$as_echo_n "checking for chflags... " >&6; }
12551if ${ac_cv_have_chflags+:} false; then :
12552 $as_echo_n "(cached) " >&6
12553else
12554 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012555 ac_cv_have_chflags=cross
Christian Heimes39258d32021-04-17 11:36:35 +020012556else
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012558/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012559
Christian Heimesd0764e22007-12-04 15:00:33 +000012560#include <sys/stat.h>
12561#include <unistd.h>
12562int main(int argc, char*argv[])
12563{
12564 if(chflags(argv[0], 0) != 0)
12565 return 1;
12566 return 0;
12567}
Ned Deily3eb67d52011-06-28 00:00:28 -070012568
Christian Heimesd0764e22007-12-04 15:00:33 +000012569_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012570if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012571 ac_cv_have_chflags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012572else
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12576 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012577fi
12578
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012579
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012580fi
Christian Heimes39258d32021-04-17 11:36:35 +020012581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12582$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012583if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Christian Heimes39258d32021-04-17 11:36:35 +020012585if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012586 ac_cv_have_chflags="yes"
Christian Heimes39258d32021-04-17 11:36:35 +020012587else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012588 ac_cv_have_chflags="no"
12589fi
12590
12591fi
12592if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012593
Christian Heimes39258d32021-04-17 11:36:35 +020012594$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012595
12596fi
12597
Christian Heimes39258d32021-04-17 11:36:35 +020012598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12599$as_echo_n "checking for lchflags... " >&6; }
12600if ${ac_cv_have_lchflags+:} false; then :
12601 $as_echo_n "(cached) " >&6
12602else
12603 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012604 ac_cv_have_lchflags=cross
Christian Heimes39258d32021-04-17 11:36:35 +020012605else
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012607/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012608
Christian Heimesd0764e22007-12-04 15:00:33 +000012609#include <sys/stat.h>
12610#include <unistd.h>
12611int main(int argc, char*argv[])
12612{
12613 if(lchflags(argv[0], 0) != 0)
12614 return 1;
12615 return 0;
12616}
Ned Deily3eb67d52011-06-28 00:00:28 -070012617
Christian Heimesd0764e22007-12-04 15:00:33 +000012618_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012619if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012620 ac_cv_have_lchflags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012621else
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12625 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012626fi
12627
12628
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012629fi
Christian Heimes39258d32021-04-17 11:36:35 +020012630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12631$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012632if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Christian Heimes39258d32021-04-17 11:36:35 +020012634if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012635 ac_cv_have_lchflags="yes"
Christian Heimes39258d32021-04-17 11:36:35 +020012636else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012637 ac_cv_have_lchflags="no"
12638fi
12639
12640fi
12641if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012642
Christian Heimes39258d32021-04-17 11:36:35 +020012643$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012644
12645fi
12646
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012647case $ac_sys_system/$ac_sys_release in
12648Darwin/*)
12649 _CUR_CFLAGS="${CFLAGS}"
12650 _CUR_LDFLAGS="${LDFLAGS}"
12651 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12652 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12653 ;;
12654esac
12655
Christian Heimes39258d32021-04-17 11:36:35 +020012656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12657$as_echo_n "checking for inflateCopy in -lz... " >&6; }
12658if ${ac_cv_lib_z_inflateCopy+:} false; then :
12659 $as_echo_n "(cached) " >&6
12660else
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012661 ac_check_lib_save_LIBS=$LIBS
12662LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012664/* end confdefs.h. */
12665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666/* Override any GCC internal prototype to avoid an error.
12667 Use char because int might match the return type of a GCC
12668 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012669#ifdef __cplusplus
12670extern "C"
12671#endif
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012672char inflateCopy ();
12673int
Christian Heimes39258d32021-04-17 11:36:35 +020012674main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012676return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012677 ;
12678 return 0;
12679}
12680_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012681if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012682 ac_cv_lib_z_inflateCopy=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012685fi
Christian Heimes39258d32021-04-17 11:36:35 +020012686rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012688LIBS=$ac_check_lib_save_LIBS
12689fi
Christian Heimes39258d32021-04-17 11:36:35 +020012690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12691$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
12692if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012693
Christian Heimes39258d32021-04-17 11:36:35 +020012694$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012695
12696fi
12697
12698
12699case $ac_sys_system/$ac_sys_release in
12700Darwin/*)
12701 CFLAGS="${_CUR_CFLAGS}"
12702 LDFLAGS="${_CUR_LDFLAGS}"
12703 ;;
12704esac
12705
Christian Heimes39258d32021-04-17 11:36:35 +020012706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12707$as_echo_n "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012709/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012710
Martin v. Löwise9416172003-05-03 10:12:45 +000012711#include <netdb.h>
12712
Martin v. Löwise9416172003-05-03 10:12:45 +000012713int
Christian Heimes39258d32021-04-17 11:36:35 +020012714main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012715{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012716void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012717 ;
12718 return 0;
12719}
12720_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012721if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012722
Christian Heimes39258d32021-04-17 11:36:35 +020012723$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012724
Christian Heimes39258d32021-04-17 11:36:35 +020012725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12726$as_echo "yes" >&6; }
12727else
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12729$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012730
12731fi
Christian Heimes39258d32021-04-17 11:36:35 +020012732rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734
Christian Heimes39258d32021-04-17 11:36:35 +020012735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12736$as_echo_n "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012739
Martin v. Löwis86d66262006-02-17 08:40:11 +000012740#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012741#include <sys/socket.h>
12742#include <netinet/in.h>
12743#include <arpa/inet.h>
12744
Martin v. Löwise9416172003-05-03 10:12:45 +000012745int
Christian Heimes39258d32021-04-17 11:36:35 +020012746main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012747{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012748void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012749 ;
12750 return 0;
12751}
12752_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012754
Christian Heimes39258d32021-04-17 11:36:35 +020012755$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012756
Christian Heimes39258d32021-04-17 11:36:35 +020012757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12758$as_echo "yes" >&6; }
12759else
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12761$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012762
12763fi
Christian Heimes39258d32021-04-17 11:36:35 +020012764rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766
Christian Heimes39258d32021-04-17 11:36:35 +020012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12768$as_echo_n "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012770/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012771
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012772#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012773#include <sys/socket.h>
12774#include <netinet/in.h>
12775#include <arpa/inet.h>
12776
Martin v. Löwise9416172003-05-03 10:12:45 +000012777int
Christian Heimes39258d32021-04-17 11:36:35 +020012778main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012779{
12780void* p = inet_pton
12781 ;
12782 return 0;
12783}
12784_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012786
Christian Heimes39258d32021-04-17 11:36:35 +020012787$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012788
Christian Heimes39258d32021-04-17 11:36:35 +020012789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12790$as_echo "yes" >&6; }
12791else
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12793$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012794
12795fi
Christian Heimes39258d32021-04-17 11:36:35 +020012796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012797
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012798# On some systems, setgroups is in unistd.h, on others, in grp.h
Christian Heimes39258d32021-04-17 11:36:35 +020012799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12800$as_echo_n "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012803
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012804#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012805#ifdef HAVE_GRP_H
12806#include <grp.h>
12807#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012808
Martin v. Löwisd5843682002-11-21 20:41:28 +000012809int
Christian Heimes39258d32021-04-17 11:36:35 +020012810main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012811{
12812void* p = setgroups
12813 ;
12814 return 0;
12815}
12816_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012817if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012818
Christian Heimes39258d32021-04-17 11:36:35 +020012819$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012820
Christian Heimes39258d32021-04-17 11:36:35 +020012821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12822$as_echo "yes" >&6; }
12823else
12824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12825$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012826
12827fi
Christian Heimes39258d32021-04-17 11:36:35 +020012828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012829
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012830# check for openpty and forkpty
12831
Christian Heimes39258d32021-04-17 11:36:35 +020012832for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012833do :
12834 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Christian Heimes39258d32021-04-17 11:36:35 +020012835if test "x$ac_cv_func_openpty" = xyes; then :
12836 cat >>confdefs.h <<_ACEOF
12837#define HAVE_OPENPTY 1
12838_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012839
Christian Heimes39258d32021-04-17 11:36:35 +020012840else
12841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12842$as_echo_n "checking for openpty in -lutil... " >&6; }
12843if ${ac_cv_lib_util_openpty+:} false; then :
12844 $as_echo_n "(cached) " >&6
12845else
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012847LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851/* Override any GCC internal prototype to avoid an error.
12852 Use char because int might match the return type of a GCC
12853 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012854#ifdef __cplusplus
12855extern "C"
12856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012857char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012858int
Christian Heimes39258d32021-04-17 11:36:35 +020012859main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ;
12863 return 0;
12864}
12865_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012866if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012867 ac_cv_lib_util_openpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012868else
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012870fi
Christian Heimes39258d32021-04-17 11:36:35 +020012871rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012872 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012873LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012874fi
Christian Heimes39258d32021-04-17 11:36:35 +020012875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12876$as_echo "$ac_cv_lib_util_openpty" >&6; }
12877if test "x$ac_cv_lib_util_openpty" = xyes; then :
12878 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012879 LIBS="$LIBS -lutil"
Christian Heimes39258d32021-04-17 11:36:35 +020012880else
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12882$as_echo_n "checking for openpty in -lbsd... " >&6; }
12883if ${ac_cv_lib_bsd_openpty+:} false; then :
12884 $as_echo_n "(cached) " >&6
12885else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012886 ac_check_lib_save_LIBS=$LIBS
12887LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012889/* end confdefs.h. */
12890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891/* Override any GCC internal prototype to avoid an error.
12892 Use char because int might match the return type of a GCC
12893 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012894#ifdef __cplusplus
12895extern "C"
12896#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012897char openpty ();
12898int
Christian Heimes39258d32021-04-17 11:36:35 +020012899main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012902 ;
12903 return 0;
12904}
12905_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012907 ac_cv_lib_bsd_openpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012910fi
Christian Heimes39258d32021-04-17 11:36:35 +020012911rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012913LIBS=$ac_check_lib_save_LIBS
12914fi
Christian Heimes39258d32021-04-17 11:36:35 +020012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12916$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
12917if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
12918 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012919 LIBS="$LIBS -lbsd"
12920fi
12921
12922
12923fi
12924
Fred Drake8cef4cf2000-06-28 16:40:38 +000012925
12926fi
12927done
12928
Christian Heimes39258d32021-04-17 11:36:35 +020012929for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012930do :
12931 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Christian Heimes39258d32021-04-17 11:36:35 +020012932if test "x$ac_cv_func_forkpty" = xyes; then :
12933 cat >>confdefs.h <<_ACEOF
12934#define HAVE_FORKPTY 1
12935_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012936
Christian Heimes39258d32021-04-17 11:36:35 +020012937else
12938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12939$as_echo_n "checking for forkpty in -lutil... " >&6; }
12940if ${ac_cv_lib_util_forkpty+:} false; then :
12941 $as_echo_n "(cached) " >&6
12942else
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012944LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948/* Override any GCC internal prototype to avoid an error.
12949 Use char because int might match the return type of a GCC
12950 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012951#ifdef __cplusplus
12952extern "C"
12953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012954char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012955int
Christian Heimes39258d32021-04-17 11:36:35 +020012956main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 ;
12960 return 0;
12961}
12962_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020012963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 ac_cv_lib_util_forkpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020012965else
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012967fi
Christian Heimes39258d32021-04-17 11:36:35 +020012968rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012970LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012971fi
Christian Heimes39258d32021-04-17 11:36:35 +020012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12973$as_echo "$ac_cv_lib_util_forkpty" >&6; }
12974if test "x$ac_cv_lib_util_forkpty" = xyes; then :
12975 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012976 LIBS="$LIBS -lutil"
Christian Heimes39258d32021-04-17 11:36:35 +020012977else
12978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12979$as_echo_n "checking for forkpty in -lbsd... " >&6; }
12980if ${ac_cv_lib_bsd_forkpty+:} false; then :
12981 $as_echo_n "(cached) " >&6
12982else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012983 ac_check_lib_save_LIBS=$LIBS
12984LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012986/* end confdefs.h. */
12987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988/* Override any GCC internal prototype to avoid an error.
12989 Use char because int might match the return type of a GCC
12990 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020012991#ifdef __cplusplus
12992extern "C"
12993#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012994char forkpty ();
12995int
Christian Heimes39258d32021-04-17 11:36:35 +020012996main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012999 ;
13000 return 0;
13001}
13002_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013003if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013004 ac_cv_lib_bsd_forkpty=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013005else
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013007fi
Christian Heimes39258d32021-04-17 11:36:35 +020013008rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013010LIBS=$ac_check_lib_save_LIBS
13011fi
Christian Heimes39258d32021-04-17 11:36:35 +020013012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
13013$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
13014if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
13015 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000013016 LIBS="$LIBS -lbsd"
13017fi
13018
13019
13020fi
13021
Fred Drake8cef4cf2000-06-28 16:40:38 +000013022
13023fi
Pablo Galindo53e55292021-04-05 17:38:40 +010013024done
Christian Heimes32eba612021-03-19 10:29:25 +010013025
Christian Heimes39258d32021-04-17 11:36:35 +020013026
Michael W. Hudson54241132001-12-07 15:38:26 +000013027# check for long file support functions
Christian Heimes39258d32021-04-17 11:36:35 +020013028for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13029do :
13030 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13031ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13032if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13033 cat >>confdefs.h <<_ACEOF
13034#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13035_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013037fi
Christian Heimes39258d32021-04-17 11:36:35 +020013038done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013039
Michael W. Hudson54241132001-12-07 15:38:26 +000013040
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013041ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Christian Heimes39258d32021-04-17 11:36:35 +020013042if test "x$ac_cv_func_dup2" = xyes; then :
13043 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000013044
Christian Heimes39258d32021-04-17 11:36:35 +020013045else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013047 *" dup2.$ac_objext "* ) ;;
13048 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013050esac
13051
Martin v. Löwis1142de32002-03-29 16:28:31 +000013052fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013053
Martin v. Löwis1142de32002-03-29 16:28:31 +000013054
Christian Heimes39258d32021-04-17 11:36:35 +020013055for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013056do :
13057 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Christian Heimes39258d32021-04-17 11:36:35 +020013058if test "x$ac_cv_func_getpgrp" = xyes; then :
13059 cat >>confdefs.h <<_ACEOF
13060#define HAVE_GETPGRP 1
13061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013063/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013065int
Christian Heimes39258d32021-04-17 11:36:35 +020013066main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ;
13070 return 0;
13071}
13072_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013073if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
Christian Heimes39258d32021-04-17 11:36:35 +020013075$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013076
Guido van Rossum627b2d71993-12-24 10:39:16 +000013077fi
Christian Heimes39258d32021-04-17 11:36:35 +020013078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013079
Guido van Rossum627b2d71993-12-24 10:39:16 +000013080fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013081done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013082
Christian Heimes39258d32021-04-17 11:36:35 +020013083for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013084do :
13085 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Christian Heimes39258d32021-04-17 11:36:35 +020013086if test "x$ac_cv_func_setpgrp" = xyes; then :
13087 cat >>confdefs.h <<_ACEOF
13088#define HAVE_SETPGRP 1
13089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013091/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013092#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013093int
Christian Heimes39258d32021-04-17 11:36:35 +020013094main ()
Jack Jansen150753c2003-03-29 22:07:47 +000013095{
13096setpgrp(0,0);
13097 ;
13098 return 0;
13099}
13100_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013101if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
Christian Heimes39258d32021-04-17 11:36:35 +020013103$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013104
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013105fi
Christian Heimes39258d32021-04-17 11:36:35 +020013106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013107
13108fi
13109done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013110
Christian Heimes39258d32021-04-17 11:36:35 +020013111
Gregory P. Smith387512c2018-12-30 15:42:32 -080013112# We search for both crypt and crypt_r as one or the other may be defined
13113# This gets us our -lcrypt in LIBS when required on the target platform.
Christian Heimes39258d32021-04-17 11:36:35 +020013114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13115$as_echo_n "checking for library containing crypt... " >&6; }
13116if ${ac_cv_search_crypt+:} false; then :
13117 $as_echo_n "(cached) " >&6
13118else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013119 ac_func_search_save_LIBS=$LIBS
13120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13121/* end confdefs.h. */
13122
13123/* Override any GCC internal prototype to avoid an error.
13124 Use char because int might match the return type of a GCC
13125 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013126#ifdef __cplusplus
13127extern "C"
13128#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013129char crypt ();
13130int
Christian Heimes39258d32021-04-17 11:36:35 +020013131main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013132{
13133return crypt ();
13134 ;
13135 return 0;
13136}
13137_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013138for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013139 if test -z "$ac_lib"; then
13140 ac_res="none required"
13141 else
13142 ac_res=-l$ac_lib
13143 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13144 fi
Christian Heimes39258d32021-04-17 11:36:35 +020013145 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013146 ac_cv_search_crypt=$ac_res
13147fi
Christian Heimes39258d32021-04-17 11:36:35 +020013148rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013149 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020013150 if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013151 break
13152fi
13153done
Christian Heimes39258d32021-04-17 11:36:35 +020013154if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013155
Christian Heimes39258d32021-04-17 11:36:35 +020013156else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013157 ac_cv_search_crypt=no
13158fi
13159rm conftest.$ac_ext
13160LIBS=$ac_func_search_save_LIBS
13161fi
Christian Heimes39258d32021-04-17 11:36:35 +020013162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13163$as_echo "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013164ac_res=$ac_cv_search_crypt
Christian Heimes39258d32021-04-17 11:36:35 +020013165if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013166 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13167
13168fi
13169
Christian Heimes39258d32021-04-17 11:36:35 +020013170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13171$as_echo_n "checking for library containing crypt_r... " >&6; }
13172if ${ac_cv_search_crypt_r+:} false; then :
13173 $as_echo_n "(cached) " >&6
13174else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013175 ac_func_search_save_LIBS=$LIBS
13176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13177/* end confdefs.h. */
13178
13179/* Override any GCC internal prototype to avoid an error.
13180 Use char because int might match the return type of a GCC
13181 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013182#ifdef __cplusplus
13183extern "C"
13184#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013185char crypt_r ();
13186int
Christian Heimes39258d32021-04-17 11:36:35 +020013187main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013188{
13189return crypt_r ();
13190 ;
13191 return 0;
13192}
13193_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013194for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013195 if test -z "$ac_lib"; then
13196 ac_res="none required"
13197 else
13198 ac_res=-l$ac_lib
13199 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13200 fi
Christian Heimes39258d32021-04-17 11:36:35 +020013201 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013202 ac_cv_search_crypt_r=$ac_res
13203fi
Christian Heimes39258d32021-04-17 11:36:35 +020013204rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013205 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020013206 if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013207 break
13208fi
13209done
Christian Heimes39258d32021-04-17 11:36:35 +020013210if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013211
Christian Heimes39258d32021-04-17 11:36:35 +020013212else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013213 ac_cv_search_crypt_r=no
13214fi
13215rm conftest.$ac_ext
13216LIBS=$ac_func_search_save_LIBS
13217fi
Christian Heimes39258d32021-04-17 11:36:35 +020013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13219$as_echo "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013220ac_res=$ac_cv_search_crypt_r
Christian Heimes39258d32021-04-17 11:36:35 +020013221if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013222 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13223
13224fi
13225
13226
13227ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Christian Heimes39258d32021-04-17 11:36:35 +020013228if test "x$ac_cv_func_crypt_r" = xyes; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13230/* end confdefs.h. */
13231
13232#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13233#include <crypt.h>
13234
13235int
Christian Heimes39258d32021-04-17 11:36:35 +020013236main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013237{
13238
13239struct crypt_data d;
13240char *r = crypt_r("", "", &d);
13241
13242 ;
13243 return 0;
13244}
13245_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013246if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013247
Christian Heimes39258d32021-04-17 11:36:35 +020013248$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080013249
13250fi
Christian Heimes39258d32021-04-17 11:36:35 +020013251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080013252
13253fi
13254
13255
Christian Heimes39258d32021-04-17 11:36:35 +020013256for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020013257do :
13258 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Christian Heimes39258d32021-04-17 11:36:35 +020013259if test "x$ac_cv_func_clock_gettime" = xyes; then :
13260 cat >>confdefs.h <<_ACEOF
13261#define HAVE_CLOCK_GETTIME 1
13262_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013263
Christian Heimes39258d32021-04-17 11:36:35 +020013264else
Victor Stinnere0be4232011-10-25 13:06:09 +020013265
Christian Heimes39258d32021-04-17 11:36:35 +020013266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13267$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13268if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13269 $as_echo_n "(cached) " >&6
13270else
Victor Stinnere0be4232011-10-25 13:06:09 +020013271 ac_check_lib_save_LIBS=$LIBS
13272LIBS="-lrt $LIBS"
13273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13274/* end confdefs.h. */
13275
13276/* Override any GCC internal prototype to avoid an error.
13277 Use char because int might match the return type of a GCC
13278 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013279#ifdef __cplusplus
13280extern "C"
13281#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013282char clock_gettime ();
13283int
Christian Heimes39258d32021-04-17 11:36:35 +020013284main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013285{
13286return clock_gettime ();
13287 ;
13288 return 0;
13289}
13290_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013291if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013292 ac_cv_lib_rt_clock_gettime=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013293else
Victor Stinnere0be4232011-10-25 13:06:09 +020013294 ac_cv_lib_rt_clock_gettime=no
13295fi
Christian Heimes39258d32021-04-17 11:36:35 +020013296rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013297 conftest$ac_exeext conftest.$ac_ext
13298LIBS=$ac_check_lib_save_LIBS
13299fi
Christian Heimes39258d32021-04-17 11:36:35 +020013300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13301$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13302if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013303
Victor Stinner7efb8332014-08-29 15:41:08 +020013304 LIBS="$LIBS -lrt"
Christian Heimes39258d32021-04-17 11:36:35 +020013305 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013306
13307
Christian Heimes39258d32021-04-17 11:36:35 +020013308$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013309
13310
13311fi
13312
13313
13314fi
13315done
13316
13317
Christian Heimes39258d32021-04-17 11:36:35 +020013318for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020013319do :
13320 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Christian Heimes39258d32021-04-17 11:36:35 +020013321if test "x$ac_cv_func_clock_getres" = xyes; then :
13322 cat >>confdefs.h <<_ACEOF
13323#define HAVE_CLOCK_GETRES 1
13324_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013325
Christian Heimes39258d32021-04-17 11:36:35 +020013326else
Victor Stinnere0be4232011-10-25 13:06:09 +020013327
Christian Heimes39258d32021-04-17 11:36:35 +020013328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13329$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13330if ${ac_cv_lib_rt_clock_getres+:} false; then :
13331 $as_echo_n "(cached) " >&6
13332else
Victor Stinnere0be4232011-10-25 13:06:09 +020013333 ac_check_lib_save_LIBS=$LIBS
13334LIBS="-lrt $LIBS"
13335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336/* end confdefs.h. */
13337
13338/* Override any GCC internal prototype to avoid an error.
13339 Use char because int might match the return type of a GCC
13340 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013341#ifdef __cplusplus
13342extern "C"
13343#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013344char clock_getres ();
13345int
Christian Heimes39258d32021-04-17 11:36:35 +020013346main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013347{
13348return clock_getres ();
13349 ;
13350 return 0;
13351}
13352_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013353if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013354 ac_cv_lib_rt_clock_getres=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013355else
Victor Stinnere0be4232011-10-25 13:06:09 +020013356 ac_cv_lib_rt_clock_getres=no
13357fi
Christian Heimes39258d32021-04-17 11:36:35 +020013358rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013359 conftest$ac_exeext conftest.$ac_ext
13360LIBS=$ac_check_lib_save_LIBS
13361fi
Christian Heimes39258d32021-04-17 11:36:35 +020013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13363$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13364if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013365
Christian Heimes39258d32021-04-17 11:36:35 +020013366 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013367
13368
13369fi
13370
13371
13372fi
13373done
13374
13375
Christian Heimes39258d32021-04-17 11:36:35 +020013376for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013377do :
13378 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Christian Heimes39258d32021-04-17 11:36:35 +020013379if test "x$ac_cv_func_clock_settime" = xyes; then :
13380 cat >>confdefs.h <<_ACEOF
13381#define HAVE_CLOCK_SETTIME 1
13382_ACEOF
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013383
Christian Heimes39258d32021-04-17 11:36:35 +020013384else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013385
Christian Heimes39258d32021-04-17 11:36:35 +020013386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13387$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13388if ${ac_cv_lib_rt_clock_settime+:} false; then :
13389 $as_echo_n "(cached) " >&6
13390else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013391 ac_check_lib_save_LIBS=$LIBS
13392LIBS="-lrt $LIBS"
13393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13394/* end confdefs.h. */
13395
13396/* Override any GCC internal prototype to avoid an error.
13397 Use char because int might match the return type of a GCC
13398 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020013399#ifdef __cplusplus
13400extern "C"
13401#endif
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013402char clock_settime ();
13403int
Christian Heimes39258d32021-04-17 11:36:35 +020013404main ()
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013405{
13406return clock_settime ();
13407 ;
13408 return 0;
13409}
13410_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013411if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013412 ac_cv_lib_rt_clock_settime=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013413else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013414 ac_cv_lib_rt_clock_settime=no
13415fi
Christian Heimes39258d32021-04-17 11:36:35 +020013416rm -f core conftest.err conftest.$ac_objext \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013417 conftest$ac_exeext conftest.$ac_ext
13418LIBS=$ac_check_lib_save_LIBS
13419fi
Christian Heimes39258d32021-04-17 11:36:35 +020013420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13421$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13422if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013423
Christian Heimes39258d32021-04-17 11:36:35 +020013424 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013425
13426
13427fi
13428
13429
13430fi
13431done
13432
Christian Heimes39258d32021-04-17 11:36:35 +020013433
13434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13435$as_echo_n "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013438
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013439#if defined(MAJOR_IN_MKDEV)
13440#include <sys/mkdev.h>
13441#elif defined(MAJOR_IN_SYSMACROS)
13442#include <sys/sysmacros.h>
13443#else
13444#include <sys/types.h>
13445#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013446
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013447int
Christian Heimes39258d32021-04-17 11:36:35 +020013448main ()
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013449{
13450
13451 makedev(major(0),minor(0));
13452
13453 ;
13454 return 0;
13455}
13456_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013458
13459
Christian Heimes39258d32021-04-17 11:36:35 +020013460$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013461
Christian Heimes39258d32021-04-17 11:36:35 +020013462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13463$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013464
Christian Heimes39258d32021-04-17 11:36:35 +020013465else
Skip Montanaro6dead952003-09-25 14:50:04 +000013466
Christian Heimes39258d32021-04-17 11:36:35 +020013467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13468$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013469
13470fi
Christian Heimes39258d32021-04-17 11:36:35 +020013471rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013472 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013473
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013474# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013475# for [no]getaddrinfo in netdb.h.
Christian Heimes39258d32021-04-17 11:36:35 +020013476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13477$as_echo_n "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013480
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013481#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013482#include <sys/socket.h>
13483#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013484#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013485
Martin v. Löwis11437992002-04-12 09:54:03 +000013486int
Christian Heimes39258d32021-04-17 11:36:35 +020013487main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013488{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013489getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 ;
13491 return 0;
13492}
13493_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013494if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495 have_getaddrinfo=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013498fi
Christian Heimes39258d32021-04-17 11:36:35 +020013499rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020013501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13502$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013503if test $have_getaddrinfo = yes
13504then
Christian Heimes39258d32021-04-17 11:36:35 +020013505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13506$as_echo_n "checking getaddrinfo bug... " >&6; }
13507 if ${ac_cv_buggy_getaddrinfo+:} false; then :
13508 $as_echo_n "(cached) " >&6
13509else
13510 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013511
13512if test "${enable_ipv6+set}" = set; then
13513 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13514else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013515 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013516fi
Christian Heimes39258d32021-04-17 11:36:35 +020013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013519/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013520
Stefan Krah19c21392012-11-22 23:47:32 +010013521#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013522#include <sys/types.h>
13523#include <netdb.h>
13524#include <string.h>
13525#include <sys/socket.h>
13526#include <netinet/in.h>
13527
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013528int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529{
13530 int passive, gaierr, inet4 = 0, inet6 = 0;
13531 struct addrinfo hints, *ai, *aitop;
13532 char straddr[INET6_ADDRSTRLEN], strport[16];
13533
13534 for (passive = 0; passive <= 1; passive++) {
13535 memset(&hints, 0, sizeof(hints));
13536 hints.ai_family = AF_UNSPEC;
13537 hints.ai_flags = passive ? AI_PASSIVE : 0;
13538 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013539 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013540 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13541 (void)gai_strerror(gaierr);
13542 goto bad;
13543 }
13544 for (ai = aitop; ai; ai = ai->ai_next) {
13545 if (ai->ai_addr == NULL ||
13546 ai->ai_addrlen == 0 ||
13547 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13548 straddr, sizeof(straddr), strport, sizeof(strport),
13549 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13550 goto bad;
13551 }
13552 switch (ai->ai_family) {
13553 case AF_INET:
13554 if (strcmp(strport, "54321") != 0) {
13555 goto bad;
13556 }
13557 if (passive) {
13558 if (strcmp(straddr, "0.0.0.0") != 0) {
13559 goto bad;
13560 }
13561 } else {
13562 if (strcmp(straddr, "127.0.0.1") != 0) {
13563 goto bad;
13564 }
13565 }
13566 inet4++;
13567 break;
13568 case AF_INET6:
13569 if (strcmp(strport, "54321") != 0) {
13570 goto bad;
13571 }
13572 if (passive) {
13573 if (strcmp(straddr, "::") != 0) {
13574 goto bad;
13575 }
13576 } else {
13577 if (strcmp(straddr, "::1") != 0) {
13578 goto bad;
13579 }
13580 }
13581 inet6++;
13582 break;
13583 case AF_UNSPEC:
13584 goto bad;
13585 break;
13586 default:
13587 /* another family support? */
13588 break;
13589 }
13590 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013591 freeaddrinfo(aitop);
13592 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593 }
13594
13595 if (!(inet4 == 0 || inet4 == 2))
13596 goto bad;
13597 if (!(inet6 == 0 || inet6 == 2))
13598 goto bad;
13599
13600 if (aitop)
13601 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013602 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603
13604 bad:
13605 if (aitop)
13606 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013607 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013608}
13609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013611if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013612 ac_cv_buggy_getaddrinfo=no
Christian Heimes39258d32021-04-17 11:36:35 +020013613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013620fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623
Christian Heimes39258d32021-04-17 11:36:35 +020013624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13625$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013626
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013627if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013628then
13629 if test $ipv6 = yes
13630 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013631 echo 'Fatal: You must get working getaddrinfo() function.'
13632 echo ' or you can specify "--disable-ipv6"'.
13633 exit 1
13634 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013635else
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
Christian Heimes39258d32021-04-17 11:36:35 +020013637$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013638
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013639fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013640
Christian Heimes39258d32021-04-17 11:36:35 +020013641for ac_func in getnameinfo
13642do :
13643 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
13644if test "x$ac_cv_func_getnameinfo" = xyes; then :
13645 cat >>confdefs.h <<_ACEOF
13646#define HAVE_GETNAMEINFO 1
13647_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013648
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013649fi
Christian Heimes39258d32021-04-17 11:36:35 +020013650done
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013651
Michael W. Hudson54241132001-12-07 15:38:26 +000013652
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013653# checks for structures
Christian Heimes39258d32021-04-17 11:36:35 +020013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13655$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
13656if ${ac_cv_header_time+:} false; then :
13657 $as_echo_n "(cached) " >&6
13658else
13659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13660/* end confdefs.h. */
13661#include <sys/types.h>
13662#include <sys/time.h>
13663#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Christian Heimes39258d32021-04-17 11:36:35 +020013665int
13666main ()
13667{
13668if ((struct tm *) 0)
13669return 0;
13670 ;
13671 return 0;
13672}
13673_ACEOF
13674if ac_fn_c_try_compile "$LINENO"; then :
13675 ac_cv_header_time=yes
13676else
13677 ac_cv_header_time=no
13678fi
13679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13680fi
13681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13682$as_echo "$ac_cv_header_time" >&6; }
13683if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
Christian Heimes39258d32021-04-17 11:36:35 +020013685$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686
13687fi
13688
Christian Heimes39258d32021-04-17 11:36:35 +020013689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13690$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13691if ${ac_cv_struct_tm+:} false; then :
13692 $as_echo_n "(cached) " >&6
13693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013695/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013696#include <sys/types.h>
13697#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Martin v. Löwis11437992002-04-12 09:54:03 +000013699int
Christian Heimes39258d32021-04-17 11:36:35 +020013700main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702struct tm tm;
13703 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 ;
13706 return 0;
13707}
13708_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013709if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013710 ac_cv_struct_tm=time.h
Christian Heimes39258d32021-04-17 11:36:35 +020013711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713fi
Christian Heimes39258d32021-04-17 11:36:35 +020013714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013715fi
Christian Heimes39258d32021-04-17 11:36:35 +020013716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13717$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013718if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
Christian Heimes39258d32021-04-17 11:36:35 +020013720$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013721
13722fi
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724ac_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 +000013725#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727"
Christian Heimes39258d32021-04-17 11:36:35 +020013728if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013729
Christian Heimes39258d32021-04-17 11:36:35 +020013730cat >>confdefs.h <<_ACEOF
13731#define HAVE_STRUCT_TM_TM_ZONE 1
13732_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
13734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013736
Martin v. Löwis11437992002-04-12 09:54:03 +000013737if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13738
Christian Heimes39258d32021-04-17 11:36:35 +020013739$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740
13741else
Christian Heimes39258d32021-04-17 11:36:35 +020013742 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13743"
13744if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020013746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748fi
13749
Christian Heimes39258d32021-04-17 11:36:35 +020013750cat >>confdefs.h <<_ACEOF
13751#define HAVE_DECL_TZNAME $ac_have_decl
13752_ACEOF
13753
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13755$as_echo_n "checking for tzname... " >&6; }
13756if ${ac_cv_var_tzname+:} false; then :
13757 $as_echo_n "(cached) " >&6
13758else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013760/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013761#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762#if !HAVE_DECL_TZNAME
13763extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013765
Martin v. Löwis11437992002-04-12 09:54:03 +000013766int
Christian Heimes39258d32021-04-17 11:36:35 +020013767main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 ;
13771 return 0;
13772}
13773_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013774if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775 ac_cv_var_tzname=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013778fi
Christian Heimes39258d32021-04-17 11:36:35 +020013779rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013781fi
Christian Heimes39258d32021-04-17 11:36:35 +020013782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13783$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013784 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013785
Christian Heimes39258d32021-04-17 11:36:35 +020013786$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013787
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788 fi
13789fi
13790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791ac_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 +020013792if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013793
Christian Heimes39258d32021-04-17 11:36:35 +020013794cat >>confdefs.h <<_ACEOF
13795#define HAVE_STRUCT_STAT_ST_RDEV 1
13796_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
13798
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013799fi
13800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801ac_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 +020013802if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013803
Christian Heimes39258d32021-04-17 11:36:35 +020013804cat >>confdefs.h <<_ACEOF
13805#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13806_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
13808
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013809fi
13810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811ac_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 +020013812if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013813
Christian Heimes39258d32021-04-17 11:36:35 +020013814cat >>confdefs.h <<_ACEOF
13815#define HAVE_STRUCT_STAT_ST_FLAGS 1
13816_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013817
13818
13819fi
13820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821ac_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 +020013822if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013823
Christian Heimes39258d32021-04-17 11:36:35 +020013824cat >>confdefs.h <<_ACEOF
13825#define HAVE_STRUCT_STAT_ST_GEN 1
13826_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013827
13828
13829fi
13830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831ac_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 +020013832if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013833
Christian Heimes39258d32021-04-17 11:36:35 +020013834cat >>confdefs.h <<_ACEOF
13835#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13836_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013837
13838
13839fi
13840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841ac_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 +020013842if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013843
Christian Heimes39258d32021-04-17 11:36:35 +020013844cat >>confdefs.h <<_ACEOF
13845#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13846_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
13848
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013849fi
13850
Stefan Krah267b6392016-04-26 01:09:18 +020013851ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13852 #include <sys/types.h>
13853 #include <pwd.h>
13854
13855"
Christian Heimes39258d32021-04-17 11:36:35 +020013856if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013857
Christian Heimes39258d32021-04-17 11:36:35 +020013858cat >>confdefs.h <<_ACEOF
13859#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13860_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013861
13862
13863fi
13864ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13865 #include <sys/types.h>
13866 #include <pwd.h>
13867
13868"
Christian Heimes39258d32021-04-17 11:36:35 +020013869if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013870
Christian Heimes39258d32021-04-17 11:36:35 +020013871cat >>confdefs.h <<_ACEOF
13872#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13873_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013874
13875
13876fi
13877
Zachary Ware6a6967e2016-10-01 00:47:27 -050013878# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13879ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13880"
Christian Heimes39258d32021-04-17 11:36:35 +020013881if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050013882
Christian Heimes39258d32021-04-17 11:36:35 +020013883cat >>confdefs.h <<_ACEOF
13884#define HAVE_SIGINFO_T_SI_BAND 1
13885_ACEOF
Zachary Ware6a6967e2016-10-01 00:47:27 -050013886
13887
13888fi
13889
Michael W. Hudson54241132001-12-07 15:38:26 +000013890
Christian Heimes39258d32021-04-17 11:36:35 +020013891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13892$as_echo_n "checking for time.h that defines altzone... " >&6; }
13893if ${ac_cv_header_time_altzone+:} false; then :
13894 $as_echo_n "(cached) " >&6
13895else
Matthias Kloseb159a552010-04-25 21:00:44 +000013896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013898/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013899#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013900int
Christian Heimes39258d32021-04-17 11:36:35 +020013901main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013902{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ;
13905 return 0;
13906}
13907_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013908if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013909 ac_cv_header_time_altzone=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013910else
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013912fi
Christian Heimes39258d32021-04-17 11:36:35 +020013913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915fi
13916
Christian Heimes39258d32021-04-17 11:36:35 +020013917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13918$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013919if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Christian Heimes39258d32021-04-17 11:36:35 +020013921$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013922
13923fi
13924
Guido van Rossumda88dad1995-01-26 00:46:29 +000013925was_it_defined=no
Christian Heimes39258d32021-04-17 11:36:35 +020013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13927$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013929/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013930
13931#include <sys/types.h>
13932#include <sys/select.h>
13933#include <sys/time.h>
13934
Martin v. Löwis11437992002-04-12 09:54:03 +000013935int
Christian Heimes39258d32021-04-17 11:36:35 +020013936main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013937{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013938;
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 ;
13940 return 0;
13941}
13942_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013943if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013944
13945
Christian Heimes39258d32021-04-17 11:36:35 +020013946$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013948 was_it_defined=yes
13949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950fi
Christian Heimes39258d32021-04-17 11:36:35 +020013951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13953$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954
Christian Heimes39258d32021-04-17 11:36:35 +020013955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13956$as_echo_n "checking for addrinfo... " >&6; }
13957if ${ac_cv_struct_addrinfo+:} false; then :
13958 $as_echo_n "(cached) " >&6
13959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013962#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013963int
Christian Heimes39258d32021-04-17 11:36:35 +020013964main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013965{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013966struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 ;
13968 return 0;
13969}
13970_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020013971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013972 ac_cv_struct_addrinfo=yes
Christian Heimes39258d32021-04-17 11:36:35 +020013973else
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013975fi
Christian Heimes39258d32021-04-17 11:36:35 +020013976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977fi
13978
Christian Heimes39258d32021-04-17 11:36:35 +020013979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13980$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013981if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013982
Christian Heimes39258d32021-04-17 11:36:35 +020013983$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013984
13985fi
13986
Christian Heimes39258d32021-04-17 11:36:35 +020013987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13988$as_echo_n "checking for sockaddr_storage... " >&6; }
13989if ${ac_cv_struct_sockaddr_storage+:} false; then :
13990 $as_echo_n "(cached) " >&6
13991else
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013993/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013994
13995# include <sys/types.h>
13996# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013997int
Christian Heimes39258d32021-04-17 11:36:35 +020013998main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013999{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014000struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 ;
14002 return 0;
14003}
14004_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014006 ac_cv_struct_sockaddr_storage=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014007else
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014009fi
Christian Heimes39258d32021-04-17 11:36:35 +020014010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011fi
14012
Christian Heimes39258d32021-04-17 11:36:35 +020014013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
14014$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014015if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
Christian Heimes39258d32021-04-17 11:36:35 +020014017$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014018
14019fi
14020
Christian Heimes39258d32021-04-17 11:36:35 +020014021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
14022$as_echo_n "checking for sockaddr_alg... " >&6; }
14023if ${ac_cv_struct_sockaddr_alg+:} false; then :
14024 $as_echo_n "(cached) " >&6
14025else
Christian Heimesdffa3942016-09-05 23:54:41 +020014026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14027/* end confdefs.h. */
14028
14029# include <sys/types.h>
14030# include <sys/socket.h>
14031# include <linux/if_alg.h>
14032int
Christian Heimes39258d32021-04-17 11:36:35 +020014033main ()
Christian Heimesdffa3942016-09-05 23:54:41 +020014034{
14035struct sockaddr_alg s
14036 ;
14037 return 0;
14038}
14039_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014040if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesdffa3942016-09-05 23:54:41 +020014041 ac_cv_struct_sockaddr_alg=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014042else
Christian Heimesdffa3942016-09-05 23:54:41 +020014043 ac_cv_struct_sockaddr_alg=no
14044fi
Christian Heimes39258d32021-04-17 11:36:35 +020014045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020014046fi
14047
Christian Heimes39258d32021-04-17 11:36:35 +020014048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
14049$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020014050if test $ac_cv_struct_sockaddr_alg = yes; then
14051
Christian Heimes39258d32021-04-17 11:36:35 +020014052$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020014053
14054fi
14055
Guido van Rossum627b2d71993-12-24 10:39:16 +000014056# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014057
Christian Heimes39258d32021-04-17 11:36:35 +020014058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
14059$as_echo_n "checking whether char is unsigned... " >&6; }
14060if ${ac_cv_c_char_unsigned+:} false; then :
14061 $as_echo_n "(cached) " >&6
14062else
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014065$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014066int
Christian Heimes39258d32021-04-17 11:36:35 +020014067main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014068{
14069static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014070test_array [0] = 0;
14071return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
14073 ;
14074 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014075}
Martin v. Löwis11437992002-04-12 09:54:03 +000014076_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014077if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014078 ac_cv_c_char_unsigned=no
Christian Heimes39258d32021-04-17 11:36:35 +020014079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014081fi
Christian Heimes39258d32021-04-17 11:36:35 +020014082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014083fi
Christian Heimes39258d32021-04-17 11:36:35 +020014084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14085$as_echo "$ac_cv_c_char_unsigned" >&6; }
14086if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
14087 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088
14089fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014090
Christian Heimes39258d32021-04-17 11:36:35 +020014091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14092$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14093if ${ac_cv_c_const+:} false; then :
14094 $as_echo_n "(cached) " >&6
14095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014097/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014098
Martin v. Löwis11437992002-04-12 09:54:03 +000014099int
Christian Heimes39258d32021-04-17 11:36:35 +020014100main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014101{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014104 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014106 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108 char const *const *pcpcc;
14109 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 /* NEC SVR4.0.2 mips cc rejects this. */
14111 struct point {int x, y;};
14112 static struct point const zero = {0,0};
Christian Heimes39258d32021-04-17 11:36:35 +020014113 /* AIX XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 It does not let you subtract one const X* pointer from another in
14115 an arm of an if-expression whose if-part is not a constant
14116 expression */
14117 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120 ++pcpcc;
14121 ppc = (char**) pcpcc;
14122 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014123 { /* SCO 3.2v4 cc rejects this sort of thing. */
14124 char tx;
14125 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014127
Martin v. Löwis11437992002-04-12 09:54:03 +000014128 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014130 }
14131 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14132 int x[] = {25, 17};
14133 const int *foo = &x[0];
14134 ++foo;
14135 }
14136 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14137 typedef const int *iptr;
14138 iptr p = 0;
14139 ++p;
14140 }
Christian Heimes39258d32021-04-17 11:36:35 +020014141 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014143 struct s { int j; const int *ap[3]; } bx;
14144 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 }
14146 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14147 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014151#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014152
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 ;
14154 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014155}
Martin v. Löwis11437992002-04-12 09:54:03 +000014156_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014157if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014158 ac_cv_c_const=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014159else
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014161fi
Christian Heimes39258d32021-04-17 11:36:35 +020014162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014163fi
Christian Heimes39258d32021-04-17 11:36:35 +020014164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14165$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014166if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Christian Heimes39258d32021-04-17 11:36:35 +020014168$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169
14170fi
14171
Michael W. Hudson54241132001-12-07 15:38:26 +000014172
Guido van Rossumda88dad1995-01-26 00:46:29 +000014173works=no
Christian Heimes39258d32021-04-17 11:36:35 +020014174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14175$as_echo_n "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014177/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014178
Martin v. Löwis11437992002-04-12 09:54:03 +000014179int
Christian Heimes39258d32021-04-17 11:36:35 +020014180main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014181{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014182signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 ;
14184 return 0;
14185}
14186_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014187if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014188 works=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014189else
Skip Montanaro6dead952003-09-25 14:50:04 +000014190
Christian Heimes39258d32021-04-17 11:36:35 +020014191$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014192
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014193
Guido van Rossum7f43da71994-08-01 12:15:30 +000014194fi
Christian Heimes39258d32021-04-17 11:36:35 +020014195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14197$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014198
Guido van Rossumda88dad1995-01-26 00:46:29 +000014199have_prototypes=no
Christian Heimes39258d32021-04-17 11:36:35 +020014200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14201$as_echo_n "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014203/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014204int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014205int
Christian Heimes39258d32021-04-17 11:36:35 +020014206main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014207{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014208return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ;
14210 return 0;
14211}
14212_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014213if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014214
Christian Heimes39258d32021-04-17 11:36:35 +020014215$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014216
Matthias Kloseb159a552010-04-25 21:00:44 +000014217 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014218fi
Christian Heimes39258d32021-04-17 11:36:35 +020014219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14221$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014222
Guido van Rossumda88dad1995-01-26 00:46:29 +000014223works=no
Christian Heimes39258d32021-04-17 11:36:35 +020014224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14225$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014227/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014228
14229#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014230int foo(int x, ...) {
14231 va_list va;
14232 va_start(va, x);
14233 va_arg(va, int);
14234 va_arg(va, char *);
14235 va_arg(va, double);
14236 return 0;
14237}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014238
Martin v. Löwis11437992002-04-12 09:54:03 +000014239int
Christian Heimes39258d32021-04-17 11:36:35 +020014240main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014241{
Guido van Rossum90eea071996-08-30 20:58:57 +000014242return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 ;
14244 return 0;
14245}
14246_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
14249
Christian Heimes39258d32021-04-17 11:36:35 +020014250$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014252 works=yes
14253
Guido van Rossum627b2d71993-12-24 10:39:16 +000014254fi
Christian Heimes39258d32021-04-17 11:36:35 +020014255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14257$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014258
Martin v. Löwisd6320502004-08-12 13:45:08 +000014259# check for socketpair
Christian Heimes39258d32021-04-17 11:36:35 +020014260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14261$as_echo_n "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014263/* end confdefs.h. */
14264
14265#include <sys/types.h>
14266#include <sys/socket.h>
14267
14268int
Christian Heimes39258d32021-04-17 11:36:35 +020014269main ()
Martin v. Löwisd6320502004-08-12 13:45:08 +000014270{
14271void *x=socketpair
14272 ;
14273 return 0;
14274}
14275_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014277
Christian Heimes39258d32021-04-17 11:36:35 +020014278$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014279
Christian Heimes39258d32021-04-17 11:36:35 +020014280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14281$as_echo "yes" >&6; }
14282else
14283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14284$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014285
14286fi
Christian Heimes39258d32021-04-17 11:36:35 +020014287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014288
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014289# check if sockaddr has sa_len member
Christian Heimes39258d32021-04-17 11:36:35 +020014290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14291$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014293/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014294#include <sys/types.h>
14295#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014296int
Christian Heimes39258d32021-04-17 11:36:35 +020014297main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014298{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014299struct sockaddr x;
14300x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014301 ;
14302 return 0;
14303}
14304_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014305if ac_fn_c_try_compile "$LINENO"; then :
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14307$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Christian Heimes39258d32021-04-17 11:36:35 +020014309$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014310
Christian Heimes39258d32021-04-17 11:36:35 +020014311else
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14313$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014314
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014315fi
Christian Heimes39258d32021-04-17 11:36:35 +020014316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014317
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014318# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
14320
Matthias Kloseb9621712010-04-24 17:59:49 +000014321ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Christian Heimes39258d32021-04-17 11:36:35 +020014322if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Christian Heimes39258d32021-04-17 11:36:35 +020014324 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014325
Christian Heimes39258d32021-04-17 11:36:35 +020014326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14327$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014328 OLD_CFLAGS=$CFLAGS
14329 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014331/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014332
14333# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
Martin v. Löwis11437992002-04-12 09:54:03 +000014335int
Christian Heimes39258d32021-04-17 11:36:35 +020014336main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014337{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014338
14339 char *name;
14340 struct hostent *he, *res;
14341 char buffer[2048];
14342 int buflen = 2048;
14343 int h_errnop;
14344
14345 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
14347 ;
14348 return 0;
14349}
14350_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014352
Christian Heimes39258d32021-04-17 11:36:35 +020014353 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014354
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
Christian Heimes39258d32021-04-17 11:36:35 +020014356$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014357
Christian Heimes39258d32021-04-17 11:36:35 +020014358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14359$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014360
Christian Heimes39258d32021-04-17 11:36:35 +020014361else
Skip Montanaro6dead952003-09-25 14:50:04 +000014362
Christian Heimes39258d32021-04-17 11:36:35 +020014363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14364$as_echo "no" >&6; }
14365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14366$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014368/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014369
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014370# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
Martin v. Löwis11437992002-04-12 09:54:03 +000014372int
Christian Heimes39258d32021-04-17 11:36:35 +020014373main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014374{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014375
14376 char *name;
14377 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014378 char buffer[2048];
14379 int buflen = 2048;
14380 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014381
Matthias Kloseb159a552010-04-25 21:00:44 +000014382 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
14384 ;
14385 return 0;
14386}
14387_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
Christian Heimes39258d32021-04-17 11:36:35 +020014390 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014391
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
Christian Heimes39258d32021-04-17 11:36:35 +020014393$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014394
Christian Heimes39258d32021-04-17 11:36:35 +020014395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14396$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014397
Christian Heimes39258d32021-04-17 11:36:35 +020014398else
Skip Montanaro6dead952003-09-25 14:50:04 +000014399
Christian Heimes39258d32021-04-17 11:36:35 +020014400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14401$as_echo "no" >&6; }
14402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14403$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14405/* end confdefs.h. */
14406
14407# include <netdb.h>
14408
14409int
Christian Heimes39258d32021-04-17 11:36:35 +020014410main ()
Matthias Kloseb159a552010-04-25 21:00:44 +000014411{
14412
14413 char *name;
14414 struct hostent *he;
14415 struct hostent_data data;
14416
14417 (void) gethostbyname_r(name, he, &data);
14418
14419 ;
14420 return 0;
14421}
14422_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014423if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000014424
Christian Heimes39258d32021-04-17 11:36:35 +020014425 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014426
14427
Christian Heimes39258d32021-04-17 11:36:35 +020014428$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014429
Christian Heimes39258d32021-04-17 11:36:35 +020014430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14431$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014432
Christian Heimes39258d32021-04-17 11:36:35 +020014433else
Matthias Kloseb159a552010-04-25 21:00:44 +000014434
Christian Heimes39258d32021-04-17 11:36:35 +020014435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14436$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014438fi
Christian Heimes39258d32021-04-17 11:36:35 +020014439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014441fi
Christian Heimes39258d32021-04-17 11:36:35 +020014442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014444fi
Christian Heimes39258d32021-04-17 11:36:35 +020014445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014446 CFLAGS=$OLD_CFLAGS
14447
Christian Heimes39258d32021-04-17 11:36:35 +020014448else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014449
Christian Heimes39258d32021-04-17 11:36:35 +020014450 for ac_func in gethostbyname
14451do :
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Christian Heimes39258d32021-04-17 11:36:35 +020014453if test "x$ac_cv_func_gethostbyname" = xyes; then :
14454 cat >>confdefs.h <<_ACEOF
14455#define HAVE_GETHOSTBYNAME 1
14456_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014457
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014458fi
Christian Heimes39258d32021-04-17 11:36:35 +020014459done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014460
Michael W. Hudson54241132001-12-07 15:38:26 +000014461
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014462fi
14463
Michael W. Hudson54241132001-12-07 15:38:26 +000014464
14465
14466
14467
14468
14469
Guido van Rossum627b2d71993-12-24 10:39:16 +000014470# checks for system services
14471# (none yet)
14472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014473# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014474ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Christian Heimes39258d32021-04-17 11:36:35 +020014475if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014476
Christian Heimes39258d32021-04-17 11:36:35 +020014477else
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14479$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
14480if ${ac_cv_lib_ieee___fpu_control+:} false; then :
14481 $as_echo_n "(cached) " >&6
14482else
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014484LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488/* Override any GCC internal prototype to avoid an error.
14489 Use char because int might match the return type of a GCC
14490 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020014491#ifdef __cplusplus
14492extern "C"
14493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014494char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014495int
Christian Heimes39258d32021-04-17 11:36:35 +020014496main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 ;
14500 return 0;
14501}
14502_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 ac_cv_lib_ieee___fpu_control=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014505else
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014507fi
Christian Heimes39258d32021-04-17 11:36:35 +020014508rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014510LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014511fi
Christian Heimes39258d32021-04-17 11:36:35 +020014512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14513$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
14514if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
14515 cat >>confdefs.h <<_ACEOF
14516#define HAVE_LIBIEEE 1
14517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014518
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014519 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014520
Guido van Rossum627b2d71993-12-24 10:39:16 +000014521fi
14522
Michael W. Hudson54241132001-12-07 15:38:26 +000014523
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014524fi
14525
Michael W. Hudson54241132001-12-07 15:38:26 +000014526
Guido van Rossum7f43da71994-08-01 12:15:30 +000014527# check for --with-libm=...
14528
Guido van Rossum563e7081996-09-10 18:20:48 +000014529case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014530Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014531*) LIBM=-lm
14532esac
Christian Heimes39258d32021-04-17 11:36:35 +020014533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14534$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536# Check whether --with-libm was given.
Christian Heimes39258d32021-04-17 11:36:35 +020014537if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014539if test "$withval" = no
14540then LIBM=
Christian Heimes39258d32021-04-17 11:36:35 +020014541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14542$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014543elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014544then LIBM=$withval
Christian Heimes39258d32021-04-17 11:36:35 +020014545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14546$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014547else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014548fi
Christian Heimes39258d32021-04-17 11:36:35 +020014549else
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14551$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552fi
14553
Guido van Rossum7f43da71994-08-01 12:15:30 +000014554
14555# check for --with-libc=...
14556
Christian Heimes39258d32021-04-17 11:36:35 +020014557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14558$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560# Check whether --with-libc was given.
Christian Heimes39258d32021-04-17 11:36:35 +020014561if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014563if test "$withval" = no
14564then LIBC=
Christian Heimes39258d32021-04-17 11:36:35 +020014565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14566$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014567elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014568then LIBC=$withval
Christian Heimes39258d32021-04-17 11:36:35 +020014569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14570$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014571else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014572fi
Christian Heimes39258d32021-04-17 11:36:35 +020014573else
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14575$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576fi
14577
Guido van Rossum7f43da71994-08-01 12:15:30 +000014578
Stefan Krah1919b7e2012-03-21 18:25:23 +010014579# **************************************
14580# * Check for gcc x64 inline assembler *
14581# **************************************
14582
Christian Heimes39258d32021-04-17 11:36:35 +020014583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14584$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14586/* end confdefs.h. */
14587
14588int
Christian Heimes39258d32021-04-17 11:36:35 +020014589main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010014590{
14591
14592 __asm__ __volatile__ ("movq %rcx, %rax");
14593
14594 ;
14595 return 0;
14596}
14597_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014598if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014599 have_gcc_asm_for_x64=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014600else
Stefan Krah1919b7e2012-03-21 18:25:23 +010014601 have_gcc_asm_for_x64=no
14602fi
Christian Heimes39258d32021-04-17 11:36:35 +020014603rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014604 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14606$as_echo "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014607if test "$have_gcc_asm_for_x64" = yes
14608then
14609
Christian Heimes39258d32021-04-17 11:36:35 +020014610$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010014611
14612fi
14613
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014614# **************************************************
14615# * Check for various properties of floating point *
14616# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014617
Christian Heimes39258d32021-04-17 11:36:35 +020014618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14619$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14620if ${ax_cv_c_float_words_bigendian+:} false; then :
14621 $as_echo_n "(cached) " >&6
14622else
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014623
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014624
14625ax_cv_c_float_words_bigendian=unknown
14626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014627/* end confdefs.h. */
14628
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014629
14630double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14631
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014632
14633_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014634if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014635
14636
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014637if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014638 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014639fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014640if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014641 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14642 ax_cv_c_float_words_bigendian=no
14643 else
14644 ax_cv_c_float_words_bigendian=unknown
14645 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014646fi
14647
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014648
14649fi
Christian Heimes39258d32021-04-17 11:36:35 +020014650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014651fi
Christian Heimes39258d32021-04-17 11:36:35 +020014652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14653$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014654
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014655case $ax_cv_c_float_words_bigendian in
14656 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014657
Christian Heimes39258d32021-04-17 11:36:35 +020014658$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014659 ;;
14660 no)
14661 ;;
14662 *)
14663 as_fn_error $? "
14664
14665Unknown float word ordering. You need to manually preset
14666ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14667
14668 " "$LINENO" 5 ;;
14669esac
14670
14671
14672if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014673then
14674
Christian Heimes39258d32021-04-17 11:36:35 +020014675$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014676
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014677elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014678then
14679
Christian Heimes39258d32021-04-17 11:36:35 +020014680$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014681
14682else
14683 # Some ARM platforms use a mixed-endian representation for doubles.
14684 # While Python doesn't currently have full support for these platforms
14685 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14686 # conversions work.
14687 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14688 # or little, then it must be this?
14689
Christian Heimes39258d32021-04-17 11:36:35 +020014690$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014691
14692fi
14693
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014694# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014695# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014696# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014697# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014698# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014699# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014700
14701# This inline assembler syntax may also work for suncc and icc,
14702# so we try it on all platforms.
14703
Christian Heimes39258d32021-04-17 11:36:35 +020014704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14705$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 +000014706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014707/* end confdefs.h. */
14708
14709int
Christian Heimes39258d32021-04-17 11:36:35 +020014710main ()
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014711{
14712
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014713 unsigned short cw;
14714 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14715 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014716
14717 ;
14718 return 0;
14719}
14720_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014721if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014722 have_gcc_asm_for_x87=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014723else
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014725fi
Christian Heimes39258d32021-04-17 11:36:35 +020014726rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014727 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14729$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014730if test "$have_gcc_asm_for_x87" = yes
14731then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014732
Christian Heimes39258d32021-04-17 11:36:35 +020014733$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014734
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014736
Christian Heimes39258d32021-04-17 11:36:35 +020014737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14738$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 -040014739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14740/* end confdefs.h. */
14741
14742int
Christian Heimes39258d32021-04-17 11:36:35 +020014743main ()
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014744{
14745
14746 unsigned int fpcr;
14747 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14748 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14749
14750 ;
14751 return 0;
14752}
14753_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014754if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014755 have_gcc_asm_for_mc68881=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014756else
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014757 have_gcc_asm_for_mc68881=no
14758fi
Christian Heimes39258d32021-04-17 11:36:35 +020014759rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014760 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020014761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14762$as_echo "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014763if test "$have_gcc_asm_for_mc68881" = yes
14764then
14765
Christian Heimes39258d32021-04-17 11:36:35 +020014766$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014767
14768fi
14769
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014770# Detect whether system arithmetic is subject to x87-style double
14771# rounding issues. The result of this test has little meaning on non
14772# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14773# mode is round-to-nearest and double rounding issues are present, and
14774# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Christian Heimes39258d32021-04-17 11:36:35 +020014775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14776$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014777# $BASECFLAGS may affect the result
14778ac_save_cc="$CC"
14779CC="$CC $BASECFLAGS"
Christian Heimes39258d32021-04-17 11:36:35 +020014780if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014781 ac_cv_x87_double_rounding=no
Christian Heimes39258d32021-04-17 11:36:35 +020014782else
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014784/* end confdefs.h. */
14785
14786#include <stdlib.h>
14787#include <math.h>
14788int main() {
14789 volatile double x, y, z;
14790 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14791 x = 0.99999999999999989; /* 1-2**-53 */
14792 y = 1./x;
14793 if (y != 1.)
14794 exit(0);
14795 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14796 x = 1e16;
14797 y = 2.99999;
14798 z = x + y;
14799 if (z != 1e16+4.)
14800 exit(0);
14801 /* both tests show evidence of double rounding */
14802 exit(1);
14803}
14804
14805_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014806if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014807 ac_cv_x87_double_rounding=no
Christian Heimes39258d32021-04-17 11:36:35 +020014808else
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014813fi
14814
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014815CC="$ac_save_cc"
Christian Heimes39258d32021-04-17 11:36:35 +020014816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14817$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014818if test "$ac_cv_x87_double_rounding" = yes
14819then
14820
Christian Heimes39258d32021-04-17 11:36:35 +020014821$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014822
14823fi
14824
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014825# ************************************
14826# * Check for mathematical functions *
14827# ************************************
14828
14829LIBS_SAVE=$LIBS
14830LIBS="$LIBS $LIBM"
14831
Christian Heimes39258d32021-04-17 11:36:35 +020014832for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14833do :
14834 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14835ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14836if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14837 cat >>confdefs.h <<_ACEOF
14838#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14839_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014840
14841fi
Christian Heimes39258d32021-04-17 11:36:35 +020014842done
14843
14844for ac_func in hypot lgamma log1p log2 round tgamma
14845do :
14846 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14847ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14848if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14849 cat >>confdefs.h <<_ACEOF
14850#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14851_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014852
14853fi
Christian Heimes39258d32021-04-17 11:36:35 +020014854done
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014855
Christian Heimes39258d32021-04-17 11:36:35 +020014856ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14857"
14858if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014859 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014860else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014861 ac_have_decl=0
14862fi
Christian Heimes39258d32021-04-17 11:36:35 +020014863
14864cat >>confdefs.h <<_ACEOF
14865#define HAVE_DECL_ISINF $ac_have_decl
14866_ACEOF
14867ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14868"
14869if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014870 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014871else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014872 ac_have_decl=0
14873fi
Christian Heimes39258d32021-04-17 11:36:35 +020014874
14875cat >>confdefs.h <<_ACEOF
14876#define HAVE_DECL_ISNAN $ac_have_decl
14877_ACEOF
14878ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14879"
14880if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014881 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020014882else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014883 ac_have_decl=0
14884fi
Christian Heimes39258d32021-04-17 11:36:35 +020014885
14886cat >>confdefs.h <<_ACEOF
14887#define HAVE_DECL_ISFINITE $ac_have_decl
14888_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014889
14890
Mark Dickinsona614f042009-11-28 12:48:43 +000014891# For multiprocessing module, check that sem_open
14892# actually works. For FreeBSD versions <= 7.2,
14893# the kernel module that provides POSIX semaphores
14894# isn't loaded by default, so an attempt to call
14895# sem_open results in a 'Signal 12' error.
Christian Heimes39258d32021-04-17 11:36:35 +020014896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14897$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
14898if ${ac_cv_posix_semaphores_enabled+:} false; then :
14899 $as_echo_n "(cached) " >&6
14900else
14901 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014902 ac_cv_posix_semaphores_enabled=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014903else
Matthias Kloseb9621712010-04-24 17:59:49 +000014904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014905/* end confdefs.h. */
14906
14907#include <unistd.h>
14908#include <fcntl.h>
14909#include <stdio.h>
14910#include <semaphore.h>
14911#include <sys/stat.h>
14912
14913int main(void) {
14914 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14915 if (a == SEM_FAILED) {
14916 perror("sem_open");
14917 return 1;
14918 }
14919 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014920 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014921 return 0;
14922}
14923
14924_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014925if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014926 ac_cv_posix_semaphores_enabled=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014927else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014932fi
14933
14934
Mark Dickinsona614f042009-11-28 12:48:43 +000014935fi
14936
Christian Heimes39258d32021-04-17 11:36:35 +020014937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14938$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014939if test $ac_cv_posix_semaphores_enabled = no
14940then
14941
Christian Heimes39258d32021-04-17 11:36:35 +020014942$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014943
14944fi
14945
Mark Dickinson10683072009-04-18 21:18:19 +000014946# Multiprocessing check for broken sem_getvalue
Christian Heimes39258d32021-04-17 11:36:35 +020014947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14948$as_echo_n "checking for broken sem_getvalue... " >&6; }
14949if ${ac_cv_broken_sem_getvalue+:} false; then :
14950 $as_echo_n "(cached) " >&6
14951else
14952 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014953 ac_cv_broken_sem_getvalue=yes
Christian Heimes39258d32021-04-17 11:36:35 +020014954else
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014956/* end confdefs.h. */
14957
14958#include <unistd.h>
14959#include <fcntl.h>
14960#include <stdio.h>
14961#include <semaphore.h>
14962#include <sys/stat.h>
14963
14964int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014965 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014966 int count;
14967 int res;
14968 if(a==SEM_FAILED){
14969 perror("sem_open");
14970 return 1;
14971
14972 }
14973 res = sem_getvalue(a, &count);
14974 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014975 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014976 return res==-1 ? 1 : 0;
14977}
14978
Mark Dickinson10683072009-04-18 21:18:19 +000014979_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020014980if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014981 ac_cv_broken_sem_getvalue=no
Christian Heimes39258d32021-04-17 11:36:35 +020014982else
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014987fi
14988
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014989
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014990fi
14991
Christian Heimes39258d32021-04-17 11:36:35 +020014992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14993$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014994if test $ac_cv_broken_sem_getvalue = yes
14995then
14996
Christian Heimes39258d32021-04-17 11:36:35 +020014997$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014998
14999fi
15000
Christian Heimes39258d32021-04-17 11:36:35 +020015001ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
15002"
15003if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015004 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015005else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015006 ac_have_decl=0
15007fi
Christian Heimes39258d32021-04-17 11:36:35 +020015008
15009cat >>confdefs.h <<_ACEOF
15010#define HAVE_DECL_RTLD_LAZY $ac_have_decl
15011_ACEOF
15012ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15013"
15014if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015015 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015016else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015017 ac_have_decl=0
15018fi
Christian Heimes39258d32021-04-17 11:36:35 +020015019
15020cat >>confdefs.h <<_ACEOF
15021#define HAVE_DECL_RTLD_NOW $ac_have_decl
15022_ACEOF
15023ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15024"
15025if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015026 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015027else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015028 ac_have_decl=0
15029fi
Christian Heimes39258d32021-04-17 11:36:35 +020015030
15031cat >>confdefs.h <<_ACEOF
15032#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15033_ACEOF
15034ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
15035"
15036if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015037 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015038else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015039 ac_have_decl=0
15040fi
Christian Heimes39258d32021-04-17 11:36:35 +020015041
15042cat >>confdefs.h <<_ACEOF
15043#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
15044_ACEOF
15045ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
15046"
15047if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015048 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015049else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015050 ac_have_decl=0
15051fi
Christian Heimes39258d32021-04-17 11:36:35 +020015052
15053cat >>confdefs.h <<_ACEOF
15054#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
15055_ACEOF
15056ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
15057"
15058if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015059 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015060else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015061 ac_have_decl=0
15062fi
Christian Heimes39258d32021-04-17 11:36:35 +020015063
15064cat >>confdefs.h <<_ACEOF
15065#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
15066_ACEOF
15067ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
15068"
15069if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015070 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015071else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015072 ac_have_decl=0
15073fi
Christian Heimes39258d32021-04-17 11:36:35 +020015074
15075cat >>confdefs.h <<_ACEOF
15076#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
15077_ACEOF
15078ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
15079"
15080if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
Michael Feltc5ae1692017-12-19 13:58:49 +010015081 ac_have_decl=1
Christian Heimes39258d32021-04-17 11:36:35 +020015082else
Michael Feltc5ae1692017-12-19 13:58:49 +010015083 ac_have_decl=0
15084fi
Christian Heimes39258d32021-04-17 11:36:35 +020015085
15086cat >>confdefs.h <<_ACEOF
15087#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15088_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015089
15090
Mark Dickinsonbd792642009-03-18 20:06:12 +000015091# determine what size digit to use for Python's longs
Christian Heimes39258d32021-04-17 11:36:35 +020015092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15093$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015094# Check whether --enable-big-digits was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015095if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015096 enableval=$enable_big_digits; case $enable_big_digits in
15097yes)
15098 enable_big_digits=30 ;;
15099no)
15100 enable_big_digits=15 ;;
1510115|30)
15102 ;;
15103*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015104 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 +000015105esac
Christian Heimes39258d32021-04-17 11:36:35 +020015106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15107$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015108
Christian Heimes39258d32021-04-17 11:36:35 +020015109cat >>confdefs.h <<_ACEOF
15110#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15111_ACEOF
Mark Dickinsonbd792642009-03-18 20:06:12 +000015112
15113
Christian Heimes39258d32021-04-17 11:36:35 +020015114else
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15116$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015117fi
15118
15119
Guido van Rossumef2255b2000-03-10 22:30:29 +000015120# check for wchar.h
Christian Heimes39258d32021-04-17 11:36:35 +020015121ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
15122if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015123
15124
Christian Heimes39258d32021-04-17 11:36:35 +020015125$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015127 wchar_h="yes"
15128
Christian Heimes39258d32021-04-17 11:36:35 +020015129else
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131
15132fi
15133
Michael W. Hudson54241132001-12-07 15:38:26 +000015134
Christian Heimes39258d32021-04-17 11:36:35 +020015135
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015136# determine wchar_t size
15137if test "$wchar_h" = yes
15138then
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15142# This bug is HP SR number 8606223364.
Christian Heimes39258d32021-04-17 11:36:35 +020015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15144$as_echo_n "checking size of wchar_t... " >&6; }
15145if ${ac_cv_sizeof_wchar_t+:} false; then :
15146 $as_echo_n "(cached) " >&6
15147else
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 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 +020015149"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015150
Christian Heimes39258d32021-04-17 11:36:35 +020015151else
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 if test "$ac_cv_type_wchar_t" = yes; then
Christian Heimes39258d32021-04-17 11:36:35 +020015153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015155as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015156See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157 else
15158 ac_cv_sizeof_wchar_t=0
15159 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015161
Martin v. Löwis11437992002-04-12 09:54:03 +000015162fi
Christian Heimes39258d32021-04-17 11:36:35 +020015163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15164$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165
15166
15167
Christian Heimes39258d32021-04-17 11:36:35 +020015168cat >>confdefs.h <<_ACEOF
15169#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
15170_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015171
Michael W. Hudson54241132001-12-07 15:38:26 +000015172
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015173fi
15174
Christian Heimes39258d32021-04-17 11:36:35 +020015175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15176$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015177have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015179/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015180
15181#include <tcl.h>
15182#if TCL_UTF_MAX != 6
15183# error "NOT UCS4_TCL"
15184#endif
15185int
Christian Heimes39258d32021-04-17 11:36:35 +020015186main ()
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015187{
15188
15189 ;
15190 return 0;
15191}
15192_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015194
15195
Christian Heimes39258d32021-04-17 11:36:35 +020015196$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015197
15198 have_ucs4_tcl=yes
15199
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015200fi
Christian Heimes39258d32021-04-17 11:36:35 +020015201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15203$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015204
Skip Montanaro6dead952003-09-25 14:50:04 +000015205# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015206if test "$wchar_h" = yes
15207then
15208 # check whether wchar_t is signed or not
Christian Heimes39258d32021-04-17 11:36:35 +020015209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15210$as_echo_n "checking whether wchar_t is signed... " >&6; }
15211 if ${ac_cv_wchar_t_signed+:} false; then :
15212 $as_echo_n "(cached) " >&6
15213else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015214
Christian Heimes39258d32021-04-17 11:36:35 +020015215 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015216 ac_cv_wchar_t_signed=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015217else
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015219/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015220
15221 #include <wchar.h>
15222 int main()
15223 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015224 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015225 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015226 }
15227
15228_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015229if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015230 ac_cv_wchar_t_signed=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015231else
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015236fi
15237
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015238fi
15239
Christian Heimes39258d32021-04-17 11:36:35 +020015240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15241$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242fi
15243
Christian Heimes39258d32021-04-17 11:36:35 +020015244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15245$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015246# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015247if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015248 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015249then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015250
Christian Heimes39258d32021-04-17 11:36:35 +020015251$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Christian Heimes39258d32021-04-17 11:36:35 +020015253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15254$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015255else
Christian Heimes39258d32021-04-17 11:36:35 +020015256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15257$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015258fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015259
Jakub Kulík9032cf52021-04-30 15:21:42 +020015260case $ac_sys_system/$ac_sys_release in
15261SunOS/*)
15262 if test -f /etc/os-release; then
15263 OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
15264 if test "x$OS_NAME" = "xOracle Solaris"; then
15265 # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
15266 # non-Unicode locales is not Unicode and hence cannot be used directly.
15267 # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html
15268
15269$as_echo "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h
15270
15271 fi
15272 fi
15273 ;;
15274esac
15275
Guido van Rossumef2255b2000-03-10 22:30:29 +000015276# check for endianness
Christian Heimes39258d32021-04-17 11:36:35 +020015277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15278$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15279if ${ac_cv_c_bigendian+:} false; then :
15280 $as_echo_n "(cached) " >&6
15281else
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 ac_cv_c_bigendian=unknown
15283 # See if we're dealing with a universal compiler.
15284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15285/* end confdefs.h. */
15286#ifndef __APPLE_CC__
15287 not a universal capable compiler
15288 #endif
15289 typedef int dummy;
15290
Skip Montanaro6dead952003-09-25 14:50:04 +000015291_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015292if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015293
15294 # Check for potential -arch flags. It is not universal unless
15295 # there are at least two -arch flags with different values.
15296 ac_arch=
15297 ac_prev=
15298 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15299 if test -n "$ac_prev"; then
15300 case $ac_word in
15301 i?86 | x86_64 | ppc | ppc64)
15302 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15303 ac_arch=$ac_word
15304 else
15305 ac_cv_c_bigendian=universal
15306 break
15307 fi
15308 ;;
15309 esac
15310 ac_prev=
15311 elif test "x$ac_word" = "x-arch"; then
15312 ac_prev=arch
15313 fi
15314 done
15315fi
Christian Heimes39258d32021-04-17 11:36:35 +020015316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 if test $ac_cv_c_bigendian = unknown; then
15318 # See if sys/param.h defines the BYTE_ORDER macro.
15319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015320/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015321#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015323
Martin v. Löwis11437992002-04-12 09:54:03 +000015324int
Christian Heimes39258d32021-04-17 11:36:35 +020015325main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015326{
Matthias Kloseb9621712010-04-24 17:59:49 +000015327#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15328 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15329 && LITTLE_ENDIAN)
15330 bogus endian macros
15331 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
15333 ;
15334 return 0;
15335}
15336_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015337if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015338 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015340/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015341#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015343
Martin v. Löwis11437992002-04-12 09:54:03 +000015344int
Christian Heimes39258d32021-04-17 11:36:35 +020015345main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015346{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015347#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 not big endian
15349 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015350
15351 ;
15352 return 0;
15353}
15354_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015355if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015356 ac_cv_c_bigendian=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015357else
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015359fi
Christian Heimes39258d32021-04-17 11:36:35 +020015360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015361fi
Christian Heimes39258d32021-04-17 11:36:35 +020015362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 fi
15364 if test $ac_cv_c_bigendian = unknown; then
15365 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015367/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015368#include <limits.h>
15369
Martin v. Löwis11437992002-04-12 09:54:03 +000015370int
Christian Heimes39258d32021-04-17 11:36:35 +020015371main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015372{
Matthias Kloseb9621712010-04-24 17:59:49 +000015373#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15374 bogus endian macros
15375 #endif
15376
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 ;
15378 return 0;
15379}
15380_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015381if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 # It does; now see whether it defined to _BIG_ENDIAN or not.
15383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15384/* end confdefs.h. */
15385#include <limits.h>
15386
15387int
Christian Heimes39258d32021-04-17 11:36:35 +020015388main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015389{
15390#ifndef _BIG_ENDIAN
15391 not big endian
15392 #endif
15393
15394 ;
15395 return 0;
15396}
15397_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ac_cv_c_bigendian=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015400else
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015402fi
Christian Heimes39258d32021-04-17 11:36:35 +020015403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015404fi
Christian Heimes39258d32021-04-17 11:36:35 +020015405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 fi
15407 if test $ac_cv_c_bigendian = unknown; then
15408 # Compile a test program.
Christian Heimes39258d32021-04-17 11:36:35 +020015409 if test "$cross_compiling" = yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 # Try to guess by grepping values from an object file.
15411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15412/* end confdefs.h. */
Christian Heimes39258d32021-04-17 11:36:35 +020015413short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Christian Heimes39258d32021-04-17 11:36:35 +020015415 short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15417 int use_ascii (int i) {
15418 return ascii_mm[i] + ascii_ii[i];
15419 }
Christian Heimes39258d32021-04-17 11:36:35 +020015420 short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015421 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Christian Heimes39258d32021-04-17 11:36:35 +020015422 short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15424 int use_ebcdic (int i) {
15425 return ebcdic_mm[i] + ebcdic_ii[i];
15426 }
15427 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015428
Matthias Kloseb9621712010-04-24 17:59:49 +000015429int
Christian Heimes39258d32021-04-17 11:36:35 +020015430main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015431{
15432return use_ascii (foo) == use_ebcdic (foo);
15433 ;
15434 return 0;
15435}
15436_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015437if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015438 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15439 ac_cv_c_bigendian=yes
15440 fi
15441 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15442 if test "$ac_cv_c_bigendian" = unknown; then
15443 ac_cv_c_bigendian=no
15444 else
15445 # finding both strings is unlikely to happen, but who knows?
15446 ac_cv_c_bigendian=unknown
15447 fi
15448 fi
15449fi
Christian Heimes39258d32021-04-17 11:36:35 +020015450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15451else
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015453/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015455int
Christian Heimes39258d32021-04-17 11:36:35 +020015456main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 /* Are we little or big endian? From Harbison&Steele. */
15460 union
15461 {
15462 long int l;
15463 char c[sizeof (long int)];
15464 } u;
15465 u.l = 1;
15466 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015467
15468 ;
15469 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015470}
Martin v. Löwis11437992002-04-12 09:54:03 +000015471_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015472if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015473 ac_cv_c_bigendian=no
Christian Heimes39258d32021-04-17 11:36:35 +020015474else
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015482fi
Christian Heimes39258d32021-04-17 11:36:35 +020015483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15484$as_echo "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015485 case $ac_cv_c_bigendian in #(
15486 yes)
Christian Heimes39258d32021-04-17 11:36:35 +020015487 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015488;; #(
15489 no)
15490 ;; #(
15491 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015492
Christian Heimes39258d32021-04-17 11:36:35 +020015493$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 ;; #(
15496 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015497 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015498 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015500
Michael W. Hudson54241132001-12-07 15:38:26 +000015501
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015502# ABI version string for Python extension modules. This appears between the
15503# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15504# from the following attributes which affect the ABI of this Python build (in
15505# this order):
15506#
15507# * The Python implementation (always 'cpython-' for us)
15508# * The major and minor version numbers
15509# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015510#
15511# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015512# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15513# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015514#
15515# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15516# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015517
Christian Heimes39258d32021-04-17 11:36:35 +020015518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15519$as_echo_n "checking ABIFLAGS... " >&6; }
15520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15521$as_echo "$ABIFLAGS" >&6; }
15522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15523$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015524SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Christian Heimes39258d32021-04-17 11:36:35 +020015525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15526$as_echo "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015527
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015528# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15529if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015530 # Similar to SOABI but remove "d" flag from ABIFLAGS
15531
15532 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15533
Christian Heimes39258d32021-04-17 11:36:35 +020015534cat >>confdefs.h <<_ACEOF
15535#define ALT_SOABI "${ALT_SOABI}"
15536_ACEOF
Victor Stinner5422e3c2019-04-26 01:40:00 +020015537
15538fi
15539
Victor Stinner52a327c2020-12-23 03:41:08 +010015540
Matti Picusa44ce6c2020-12-20 04:56:57 +020015541EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015542
Christian Heimes39258d32021-04-17 11:36:35 +020015543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15544$as_echo_n "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015545LDVERSION='$(VERSION)$(ABIFLAGS)'
Christian Heimes39258d32021-04-17 11:36:35 +020015546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15547$as_echo "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015548
E. M. Brayc994c8f2019-05-24 17:33:47 +020015549# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015550
E. M. Brayb1fc4172019-05-24 18:39:39 +020015551if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015552 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015553else
15554 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015555fi
15556
doko@python.org87421192013-01-26 11:39:31 +010015557
Victor Stinner51ae31e2020-06-09 15:32:43 +020015558
15559BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15560
15561
15562# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015563# /usr/$LIDIRNAME/python$VERSION
15564
15565PLATLIBDIR="lib"
Christian Heimes39258d32021-04-17 11:36:35 +020015566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15567$as_echo_n "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015568
15569# Check whether --with-platlibdir was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015570if test "${with_platlibdir+set}" = set; then :
Victor Stinner8510f432020-03-10 09:53:09 +010015571 withval=$with_platlibdir;
15572# ignore 3 options:
15573# --with-platlibdir
15574# --with-platlibdir=
15575# --without-platlibdir
15576if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15577then
Christian Heimes39258d32021-04-17 11:36:35 +020015578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15579$as_echo "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015580 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015581 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015582else
Christian Heimes39258d32021-04-17 11:36:35 +020015583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15584$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015585fi
Christian Heimes39258d32021-04-17 11:36:35 +020015586else
15587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15588$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015589fi
15590
15591
15592
15593
15594if test x$PLATFORM_TRIPLET = x; then
15595 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15596else
15597 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015598fi
doko@python.org87421192013-01-26 11:39:31 +010015599
15600
Victor Stinner75e59a92021-01-20 17:07:21 +010015601# Check for --with-wheel-pkg-dir=PATH
15602
15603WHEEL_PKG_DIR=""
Christian Heimes39258d32021-04-17 11:36:35 +020015604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15605$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015606
15607# Check whether --with-wheel-pkg-dir was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015608if test "${with_wheel_pkg_dir+set}" = set; then :
Victor Stinner75e59a92021-01-20 17:07:21 +010015609 withval=$with_wheel_pkg_dir;
15610if test -n "$withval"; then
Christian Heimes39258d32021-04-17 11:36:35 +020015611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15612$as_echo "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015613 WHEEL_PKG_DIR="$withval"
15614else
Christian Heimes39258d32021-04-17 11:36:35 +020015615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15616$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015617fi
Christian Heimes39258d32021-04-17 11:36:35 +020015618else
15619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15620$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015621fi
15622
15623
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015624# Check whether right shifting a negative integer extends the sign bit
15625# or fills with zeros (like the Cray J90, according to Tim Peters).
Christian Heimes39258d32021-04-17 11:36:35 +020015626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15627$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
15628if ${ac_cv_rshift_extends_sign+:} false; then :
15629 $as_echo_n "(cached) " >&6
15630else
Martin v. Löwis11437992002-04-12 09:54:03 +000015631
Christian Heimes39258d32021-04-17 11:36:35 +020015632if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015633 ac_cv_rshift_extends_sign=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015634else
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015637
15638int main()
15639{
Joshua Root674fa0a2020-12-14 07:56:34 +110015640 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015641}
15642
Martin v. Löwis11437992002-04-12 09:54:03 +000015643_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015644if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015645 ac_cv_rshift_extends_sign=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015646else
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015651fi
15652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653fi
15654
Christian Heimes39258d32021-04-17 11:36:35 +020015655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15656$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015657if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015658then
Martin v. Löwis11437992002-04-12 09:54:03 +000015659
Christian Heimes39258d32021-04-17 11:36:35 +020015660$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015661
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015662fi
15663
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015664# check for getc_unlocked and related locking functions
Christian Heimes39258d32021-04-17 11:36:35 +020015665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15666$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
15667if ${ac_cv_have_getc_unlocked+:} false; then :
15668 $as_echo_n "(cached) " >&6
15669else
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015672/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015673#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015674int
Christian Heimes39258d32021-04-17 11:36:35 +020015675main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015676{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015677
15678 FILE *f = fopen("/dev/null", "r");
15679 flockfile(f);
15680 getc_unlocked(f);
15681 funlockfile(f);
15682
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 ;
15684 return 0;
15685}
15686_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015687if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015688 ac_cv_have_getc_unlocked=yes
Christian Heimes39258d32021-04-17 11:36:35 +020015689else
Matthias Kloseb9621712010-04-24 17:59:49 +000015690 ac_cv_have_getc_unlocked=no
15691fi
Christian Heimes39258d32021-04-17 11:36:35 +020015692rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015695
Christian Heimes39258d32021-04-17 11:36:35 +020015696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15697$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015698if test "$ac_cv_have_getc_unlocked" = yes
15699then
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
Christian Heimes39258d32021-04-17 11:36:35 +020015701$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015702
15703fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015704
Roland Hiebere1f77692021-02-09 02:05:25 +010015705
15706# Check whether --with-readline was given.
Christian Heimes39258d32021-04-17 11:36:35 +020015707if test "${with_readline+set}" = set; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015708 withval=$with_readline;
Christian Heimes39258d32021-04-17 11:36:35 +020015709else
Roland Hiebere1f77692021-02-09 02:05:25 +010015710 with_readline=yes
15711fi
15712
15713
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015714# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015715py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015716# save the value of LIBS so we don't actually link Python with readline
15717LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015718
Roland Hiebere1f77692021-02-09 02:05:25 +010015719if test "$with_readline" != no; then
15720 case "$with_readline" in
15721 editline|edit)
15722 LIBREADLINE=edit
15723
Christian Heimes39258d32021-04-17 11:36:35 +020015724$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010015725
15726 ;;
15727 yes|readline)
15728 LIBREADLINE=readline
15729 ;;
15730 *)
15731 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15732 ;;
15733 esac
15734
15735 # On some systems we need to link readline to a termcap compatible
15736 # library. NOTE: Keep the precedence of listed libraries synchronised
15737 # with setup.py.
Christian Heimes39258d32021-04-17 11:36:35 +020015738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15739$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015740 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15741 if test -z "$py_libtermcap"; then
15742 READLINE_LIBS="-l$LIBREADLINE"
15743 else
15744 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15745 fi
15746 LIBS="$READLINE_LIBS $LIBS_no_readline"
15747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015748/* end confdefs.h. */
15749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750/* Override any GCC internal prototype to avoid an error.
15751 Use char because int might match the return type of a GCC
15752 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015753#ifdef __cplusplus
15754extern "C"
15755#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015756char readline ();
15757int
Christian Heimes39258d32021-04-17 11:36:35 +020015758main ()
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015761 ;
15762 return 0;
15763}
15764_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015765if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015766 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015767fi
Christian Heimes39258d32021-04-17 11:36:35 +020015768rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015770 if test $py_cv_lib_readline = yes; then
15771 break
15772 fi
15773 done
15774
15775 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15776 #AC_SUBST([READLINE_LIBS])
15777 if test $py_cv_lib_readline = no; then
Christian Heimes39258d32021-04-17 11:36:35 +020015778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15779$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015780 else
Christian Heimes39258d32021-04-17 11:36:35 +020015781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15782$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015783
Christian Heimes39258d32021-04-17 11:36:35 +020015784$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015785
Roland Hiebere1f77692021-02-09 02:05:25 +010015786 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015787fi
15788
Roland Hiebere1f77692021-02-09 02:05:25 +010015789if test "$py_cv_lib_readline" = yes; then
15790 # check for readline 2.2
Christian Heimes39258d32021-04-17 11:36:35 +020015791 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 +010015792#include <stdio.h> /* Must be first for Gnu Readline */
15793#ifdef WITH_EDITLINE
15794# include <editline/readline.h>
15795#else
15796# include <readline/readline.h>
15797#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015798
Christian Heimes39258d32021-04-17 11:36:35 +020015799"
15800if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015801
Christian Heimes39258d32021-04-17 11:36:35 +020015802$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015803
15804fi
Christian Heimes39258d32021-04-17 11:36:35 +020015805
15806 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 +010015807#include <stdio.h> /* Must be first for Gnu Readline */
15808#ifdef WITH_EDITLINE
15809# include <editline/readline.h>
15810#else
15811# include <readline/readline.h>
15812#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015813
Christian Heimes39258d32021-04-17 11:36:35 +020015814"
15815if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015816
Christian Heimes39258d32021-04-17 11:36:35 +020015817$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015818
15819fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015820
Christian Heimes39258d32021-04-17 11:36:35 +020015821
Roland Hiebere1f77692021-02-09 02:05:25 +010015822 # check for readline 4.0
Christian Heimes39258d32021-04-17 11:36:35 +020015823 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15825$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15826if eval \${$as_ac_Lib+:} false; then :
15827 $as_echo_n "(cached) " >&6
15828else
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015830LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834/* Override any GCC internal prototype to avoid an error.
15835 Use char because int might match the return type of a GCC
15836 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015837#ifdef __cplusplus
15838extern "C"
15839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015840char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015841int
Christian Heimes39258d32021-04-17 11:36:35 +020015842main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 ;
15846 return 0;
15847}
15848_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015849if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015850 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015851else
Roland Hiebere1f77692021-02-09 02:05:25 +010015852 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015853fi
Christian Heimes39258d32021-04-17 11:36:35 +020015854rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015856LIBS=$ac_check_lib_save_LIBS
15857fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015858eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15860$as_echo "$ac_res" >&6; }
15861if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015862
Christian Heimes39258d32021-04-17 11:36:35 +020015863$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015864
Martin v. Löwis0daad592001-09-30 21:09:59 +000015865fi
15866
Michael W. Hudson54241132001-12-07 15:38:26 +000015867
Roland Hiebere1f77692021-02-09 02:05:25 +010015868 # also in 4.0
Christian Heimes39258d32021-04-17 11:36:35 +020015869 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15871$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15872if eval \${$as_ac_Lib+:} false; then :
15873 $as_echo_n "(cached) " >&6
15874else
Thomas Wouters89d996e2007-09-08 17:39:28 +000015875 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015876LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015878/* end confdefs.h. */
15879
15880/* Override any GCC internal prototype to avoid an error.
15881 Use char because int might match the return type of a GCC
15882 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015883#ifdef __cplusplus
15884extern "C"
15885#endif
Thomas Wouters89d996e2007-09-08 17:39:28 +000015886char rl_completion_display_matches_hook ();
15887int
Christian Heimes39258d32021-04-17 11:36:35 +020015888main ()
Thomas Wouters89d996e2007-09-08 17:39:28 +000015889{
15890return rl_completion_display_matches_hook ();
15891 ;
15892 return 0;
15893}
15894_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015895if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015896 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015897else
Roland Hiebere1f77692021-02-09 02:05:25 +010015898 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015899fi
Christian Heimes39258d32021-04-17 11:36:35 +020015900rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015902LIBS=$ac_check_lib_save_LIBS
15903fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015904eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15906$as_echo "$ac_res" >&6; }
15907if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015908
Christian Heimes39258d32021-04-17 11:36:35 +020015909$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015910
15911fi
15912
15913
Roland Hiebere1f77692021-02-09 02:05:25 +010015914 # also in 4.0, but not in editline
Christian Heimes39258d32021-04-17 11:36:35 +020015915 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15917$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15918if eval \${$as_ac_Lib+:} false; then :
15919 $as_echo_n "(cached) " >&6
15920else
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015921 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015922LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15924/* end confdefs.h. */
15925
15926/* Override any GCC internal prototype to avoid an error.
15927 Use char because int might match the return type of a GCC
15928 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015929#ifdef __cplusplus
15930extern "C"
15931#endif
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015932char rl_resize_terminal ();
15933int
Christian Heimes39258d32021-04-17 11:36:35 +020015934main ()
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015935{
15936return rl_resize_terminal ();
15937 ;
15938 return 0;
15939}
15940_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015941if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015942 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015943else
Roland Hiebere1f77692021-02-09 02:05:25 +010015944 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015945fi
Christian Heimes39258d32021-04-17 11:36:35 +020015946rm -f core conftest.err conftest.$ac_objext \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015947 conftest$ac_exeext conftest.$ac_ext
15948LIBS=$ac_check_lib_save_LIBS
15949fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015950eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15952$as_echo "$ac_res" >&6; }
15953if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015954
Christian Heimes39258d32021-04-17 11:36:35 +020015955$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015956
15957fi
15958
15959
Roland Hiebere1f77692021-02-09 02:05:25 +010015960 # check for readline 4.2
Christian Heimes39258d32021-04-17 11:36:35 +020015961 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15963$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15964if eval \${$as_ac_Lib+:} false; then :
15965 $as_echo_n "(cached) " >&6
15966else
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015968LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972/* Override any GCC internal prototype to avoid an error.
15973 Use char because int might match the return type of a GCC
15974 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020015975#ifdef __cplusplus
15976extern "C"
15977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015978char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015979int
Christian Heimes39258d32021-04-17 11:36:35 +020015980main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 ;
15984 return 0;
15985}
15986_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020015987if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015988 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020015989else
Roland Hiebere1f77692021-02-09 02:05:25 +010015990 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000015991fi
Christian Heimes39258d32021-04-17 11:36:35 +020015992rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015994LIBS=$ac_check_lib_save_LIBS
15995fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015996eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020015997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15998$as_echo "$ac_res" >&6; }
15999if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000016000
Christian Heimes39258d32021-04-17 11:36:35 +020016001$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000016002
Guido van Rossum353ae582001-07-10 16:45:32 +000016003fi
16004
Jack Jansendd19cf82001-12-06 22:36:17 +000016005
Roland Hiebere1f77692021-02-09 02:05:25 +010016006 # also in readline 4.2
Christian Heimes39258d32021-04-17 11:36:35 +020016007 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010016008#include <stdio.h> /* Must be first for Gnu Readline */
16009#ifdef WITH_EDITLINE
16010# include <editline/readline.h>
16011#else
16012# include <readline/readline.h>
16013#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000016014
Christian Heimes39258d32021-04-17 11:36:35 +020016015"
16016if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016017
Christian Heimes39258d32021-04-17 11:36:35 +020016018$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016019
16020fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016021
Christian Heimes39258d32021-04-17 11:36:35 +020016022
16023 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
16024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
16025$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
16026if eval \${$as_ac_Lib+:} false; then :
16027 $as_echo_n "(cached) " >&6
16028else
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016029 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010016030LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16032/* end confdefs.h. */
16033
16034/* Override any GCC internal prototype to avoid an error.
16035 Use char because int might match the return type of a GCC
16036 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020016037#ifdef __cplusplus
16038extern "C"
16039#endif
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016040char append_history ();
16041int
Christian Heimes39258d32021-04-17 11:36:35 +020016042main ()
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016043{
16044return append_history ();
16045 ;
16046 return 0;
16047}
16048_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016049if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010016050 eval "$as_ac_Lib=yes"
Christian Heimes39258d32021-04-17 11:36:35 +020016051else
Roland Hiebere1f77692021-02-09 02:05:25 +010016052 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016053fi
Christian Heimes39258d32021-04-17 11:36:35 +020016054rm -f core conftest.err conftest.$ac_objext \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016055 conftest$ac_exeext conftest.$ac_ext
16056LIBS=$ac_check_lib_save_LIBS
16057fi
Roland Hiebere1f77692021-02-09 02:05:25 +010016058eval ac_res=\$$as_ac_Lib
Christian Heimes39258d32021-04-17 11:36:35 +020016059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16060$as_echo "$ac_res" >&6; }
16061if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016062
Christian Heimes39258d32021-04-17 11:36:35 +020016063$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016064
16065fi
16066
Roland Hiebere1f77692021-02-09 02:05:25 +010016067fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060016068
Martin v. Löwis82bca632006-02-10 20:49:30 +000016069# End of readline checks: restore LIBS
16070LIBS=$LIBS_no_readline
16071
Christian Heimes39258d32021-04-17 11:36:35 +020016072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
16073$as_echo_n "checking for broken nice()... " >&6; }
16074if ${ac_cv_broken_nice+:} false; then :
16075 $as_echo_n "(cached) " >&6
16076else
Martin v. Löwis11437992002-04-12 09:54:03 +000016077
Christian Heimes39258d32021-04-17 11:36:35 +020016078if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000016079 ac_cv_broken_nice=no
Christian Heimes39258d32021-04-17 11:36:35 +020016080else
Matthias Kloseb9621712010-04-24 17:59:49 +000016081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016082/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016083
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080016084#include <stdlib.h>
16085#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016086int main()
16087{
16088 int val1 = nice(1);
16089 if (val1 != -1 && val1 == nice(2))
16090 exit(0);
16091 exit(1);
16092}
16093
Martin v. Löwis11437992002-04-12 09:54:03 +000016094_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016095if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016096 ac_cv_broken_nice=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016097else
Matthias Kloseb9621712010-04-24 17:59:49 +000016098 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016102fi
16103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016104fi
16105
Christian Heimes39258d32021-04-17 11:36:35 +020016106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
16107$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016108if test "$ac_cv_broken_nice" = yes
16109then
Martin v. Löwis11437992002-04-12 09:54:03 +000016110
Christian Heimes39258d32021-04-17 11:36:35 +020016111$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016112
16113fi
16114
Christian Heimes39258d32021-04-17 11:36:35 +020016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16116$as_echo_n "checking for broken poll()... " >&6; }
16117if ${ac_cv_broken_poll+:} false; then :
16118 $as_echo_n "(cached) " >&6
16119else
16120 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016121 ac_cv_broken_poll=no
Christian Heimes39258d32021-04-17 11:36:35 +020016122else
Matthias Kloseb9621712010-04-24 17:59:49 +000016123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016124/* end confdefs.h. */
16125
16126#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016127#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016129int main()
16130{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016131 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016132 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016133
16134 close (42);
16135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016136 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016137 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016138 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016139 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016140 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016141 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016142 return 1;
16143}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016144
16145_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016146if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016147 ac_cv_broken_poll=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016148else
Matthias Kloseb9621712010-04-24 17:59:49 +000016149 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016155fi
16156
Christian Heimes39258d32021-04-17 11:36:35 +020016157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16158$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016159if test "$ac_cv_broken_poll" = yes
16160then
16161
Christian Heimes39258d32021-04-17 11:36:35 +020016162$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016163
16164fi
16165
Martin v. Löwis1d459062005-03-14 21:23:33 +000016166# check tzset(3) exists and works like we expect it to
Christian Heimes39258d32021-04-17 11:36:35 +020016167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16168$as_echo_n "checking for working tzset()... " >&6; }
16169if ${ac_cv_working_tzset+:} false; then :
16170 $as_echo_n "(cached) " >&6
16171else
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016172
Christian Heimes39258d32021-04-17 11:36:35 +020016173if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016174 ac_cv_working_tzset=no
Christian Heimes39258d32021-04-17 11:36:35 +020016175else
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016177/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016178
16179#include <stdlib.h>
16180#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016181#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016182
16183#if HAVE_TZNAME
16184extern char *tzname[];
16185#endif
16186
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016187int main()
16188{
Brett Cannon18367812003-09-19 00:59:16 +000016189 /* Note that we need to ensure that not only does tzset(3)
16190 do 'something' with localtime, but it works as documented
16191 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016192 This includes making sure that tzname is set properly if
16193 tm->tm_zone does not exist since it is the alternative way
16194 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016195
16196 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016197 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016198 */
16199
Martin v. Löwis1d459062005-03-14 21:23:33 +000016200 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016201 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16202
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016203 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016204 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016205 if (localtime(&groundhogday)->tm_hour != 0)
16206 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016207#if HAVE_TZNAME
16208 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16209 if (strcmp(tzname[0], "UTC") ||
16210 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16211 exit(1);
16212#endif
Brett Cannon18367812003-09-19 00:59:16 +000016213
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016214 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016215 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016216 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016217 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016218#if HAVE_TZNAME
16219 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16220 exit(1);
16221#endif
Brett Cannon18367812003-09-19 00:59:16 +000016222
16223 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16224 tzset();
16225 if (localtime(&groundhogday)->tm_hour != 11)
16226 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016227#if HAVE_TZNAME
16228 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16229 exit(1);
16230#endif
16231
16232#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016233 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16234 exit(1);
16235 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16236 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016237#endif
Brett Cannon18367812003-09-19 00:59:16 +000016238
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016239 exit(0);
16240}
16241
16242_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016243if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016244 ac_cv_working_tzset=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016245else
Matthias Kloseb9621712010-04-24 17:59:49 +000016246 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016250fi
16251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252fi
16253
Christian Heimes39258d32021-04-17 11:36:35 +020016254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16255$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016256if test "$ac_cv_working_tzset" = yes
16257then
16258
Christian Heimes39258d32021-04-17 11:36:35 +020016259$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016260
16261fi
16262
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016263# Look for subsecond timestamps in struct stat
Christian Heimes39258d32021-04-17 11:36:35 +020016264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16265$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
16266if ${ac_cv_stat_tv_nsec+:} false; then :
16267 $as_echo_n "(cached) " >&6
16268else
Matthias Kloseb9621712010-04-24 17:59:49 +000016269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016270/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016271#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016272int
Christian Heimes39258d32021-04-17 11:36:35 +020016273main ()
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016274{
16275
16276struct stat st;
16277st.st_mtim.tv_nsec = 1;
16278
16279 ;
16280 return 0;
16281}
16282_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016284 ac_cv_stat_tv_nsec=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016285else
Matthias Kloseb9621712010-04-24 17:59:49 +000016286 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016287fi
Christian Heimes39258d32021-04-17 11:36:35 +020016288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289fi
16290
Christian Heimes39258d32021-04-17 11:36:35 +020016291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16292$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016293if test "$ac_cv_stat_tv_nsec" = yes
16294then
16295
Christian Heimes39258d32021-04-17 11:36:35 +020016296$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016297
16298fi
16299
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016300# Look for BSD style subsecond timestamps in struct stat
Christian Heimes39258d32021-04-17 11:36:35 +020016301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16302$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
16303if ${ac_cv_stat_tv_nsec2+:} false; then :
16304 $as_echo_n "(cached) " >&6
16305else
Matthias Kloseb9621712010-04-24 17:59:49 +000016306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016307/* end confdefs.h. */
16308#include <sys/stat.h>
16309int
Christian Heimes39258d32021-04-17 11:36:35 +020016310main ()
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016311{
16312
16313struct stat st;
16314st.st_mtimespec.tv_nsec = 1;
16315
16316 ;
16317 return 0;
16318}
16319_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016321 ac_cv_stat_tv_nsec2=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016322else
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016324fi
Christian Heimes39258d32021-04-17 11:36:35 +020016325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326fi
16327
Christian Heimes39258d32021-04-17 11:36:35 +020016328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16329$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016330if test "$ac_cv_stat_tv_nsec2" = yes
16331then
16332
Christian Heimes39258d32021-04-17 11:36:35 +020016333$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016334
16335fi
16336
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016337# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016338ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016339if test "$cross_compiling" = no; then
16340 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16341fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016342
Christian Heimes39258d32021-04-17 11:36:35 +020016343for ac_header in curses.h ncurses.h
16344do :
16345 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16346ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16347if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16348 cat >>confdefs.h <<_ACEOF
16349#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16350_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016351
16352fi
Pablo Galindocc128882021-03-01 16:47:53 +000016353
Christian Heimes39258d32021-04-17 11:36:35 +020016354done
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016355
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016356
16357# On Solaris, term.h requires curses.h
Christian Heimes39258d32021-04-17 11:36:35 +020016358for ac_header in term.h
16359do :
16360 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016361#ifdef HAVE_CURSES_H
16362#include <curses.h>
16363#endif
16364
16365"
Christian Heimes39258d32021-04-17 11:36:35 +020016366if test "x$ac_cv_header_term_h" = xyes; then :
16367 cat >>confdefs.h <<_ACEOF
16368#define HAVE_TERM_H 1
16369_ACEOF
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016370
16371fi
16372
Christian Heimes39258d32021-04-17 11:36:35 +020016373done
16374
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016375
Jack Jansen666b1e72001-10-31 12:11:48 +000016376# On HP/UX 11.0, mvwdelch is a block with a return statement
Christian Heimes39258d32021-04-17 11:36:35 +020016377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16378$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
16379if ${ac_cv_mvwdelch_is_expression+:} false; then :
16380 $as_echo_n "(cached) " >&6
16381else
Matthias Kloseb9621712010-04-24 17:59:49 +000016382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016383/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016384#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016385int
Christian Heimes39258d32021-04-17 11:36:35 +020016386main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016387{
Jack Jansen666b1e72001-10-31 12:11:48 +000016388
16389 int rtn;
16390 rtn = mvwdelch(0,0,0);
16391
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 ;
16393 return 0;
16394}
16395_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016396if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016397 ac_cv_mvwdelch_is_expression=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016398else
Matthias Kloseb9621712010-04-24 17:59:49 +000016399 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016400fi
Christian Heimes39258d32021-04-17 11:36:35 +020016401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402fi
16403
Christian Heimes39258d32021-04-17 11:36:35 +020016404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16405$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016406
16407if test "$ac_cv_mvwdelch_is_expression" = yes
16408then
Martin v. Löwis11437992002-04-12 09:54:03 +000016409
Christian Heimes39258d32021-04-17 11:36:35 +020016410$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016411
16412fi
16413
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016414# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16415# structs since version 5.7. If the macro is defined as zero before including
16416# [n]curses.h, ncurses will expose fields of the structs regardless of the
16417# configuration.
Christian Heimes39258d32021-04-17 11:36:35 +020016418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16419$as_echo_n "checking whether WINDOW has _flags... " >&6; }
16420if ${ac_cv_window_has_flags+:} false; then :
16421 $as_echo_n "(cached) " >&6
16422else
Matthias Kloseb9621712010-04-24 17:59:49 +000016423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016424/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016425
16426 #define NCURSES_OPAQUE 0
16427 #include <curses.h>
16428
Martin v. Löwis11437992002-04-12 09:54:03 +000016429int
Christian Heimes39258d32021-04-17 11:36:35 +020016430main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016431{
Jack Jansen666b1e72001-10-31 12:11:48 +000016432
16433 WINDOW *w;
16434 w->_flags = 0;
16435
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ;
16437 return 0;
16438}
16439_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016440if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016441 ac_cv_window_has_flags=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016442else
Matthias Kloseb9621712010-04-24 17:59:49 +000016443 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016444fi
Christian Heimes39258d32021-04-17 11:36:35 +020016445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446fi
16447
Christian Heimes39258d32021-04-17 11:36:35 +020016448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16449$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016450
Jack Jansen666b1e72001-10-31 12:11:48 +000016451
16452if test "$ac_cv_window_has_flags" = yes
16453then
Martin v. Löwis11437992002-04-12 09:54:03 +000016454
Christian Heimes39258d32021-04-17 11:36:35 +020016455$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016456
16457fi
16458
Christian Heimes39258d32021-04-17 11:36:35 +020016459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16460$as_echo_n "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16462/* end confdefs.h. */
16463#include <curses.h>
16464int
Christian Heimes39258d32021-04-17 11:36:35 +020016465main ()
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016466{
16467
16468#ifndef is_pad
16469void *x=is_pad
16470#endif
16471
16472 ;
16473 return 0;
16474}
16475_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016476if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016477
Christian Heimes39258d32021-04-17 11:36:35 +020016478$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016479
Christian Heimes39258d32021-04-17 11:36:35 +020016480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16481$as_echo "yes" >&6; }
16482else
16483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16484$as_echo "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016485
16486fi
Christian Heimes39258d32021-04-17 11:36:35 +020016487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016488
Christian Heimes39258d32021-04-17 11:36:35 +020016489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16490$as_echo_n "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016492/* end confdefs.h. */
16493#include <curses.h>
16494int
Christian Heimes39258d32021-04-17 11:36:35 +020016495main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016496{
16497void *x=is_term_resized
16498 ;
16499 return 0;
16500}
16501_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016503
Christian Heimes39258d32021-04-17 11:36:35 +020016504$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016505
Christian Heimes39258d32021-04-17 11:36:35 +020016506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16507$as_echo "yes" >&6; }
16508else
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16510$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016511
16512fi
Christian Heimes39258d32021-04-17 11:36:35 +020016513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514
Christian Heimes39258d32021-04-17 11:36:35 +020016515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16516$as_echo_n "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016518/* end confdefs.h. */
16519#include <curses.h>
16520int
Christian Heimes39258d32021-04-17 11:36:35 +020016521main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016522{
16523void *x=resize_term
16524 ;
16525 return 0;
16526}
16527_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016528if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016529
Christian Heimes39258d32021-04-17 11:36:35 +020016530$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016531
Christian Heimes39258d32021-04-17 11:36:35 +020016532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16533$as_echo "yes" >&6; }
16534else
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16536$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016537
16538fi
Christian Heimes39258d32021-04-17 11:36:35 +020016539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540
Christian Heimes39258d32021-04-17 11:36:35 +020016541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16542$as_echo_n "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016544/* end confdefs.h. */
16545#include <curses.h>
16546int
Christian Heimes39258d32021-04-17 11:36:35 +020016547main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016548{
16549void *x=resizeterm
16550 ;
16551 return 0;
16552}
16553_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016554if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016555
Christian Heimes39258d32021-04-17 11:36:35 +020016556$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016557
Christian Heimes39258d32021-04-17 11:36:35 +020016558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16559$as_echo "yes" >&6; }
16560else
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16562$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016563
16564fi
Christian Heimes39258d32021-04-17 11:36:35 +020016565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016566
Christian Heimes39258d32021-04-17 11:36:35 +020016567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16568$as_echo_n "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16570/* end confdefs.h. */
16571#include <curses.h>
16572int
Christian Heimes39258d32021-04-17 11:36:35 +020016573main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016574{
16575
16576#ifndef immedok
16577void *x=immedok
16578#endif
16579
16580 ;
16581 return 0;
16582}
16583_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016584if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016585
Christian Heimes39258d32021-04-17 11:36:35 +020016586$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016587
Christian Heimes39258d32021-04-17 11:36:35 +020016588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16589$as_echo "yes" >&6; }
16590else
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16592$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016593
16594fi
Christian Heimes39258d32021-04-17 11:36:35 +020016595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016596
Christian Heimes39258d32021-04-17 11:36:35 +020016597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16598$as_echo_n "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16600/* end confdefs.h. */
16601#include <curses.h>
16602int
Christian Heimes39258d32021-04-17 11:36:35 +020016603main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016604{
16605
16606#ifndef syncok
16607void *x=syncok
16608#endif
16609
16610 ;
16611 return 0;
16612}
16613_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016614if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016615
Christian Heimes39258d32021-04-17 11:36:35 +020016616$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016617
Christian Heimes39258d32021-04-17 11:36:35 +020016618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16619$as_echo "yes" >&6; }
16620else
16621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16622$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016623
16624fi
Christian Heimes39258d32021-04-17 11:36:35 +020016625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016626
Christian Heimes39258d32021-04-17 11:36:35 +020016627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16628$as_echo_n "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16630/* end confdefs.h. */
16631#include <curses.h>
16632int
Christian Heimes39258d32021-04-17 11:36:35 +020016633main ()
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016634{
16635
16636#ifndef wchgat
16637void *x=wchgat
16638#endif
16639
16640 ;
16641 return 0;
16642}
16643_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016644if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016645
Christian Heimes39258d32021-04-17 11:36:35 +020016646$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016647
Christian Heimes39258d32021-04-17 11:36:35 +020016648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16649$as_echo "yes" >&6; }
16650else
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16652$as_echo "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016653
16654fi
Christian Heimes39258d32021-04-17 11:36:35 +020016655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016656
Christian Heimes39258d32021-04-17 11:36:35 +020016657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16658$as_echo_n "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16660/* end confdefs.h. */
16661#include <curses.h>
16662int
Christian Heimes39258d32021-04-17 11:36:35 +020016663main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016664{
16665
16666#ifndef filter
16667void *x=filter
16668#endif
16669
16670 ;
16671 return 0;
16672}
16673_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016674if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016675
Christian Heimes39258d32021-04-17 11:36:35 +020016676$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016677
Christian Heimes39258d32021-04-17 11:36:35 +020016678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16679$as_echo "yes" >&6; }
16680else
16681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16682$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016683
16684fi
Christian Heimes39258d32021-04-17 11:36:35 +020016685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016686
Christian Heimes39258d32021-04-17 11:36:35 +020016687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16688$as_echo_n "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16690/* end confdefs.h. */
16691#include <curses.h>
16692int
Christian Heimes39258d32021-04-17 11:36:35 +020016693main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016694{
16695
16696#ifndef has_key
16697void *x=has_key
16698#endif
16699
16700 ;
16701 return 0;
16702}
16703_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016704if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016705
Christian Heimes39258d32021-04-17 11:36:35 +020016706$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016707
Christian Heimes39258d32021-04-17 11:36:35 +020016708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16709$as_echo "yes" >&6; }
16710else
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16712$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016713
16714fi
Christian Heimes39258d32021-04-17 11:36:35 +020016715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016716
Christian Heimes39258d32021-04-17 11:36:35 +020016717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16718$as_echo_n "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16720/* end confdefs.h. */
16721#include <curses.h>
16722int
Christian Heimes39258d32021-04-17 11:36:35 +020016723main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016724{
16725
16726#ifndef typeahead
16727void *x=typeahead
16728#endif
16729
16730 ;
16731 return 0;
16732}
16733_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016734if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016735
Christian Heimes39258d32021-04-17 11:36:35 +020016736$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016737
Christian Heimes39258d32021-04-17 11:36:35 +020016738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16739$as_echo "yes" >&6; }
16740else
16741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16742$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016743
16744fi
Christian Heimes39258d32021-04-17 11:36:35 +020016745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016746
Christian Heimes39258d32021-04-17 11:36:35 +020016747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16748$as_echo_n "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16750/* end confdefs.h. */
16751#include <curses.h>
16752int
Christian Heimes39258d32021-04-17 11:36:35 +020016753main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016754{
16755
16756#ifndef use_env
16757void *x=use_env
16758#endif
16759
16760 ;
16761 return 0;
16762}
16763_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016764if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016765
Christian Heimes39258d32021-04-17 11:36:35 +020016766$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016767
Christian Heimes39258d32021-04-17 11:36:35 +020016768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16769$as_echo "yes" >&6; }
16770else
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16772$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016773
16774fi
Christian Heimes39258d32021-04-17 11:36:35 +020016775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016776# last curses configure check
16777CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778
Christian Heimes39258d32021-04-17 11:36:35 +020016779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16780$as_echo "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016781
16782if test "x$cross_compiling" = xyes; then
16783 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Christian Heimes39258d32021-04-17 11:36:35 +020016784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16785$as_echo_n "checking for /dev/ptmx... " >&6; }
16786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16787$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016788 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16789 fi
16790 if test "${ac_cv_file__dev_ptc+set}" != set; then
Christian Heimes39258d32021-04-17 11:36:35 +020016791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16792$as_echo_n "checking for /dev/ptc... " >&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_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16796 fi
16797fi
16798
Christian Heimes39258d32021-04-17 11:36:35 +020016799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16800$as_echo_n "checking for /dev/ptmx... " >&6; }
16801if ${ac_cv_file__dev_ptmx+:} false; then :
16802 $as_echo_n "(cached) " >&6
16803else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016804 test "$cross_compiling" = yes &&
16805 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16806if test -r "/dev/ptmx"; then
16807 ac_cv_file__dev_ptmx=yes
16808else
16809 ac_cv_file__dev_ptmx=no
16810fi
16811fi
Christian Heimes39258d32021-04-17 11:36:35 +020016812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16813$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16814if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016815
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016816fi
16817
16818if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016819
Christian Heimes39258d32021-04-17 11:36:35 +020016820$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016821
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016822fi
Christian Heimes39258d32021-04-17 11:36:35 +020016823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16824$as_echo_n "checking for /dev/ptc... " >&6; }
16825if ${ac_cv_file__dev_ptc+:} false; then :
16826 $as_echo_n "(cached) " >&6
16827else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016828 test "$cross_compiling" = yes &&
16829 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16830if test -r "/dev/ptc"; then
16831 ac_cv_file__dev_ptc=yes
16832else
16833 ac_cv_file__dev_ptc=no
16834fi
16835fi
Christian Heimes39258d32021-04-17 11:36:35 +020016836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16837$as_echo "$ac_cv_file__dev_ptc" >&6; }
16838if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016839
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016840fi
16841
16842if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016843
Christian Heimes39258d32021-04-17 11:36:35 +020016844$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016845
Neal Norwitz865400f2003-03-21 01:42:58 +000016846fi
16847
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016848if test $ac_sys_system = Darwin
16849then
16850 LIBS="$LIBS -framework CoreFoundation"
16851fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016852
Christian Heimes39258d32021-04-17 11:36:35 +020016853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16854$as_echo_n "checking for %zd printf() format support... " >&6; }
16855if ${ac_cv_have_size_t_format+:} false; then :
16856 $as_echo_n "(cached) " >&6
16857else
16858 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016859 ac_cv_have_size_t_format="cross -- assuming yes"
16860
Christian Heimes39258d32021-04-17 11:36:35 +020016861else
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016863/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016864
Thomas Wouters477c8d52006-05-27 19:21:47 +000016865#include <stdio.h>
16866#include <stddef.h>
16867#include <string.h>
16868
Christian Heimes2c181612007-12-17 20:04:13 +000016869#ifdef HAVE_SYS_TYPES_H
16870#include <sys/types.h>
16871#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016872
16873#ifdef HAVE_SSIZE_T
16874typedef ssize_t Py_ssize_t;
16875#elif SIZEOF_VOID_P == SIZEOF_LONG
16876typedef long Py_ssize_t;
16877#else
16878typedef int Py_ssize_t;
16879#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016880
Christian Heimes2c181612007-12-17 20:04:13 +000016881int main()
16882{
16883 char buffer[256];
16884
Thomas Wouters477c8d52006-05-27 19:21:47 +000016885 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16886 return 1;
16887
Thomas Wouters89f507f2006-12-13 04:49:30 +000016888 if (strcmp(buffer, "123"))
16889 return 1;
16890
16891 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16892 return 1;
16893
16894 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016895 return 1;
16896
16897 return 0;
16898}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016899
Thomas Wouters477c8d52006-05-27 19:21:47 +000016900_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016901if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016902 ac_cv_have_size_t_format=yes
Christian Heimes39258d32021-04-17 11:36:35 +020016903else
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016908fi
16909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016910fi
Christian Heimes39258d32021-04-17 11:36:35 +020016911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16912$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016913if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016914
Christian Heimes39258d32021-04-17 11:36:35 +020016915$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016916
16917fi
16918
Matthias Kloseb9621712010-04-24 17:59:49 +000016919ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016920#ifdef HAVE_SYS_TYPES_H
16921#include <sys/types.h>
16922#endif
16923#ifdef HAVE_SYS_SOCKET_H
16924#include <sys/socket.h>
16925#endif
16926
Matthias Kloseb9621712010-04-24 17:59:49 +000016927"
Christian Heimes39258d32021-04-17 11:36:35 +020016928if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016929
Christian Heimes39258d32021-04-17 11:36:35 +020016930else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016931
Christian Heimes39258d32021-04-17 11:36:35 +020016932$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016933
16934fi
16935
Michael W. Hudson54241132001-12-07 15:38:26 +000016936
Christian Heimes39258d32021-04-17 11:36:35 +020016937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16938$as_echo_n "checking for broken mbstowcs... " >&6; }
16939if ${ac_cv_broken_mbstowcs+:} false; then :
16940 $as_echo_n "(cached) " >&6
16941else
16942 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016943 ac_cv_broken_mbstowcs=no
Christian Heimes39258d32021-04-17 11:36:35 +020016944else
Matthias Kloseb9621712010-04-24 17:59:49 +000016945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016946/* end confdefs.h. */
16947
Stefan Krah19c21392012-11-22 23:47:32 +010016948#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016949#include<stdlib.h>
16950int main() {
16951 size_t len = -1;
16952 const char *str = "text";
16953 len = mbstowcs(NULL, str, 0);
16954 return (len != 4);
16955}
16956
16957_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020016958if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016959 ac_cv_broken_mbstowcs=no
Christian Heimes39258d32021-04-17 11:36:35 +020016960else
Matthias Kloseb9621712010-04-24 17:59:49 +000016961 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016965fi
16966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016967fi
16968
Christian Heimes39258d32021-04-17 11:36:35 +020016969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16970$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016971if test "$ac_cv_broken_mbstowcs" = yes
16972then
16973
Christian Heimes39258d32021-04-17 11:36:35 +020016974$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016975
16976fi
16977
Antoine Pitroub52ec782009-01-25 16:34:23 +000016978# Check for --with-computed-gotos
Christian Heimes39258d32021-04-17 11:36:35 +020016979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16980$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016981
16982# Check whether --with-computed-gotos was given.
Christian Heimes39258d32021-04-17 11:36:35 +020016983if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016984 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016985if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016986then
16987
Christian Heimes39258d32021-04-17 11:36:35 +020016988$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016989
Christian Heimes39258d32021-04-17 11:36:35 +020016990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16991$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016992fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016993if test "$withval" = no
16994then
16995
Christian Heimes39258d32021-04-17 11:36:35 +020016996$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000016997
Christian Heimes39258d32021-04-17 11:36:35 +020016998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16999$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000017000fi
17001
Christian Heimes39258d32021-04-17 11:36:35 +020017002else
17003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
17004$as_echo "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000017005fi
17006
Antoine Pitroub52ec782009-01-25 16:34:23 +000017007
Christian Heimes39258d32021-04-17 11:36:35 +020017008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
17009$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
17010if ${ac_cv_computed_gotos+:} false; then :
17011 $as_echo_n "(cached) " >&6
17012else
17013 if test "$cross_compiling" = yes; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010017014 if test "${with_computed_gotos+set}" = set; then
17015 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
17016 else
17017 ac_cv_computed_gotos=no
17018 fi
Christian Heimes39258d32021-04-17 11:36:35 +020017019else
Matthias Kloseb17289e2012-03-15 19:51:34 +010017020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17021/* end confdefs.h. */
17022
17023int main(int argc, char **argv)
17024{
17025 static void *targets[1] = { &&LABEL1 };
17026 goto LABEL2;
17027LABEL1:
17028 return 0;
17029LABEL2:
17030 goto *targets[0];
17031 return 1;
17032}
17033
17034_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017035if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010017036 ac_cv_computed_gotos=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017037else
Matthias Kloseb17289e2012-03-15 19:51:34 +010017038 ac_cv_computed_gotos=no
17039fi
17040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17041 conftest.$ac_objext conftest.beam conftest.$ac_ext
17042fi
17043
17044fi
17045
Christian Heimes39258d32021-04-17 11:36:35 +020017046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
17047$as_echo "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010017048case "$ac_cv_computed_gotos" in yes*)
17049
Christian Heimes39258d32021-04-17 11:36:35 +020017050$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010017051
17052esac
17053
Benjamin Petersond8d835b2010-10-15 23:14:46 +000017054case $ac_sys_system in
17055AIX*)
17056
Christian Heimes39258d32021-04-17 11:36:35 +020017057$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000017058 ;;
17059esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017060
Michael W. Hudson54241132001-12-07 15:38:26 +000017061
Mark Dickinsonb2153e92010-05-05 22:31:36 +000017062
17063
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017064for h in `(cd $srcdir;echo Python/thread_*.h)`
17065do
17066 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17067done
17068
Michael W. Hudson54241132001-12-07 15:38:26 +000017069
Ned Deily8d02f912020-06-25 10:46:44 -040017070SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Christian Heimes39258d32021-04-17 11:36:35 +020017071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
17072$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017073for dir in $SRCDIRS; do
17074 if test ! -d $dir; then
17075 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017076 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017077done
Christian Heimes39258d32021-04-17 11:36:35 +020017078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
17079$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000017080
Stefan Krah1919b7e2012-03-21 18:25:23 +010017081# Availability of -O2:
Christian Heimes39258d32021-04-17 11:36:35 +020017082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
17083$as_echo_n "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017084saved_cflags="$CFLAGS"
17085CFLAGS="-O2"
17086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17087/* end confdefs.h. */
17088
17089int
Christian Heimes39258d32021-04-17 11:36:35 +020017090main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010017091{
17092
17093
17094 ;
17095 return 0;
17096}
17097_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017098if ac_fn_c_try_compile "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017099 have_O2=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017100else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017101 have_O2=no
17102fi
Christian Heimes39258d32021-04-17 11:36:35 +020017103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
17105$as_echo "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017106CFLAGS="$saved_cflags"
17107
17108# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
17109# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Christian Heimes39258d32021-04-17 11:36:35 +020017110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
17111$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017112saved_cflags="$CFLAGS"
17113CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17114if test "$have_O2" = no; then
17115 CFLAGS=""
17116fi
Christian Heimes39258d32021-04-17 11:36:35 +020017117if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017118 have_glibc_memmove_bug=undefined
Christian Heimes39258d32021-04-17 11:36:35 +020017119else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17121/* end confdefs.h. */
17122
17123#include <stdio.h>
17124#include <stdlib.h>
17125#include <string.h>
17126void foo(void *p, void *q) { memmove(p, q, 19); }
17127int main() {
17128 char a[32] = "123456789000000000";
17129 foo(&a[9], a);
17130 if (strcmp(a, "123456789123456789000000000") != 0)
17131 return 1;
17132 foo(a, &a[9]);
17133 if (strcmp(a, "123456789000000000") != 0)
17134 return 1;
17135 return 0;
17136}
17137
17138_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017139if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017140 have_glibc_memmove_bug=no
Christian Heimes39258d32021-04-17 11:36:35 +020017141else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017142 have_glibc_memmove_bug=yes
17143fi
17144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17145 conftest.$ac_objext conftest.beam conftest.$ac_ext
17146fi
17147
17148CFLAGS="$saved_cflags"
Christian Heimes39258d32021-04-17 11:36:35 +020017149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17150$as_echo "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017151if test "$have_glibc_memmove_bug" = yes; then
17152
Christian Heimes39258d32021-04-17 11:36:35 +020017153$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017154
17155fi
17156
17157if test "$have_gcc_asm_for_x87" = yes; then
17158 # Some versions of gcc miscompile inline asm:
17159 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17160 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17161 case $CC in
17162 *gcc*)
Christian Heimes39258d32021-04-17 11:36:35 +020017163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17164$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017165 saved_cflags="$CFLAGS"
17166 CFLAGS="-O2"
Christian Heimes39258d32021-04-17 11:36:35 +020017167 if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017168 have_ipa_pure_const_bug=undefined
Christian Heimes39258d32021-04-17 11:36:35 +020017169else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17171/* end confdefs.h. */
17172
17173 __attribute__((noinline)) int
17174 foo(int *p) {
17175 int r;
17176 asm ( "movl \$6, (%1)\n\t"
17177 "xorl %0, %0\n\t"
17178 : "=r" (r) : "r" (p) : "memory"
17179 );
17180 return r;
17181 }
17182 int main() {
17183 int p = 8;
17184 if ((foo(&p) ? : p) != 6)
17185 return 1;
17186 return 0;
17187 }
17188
17189_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017190if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017191 have_ipa_pure_const_bug=no
Christian Heimes39258d32021-04-17 11:36:35 +020017192else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017193 have_ipa_pure_const_bug=yes
17194fi
17195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17196 conftest.$ac_objext conftest.beam conftest.$ac_ext
17197fi
17198
17199 CFLAGS="$saved_cflags"
Christian Heimes39258d32021-04-17 11:36:35 +020017200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17201$as_echo "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017202 if test "$have_ipa_pure_const_bug" = yes; then
17203
Christian Heimes39258d32021-04-17 11:36:35 +020017204$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017205
17206 fi
17207 ;;
17208 esac
17209fi
17210
Victor Stinner4f5366e2015-01-09 02:13:19 +010017211# Check for stdatomic.h
Christian Heimes39258d32021-04-17 11:36:35 +020017212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17213$as_echo_n "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17215/* end confdefs.h. */
17216
17217
17218 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017219 atomic_int int_var;
17220 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017221 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017222 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17223 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17224 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017225 return 0;
17226 }
17227
17228
17229_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017230if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017231 have_stdatomic_h=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017232else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017233 have_stdatomic_h=no
17234fi
Christian Heimes39258d32021-04-17 11:36:35 +020017235rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017236 conftest$ac_exeext conftest.$ac_ext
17237
Christian Heimes39258d32021-04-17 11:36:35 +020017238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17239$as_echo "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017240
17241if test "$have_stdatomic_h" = yes; then
17242
Christian Heimes39258d32021-04-17 11:36:35 +020017243$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017244
17245fi
17246
Victor Stinner52a327c2020-12-23 03:41:08 +010017247# Check for GCC >= 4.7 and clang __atomic builtin functions
Christian Heimes39258d32021-04-17 11:36:35 +020017248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17249$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17251/* end confdefs.h. */
17252
17253
Victor Stinner52a327c2020-12-23 03:41:08 +010017254 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017255 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017256 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17257 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017258 return 0;
17259 }
17260
17261
17262_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017263if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017264 have_builtin_atomic=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017265else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017266 have_builtin_atomic=no
17267fi
Christian Heimes39258d32021-04-17 11:36:35 +020017268rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017269 conftest$ac_exeext conftest.$ac_ext
17270
Christian Heimes39258d32021-04-17 11:36:35 +020017271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17272$as_echo "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017273
17274if test "$have_builtin_atomic" = yes; then
17275
Christian Heimes39258d32021-04-17 11:36:35 +020017276$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017277
17278fi
17279
Ned Deily322f5ba2013-11-21 23:01:59 -080017280# ensurepip option
Christian Heimes39258d32021-04-17 11:36:35 +020017281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17282$as_echo_n "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017283
17284# Check whether --with-ensurepip was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017285if test "${with_ensurepip+set}" = set; then :
Ned Deily322f5ba2013-11-21 23:01:59 -080017286 withval=$with_ensurepip;
Christian Heimes39258d32021-04-17 11:36:35 +020017287else
Ned Deily322f5ba2013-11-21 23:01:59 -080017288 with_ensurepip=upgrade
17289fi
17290
17291case $with_ensurepip in #(
17292 yes|upgrade) :
17293 ENSUREPIP=upgrade ;; #(
17294 install) :
17295 ENSUREPIP=install ;; #(
17296 no) :
17297 ENSUREPIP=no ;; #(
17298 *) :
17299 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17300esac
Christian Heimes39258d32021-04-17 11:36:35 +020017301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17302$as_echo "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017303
17304
Victor Stinner35a97c02015-03-08 02:59:09 +010017305# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Christian Heimes39258d32021-04-17 11:36:35 +020017306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17307$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17309/* end confdefs.h. */
17310
17311
17312 #include <dirent.h>
17313
17314 int main() {
17315 struct dirent entry;
17316 return entry.d_type == DT_UNKNOWN;
17317 }
17318
17319
17320_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017321if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner35a97c02015-03-08 02:59:09 +010017322 have_dirent_d_type=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017323else
Victor Stinner35a97c02015-03-08 02:59:09 +010017324 have_dirent_d_type=no
17325fi
Christian Heimes39258d32021-04-17 11:36:35 +020017326rm -f core conftest.err conftest.$ac_objext \
Victor Stinner35a97c02015-03-08 02:59:09 +010017327 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17329$as_echo "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017330
17331if test "$have_dirent_d_type" = yes; then
17332
Christian Heimes39258d32021-04-17 11:36:35 +020017333$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010017334
17335fi
17336
Victor Stinner9eb57c52015-03-19 22:21:49 +010017337# check if the Linux getrandom() syscall is available
Christian Heimes39258d32021-04-17 11:36:35 +020017338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17339$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17341/* end confdefs.h. */
17342
17343
Victor Stinner1b80b242016-04-12 22:34:58 +020017344 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017345 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017346 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017347
17348 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017349 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017350 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017351 const int flags = GRND_NONBLOCK;
17352 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017353 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017354 return 0;
17355 }
17356
17357
17358_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017359if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010017360 have_getrandom_syscall=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017361else
Victor Stinner9eb57c52015-03-19 22:21:49 +010017362 have_getrandom_syscall=no
17363fi
Christian Heimes39258d32021-04-17 11:36:35 +020017364rm -f core conftest.err conftest.$ac_objext \
Victor Stinner9eb57c52015-03-19 22:21:49 +010017365 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17367$as_echo "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017368
17369if test "$have_getrandom_syscall" = yes; then
17370
Christian Heimes39258d32021-04-17 11:36:35 +020017371$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010017372
17373fi
17374
Victor Stinner3abf44e2015-09-18 15:38:37 +020017375# check if the getrandom() function is available
17376# the test was written for the Solaris function of <sys/random.h>
Christian Heimes39258d32021-04-17 11:36:35 +020017377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17378$as_echo_n "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17380/* end confdefs.h. */
17381
17382
17383 #include <sys/random.h>
17384
17385 int main() {
17386 char buffer[1];
17387 const size_t buflen = sizeof(buffer);
17388 const int flags = 0;
17389 /* ignore the result, Python checks for ENOSYS at runtime */
17390 (void)getrandom(buffer, buflen, flags);
17391 return 0;
17392 }
17393
17394
17395_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017396if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020017397 have_getrandom=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017398else
Victor Stinner3abf44e2015-09-18 15:38:37 +020017399 have_getrandom=no
17400fi
Christian Heimes39258d32021-04-17 11:36:35 +020017401rm -f core conftest.err conftest.$ac_objext \
Victor Stinner3abf44e2015-09-18 15:38:37 +020017402 conftest$ac_exeext conftest.$ac_ext
Christian Heimes39258d32021-04-17 11:36:35 +020017403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17404$as_echo "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017405
17406if test "$have_getrandom" = yes; then
17407
Christian Heimes39258d32021-04-17 11:36:35 +020017408$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020017409
17410fi
17411
Neil Schemenauer5741c452019-02-08 10:48:46 -080017412# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17413# shm_* may only be available if linking against librt
17414save_LIBS="$LIBS"
17415save_includes_default="$ac_includes_default"
Christian Heimes39258d32021-04-17 11:36:35 +020017416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17417$as_echo_n "checking for library containing shm_open... " >&6; }
17418if ${ac_cv_search_shm_open+:} false; then :
17419 $as_echo_n "(cached) " >&6
17420else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017421 ac_func_search_save_LIBS=$LIBS
17422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17423/* end confdefs.h. */
17424
17425/* Override any GCC internal prototype to avoid an error.
17426 Use char because int might match the return type of a GCC
17427 builtin and then its argument prototype would still apply. */
Christian Heimes39258d32021-04-17 11:36:35 +020017428#ifdef __cplusplus
17429extern "C"
17430#endif
Neil Schemenauer5741c452019-02-08 10:48:46 -080017431char shm_open ();
17432int
Christian Heimes39258d32021-04-17 11:36:35 +020017433main ()
Neil Schemenauer5741c452019-02-08 10:48:46 -080017434{
17435return shm_open ();
17436 ;
17437 return 0;
17438}
17439_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017440for ac_lib in '' rt; do
Neil Schemenauer5741c452019-02-08 10:48:46 -080017441 if test -z "$ac_lib"; then
17442 ac_res="none required"
17443 else
17444 ac_res=-l$ac_lib
17445 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17446 fi
Christian Heimes39258d32021-04-17 11:36:35 +020017447 if ac_fn_c_try_link "$LINENO"; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017448 ac_cv_search_shm_open=$ac_res
17449fi
Christian Heimes39258d32021-04-17 11:36:35 +020017450rm -f core conftest.err conftest.$ac_objext \
Neil Schemenauer5741c452019-02-08 10:48:46 -080017451 conftest$ac_exeext
Christian Heimes39258d32021-04-17 11:36:35 +020017452 if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017453 break
17454fi
17455done
Christian Heimes39258d32021-04-17 11:36:35 +020017456if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017457
Christian Heimes39258d32021-04-17 11:36:35 +020017458else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017459 ac_cv_search_shm_open=no
17460fi
17461rm conftest.$ac_ext
17462LIBS=$ac_func_search_save_LIBS
17463fi
Christian Heimes39258d32021-04-17 11:36:35 +020017464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17465$as_echo "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080017466ac_res=$ac_cv_search_shm_open
Christian Heimes39258d32021-04-17 11:36:35 +020017467if test "$ac_res" != no; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017468 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17469
17470fi
17471
17472if test "$ac_cv_search_shm_open" = "-lrt"; then
17473
Christian Heimes39258d32021-04-17 11:36:35 +020017474$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080017475
17476fi
Christian Heimes39258d32021-04-17 11:36:35 +020017477for ac_header in sys/mman.h
17478do :
17479 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17480if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17481 cat >>confdefs.h <<_ACEOF
17482#define HAVE_SYS_MMAN_H 1
17483_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017484
17485fi
17486
Christian Heimes39258d32021-04-17 11:36:35 +020017487done
17488
Neil Schemenauer5741c452019-02-08 10:48:46 -080017489# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17490ac_includes_default="\
17491${ac_includes_default}
17492#ifndef __cplusplus
17493# ifdef HAVE_SYS_MMAN_H
17494# include <sys/mman.h>
17495# endif
17496#endif
17497"
Christian Heimes39258d32021-04-17 11:36:35 +020017498for ac_func in shm_open shm_unlink
17499do :
17500 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17501ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17502if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17503 cat >>confdefs.h <<_ACEOF
17504#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17505_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017506
17507fi
Christian Heimes39258d32021-04-17 11:36:35 +020017508done
Neil Schemenauer5741c452019-02-08 10:48:46 -080017509
17510# we don't want to link with librt always, restore LIBS
17511LIBS="$save_LIBS"
17512ac_includes_default="$save_includes_default"
17513
Christian Heimesff5be6e2018-01-20 13:19:21 +010017514# Check for usable OpenSSL
17515
17516 found=false
17517
17518# Check whether --with-openssl was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017519if test "${with_openssl+set}" = set; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017520 withval=$with_openssl;
17521 case "$withval" in
17522 "" | y | ye | yes | n | no)
17523 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17524 ;;
17525 *) ssldirs="$withval"
17526 ;;
17527 esac
17528
Christian Heimes39258d32021-04-17 11:36:35 +020017529else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017530
17531 # if pkg-config is installed and openssl has installed a .pc file,
17532 # then use that information and don't search ssldirs
17533 if test -n "$ac_tool_prefix"; then
17534 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17535set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020017536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17537$as_echo_n "checking for $ac_word... " >&6; }
17538if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17539 $as_echo_n "(cached) " >&6
17540else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017541 if test -n "$PKG_CONFIG"; then
17542 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17543else
17544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17545for as_dir in $PATH
17546do
17547 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020017548 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017549 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020017550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017551 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Christian Heimes39258d32021-04-17 11:36:35 +020017552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017553 break 2
17554 fi
17555done
17556 done
17557IFS=$as_save_IFS
17558
17559fi
17560fi
17561PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17562if test -n "$PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17564$as_echo "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017565else
Christian Heimes39258d32021-04-17 11:36:35 +020017566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17567$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017568fi
17569
17570
17571fi
17572if test -z "$ac_cv_prog_PKG_CONFIG"; then
17573 ac_ct_PKG_CONFIG=$PKG_CONFIG
17574 # Extract the first word of "pkg-config", so it can be a program name with args.
17575set dummy pkg-config; ac_word=$2
Christian Heimes39258d32021-04-17 11:36:35 +020017576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17577$as_echo_n "checking for $ac_word... " >&6; }
17578if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17579 $as_echo_n "(cached) " >&6
17580else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017581 if test -n "$ac_ct_PKG_CONFIG"; then
17582 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17583else
17584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17585for as_dir in $PATH
17586do
17587 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020017588 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017589 for ac_exec_ext in '' $ac_executable_extensions; do
Christian Heimes39258d32021-04-17 11:36:35 +020017590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017591 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Christian Heimes39258d32021-04-17 11:36:35 +020017592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017593 break 2
17594 fi
17595done
17596 done
17597IFS=$as_save_IFS
17598
17599fi
17600fi
17601ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17602if test -n "$ac_ct_PKG_CONFIG"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17604$as_echo "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017605else
Christian Heimes39258d32021-04-17 11:36:35 +020017606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17607$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017608fi
17609
17610 if test "x$ac_ct_PKG_CONFIG" = x; then
17611 PKG_CONFIG=""
17612 else
17613 case $cross_compiling:$ac_tool_warned in
17614yes:)
Christian Heimes39258d32021-04-17 11:36:35 +020017615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010017617ac_tool_warned=yes ;;
17618esac
17619 PKG_CONFIG=$ac_ct_PKG_CONFIG
17620 fi
17621else
17622 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17623fi
17624
17625 if test x"$PKG_CONFIG" != x""; then
17626 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17627 if test $? = 0; then
17628 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17629 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17630 found=true
17631 fi
17632 fi
17633
17634 # no such luck; use some default ssldirs
17635 if ! $found; then
17636 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17637 fi
17638
17639
17640fi
17641
17642
17643
17644 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17645 # an 'openssl' subdirectory
17646
17647 if ! $found; then
17648 OPENSSL_INCLUDES=
17649 for ssldir in $ssldirs; do
Christian Heimes39258d32021-04-17 11:36:35 +020017650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17651$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017652 if test -f "$ssldir/include/openssl/ssl.h"; then
17653 OPENSSL_INCLUDES="-I$ssldir/include"
17654 OPENSSL_LDFLAGS="-L$ssldir/lib"
17655 OPENSSL_LIBS="-lssl -lcrypto"
17656 found=true
Christian Heimes39258d32021-04-17 11:36:35 +020017657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17658$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017659 break
17660 else
Christian Heimes39258d32021-04-17 11:36:35 +020017661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17662$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017663 fi
17664 done
17665
17666 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17667 # it will just work!
17668 fi
17669
17670 # try the preprocessor and linker with our new flags,
17671 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17672
Christian Heimes39258d32021-04-17 11:36:35 +020017673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17674$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017675 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17676 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17677
17678 save_LIBS="$LIBS"
17679 save_LDFLAGS="$LDFLAGS"
17680 save_CPPFLAGS="$CPPFLAGS"
17681 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17682 LIBS="$OPENSSL_LIBS $LIBS"
17683 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17685/* end confdefs.h. */
17686#include <openssl/ssl.h>
17687int
Christian Heimes39258d32021-04-17 11:36:35 +020017688main ()
Christian Heimesff5be6e2018-01-20 13:19:21 +010017689{
17690SSL_new(NULL)
17691 ;
17692 return 0;
17693}
17694_ACEOF
Christian Heimes39258d32021-04-17 11:36:35 +020017695if ac_fn_c_try_link "$LINENO"; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017696
Christian Heimes39258d32021-04-17 11:36:35 +020017697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17698$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017699 have_openssl=yes
17700
Christian Heimes39258d32021-04-17 11:36:35 +020017701else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017702
Christian Heimes39258d32021-04-17 11:36:35 +020017703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17704$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017705 have_openssl=no
17706
17707fi
Christian Heimes39258d32021-04-17 11:36:35 +020017708rm -f core conftest.err conftest.$ac_objext \
Christian Heimesff5be6e2018-01-20 13:19:21 +010017709 conftest$ac_exeext conftest.$ac_ext
17710 CPPFLAGS="$save_CPPFLAGS"
17711 LDFLAGS="$save_LDFLAGS"
17712 LIBS="$save_LIBS"
17713
17714
17715
17716
17717
17718
Christian Heimes32eba612021-03-19 10:29:25 +010017719# rpath to libssl and libcrypto
Christian Heimes39258d32021-04-17 11:36:35 +020017720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
17721$as_echo_n "checking for --with-openssl-rpath... " >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017722
17723# Check whether --with-openssl-rpath was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017724if test "${with_openssl_rpath+set}" = set; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017725 withval=$with_openssl_rpath;
Christian Heimes39258d32021-04-17 11:36:35 +020017726else
Christian Heimes32eba612021-03-19 10:29:25 +010017727 with_openssl_rpath=no
17728
17729fi
17730
17731case $with_openssl_rpath in #(
17732 auto|yes) :
17733 OPENSSL_RPATH=auto ;; #(
17734 no) :
17735 OPENSSL_RPATH= ;; #(
17736 *) :
Christian Heimes39258d32021-04-17 11:36:35 +020017737 if test -d "$with_openssl_rpath"; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017738 OPENSSL_RPATH="$with_openssl_rpath"
Christian Heimes39258d32021-04-17 11:36:35 +020017739else
Christian Heimes32eba612021-03-19 10:29:25 +010017740 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
17741fi
17742
17743 ;;
17744esac
Christian Heimes39258d32021-04-17 11:36:35 +020017745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
17746$as_echo "$OPENSSL_RPATH" >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017747
17748
Christian Heimes892d66e2018-01-29 14:10:18 +010017749# ssl module default cipher suite string
17750
17751
17752
Christian Heimes39258d32021-04-17 11:36:35 +020017753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17754$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017755
17756# Check whether --with-ssl-default-suites was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017757if test "${with_ssl_default_suites+set}" = set; then :
Christian Heimes892d66e2018-01-29 14:10:18 +010017758 withval=$with_ssl_default_suites;
Christian Heimes39258d32021-04-17 11:36:35 +020017759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17760$as_echo "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017761case "$withval" in
17762 python)
Christian Heimes39258d32021-04-17 11:36:35 +020017763 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017764
17765 ;;
17766 openssl)
Christian Heimes39258d32021-04-17 11:36:35 +020017767 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017768
17769 ;;
17770 *)
Christian Heimes39258d32021-04-17 11:36:35 +020017771 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017772
Christian Heimes39258d32021-04-17 11:36:35 +020017773 cat >>confdefs.h <<_ACEOF
17774#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17775_ACEOF
Christian Heimes892d66e2018-01-29 14:10:18 +010017776
17777 ;;
17778esac
17779
Christian Heimes39258d32021-04-17 11:36:35 +020017780else
Christian Heimes892d66e2018-01-29 14:10:18 +010017781
Christian Heimes39258d32021-04-17 11:36:35 +020017782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17783$as_echo "python" >&6; }
17784$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017785
17786
17787fi
17788
17789
Christian Heimes9b60e552020-05-15 23:54:53 +020017790# builtin hash modules
17791default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17792
Christian Heimes39258d32021-04-17 11:36:35 +020017793$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020017794
Christian Heimes39258d32021-04-17 11:36:35 +020017795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17796$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020017797
17798# Check whether --with-builtin-hashlib-hashes was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017799if test "${with_builtin_hashlib_hashes+set}" = set; then :
Christian Heimes9b60e552020-05-15 23:54:53 +020017800 withval=$with_builtin_hashlib_hashes;
17801case "$withval" in
17802 yes)
17803 withval=$default_hashlib_hashes
17804 ;;
17805 no)
17806 withval=""
17807 ;;
17808esac
Christian Heimes39258d32021-04-17 11:36:35 +020017809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17810$as_echo "$withval" >&6; }
17811cat >>confdefs.h <<_ACEOF
17812#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17813_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017814
17815
Christian Heimes39258d32021-04-17 11:36:35 +020017816else
Christian Heimes9b60e552020-05-15 23:54:53 +020017817
Christian Heimes39258d32021-04-17 11:36:35 +020017818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17819$as_echo "$default_hashlib_hashes" >&6; };
17820cat >>confdefs.h <<_ACEOF
17821#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17822_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017823
17824
17825fi
17826
17827
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017828# --with-experimental-isolated-subinterpreters
17829
Christian Heimes39258d32021-04-17 11:36:35 +020017830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17831$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017832
17833# Check whether --with-experimental-isolated-subinterpreters was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017834if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017835 withval=$with_experimental_isolated_subinterpreters;
17836if test "$withval" != no
17837then
Christian Heimes39258d32021-04-17 11:36:35 +020017838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17839$as_echo "yes" >&6; };
17840 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017841
17842else
Christian Heimes39258d32021-04-17 11:36:35 +020017843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17844$as_echo "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017845fi
Christian Heimes39258d32021-04-17 11:36:35 +020017846else
17847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17848$as_echo "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017849fi
17850
17851
Victor Stinner801bb0b2021-02-17 11:14:42 +010017852# --with-static-libpython
17853STATIC_LIBPYTHON=1
Christian Heimes39258d32021-04-17 11:36:35 +020017854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
17855$as_echo_n "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017856
17857# Check whether --with-static-libpython was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017858if test "${with_static_libpython+set}" = set; then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010017859 withval=$with_static_libpython;
17860if test "$withval" = no
17861then
Christian Heimes39258d32021-04-17 11:36:35 +020017862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17863$as_echo "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017864 STATIC_LIBPYTHON=0
17865else
Christian Heimes39258d32021-04-17 11:36:35 +020017866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17867$as_echo "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017868fi
Christian Heimes39258d32021-04-17 11:36:35 +020017869else
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17871$as_echo "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017872fi
17873
17874LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050017875if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010017876 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
17877 if test "$STATIC_LIBPYTHON" = 1; then
17878 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17879 fi
17880else
17881 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17882fi
17883
17884
17885
pxinwr277ce302020-12-30 20:50:39 +080017886# Check whether to disable test modules. Once set, setup.py will not build
17887# test extension modules and "make install" will not install test suites.
Christian Heimes39258d32021-04-17 11:36:35 +020017888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17889$as_echo_n "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017890# Check whether --enable-test-modules was given.
Christian Heimes39258d32021-04-17 11:36:35 +020017891if test "${enable_test_modules+set}" = set; then :
pxinwr277ce302020-12-30 20:50:39 +080017892 enableval=$enable_test_modules;
17893fi
17894
17895if test "$enable_test_modules" = no; then
17896 TEST_MODULES=no
Christian Heimes39258d32021-04-17 11:36:35 +020017897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17898$as_echo "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017899else
17900 TEST_MODULES=yes
Christian Heimes39258d32021-04-17 11:36:35 +020017901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17902$as_echo "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017903fi
17904
17905
Christian Heimes892d66e2018-01-29 14:10:18 +010017906
Guido van Rossum627b2d71993-12-24 10:39:16 +000017907# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017908ac_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 +000017909
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017910ac_config_files="$ac_config_files Modules/ld_so_aix"
17911
Martin v. Löwis11437992002-04-12 09:54:03 +000017912cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017913# This file is a shell script that caches the results of configure
17914# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017915# scripts and configure runs, see configure's option --config-cache.
17916# It is not useful on other systems. If it contains results you don't
17917# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017918#
Martin v. Löwis11437992002-04-12 09:54:03 +000017919# config.status only pays attention to the cache file if you give it
17920# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017921#
Skip Montanaro6dead952003-09-25 14:50:04 +000017922# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017923# loading this file, other *unset* `ac_cv_foo' will be assigned the
17924# following values.
17925
17926_ACEOF
17927
Guido van Rossumf78abae1997-01-21 22:02:36 +000017928# The following way of writing the cache mishandles newlines in values,
17929# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017931# Ultrix sh set writes to stderr and can't be redirected directly,
17932# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933(
17934 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17935 eval ac_val=\$$ac_var
17936 case $ac_val in #(
17937 *${as_nl}*)
17938 case $ac_var in #(
Christian Heimes39258d32021-04-17 11:36:35 +020017939 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17940$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941 esac
17942 case $ac_var in #(
17943 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017944 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17945 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946 esac ;;
17947 esac
17948 done
17949
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17952 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 # `set' does not quote correctly, so add quotes: double-quote
17954 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017956 "s/'/'\\\\''/g;
17957 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 *)
17960 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 esac |
17964 sort
17965) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017968 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 :clear
Christian Heimes39258d32021-04-17 11:36:35 +020017970 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17973 :end' >>confcache
17974if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17975 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017976 if test "x$cache_file" != "x/dev/null"; then
Christian Heimes39258d32021-04-17 11:36:35 +020017977 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17978$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017979 if test ! -f "$cache_file" || test -h "$cache_file"; then
17980 cat confcache >"$cache_file"
17981 else
17982 case $cache_file in #(
17983 */* | ?:*)
17984 mv -f confcache "$cache_file"$$ &&
17985 mv -f "$cache_file"$$ "$cache_file" ;; #(
17986 *)
17987 mv -f confcache "$cache_file" ;;
17988 esac
17989 fi
17990 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017991 else
Christian Heimes39258d32021-04-17 11:36:35 +020017992 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17993$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017994 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017995fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017996rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017997
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017998test "x$prefix" = xNONE && prefix=$ac_default_prefix
17999# Let make expand exec_prefix.
18000test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018001
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018002DEFS=-DHAVE_CONFIG_H
18003
Skip Montanaro6dead952003-09-25 14:50:04 +000018004ac_libobjs=
18005ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018006U=
Skip Montanaro6dead952003-09-25 14:50:04 +000018007for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18008 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Christian Heimes39258d32021-04-17 11:36:35 +020018010 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18012 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000018013 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18014 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000018015done
18016LIBOBJS=$ac_libobjs
18017
18018LTLIBOBJS=$ac_ltlibobjs
18019
18020
Martin v. Löwis11437992002-04-12 09:54:03 +000018021
Matthias Kloseb9621712010-04-24 17:59:49 +000018022
Victor Stinnere0be4232011-10-25 13:06:09 +020018023: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000018024ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000018025ac_clean_files_save=$ac_clean_files
18026ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Christian Heimes39258d32021-04-17 11:36:35 +020018027{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18028$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000018029as_write_fail=0
18030cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018031#! $SHELL
18032# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018033# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018034# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018035# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018036
Martin v. Löwis11437992002-04-12 09:54:03 +000018037debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018038ac_cs_recheck=false
18039ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000018040
Matthias Kloseb9621712010-04-24 17:59:49 +000018041SHELL=\${CONFIG_SHELL-$SHELL}
18042export SHELL
18043_ASEOF
18044cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18045## -------------------- ##
18046## M4sh Initialization. ##
18047## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049# Be more Bourne compatible
18050DUALCASE=1; export DUALCASE # for MKS sh
Christian Heimes39258d32021-04-17 11:36:35 +020018051if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000018052 emulate sh
18053 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000018054 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000018055 # is contrary to our usage. Disable this feature.
18056 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057 setopt NO_GLOB_SUBST
Christian Heimes39258d32021-04-17 11:36:35 +020018058else
Matthias Kloseb9621712010-04-24 17:59:49 +000018059 case `(set -o) 2>/dev/null` in #(
18060 *posix*) :
18061 set -o posix ;; #(
18062 *) :
18063 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064esac
Michael W. Hudson54241132001-12-07 15:38:26 +000018065fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000018066
18067
Matthias Kloseb9621712010-04-24 17:59:49 +000018068as_nl='
18069'
18070export as_nl
Christian Heimes39258d32021-04-17 11:36:35 +020018071# Printing a long string crashes Solaris 7 /usr/bin/printf.
18072as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18073as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18074as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18075# Prefer a ksh shell builtin over an external printf program on Solaris,
18076# but without wasting forks for bash or zsh.
18077if test -z "$BASH_VERSION$ZSH_VERSION" \
18078 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18079 as_echo='print -r --'
18080 as_echo_n='print -rn --'
18081elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18082 as_echo='printf %s\n'
18083 as_echo_n='printf %s'
18084else
18085 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18086 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18087 as_echo_n='/usr/ucb/echo -n'
18088 else
18089 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18090 as_echo_n_body='eval
18091 arg=$1;
18092 case $arg in #(
18093 *"$as_nl"*)
18094 expr "X$arg" : "X\\(.*\\)$as_nl";
18095 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18096 esac;
18097 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18098 '
18099 export as_echo_n_body
18100 as_echo_n='sh -c $as_echo_n_body as_echo'
18101 fi
18102 export as_echo_body
18103 as_echo='sh -c $as_echo_body as_echo'
18104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018105
18106# The user is always right.
Christian Heimes39258d32021-04-17 11:36:35 +020018107if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018108 PATH_SEPARATOR=:
18109 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18110 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18111 PATH_SEPARATOR=';'
18112 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115
Christian Heimes39258d32021-04-17 11:36:35 +020018116# IFS
18117# We need space, tab and new line, in precisely that order. Quoting is
18118# there to prevent editors from complaining about space-tab.
18119# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18120# splitting by setting IFS to empty value.)
18121IFS=" "" $as_nl"
18122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018124as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018125case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 *[\\/]* ) as_myself=$0 ;;
18127 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018128for as_dir in $PATH
18129do
18130 IFS=$as_save_IFS
Christian Heimes39258d32021-04-17 11:36:35 +020018131 test -z "$as_dir" && as_dir=.
18132 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000018133 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136 ;;
18137esac
18138# We did not find ourselves, most probably we were run as `sh COMMAND'
18139# in which case we are not to be found in the path.
18140if test "x$as_myself" = x; then
18141 as_myself=$0
18142fi
18143if test ! -f "$as_myself"; then
Christian Heimes39258d32021-04-17 11:36:35 +020018144 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018145 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146fi
18147
Christian Heimes39258d32021-04-17 11:36:35 +020018148# Unset variables that we do not need and which cause bugs (e.g. in
18149# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18150# suppresses any "Segmentation fault" message there. '((' could
18151# trigger a bug in pdksh 5.2.14.
18152for as_var in BASH_ENV ENV MAIL MAILPATH
18153do eval test x\${$as_var+set} = xset \
18154 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18155done
18156PS1='$ '
18157PS2='> '
18158PS4='+ '
18159
18160# NLS nuisances.
18161LC_ALL=C
18162export LC_ALL
18163LANGUAGE=C
18164export LANGUAGE
18165
18166# CDPATH.
18167(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +000018168
18169
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018170# as_fn_error STATUS ERROR [LINENO LOG_FD]
18171# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018172# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18173# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018174# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018175as_fn_error ()
18176{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018177 as_status=$1; test $as_status -eq 0 && as_status=1
18178 if test "$4"; then
18179 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Christian Heimes39258d32021-04-17 11:36:35 +020018180 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018181 fi
Christian Heimes39258d32021-04-17 11:36:35 +020018182 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018183 as_fn_exit $as_status
18184} # as_fn_error
18185
18186
18187# as_fn_set_status STATUS
18188# -----------------------
18189# Set $? to STATUS, without forking.
18190as_fn_set_status ()
18191{
18192 return $1
18193} # as_fn_set_status
18194
18195# as_fn_exit STATUS
18196# -----------------
18197# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18198as_fn_exit ()
18199{
18200 set +e
18201 as_fn_set_status $1
18202 exit $1
18203} # as_fn_exit
18204
18205# as_fn_unset VAR
18206# ---------------
18207# Portably unset VAR.
18208as_fn_unset ()
18209{
18210 { eval $1=; unset $1;}
18211}
18212as_unset=as_fn_unset
18213# as_fn_append VAR VALUE
18214# ----------------------
18215# Append the text in VALUE to the end of the definition contained in VAR. Take
18216# advantage of any shell optimizations that allow amortized linear growth over
18217# repeated appends, instead of the typical quadratic growth present in naive
18218# implementations.
Christian Heimes39258d32021-04-17 11:36:35 +020018219if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018220 eval 'as_fn_append ()
18221 {
18222 eval $1+=\$2
18223 }'
Christian Heimes39258d32021-04-17 11:36:35 +020018224else
Matthias Kloseb9621712010-04-24 17:59:49 +000018225 as_fn_append ()
18226 {
18227 eval $1=\$$1\$2
18228 }
18229fi # as_fn_append
18230
18231# as_fn_arith ARG...
18232# ------------------
18233# Perform arithmetic evaluation on the ARGs, and store the result in the
18234# global $as_val. Take advantage of shells that can avoid forks. The arguments
18235# must be portable across $(()) and expr.
Christian Heimes39258d32021-04-17 11:36:35 +020018236if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018237 eval 'as_fn_arith ()
18238 {
18239 as_val=$(( $* ))
18240 }'
Christian Heimes39258d32021-04-17 11:36:35 +020018241else
Matthias Kloseb9621712010-04-24 17:59:49 +000018242 as_fn_arith ()
18243 {
18244 as_val=`expr "$@" || test $? -eq 1`
18245 }
18246fi # as_fn_arith
18247
18248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249if expr a : '\(a\)' >/dev/null 2>&1 &&
18250 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18251 as_expr=expr
18252else
18253 as_expr=false
18254fi
18255
18256if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18257 as_basename=basename
18258else
18259 as_basename=false
18260fi
18261
Matthias Kloseb9621712010-04-24 17:59:49 +000018262if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18263 as_dirname=dirname
18264else
18265 as_dirname=false
18266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018268as_me=`$as_basename -- "$0" ||
18269$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18270 X"$0" : 'X\(//\)$' \| \
18271 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020018272$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273 sed '/^.*\/\([^/][^/]*\)\/*$/{
18274 s//\1/
18275 q
18276 }
18277 /^X\/\(\/\/\)$/{
18278 s//\1/
18279 q
18280 }
18281 /^X\/\(\/\).*/{
18282 s//\1/
18283 q
18284 }
18285 s/.*/./; q'`
18286
Matthias Kloseb9621712010-04-24 17:59:49 +000018287# Avoid depending upon Character Ranges.
18288as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18289as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18290as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18291as_cr_digits='0123456789'
18292as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293
18294ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018295case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018297 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018299 xy) ECHO_C='\c';;
18300 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18301 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018302 esac;;
18303*)
18304 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018306
Martin v. Löwis11437992002-04-12 09:54:03 +000018307rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018308if test -d conf$$.dir; then
18309 rm -f conf$$.dir/conf$$.file
18310else
18311 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018312 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018314if (echo >conf$$.file) 2>/dev/null; then
18315 if ln -s conf$$.file conf$$ 2>/dev/null; then
18316 as_ln_s='ln -s'
18317 # ... but there are two gotchas:
18318 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18319 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018320 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018321 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018322 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018323 elif ln conf$$.file conf$$ 2>/dev/null; then
18324 as_ln_s=ln
18325 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018326 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018327 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018328else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018329 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018331rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18332rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018333
Matthias Kloseb9621712010-04-24 17:59:49 +000018334
18335# as_fn_mkdir_p
18336# -------------
18337# Create "$as_dir" as a directory, including parents if necessary.
18338as_fn_mkdir_p ()
18339{
18340
18341 case $as_dir in #(
18342 -*) as_dir=./$as_dir;;
18343 esac
18344 test -d "$as_dir" || eval $as_mkdir_p || {
18345 as_dirs=
18346 while :; do
18347 case $as_dir in #(
Christian Heimes39258d32021-04-17 11:36:35 +020018348 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000018349 *) as_qdir=$as_dir;;
18350 esac
18351 as_dirs="'$as_qdir' $as_dirs"
18352 as_dir=`$as_dirname -- "$as_dir" ||
18353$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18354 X"$as_dir" : 'X\(//\)[^/]' \| \
18355 X"$as_dir" : 'X\(//\)$' \| \
18356 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020018357$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018358 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18359 s//\1/
18360 q
18361 }
18362 /^X\(\/\/\)[^/].*/{
18363 s//\1/
18364 q
18365 }
18366 /^X\(\/\/\)$/{
18367 s//\1/
18368 q
18369 }
18370 /^X\(\/\).*/{
18371 s//\1/
18372 q
18373 }
18374 s/.*/./; q'`
18375 test -d "$as_dir" && break
18376 done
18377 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018378 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018379
18380
18381} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018382if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018383 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018384else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018385 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018386 as_mkdir_p=false
18387fi
18388
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018389
18390# as_fn_executable_p FILE
18391# -----------------------
18392# Test if FILE is an executable regular file.
18393as_fn_executable_p ()
18394{
18395 test -f "$1" && test -x "$1"
18396} # as_fn_executable_p
18397as_test_x='test -x'
18398as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018399
18400# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018401as_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 +000018402
18403# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018404as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018405
18406
Martin v. Löwis11437992002-04-12 09:54:03 +000018407exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018408## ----------------------------------- ##
18409## Main body of $CONFIG_STATUS script. ##
18410## ----------------------------------- ##
18411_ASEOF
18412test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018413
Matthias Kloseb9621712010-04-24 17:59:49 +000018414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18415# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018416# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018417# values after options handling.
18418ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018419This file was extended by python $as_me 3.10, which was
Christian Heimes39258d32021-04-17 11:36:35 +020018420generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018421
18422 CONFIG_FILES = $CONFIG_FILES
18423 CONFIG_HEADERS = $CONFIG_HEADERS
18424 CONFIG_LINKS = $CONFIG_LINKS
18425 CONFIG_COMMANDS = $CONFIG_COMMANDS
18426 $ $0 $@
18427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428on `(hostname || uname -n) 2>/dev/null | sed 1q`
18429"
18430
Martin v. Löwis11437992002-04-12 09:54:03 +000018431_ACEOF
18432
Matthias Kloseb9621712010-04-24 17:59:49 +000018433case $ac_config_files in *"
18434"*) set x $ac_config_files; shift; ac_config_files=$*;;
18435esac
18436
18437case $ac_config_headers in *"
18438"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18439esac
18440
18441
18442cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018443# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018444config_files="$ac_config_files"
18445config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018448
Matthias Kloseb9621712010-04-24 17:59:49 +000018449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018450ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018451\`$as_me' instantiates files and other configuration actions
18452from templates according to the current configuration. Unless the files
18453and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018454
Matthias Kloseb9621712010-04-24 17:59:49 +000018455Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018456
18457 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018459 --config print configuration, then exit
18460 -q, --quiet, --silent
18461 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018462 -d, --debug don't remove temporary files
18463 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018464 --file=FILE[:TEMPLATE]
18465 instantiate the configuration file FILE
18466 --header=FILE[:TEMPLATE]
18467 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018468
18469Configuration files:
18470$config_files
18471
18472Configuration headers:
18473$config_headers
18474
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018475Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018478cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Christian Heimes39258d32021-04-17 11:36:35 +020018479ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018480ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018481python config.status 3.10
Christian Heimes39258d32021-04-17 11:36:35 +020018482configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018483 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018484
Christian Heimes39258d32021-04-17 11:36:35 +020018485Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018486This config.status script is free software; the Free Software Foundation
18487gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488
18489ac_pwd='$ac_pwd'
18490srcdir='$srcdir'
18491INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018492MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018493test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018494_ACEOF
18495
Matthias Kloseb9621712010-04-24 17:59:49 +000018496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18497# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018498ac_need_defaults=:
18499while test $# != 0
18500do
18501 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018502 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18504 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018505 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018507 --*=)
18508 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18509 ac_optarg=
18510 ac_shift=:
18511 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018513 ac_option=$1
18514 ac_optarg=$2
18515 ac_shift=shift
18516 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018517 esac
18518
Skip Montanaro6dead952003-09-25 14:50:04 +000018519 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018520 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018521 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18522 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Christian Heimes39258d32021-04-17 11:36:35 +020018524 $as_echo "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018525 --config | --confi | --conf | --con | --co | --c )
Christian Heimes39258d32021-04-17 11:36:35 +020018526 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 debug=: ;;
18529 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018530 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018531 case $ac_optarg in
Christian Heimes39258d32021-04-17 11:36:35 +020018532 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018533 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018534 esac
18535 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018536 ac_need_defaults=false;;
18537 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018538 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018539 case $ac_optarg in
Christian Heimes39258d32021-04-17 11:36:35 +020018540 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018541 esac
18542 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018544 --he | --h)
18545 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018546 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018547Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548 --help | --hel | -h )
Christian Heimes39258d32021-04-17 11:36:35 +020018549 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018550 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18551 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18552 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018553
18554 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018555 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018556Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018557
Matthias Kloseb9621712010-04-24 17:59:49 +000018558 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018559 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018560
18561 esac
18562 shift
18563done
18564
Skip Montanaro6dead952003-09-25 14:50:04 +000018565ac_configure_extra_args=
18566
18567if $ac_cs_silent; then
18568 exec 6>/dev/null
18569 ac_configure_extra_args="$ac_configure_extra_args --silent"
18570fi
18571
18572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018574if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018575 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018576 shift
Christian Heimes39258d32021-04-17 11:36:35 +020018577 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000018578 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018579 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018580 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018581fi
18582
Martin v. Löwis11437992002-04-12 09:54:03 +000018583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018585exec 5>>config.log
18586{
18587 echo
18588 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18589## Running $as_me. ##
18590_ASBOX
Christian Heimes39258d32021-04-17 11:36:35 +020018591 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018596_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018597
Matthias Kloseb9621712010-04-24 17:59:49 +000018598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599
18600# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018601for ac_config_target in $ac_config_targets
18602do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603 case $ac_config_target in
18604 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18605 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18606 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018607 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18608 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018610 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018611 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018612 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018613 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018614
Victor Stinnere0be4232011-10-25 13:06:09 +020018615 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 esac
18617done
18618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619
Martin v. Löwis11437992002-04-12 09:54:03 +000018620# If the user did not use the arguments to specify the items to instantiate,
18621# then the envvar interface is used. Set only those that are not.
18622# We use the long form for the default assignment because of an extremely
18623# bizarre bug on SunOS 4.1.3.
18624if $ac_need_defaults; then
Christian Heimes39258d32021-04-17 11:36:35 +020018625 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18626 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000018627fi
18628
Skip Montanaro6dead952003-09-25 14:50:04 +000018629# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018630# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018631# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018632# Hook for its removal unless debugging.
18633# Note that there is a small window in which the directory will not be cleaned:
18634# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018635$debug ||
18636{
Victor Stinnere0be4232011-10-25 13:06:09 +020018637 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018639 : "${ac_tmp:=$tmp}"
18640 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018642 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018643}
Martin v. Löwis11437992002-04-12 09:54:03 +000018644# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018645
Martin v. Löwis11437992002-04-12 09:54:03 +000018646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018647 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018648 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018649} ||
18650{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018651 tmp=./conf$$-$RANDOM
18652 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018653} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018654ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018655
Matthias Kloseb9621712010-04-24 17:59:49 +000018656# Set up the scripts for CONFIG_FILES section.
18657# No need to generate them if there are no CONFIG_FILES.
18658# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018660
Matthias Kloseb9621712010-04-24 17:59:49 +000018661
18662ac_cr=`echo X | tr X '\015'`
18663# On cygwin, bash can eat \r inside `` if the user requested igncr.
18664# But we know of no other shell where ac_cr would be empty at this
18665# point, so we can use a bashism as a fallback.
18666if test "x$ac_cr" = x; then
18667 eval ac_cr=\$\'\\r\'
18668fi
18669ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18670if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018671 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018672else
18673 ac_cs_awk_cr=$ac_cr
18674fi
18675
Victor Stinnere0be4232011-10-25 13:06:09 +020018676echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018677_ACEOF
18678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018679
Matthias Kloseb9621712010-04-24 17:59:49 +000018680{
18681 echo "cat >conf$$subs.awk <<_ACEOF" &&
18682 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18683 echo "_ACEOF"
18684} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018685 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18686ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018687ac_delim='%!_!# '
18688for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018689 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018690 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018691
Matthias Kloseb9621712010-04-24 17:59:49 +000018692 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18693 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018694 break
18695 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018696 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697 else
18698 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018699 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700done
Matthias Kloseb9621712010-04-24 17:59:49 +000018701rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018702
Matthias Kloseb9621712010-04-24 17:59:49 +000018703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018704cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018706sed -n '
18707h
18708s/^/S["/; s/!.*/"]=/
18709p
18710g
18711s/^[^!]*!//
18712:repl
18713t repl
18714s/'"$ac_delim"'$//
18715t delim
18716:nl
18717h
18718s/\(.\{148\}\)..*/\1/
18719t more1
18720s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18721p
18722n
18723b repl
18724:more1
18725s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18726p
18727g
18728s/.\{148\}//
18729t nl
18730:delim
18731h
18732s/\(.\{148\}\)..*/\1/
18733t more2
18734s/["\\]/\\&/g; s/^/"/; s/$/"/
18735p
18736b
18737:more2
18738s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18739p
18740g
18741s/.\{148\}//
18742t delim
18743' <conf$$subs.awk | sed '
18744/^[^""]/{
18745 N
18746 s/\n//
18747}
18748' >>$CONFIG_STATUS || ac_write_fail=1
18749rm -f conf$$subs.awk
18750cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18751_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018752cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018753 for (key in S) S_is_set[key] = 1
18754 FS = ""
18755
18756}
18757{
18758 line = $ 0
18759 nfields = split(line, field, "@")
18760 substed = 0
18761 len = length(field[1])
18762 for (i = 2; i < nfields; i++) {
18763 key = field[i]
18764 keylen = length(key)
18765 if (S_is_set[key]) {
18766 value = S[key]
18767 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18768 len += length(value) + length(field[++i])
18769 substed = 1
18770 } else
18771 len += 1 + keylen
18772 }
18773
18774 print line
18775}
18776
18777_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18780if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18781 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18782else
18783 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018784fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018785 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018786_ACEOF
18787
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018788# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18789# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790# trailing colons and then remove the whole line if VPATH becomes empty
18791# (actually we leave an empty line to preserve line numbers).
18792if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018793 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18794h
18795s///
18796s/^/:/
18797s/[ ]*$/:/
18798s/:\$(srcdir):/:/g
18799s/:\${srcdir}:/:/g
18800s/:@srcdir@:/:/g
18801s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018803x
18804s/\(=[ ]*\).*/\1/
18805G
18806s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018807s/^[^=]*=[ ]*$//
18808}'
18809fi
18810
Matthias Kloseb9621712010-04-24 17:59:49 +000018811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018812fi # test -n "$CONFIG_FILES"
18813
Matthias Kloseb9621712010-04-24 17:59:49 +000018814# Set up the scripts for CONFIG_HEADERS section.
18815# No need to generate them if there are no CONFIG_HEADERS.
18816# This happens for instance with `./config.status Makefile'.
18817if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018818cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018819BEGIN {
18820_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018821
Matthias Kloseb9621712010-04-24 17:59:49 +000018822# Transform confdefs.h into an awk script `defines.awk', embedded as
18823# here-document in config.status, that substitutes the proper values into
18824# config.h.in to produce config.h.
18825
18826# Create a delimiter string that does not exist in confdefs.h, to ease
18827# handling of long lines.
18828ac_delim='%!_!# '
18829for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018830 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18831 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018832 break
18833 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018834 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018835 else
18836 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18837 fi
18838done
18839
18840# For the awk script, D is an array of macro values keyed by name,
18841# likewise P contains macro parameters if any. Preserve backslash
18842# newline sequences.
18843
18844ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18845sed -n '
18846s/.\{148\}/&'"$ac_delim"'/g
18847t rset
18848:rset
18849s/^[ ]*#[ ]*define[ ][ ]*/ /
18850t def
18851d
18852:def
18853s/\\$//
18854t bsnl
18855s/["\\]/\\&/g
18856s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18857D["\1"]=" \3"/p
18858s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18859d
18860:bsnl
18861s/["\\]/\\&/g
18862s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18863D["\1"]=" \3\\\\\\n"\\/p
18864t cont
18865s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18866t cont
18867d
18868:cont
18869n
18870s/.\{148\}/&'"$ac_delim"'/g
18871t clear
18872:clear
18873s/\\$//
18874t bsnlc
18875s/["\\]/\\&/g; s/^/"/; s/$/"/p
18876d
18877:bsnlc
18878s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18879b cont
18880' <confdefs.h | sed '
18881s/'"$ac_delim"'/"\\\
18882"/g' >>$CONFIG_STATUS || ac_write_fail=1
18883
18884cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18885 for (key in D) D_is_set[key] = 1
18886 FS = ""
18887}
18888/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18889 line = \$ 0
18890 split(line, arg, " ")
18891 if (arg[1] == "#") {
18892 defundef = arg[2]
18893 mac1 = arg[3]
18894 } else {
18895 defundef = substr(arg[1], 2)
18896 mac1 = arg[2]
18897 }
18898 split(mac1, mac2, "(") #)
18899 macro = mac2[1]
18900 prefix = substr(line, 1, index(line, defundef) - 1)
18901 if (D_is_set[macro]) {
18902 # Preserve the white space surrounding the "#".
18903 print prefix "define", macro P[macro] D[macro]
18904 next
18905 } else {
18906 # Replace #undef with comments. This is necessary, for example,
18907 # in the case of _POSIX_SOURCE, which is predefined and required
18908 # on some systems where configure will not decide to define it.
18909 if (defundef == "undef") {
18910 print "/*", prefix defundef, macro, "*/"
18911 next
18912 }
18913 }
18914}
18915{ print }
18916_ACAWK
18917_ACEOF
18918cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018919 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018920fi # test -n "$CONFIG_HEADERS"
18921
18922
18923eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18924shift
18925for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018926do
18927 case $ac_tag in
18928 :[FHLC]) ac_mode=$ac_tag; continue;;
18929 esac
18930 case $ac_mode$ac_tag in
18931 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018932 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018933 :[FH]-) ac_tag=-:-;;
18934 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18935 esac
18936 ac_save_IFS=$IFS
18937 IFS=:
18938 set x $ac_tag
18939 IFS=$ac_save_IFS
18940 shift
18941 ac_file=$1
18942 shift
18943
18944 case $ac_mode in
18945 :L) ac_source=$1;;
18946 :[FH])
18947 ac_file_inputs=
18948 for ac_f
18949 do
18950 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018951 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952 *) # Look for the file first in the build tree, then in the source tree
18953 # (if the path is not absolute). The absolute path cannot be DOS-style,
18954 # because $ac_f cannot contain `:'.
18955 test -f "$ac_f" ||
18956 case $ac_f in
18957 [\\/$]*) false;;
18958 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18959 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018960 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018961 esac
Christian Heimes39258d32021-04-17 11:36:35 +020018962 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018963 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018964 done
18965
18966 # Let's still pretend it is `configure' which instantiates (i.e., don't
18967 # use $as_me), people would be surprised to read:
18968 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018969 configure_input='Generated from '`
Christian Heimes39258d32021-04-17 11:36:35 +020018970 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000018971 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018972 if test x"$ac_file" != x-; then
18973 configure_input="$ac_file. $configure_input"
Christian Heimes39258d32021-04-17 11:36:35 +020018974 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18975$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018976 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018977 # Neutralize special characters interpreted by sed in replacement strings.
18978 case $configure_input in #(
18979 *\&* | *\|* | *\\* )
Christian Heimes39258d32021-04-17 11:36:35 +020018980 ac_sed_conf_input=`$as_echo "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018981 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18982 *) ac_sed_conf_input=$configure_input;;
18983 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018984
18985 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018986 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18987 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018988 esac
18989 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018990 esac
18991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018992 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018993$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018994 X"$ac_file" : 'X\(//\)[^/]' \| \
18995 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018996 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Christian Heimes39258d32021-04-17 11:36:35 +020018997$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018998 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18999 s//\1/
19000 q
19001 }
19002 /^X\(\/\/\)[^/].*/{
19003 s//\1/
19004 q
19005 }
19006 /^X\(\/\/\)$/{
19007 s//\1/
19008 q
19009 }
19010 /^X\(\/\).*/{
19011 s//\1/
19012 q
19013 }
19014 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000019015 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000019016 ac_builddir=.
19017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019018case "$ac_dir" in
19019.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19020*)
Christian Heimes39258d32021-04-17 11:36:35 +020019021 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019022 # A ".." for each directory in $ac_dir_suffix.
Christian Heimes39258d32021-04-17 11:36:35 +020019023 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019024 case $ac_top_builddir_sub in
19025 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19026 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19027 esac ;;
19028esac
19029ac_abs_top_builddir=$ac_pwd
19030ac_abs_builddir=$ac_pwd$ac_dir_suffix
19031# for backward compatibility:
19032ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000019033
19034case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019035 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000019036 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019037 ac_top_srcdir=$ac_top_builddir_sub
19038 ac_abs_top_srcdir=$ac_pwd ;;
19039 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000019040 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019041 ac_top_srcdir=$srcdir
19042 ac_abs_top_srcdir=$srcdir ;;
19043 *) # Relative name.
19044 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19045 ac_top_srcdir=$ac_top_build_prefix$srcdir
19046 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019047esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019048ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000019049
Martin v. Löwis11437992002-04-12 09:54:03 +000019050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019051 case $ac_mode in
19052 :F)
19053 #
19054 # CONFIG_FILE
19055 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019056
19057 case $INSTALL in
19058 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010019061 ac_MKDIR_P=$MKDIR_P
19062 case $MKDIR_P in
19063 [\\/$]* | ?:[\\/]* ) ;;
19064 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19065 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000019066_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019067
Matthias Kloseb9621712010-04-24 17:59:49 +000019068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019069# If the template does not know about datarootdir, expand it.
19070# FIXME: This hack should be removed a few years after 2.60.
19071ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000019072ac_sed_dataroot='
19073/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074 p
19075 q
19076}
19077/@datadir@/p
19078/@docdir@/p
19079/@infodir@/p
19080/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000019081/@mandir@/p'
19082case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019083*datarootdir*) ac_datarootdir_seen=yes;;
19084*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Christian Heimes39258d32021-04-17 11:36:35 +020019085 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19086$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019088cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019089 ac_datarootdir_hack='
19090 s&@datadir@&$datadir&g
19091 s&@docdir@&$docdir&g
19092 s&@infodir@&$infodir&g
19093 s&@localedir@&$localedir&g
19094 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000019095 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019096esac
19097_ACEOF
19098
19099# Neutralize VPATH when `$srcdir' = `.'.
19100# Shell code in configure.ac might set extrasub.
19101# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000019102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19103ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000019104$extrasub
19105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000019107:t
19108/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000019109s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019110s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000019111s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019112s&@srcdir@&$ac_srcdir&;t t
19113s&@abs_srcdir@&$ac_abs_srcdir&;t t
19114s&@top_srcdir@&$ac_top_srcdir&;t t
19115s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19116s&@builddir@&$ac_builddir&;t t
19117s&@abs_builddir@&$ac_abs_builddir&;t t
19118s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19119s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019120s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019121$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019122"
Victor Stinnere0be4232011-10-25 13:06:09 +020019123eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19124 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019126test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019127 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19128 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19129 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Heimes39258d32021-04-17 11:36:35 +020019130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019131which seems to be undefined. Please make sure it is defined" >&5
Christian Heimes39258d32021-04-17 11:36:35 +020019132$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019133which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019134
Victor Stinnere0be4232011-10-25 13:06:09 +020019135 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019136 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019137 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19138 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019139 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019141 ;;
19142 :H)
19143 #
19144 # CONFIG_HEADER
19145 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019146 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019147 {
Christian Heimes39258d32021-04-17 11:36:35 +020019148 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019149 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19150 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019151 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019152 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Christian Heimes39258d32021-04-17 11:36:35 +020019153 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19154$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019155 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019156 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019157 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019158 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019159 fi
19160 else
Christian Heimes39258d32021-04-17 11:36:35 +020019161 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019162 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019163 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019164 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019165 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019167
19168 esac
19169
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019170
19171 case $ac_file$ac_mode in
19172 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19173
19174 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019175done # for ac_tag
19176
Guido van Rossum627b2d71993-12-24 10:39:16 +000019177
Matthias Kloseb9621712010-04-24 17:59:49 +000019178as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019179_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019180ac_clean_files=$ac_clean_files_save
19181
Matthias Kloseb9621712010-04-24 17:59:49 +000019182test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019183 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019184
Martin v. Löwis11437992002-04-12 09:54:03 +000019185
19186# configure is writing to config.log, and then calls config.status.
19187# config.status does its own redirection, appending to config.log.
19188# Unfortunately, on DOS this fails, as config.log is still kept open
19189# by configure, so config.status won't be able to write to it; its
19190# output is simply discarded. So we exec the FD to /dev/null,
19191# effectively closing config.log, so it can be properly (re)opened and
19192# appended to by config.status. When coming back to configure, we
19193# need to make the FD available again.
19194if test "$no_create" != yes; then
19195 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019196 ac_config_status_args=
19197 test "$silent" = yes &&
19198 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019199 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019200 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019201 exec 5>>config.log
19202 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19203 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019204 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019205fi
19206if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Christian Heimes39258d32021-04-17 11:36:35 +020019207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19208$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019209fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019210
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019211
Christian Heimes75ed8902013-11-20 01:11:18 +010019212echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019213if test ! -f Modules/Setup.local
19214then
19215 echo "# Edit this file for local setup changes" >Modules/Setup.local
19216fi
19217
Christian Heimes75ed8902013-11-20 01:11:18 +010019218echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019219$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019220 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019221 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019222mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019223
19224if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19225 echo "" >&6
19226 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019227 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 +000019228 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019229 echo "" >&6
19230 echo "" >&6
19231fi