blob: 1baa145e3ed4d66f28ebf361919f22d591290ace [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.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003# Generated by GNU Autoconf 2.69 for python 3.10.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010039# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010075if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010084# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" "" $as_nl"
90
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010099 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100170else
Matthias Kloseb9621712010-04-24 17:59:49 +0000171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000191
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100192else
Matthias Kloseb9621712010-04-24 17:59:49 +0000193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100202 if (eval "$as_required") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000203 as_have_required=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100204else
Matthias Kloseb9621712010-04-24 17:59:49 +0000205 as_have_required=no
206fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000208
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100209else
Matthias Kloseb9621712010-04-24 17:59:49 +0000210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100215 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100221 as_shell=$as_dir/$as_base
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000224 CONFIG_SHELL=$as_shell as_have_required=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
Pablo Galindoba421752021-05-03 20:33:17 +0100235 CONFIG_SHELL=$SHELL as_have_required=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100236fi; }
237IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +0000238
239
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
Matthias Kloseb9621712010-04-24 17:59:49 +0000268 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +0000329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100337$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +0000338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100381else
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100398else
Matthias Kloseb9621712010-04-24 17:59:49 +0000399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100583PACKAGE_VERSION='3.10'
584PACKAGE_STRING='python 3.10'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100591#include <stdio.h>
592#ifdef HAVE_SYS_TYPES_H
593# include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000594#endif
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100595#ifdef HAVE_SYS_STAT_H
596# include <sys/stat.h>
597#endif
598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100600# include <stddef.h>
601#else
602# ifdef HAVE_STDLIB_H
603# include <stdlib.h>
604# endif
Martin v. Löwis11437992002-04-12 09:54:03 +0000605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608# include <memory.h>
609# endif
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <string.h>
611#endif
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100612#ifdef HAVE_STRINGS_H
613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
pxinwr277ce302020-12-30 20:50:39 +0800626TEST_MODULES
Victor Stinner801bb0b2021-02-17 11:14:42 +0100627LIBRARY_DEPS
628STATIC_LIBPYTHON
Christian Heimes32eba612021-03-19 10:29:25 +0100629OPENSSL_RPATH
Christian Heimesff5be6e2018-01-20 13:19:21 +0100630OPENSSL_LDFLAGS
631OPENSSL_LIBS
632OPENSSL_INCLUDES
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100633PKG_CONFIG
Ned Deily322f5ba2013-11-21 23:01:59 -0800634ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000635SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000636THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100637WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100638LIBPL
639PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100640PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200641BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200642LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700643EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200644ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000645SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000646LIBC
647LIBM
648HAVE_GETHOSTBYNAME
649HAVE_GETHOSTBYNAME_R
650HAVE_GETHOSTBYNAME_R_3_ARG
651HAVE_GETHOSTBYNAME_R_5_ARG
652HAVE_GETHOSTBYNAME_R_6_ARG
653LIBOBJS
654TRUE
655MACHDEP_OBJS
656DYNLOADFILE
657DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700658DTRACE_OBJS
659DTRACE_HEADERS
660DFLAGS
661DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700662TCLTK_LIBS
663TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBFFI_INCLUDEDIR
Paul Ganssle62972d92020-05-16 04:20:06 -0400665TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000666SHLIBS
667CFLAGSFORSHARED
668LINKFORSHARED
669CCSHARED
670BLDSHARED
671LDCXXSHARED
672LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700673SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000674LIBTOOL_CRUFT
675OTHER_LIBTOOL_OPT
676UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100677LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700678CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000679BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200680CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000681OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700682LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700683LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700684LLVM_PROF_ERR
685LLVM_PROF_FILE
686LLVM_PROF_MERGER
687PGO_PROF_USE_FLAG
688PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200689LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200690LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700691PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700692DEF_MAKE_RULE
693DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000694ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000695LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100696MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000697INSTALL_DATA
698INSTALL_SCRIPT
699INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200700ac_ct_READELF
701READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000702ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000704AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000705GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200706EXPORTSFROM
707EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000708LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000709LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000710RUNSHARED
711INSTSONAME
712LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000713PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000714BLDLIBRARY
715DLLLIBRARY
716LDLIBRARY
717LIBRARY
718BUILDEXEEXT
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100719EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200720NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200721MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200722PLATFORM_TRIPLET
723MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200724ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000725MAINCC
726CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700727SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200728GREP
729CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000730OBJEXT
731EXEEXT
732ac_ct_CC
733CPPFLAGS
734LDFLAGS
735CFLAGS
736CC
737EXPORT_MACOSX_DEPLOYMENT_TARGET
738CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200739_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000740MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000741FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000742FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800743FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000744FRAMEWORKALTINSTALLLAST
745FRAMEWORKALTINSTALLFIRST
746FRAMEWORKINSTALLLAST
747FRAMEWORKINSTALLFIRST
748PYTHONFRAMEWORKINSTALLDIR
749PYTHONFRAMEWORKPREFIX
750PYTHONFRAMEWORKDIR
751PYTHONFRAMEWORKIDENTIFIER
752PYTHONFRAMEWORK
Ned Deily0cb33da2021-05-02 04:48:29 -0400753LIPO_INTEL64_FLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000754LIPO_32BIT_FLAGS
755ARCH_RUN_32BIT
756UNIVERSALSDK
757CONFIG_ARGS
758SOVERSION
759VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200760PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200761PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100762host_os
763host_vendor
764host_cpu
765host
766build_os
767build_vendor
768build_cpu
769build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500770HAS_GIT
771GITBRANCH
772GITTAG
773GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400774BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000775target_alias
776host_alias
777build_alias
778LIBS
779ECHO_T
780ECHO_N
781ECHO_C
782DEFS
783mandir
784localedir
785libdir
786psdir
787pdfdir
788dvidir
789htmldir
790infodir
791docdir
792oldincludedir
793includedir
Pablo Galindoba421752021-05-03 20:33:17 +0100794runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000795localstatedir
796sharedstatedir
797sysconfdir
798datadir
799datarootdir
800libexecdir
801sbindir
802bindir
803program_transform_name
804prefix
805exec_prefix
806PACKAGE_URL
807PACKAGE_BUGREPORT
808PACKAGE_STRING
809PACKAGE_VERSION
810PACKAGE_TARNAME
811PACKAGE_NAME
812PATH_SEPARATOR
813SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000814ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000815ac_user_opts='
816enable_option_checking
817enable_universalsdk
818with_universal_archs
819with_framework_name
820enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_cxx_main
822with_suffix
823enable_shared
824enable_profiling
825with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200826with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200827with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000828enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700829with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100830with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400831with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100832with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800833with_memory_sanitizer
834with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libs
836with_system_expat
837with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100838with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100839with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000840enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700841with_tcltk_includes
842with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000844enable_ipv6
845with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000846with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000847with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000848with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700849with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000850with_libm
851with_libc
852enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100853with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100854with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100855with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000856with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800857with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100858with_openssl
Christian Heimes32eba612021-03-19 10:29:25 +0100859with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100860with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200861with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200862with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100863with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800864enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000865'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 ac_precious_vars='build_alias
867host_alias
868target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100869MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870CC
871CFLAGS
872LDFLAGS
873LIBS
874CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800875CPP
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100876PROFILE_TASK'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877
Guido van Rossum627b2d71993-12-24 10:39:16 +0000878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000880ac_init_help=
881ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000882ac_unrecognized_opts=
883ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884# The variables have the same names as the options, with
885# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000886cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889no_recursion=
890prefix=NONE
891program_prefix=NONE
892program_suffix=NONE
893program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898x_includes=NONE
899x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000900
901# Installation directory options.
902# These are left unexpanded so users can "make install exec_prefix=/foo"
903# and all the variables that are supposed to be based on exec_prefix
904# by default will actually change.
905# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907bindir='${exec_prefix}/bin'
908sbindir='${exec_prefix}/sbin'
909libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910datarootdir='${prefix}/share'
911datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912sysconfdir='${prefix}/etc'
913sharedstatedir='${prefix}/com'
914localstatedir='${prefix}/var'
Pablo Galindoba421752021-05-03 20:33:17 +0100915runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916includedir='${prefix}/include'
917oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
919infodir='${datarootdir}/info'
920htmldir='${docdir}'
921dvidir='${docdir}'
922pdfdir='${docdir}'
923psdir='${docdir}'
924libdir='${exec_prefix}/lib'
925localedir='${datarootdir}/locale'
926mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000931do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 # If the previous option needs an argument, assign it.
933 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935 ac_prev=
936 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000937 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200940 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
941 *=) ac_optarg= ;;
942 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100945 # Accept the important Cygnus configure options, so we can diagnose typos.
946
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 case $ac_dashdash$ac_option in
948 --)
949 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -bindir | --bindir | --bindi | --bind | --bin | --bi)
952 ac_prev=bindir ;;
953 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
956 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 -cache-file | --cache-file | --cache-fil | --cache-fi \
962 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963 ac_prev=cache_file ;;
964 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 cache_file=$ac_optarg ;;
967
968 --config-cache | -C)
969 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977 | --dataroo | --dataro | --datar)
978 ac_prev=datarootdir ;;
979 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981 datarootdir=$ac_optarg ;;
982
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000998
999 -docdir | --docdir | --docdi | --doc | --do)
1000 ac_prev=docdir ;;
1001 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002 docdir=$ac_optarg ;;
1003
1004 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005 ac_prev=dvidir ;;
1006 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001010 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001012 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001013 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001014 ac_useropt_orig=$ac_useropt
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001015 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001016 case $ac_user_opts in
1017 *"
1018"enable_$ac_useropt"
1019"*) ;;
1020 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021 ac_unrecognized_sep=', ';;
1022 esac
1023 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027 | --exec | --exe | --ex)
1028 ac_prev=exec_prefix ;;
1029 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 # Obsolete; use --with-gas.
1036 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 -help | --help | --hel | --he | -h)
1039 ac_init_help=long ;;
1040 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041 ac_init_help=recursive ;;
1042 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
1045 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051 ac_prev=htmldir ;;
1052 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053 | --ht=*)
1054 htmldir=$ac_optarg ;;
1055
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 -includedir | --includedir | --includedi | --included | --include \
1057 | --includ | --inclu | --incl | --inc)
1058 ac_prev=includedir ;;
1059 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
1063 -infodir | --infodir | --infodi | --infod | --info | --inf)
1064 ac_prev=infodir ;;
1065 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
1068 -libdir | --libdir | --libdi | --libd)
1069 ac_prev=libdir ;;
1070 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074 | --libexe | --libex | --libe)
1075 ac_prev=libexecdir ;;
1076 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001080 -localedir | --localedir | --localedi | --localed | --locale)
1081 ac_prev=localedir ;;
1082 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083 localedir=$ac_optarg ;;
1084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001086 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 ac_prev=localstatedir ;;
1088 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001089 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
1092 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093 ac_prev=mandir ;;
1094 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098 # Obsolete; use --without-fp.
1099 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 no_create=yes ;;
1104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111 | --oldin | --oldi | --old | --ol | --o)
1112 ac_prev=oldincludedir ;;
1113 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119 ac_prev=prefix ;;
1120 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124 | --program-pre | --program-pr | --program-p)
1125 ac_prev=program_prefix ;;
1126 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
1130 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131 | --program-suf | --program-su | --program-s)
1132 ac_prev=program_suffix ;;
1133 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -program-transform-name | --program-transform-name \
1138 | --program-transform-nam | --program-transform-na \
1139 | --program-transform-n | --program-transform- \
1140 | --program-transform | --program-transfor \
1141 | --program-transfo | --program-transf \
1142 | --program-trans | --program-tran \
1143 | --progr-tra | --program-tr | --program-t)
1144 ac_prev=program_transform_name ;;
1145 -program-transform-name=* | --program-transform-name=* \
1146 | --program-transform-nam=* | --program-transform-na=* \
1147 | --program-transform-n=* | --program-transform-=* \
1148 | --program-transform=* | --program-transfor=* \
1149 | --program-transfo=* | --program-transf=* \
1150 | --program-trans=* | --program-tran=* \
1151 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001154 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155 ac_prev=pdfdir ;;
1156 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157 pdfdir=$ac_optarg ;;
1158
1159 -psdir | --psdir | --psdi | --psd | --ps)
1160 ac_prev=psdir ;;
1161 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162 psdir=$ac_optarg ;;
1163
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165 | -silent | --silent | --silen | --sile | --sil)
1166 silent=yes ;;
1167
Pablo Galindoba421752021-05-03 20:33:17 +01001168 -runstatedir | --runstatedir | --runstatedi | --runstated \
1169 | --runstate | --runstat | --runsta | --runst | --runs \
1170 | --run | --ru | --r)
1171 ac_prev=runstatedir ;;
1172 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1173 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1174 | --run=* | --ru=* | --r=*)
1175 runstatedir=$ac_optarg ;;
1176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1178 ac_prev=sbindir ;;
1179 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1180 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
1183 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1184 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1185 | --sharedst | --shareds | --shared | --share | --shar \
1186 | --sha | --sh)
1187 ac_prev=sharedstatedir ;;
1188 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1189 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1190 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1191 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 -site | --site | --sit)
1195 ac_prev=site ;;
1196 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1200 ac_prev=srcdir ;;
1201 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001204 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1205 | --syscon | --sysco | --sysc | --sys | --sy)
1206 ac_prev=sysconfdir ;;
1207 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1208 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001210
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001212 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1217 verbose=yes ;;
1218
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 -version | --version | --versio | --versi | --vers | -V)
1220 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001239 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001242 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 ac_useropt_orig=$ac_useropt
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001244 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 case $ac_user_opts in
1246 *"
1247"with_$ac_useropt"
1248"*) ;;
1249 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1250 ac_unrecognized_sep=', ';;
1251 esac
1252 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001254 --x)
1255 # Obsolete; use --with-x.
1256 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257
1258 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1259 | --x-incl | --x-inc | --x-in | --x-i)
1260 ac_prev=x_includes ;;
1261 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1262 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264
1265 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1266 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1267 ac_prev=x_libraries ;;
1268 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1269 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1273Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 *=*)
1277 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1278 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 case $ac_envvar in #(
1280 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001282 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 export $ac_envvar ;;
1285
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001286 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 # FIXME: should be removed in autoconf 3.0.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001288 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001289 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001290 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001291 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001292 ;;
1293
1294 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295done
1296
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001299 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300fi
1301
Matthias Kloseb9621712010-04-24 17:59:49 +00001302if test -n "$ac_unrecognized_opts"; then
1303 case $enable_option_checking in
1304 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001306 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001307 esac
1308fi
1309
1310# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1312 datadir sysconfdir sharedstatedir localstatedir includedir \
1313 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindoba421752021-05-03 20:33:17 +01001314 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001317 # Remove trailing slashes.
1318 case $ac_val in
1319 */ )
1320 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1321 eval $ac_var=\$ac_val;;
1322 esac
1323 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325 [\\/$]* | ?:[\\/]* ) continue;;
1326 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001329done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Martin v. Löwis11437992002-04-12 09:54:03 +00001331# There might be people who depend on the old broken behavior: `$host'
1332# used to hold the argument of --host etc.
1333# FIXME: To remove some day.
1334build=$build_alias
1335host=$host_alias
1336target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Martin v. Löwis11437992002-04-12 09:54:03 +00001338# FIXME: To remove some day.
1339if test "x$host_alias" != x; then
1340 if test "x$build_alias" = x; then
1341 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001342 elif test "x$build_alias" != "x$host_alias"; then
1343 cross_compiling=yes
1344 fi
1345fi
1346
1347ac_tool_prefix=
1348test -n "$host_alias" && ac_tool_prefix=$host_alias-
1349
1350test "$silent" = yes && exec 6>/dev/null
1351
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353ac_pwd=`pwd` && test -n "$ac_pwd" &&
1354ac_ls_di=`ls -di .` &&
1355ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001356 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001357test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001358 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359
1360
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361# Find the source files, if location was not specified.
1362if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001365 ac_confdir=`$as_dirname -- "$as_myself" ||
1366$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1367 X"$as_myself" : 'X\(//\)[^/]' \| \
1368 X"$as_myself" : 'X\(//\)$' \| \
1369 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001370$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1372 s//\1/
1373 q
1374 }
1375 /^X\(\/\/\)[^/].*/{
1376 s//\1/
1377 q
1378 }
1379 /^X\(\/\/\)$/{
1380 s//\1/
1381 q
1382 }
1383 /^X\(\/\).*/{
1384 s//\1/
1385 q
1386 }
1387 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001388 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001389 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001390 srcdir=..
1391 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392else
1393 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395if test ! -r "$srcdir/$ac_unique_file"; then
1396 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001397 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001399ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1400ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001401 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 pwd)`
1403# When building in place, set srcdir=.
1404if test "$ac_abs_confdir" = "$ac_pwd"; then
1405 srcdir=.
1406fi
1407# Remove unnecessary trailing slashes from srcdir.
1408# Double slashes in file names in object file debugging info
1409# mess up M-x gdb in Emacs.
1410case $srcdir in
1411*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1412esac
1413for ac_var in $ac_precious_vars; do
1414 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1415 eval ac_env_${ac_var}_value=\$${ac_var}
1416 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1417 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1418done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420#
1421# Report the --help message.
1422#
1423if test "$ac_init_help" = "long"; then
1424 # Omit some internal or obsolete options to make the list less imposing.
1425 # This message is too long to be a string in the A/UX 3.1 sh.
1426 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001427\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429Usage: $0 [OPTION]... [VAR=VALUE]...
1430
1431To assign environment variables (e.g., CC, CFLAGS...), specify them as
1432VAR=VALUE. See below for descriptions of some of the useful variables.
1433
1434Defaults for the options are specified in brackets.
1435
1436Configuration:
1437 -h, --help display this help and exit
1438 --help=short display options specific to this package
1439 --help=recursive display the short help of all the included packages
1440 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001441 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 --cache-file=FILE cache test results in FILE [disabled]
1443 -C, --config-cache alias for \`--cache-file=config.cache'
1444 -n, --no-create do not create output files
1445 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1446
Martin v. Löwis11437992002-04-12 09:54:03 +00001447Installation directories:
1448 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453By default, \`make install' will install all the files in
1454\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1455an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1456for instance \`--prefix=\$HOME'.
1457
1458For better control, use the options below.
1459
1460Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 --bindir=DIR user executables [EPREFIX/bin]
1462 --sbindir=DIR system admin executables [EPREFIX/sbin]
1463 --libexecdir=DIR program executables [EPREFIX/libexec]
1464 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1465 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1466 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Pablo Galindoba421752021-05-03 20:33:17 +01001467 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 --libdir=DIR object code libraries [EPREFIX/lib]
1469 --includedir=DIR C header files [PREFIX/include]
1470 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1471 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1472 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1473 --infodir=DIR info documentation [DATAROOTDIR/info]
1474 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1475 --mandir=DIR man documentation [DATAROOTDIR/man]
1476 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1477 --htmldir=DIR html documentation [DOCDIR]
1478 --dvidir=DIR dvi documentation [DOCDIR]
1479 --pdfdir=DIR pdf documentation [DOCDIR]
1480 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001481_ACEOF
1482
1483 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001484
1485System types:
1486 --build=BUILD configure for building on BUILD [guessed]
1487 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001488_ACEOF
1489fi
1490
1491if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001492 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001493 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001494 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 cat <<\_ACEOF
1496
1497Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001499 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1500 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001501 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001502 create a universal binary build. SDKDIR specifies
1503 which macOS SDK should be used to perform the build,
1504 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001506 create a Python.framework rather than a traditional
1507 Unix install. optional INSTALLDIR specifies the
1508 installation path. see Mac/README.rst (default is
1509 no)
1510 --enable-shared enable building a shared Python library (default is
1511 no)
1512 --enable-profiling enable C-level code profiling with gprof (default is
1513 no)
1514 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1515 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001516 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001517 support loadable extensions in _sqlite module, see
1518 Doc/library/sqlite3.rst (default is no)
1519 --enable-ipv6 enable ipv6 (with ipv4) support, see
1520 Doc/library/socket.rst (default is yes if supported)
1521 --enable-big-digits[=15|30]
1522 use big digits (30 or 15 bits) for Python longs
1523 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001524 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001525
1526Optional Packages:
1527 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1528 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001529 --with-universal-archs=ARCH
Ned Deily0cb33da2021-05-02 04:48:29 -04001530 specify the kind of macOS universal binary that
1531 should be created. This option is only valid when
Anthony Shaw2de064e2020-01-14 17:40:10 +11001532 --enable-universalsdk is set; options are:
Ned Deily0cb33da2021-05-02 04:48:29 -04001533 ("universal2", "intel-64", "intel-32", "intel",
1534 "32-bit", "64-bit", "3-way", or "all") see
1535 Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001536 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 specify the name for the python framework on macOS
1538 only valid when --enable-framework is set. see
1539 Mac/README.rst (default is 'Python')
1540 --with-cxx-main[=COMPILER]
1541 compile main() and link Python executable with C++
1542 compiler specified in COMPILER (default is $CXX)
1543 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1544 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001545 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001546 (default is no)
1547 --with-assertions build with C assertions enabled (default is no)
1548 --with-lto enable Link-Time-Optimization in any build (default
1549 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001550 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001551 select hash algorithm for use in Python/pyhash.c
1552 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001553 --with-tzpath=<list of absolute paths separated by pathsep>
1554 Select the default time zone search path for zoneinfo.TZPATH
1555
Charles-François Natalid30b0222014-05-08 23:08:51 +01001556 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001557 enable AddressSanitizer memory error detector,
1558 'asan' (default is no)
1559 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1560 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001561 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001562 enable UndefinedBehaviorSanitizer undefined
1563 behaviour detector, 'ubsan' (default is no)
1564 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001565 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001566 library, see Doc/library/pyexpat.rst (default is no)
1567 --with-system-ffi build _ctypes module using an installed ffi library,
1568 see Doc/library/ctypes.rst (default is
1569 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001570 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001571 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001572 --with-decimal-contextvar
1573 build _decimal module using a coroutine-local rather
1574 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001575 --with-tcltk-includes='-I...'
1576 override search for Tcl and Tk include files
1577 --with-tcltk-libs='-L...'
1578 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001579 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001580 override order to check db backends for dbm; a valid
1581 value is a colon separated string with the backend
1582 names `ndbm', `gdbm' and `bdb'.
1583 --with-doc-strings enable documentation strings (default is yes)
1584 --with-pymalloc enable specialized mallocs (default is yes)
1585 --with-c-locale-coercion
1586 enable C locale coercion to a UTF-8 based locale
1587 (default is yes)
1588 --with-valgrind enable Valgrind support (default is no)
1589 --with-dtrace enable DTrace support (default is no)
1590 --with-libm=STRING override libm math library to STRING (default is
1591 system-dependent)
1592 --with-libc=STRING override libc C library to STRING (default is
1593 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001594 --with-platlibdir=DIRNAME
1595 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001596 --with-wheel-pkg-dir=PATH
1597 Directory of wheel packages used by ensurepip
1598 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001599 --with(out)-readline[=editline]
1600 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001601 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001602 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001603 --with-ensurepip[=install|upgrade|no]
1604 "install" or "upgrade" using bundled pip (default is
1605 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001606 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001607 --with-openssl-rpath=[DIR|auto|no]
1608 Set runtime library directory (rpath) for OpenSSL
1609 libraries, no (default): don't set rpath, auto:
1610 auto-detect rpath from --with-openssl and
1611 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001612 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001613 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001614 Python's preferred selection (default), openssl:
1615 leave OpenSSL's defaults untouched, STRING: use a
Christian Heimese9832522021-05-01 20:53:10 +02001616 custom string, python and STRING also set TLS 1.2 as
1617 minimum TLS version
Christian Heimes9b60e552020-05-15 23:54:53 +02001618 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1619 builtin hash modules, md5, sha1, sha256, sha512,
1620 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001621 --with-experimental-isolated-subinterpreters
1622 better isolate subinterpreters, experimental build
1623 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001624 --without-static-libpython
1625 do not build libpythonMAJOR.MINOR.a and do not
1626 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001627
1628Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001629 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 CC C compiler command
1631 CFLAGS C compiler flags
1632 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1633 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001638 PROFILE_TASK
1639 Python args for PGO generation task
Martin v. Löwis11437992002-04-12 09:54:03 +00001640
1641Use these variables to override the choices made by `configure' or to help
1642it to find libraries and programs with nonstandard names/locations.
1643
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001644Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001645_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001647fi
1648
1649if test "$ac_init_help" = "recursive"; then
1650 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001652 test -d "$ac_dir" ||
1653 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1654 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 ac_builddir=.
1656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657case "$ac_dir" in
1658.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1659*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001660 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001662 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663 case $ac_top_builddir_sub in
1664 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1665 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1666 esac ;;
1667esac
1668ac_abs_top_builddir=$ac_pwd
1669ac_abs_builddir=$ac_pwd$ac_dir_suffix
1670# for backward compatibility:
1671ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001672
1673case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001674 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001675 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001676 ac_top_srcdir=$ac_top_builddir_sub
1677 ac_abs_top_srcdir=$ac_pwd ;;
1678 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001679 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001680 ac_top_srcdir=$srcdir
1681 ac_abs_top_srcdir=$srcdir ;;
1682 *) # Relative name.
1683 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1684 ac_top_srcdir=$ac_top_build_prefix$srcdir
1685 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001686esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001689 cd "$ac_dir" || { ac_status=$?; continue; }
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001690 # Check for guested configure.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001691 if test -f "$ac_srcdir/configure.gnu"; then
1692 echo &&
1693 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1694 elif test -f "$ac_srcdir/configure"; then
1695 echo &&
1696 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001698 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699 fi || ac_status=$?
1700 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 done
1702fi
1703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001704test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001705if $ac_init_version; then
1706 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001707python configure 3.10
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001708generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001709
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001710Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001711This configure script is free software; the Free Software Foundation
1712gives unlimited permission to copy, distribute and modify it.
1713_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001714 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001716
1717## ------------------------ ##
1718## Autoconf initialization. ##
1719## ------------------------ ##
1720
1721# ac_fn_c_try_compile LINENO
1722# --------------------------
1723# Try to compile conftest.$ac_ext, and return whether this succeeded.
1724ac_fn_c_try_compile ()
1725{
1726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001727 rm -f conftest.$ac_objext
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 if { { ac_try="$ac_compile"
1729case "(($ac_try" in
1730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1731 *) ac_try_echo=$ac_try;;
1732esac
1733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001734$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 (eval "$ac_compile") 2>conftest.err
1736 ac_status=$?
1737 if test -s conftest.err; then
1738 grep -v '^ *+' conftest.err >conftest.er1
1739 cat conftest.er1 >&5
1740 mv -f conftest.er1 conftest.err
1741 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001742 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 test $ac_status = 0; } && {
1744 test -z "$ac_c_werror_flag" ||
1745 test ! -s conftest.err
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001746 } && test -s conftest.$ac_objext; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 ac_retval=0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001748else
1749 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752 ac_retval=1
1753fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_compile
1758
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001759# ac_fn_c_try_cpp LINENO
1760# ----------------------
1761# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1762ac_fn_c_try_cpp ()
1763{
1764 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1765 if { { ac_try="$ac_cpp conftest.$ac_ext"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001771$as_echo "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001772 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001780 test $ac_status = 0; } > conftest.i && {
1781 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1782 test ! -s conftest.err
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001783 }; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001784 ac_retval=0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001785else
1786 $as_echo "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001787sed 's/^/| /' conftest.$ac_ext >&5
1788
1789 ac_retval=1
1790fi
1791 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1792 as_fn_set_status $ac_retval
1793
1794} # ac_fn_c_try_cpp
1795
Matthias Kloseb9621712010-04-24 17:59:49 +00001796# ac_fn_c_try_link LINENO
1797# -----------------------
1798# Try to link conftest.$ac_ext, and return whether this succeeded.
1799ac_fn_c_try_link ()
1800{
1801 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001802 rm -f conftest.$ac_objext conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001803 if { { ac_try="$ac_link"
1804case "(($ac_try" in
1805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1806 *) ac_try_echo=$ac_try;;
1807esac
1808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001809$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001810 (eval "$ac_link") 2>conftest.err
1811 ac_status=$?
1812 if test -s conftest.err; then
1813 grep -v '^ *+' conftest.err >conftest.er1
1814 cat conftest.er1 >&5
1815 mv -f conftest.er1 conftest.err
1816 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 test $ac_status = 0; } && {
1819 test -z "$ac_c_werror_flag" ||
1820 test ! -s conftest.err
1821 } && test -s conftest$ac_exeext && {
1822 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001823 test -x conftest$ac_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001824 }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 ac_retval=0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001826else
1827 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001828sed 's/^/| /' conftest.$ac_ext >&5
1829
1830 ac_retval=1
1831fi
1832 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1833 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1834 # interfere with the next link command; also delete a directory that is
1835 # left behind by Apple's compiler. We do this before executing the actions.
1836 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001837 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 as_fn_set_status $ac_retval
1839
1840} # ac_fn_c_try_link
1841
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001842# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001843# -------------------------------------------------------
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001844# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1845# the include files in INCLUDES and setting the cache variable VAR
1846# accordingly.
1847ac_fn_c_check_header_mongrel ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001850 if eval \${$3+:} false; then :
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1852$as_echo_n "checking for $2... " >&6; }
1853if eval \${$3+:} false; then :
1854 $as_echo_n "(cached) " >&6
1855fi
1856eval ac_res=\$$3
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858$as_echo "$ac_res" >&6; }
1859else
1860 # Is the header compilable?
1861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1862$as_echo_n "checking $2 usability... " >&6; }
1863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001864/* end confdefs.h. */
1865$4
1866#include <$2>
1867_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001868if ac_fn_c_try_compile "$LINENO"; then :
1869 ac_header_compiler=yes
1870else
1871 ac_header_compiler=no
Matthias Kloseb9621712010-04-24 17:59:49 +00001872fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1875$as_echo "$ac_header_compiler" >&6; }
1876
1877# Is the header present?
1878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1879$as_echo_n "checking $2 presence... " >&6; }
1880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882#include <$2>
1883_ACEOF
1884if ac_fn_c_try_cpp "$LINENO"; then :
1885 ac_header_preproc=yes
1886else
1887 ac_header_preproc=no
1888fi
1889rm -f conftest.err conftest.i conftest.$ac_ext
1890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1891$as_echo "$ac_header_preproc" >&6; }
1892
1893# So? What about this header?
1894case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1895 yes:no: )
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1897$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1899$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1900 ;;
1901 no:yes:* )
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1903$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1905$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1907$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1909$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1911$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1912( $as_echo "## --------------------------------------- ##
1913## Report this to https://bugs.python.org/ ##
1914## --------------------------------------- ##"
1915 ) | sed "s/^/$as_me: WARNING: /" >&2
1916 ;;
1917esac
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
1920if eval \${$3+:} false; then :
1921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=\$ac_header_compiler"
Matthias Kloseb9621712010-04-24 17:59:49 +00001924fi
1925eval ac_res=\$$3
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
1928fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001931} # ac_fn_c_check_header_mongrel
Matthias Kloseb9621712010-04-24 17:59:49 +00001932
1933# ac_fn_c_try_run LINENO
1934# ----------------------
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001935# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1936# that executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001937ac_fn_c_try_run ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 if { { ac_try="$ac_link"
1941case "(($ac_try" in
1942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943 *) ac_try_echo=$ac_try;;
1944esac
1945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001946$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001947 (eval "$ac_link") 2>&5
1948 ac_status=$?
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001950 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1951 { { case "(($ac_try" in
1952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953 *) ac_try_echo=$ac_try;;
1954esac
1955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001956$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 (eval "$ac_try") 2>&5
1958 ac_status=$?
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960 test $ac_status = 0; }; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001961 ac_retval=0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001962else
1963 $as_echo "$as_me: program exited with status $ac_status" >&5
1964 $as_echo "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001965sed 's/^/| /' conftest.$ac_ext >&5
1966
1967 ac_retval=$ac_status
1968fi
1969 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001971 as_fn_set_status $ac_retval
1972
1973} # ac_fn_c_try_run
1974
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01001975# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1976# -------------------------------------------------------
1977# Tests whether HEADER exists and can be compiled using the include files in
1978# INCLUDES, setting the cache variable VAR accordingly.
1979ac_fn_c_check_header_compile ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983$as_echo_n "checking for $2... " >&6; }
1984if eval \${$3+:} false; then :
1985 $as_echo_n "(cached) " >&6
1986else
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990#include <$2>
1991_ACEOF
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 eval "$3=yes"
1994else
1995 eval "$3=no"
1996fi
1997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
2002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2003
2004} # ac_fn_c_check_header_compile
2005
Matthias Kloseb9621712010-04-24 17:59:49 +00002006# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2007# -------------------------------------------
2008# Tests whether TYPE exists after having included INCLUDES, setting cache
2009# variable VAR accordingly.
2010ac_fn_c_check_type ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2014$as_echo_n "checking for $2... " >&6; }
2015if eval \${$3+:} false; then :
2016 $as_echo_n "(cached) " >&6
2017else
Matthias Kloseb9621712010-04-24 17:59:49 +00002018 eval "$3=no"
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002023main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002024{
2025if (sizeof ($2))
2026 return 0;
2027 ;
2028 return 0;
2029}
2030_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002031if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002036main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002037{
2038if (sizeof (($2)))
2039 return 0;
2040 ;
2041 return 0;
2042}
2043_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002044if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002046else
Matthias Kloseb9621712010-04-24 17:59:49 +00002047 eval "$3=yes"
2048fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002050fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002052fi
2053eval ac_res=\$$3
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2055$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002056 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058} # ac_fn_c_check_type
2059
Matthias Kloseb9621712010-04-24 17:59:49 +00002060# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2061# --------------------------------------------
2062# Tries to find the compile-time value of EXPR in a program that includes
2063# INCLUDES, setting VAR accordingly. Returns whether the value could be
2064# computed
2065ac_fn_c_compute_int ()
2066{
2067 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068 if test "$cross_compiling" = yes; then
2069 # Depending upon the size, compute the lo and hi bounds.
2070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002074main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002075{
2076static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002077test_array [0] = 0;
2078return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002079
2080 ;
2081 return 0;
2082}
2083_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002084if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002085 ac_lo=0 ac_mid=0
2086 while :; do
2087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002091main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002092{
2093static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002094test_array [0] = 0;
2095return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097 ;
2098 return 0;
2099}
2100_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002101if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002102 ac_hi=$ac_mid; break
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002103else
Matthias Kloseb9621712010-04-24 17:59:49 +00002104 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2105 if test $ac_lo -le $ac_mid; then
2106 ac_lo= ac_hi=
2107 break
2108 fi
2109 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2110fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002112 done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002113else
Matthias Kloseb9621712010-04-24 17:59:49 +00002114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002118main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002119{
2120static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002121test_array [0] = 0;
2122return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002123
2124 ;
2125 return 0;
2126}
2127_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002128if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002129 ac_hi=-1 ac_mid=-1
2130 while :; do
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002135main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002136{
2137static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002138test_array [0] = 0;
2139return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002140
2141 ;
2142 return 0;
2143}
2144_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002145if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002146 ac_lo=$ac_mid; break
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002147else
Matthias Kloseb9621712010-04-24 17:59:49 +00002148 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2149 if test $ac_mid -le $ac_hi; then
2150 ac_lo= ac_hi=
2151 break
2152 fi
2153 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2154fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002157else
Matthias Kloseb9621712010-04-24 17:59:49 +00002158 ac_lo= ac_hi=
2159fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002161fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002163# Binary search between lo and hi bounds.
2164while test "x$ac_lo" != "x$ac_hi"; do
2165 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002170main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002171{
2172static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002173test_array [0] = 0;
2174return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002175
2176 ;
2177 return 0;
2178}
2179_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002180if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 ac_hi=$ac_mid
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002182else
Matthias Kloseb9621712010-04-24 17:59:49 +00002183 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2184fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002186done
2187case $ac_lo in #((
2188?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2189'') ac_retval=1 ;;
2190esac
2191 else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194$4
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002195static long int longval () { return $2; }
2196static unsigned long int ulongval () { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002197#include <stdio.h>
2198#include <stdlib.h>
2199int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002200main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002201{
2202
2203 FILE *f = fopen ("conftest.val", "w");
2204 if (! f)
2205 return 1;
2206 if (($2) < 0)
2207 {
2208 long int i = longval ();
2209 if (i != ($2))
2210 return 1;
2211 fprintf (f, "%ld", i);
2212 }
2213 else
2214 {
2215 unsigned long int i = ulongval ();
2216 if (i != ($2))
2217 return 1;
2218 fprintf (f, "%lu", i);
2219 }
2220 /* Do not output a trailing newline, as this causes \r\n confusion
2221 on some platforms. */
2222 return ferror (f) || fclose (f) != 0;
2223
2224 ;
2225 return 0;
2226}
2227_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002228if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002229 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002230else
Matthias Kloseb9621712010-04-24 17:59:49 +00002231 ac_retval=1
2232fi
2233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2234 conftest.$ac_objext conftest.beam conftest.$ac_ext
2235rm -f conftest.val
2236
2237 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002238 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002239 as_fn_set_status $ac_retval
2240
2241} # ac_fn_c_compute_int
2242
2243# ac_fn_c_check_func LINENO FUNC VAR
2244# ----------------------------------
2245# Tests whether FUNC exists, setting the cache variable VAR accordingly
2246ac_fn_c_check_func ()
2247{
2248 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2250$as_echo_n "checking for $2... " >&6; }
2251if eval \${$3+:} false; then :
2252 $as_echo_n "(cached) " >&6
2253else
Matthias Kloseb9621712010-04-24 17:59:49 +00002254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2257 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2258#define $2 innocuous_$2
2259
2260/* System header to define __stub macros and hopefully few prototypes,
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002261 which can conflict with char $2 (); below.
2262 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2263 <limits.h> exists even on freestanding compilers. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002264
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002265#ifdef __STDC__
2266# include <limits.h>
2267#else
2268# include <assert.h>
2269#endif
2270
Matthias Kloseb9621712010-04-24 17:59:49 +00002271#undef $2
2272
2273/* Override any GCC internal prototype to avoid an error.
2274 Use char because int might match the return type of a GCC
2275 builtin and then its argument prototype would still apply. */
2276#ifdef __cplusplus
2277extern "C"
2278#endif
2279char $2 ();
2280/* The GNU C library defines this for functions which it implements
2281 to always fail with ENOSYS. Some functions are actually named
2282 something starting with __ and the normal name is an alias. */
2283#if defined __stub_$2 || defined __stub___$2
2284choke me
2285#endif
2286
2287int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002288main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002289{
2290return $2 ();
2291 ;
2292 return 0;
2293}
2294_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002295if ac_fn_c_try_link "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002296 eval "$3=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002297else
Matthias Kloseb9621712010-04-24 17:59:49 +00002298 eval "$3=no"
2299fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002300rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 conftest$ac_exeext conftest.$ac_ext
2302fi
2303eval ac_res=\$$3
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2305$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002306 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002307
2308} # ac_fn_c_check_func
2309
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002310# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2311# ---------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002312# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002313# accordingly.
2314ac_fn_c_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002315{
2316 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2317 as_decl_name=`echo $2|sed 's/ *(.*//'`
2318 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2320$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2321if eval \${$3+:} false; then :
2322 $as_echo_n "(cached) " >&6
2323else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325/* end confdefs.h. */
2326$4
2327int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002328main ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002329{
2330#ifndef $as_decl_name
2331#ifdef __cplusplus
2332 (void) $as_decl_use;
2333#else
2334 (void) $as_decl_name;
2335#endif
2336#endif
2337
2338 ;
2339 return 0;
2340}
2341_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002342if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002343 eval "$3=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002344else
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002345 eval "$3=no"
2346fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002348fi
2349eval ac_res=\$$3
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351$as_echo "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002352 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2353
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002354} # ac_fn_c_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002355
Matthias Kloseb9621712010-04-24 17:59:49 +00002356# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2357# ----------------------------------------------------
2358# Tries to find if the field MEMBER exists in type AGGR, after including
2359# INCLUDES, setting cache variable VAR accordingly.
2360ac_fn_c_check_member ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2364$as_echo_n "checking for $2.$3... " >&6; }
2365if eval \${$4+:} false; then :
2366 $as_echo_n "(cached) " >&6
2367else
Matthias Kloseb9621712010-04-24 17:59:49 +00002368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369/* end confdefs.h. */
2370$5
2371int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002372main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002373{
2374static $2 ac_aggr;
2375if (ac_aggr.$3)
2376return 0;
2377 ;
2378 return 0;
2379}
2380_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002381if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 eval "$4=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002383else
Matthias Kloseb9621712010-04-24 17:59:49 +00002384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2385/* end confdefs.h. */
2386$5
2387int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002388main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00002389{
2390static $2 ac_aggr;
2391if (sizeof ac_aggr.$3)
2392return 0;
2393 ;
2394 return 0;
2395}
2396_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002397if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002398 eval "$4=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002399else
Matthias Kloseb9621712010-04-24 17:59:49 +00002400 eval "$4=no"
2401fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002403fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002405fi
2406eval ac_res=\$$4
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2408$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002409 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002410
2411} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002413This file contains any messages produced by compilers while
2414running configure, to aid debugging if configure makes a mistake.
2415
Pablo Galindod4fe0982020-05-19 03:33:01 +01002416It was created by python $as_me 3.10, which was
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002417generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002418
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002419 $ $0 $@
Martin v. Löwis11437992002-04-12 09:54:03 +00002420
2421_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002423{
2424cat <<_ASUNAME
2425## --------- ##
2426## Platform. ##
2427## --------- ##
2428
2429hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2430uname -m = `(uname -m) 2>/dev/null || echo unknown`
2431uname -r = `(uname -r) 2>/dev/null || echo unknown`
2432uname -s = `(uname -s) 2>/dev/null || echo unknown`
2433uname -v = `(uname -v) 2>/dev/null || echo unknown`
2434
2435/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2436/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2437
2438/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2439/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2440/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002441/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002442/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2443/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2444/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2445
2446_ASUNAME
2447
2448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2449for as_dir in $PATH
2450do
2451 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002452 test -z "$as_dir" && as_dir=.
2453 $as_echo "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457} >&5
2458
2459cat >&5 <<_ACEOF
2460
2461
2462## ----------- ##
2463## Core tests. ##
2464## ----------- ##
2465
2466_ACEOF
2467
2468
2469# Keep a trace of the command line.
2470# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002471# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002472# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002473# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002474ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002475ac_configure_args0=
2476ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002477ac_must_keep_next=false
2478for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002479do
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 for ac_arg
2481 do
2482 case $ac_arg in
2483 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2484 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2485 | -silent | --silent | --silen | --sile | --sil)
2486 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 *\'*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002488 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 esac
2490 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002497 case $ac_arg in
2498 *=* | --config-cache | -C | -disable-* | --disable-* \
2499 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2500 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2501 | -with-* | --with-* | -without-* | --without-* | --x)
2502 case "$ac_configure_args0 " in
2503 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2504 esac
2505 ;;
2506 -* ) ac_must_keep_next=true ;;
2507 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 ;;
2511 esac
2512 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002513done
Matthias Kloseb9621712010-04-24 17:59:49 +00002514{ ac_configure_args0=; unset ac_configure_args0;}
2515{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002516
2517# When interrupted or exit'd, cleanup temporary files, and complete
2518# config.log. We remove comments because anyway the quotes in there
2519# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520# WARNING: Use '\'' to represent an apostrophe within the trap.
2521# 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 +00002522trap 'exit_status=$?
2523 # Save into config.log some information that might help in debugging.
2524 {
2525 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002526
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002527 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002528## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
2531 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532(
2533 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2534 eval ac_val=\$$ac_var
2535 case $ac_val in #(
2536 *${as_nl}*)
2537 case $ac_var in #(
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002538 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2539$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 esac
2541 case $ac_var in #(
2542 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2544 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 esac ;;
2546 esac
2547 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2550 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 "s/'\''/'\''\\\\'\'''\''/g;
2553 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2554 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002555 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002557 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 esac |
2559 sort
2560)
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002562
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002563 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002564## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002566 echo
2567 for ac_var in $ac_subst_vars
2568 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 eval ac_val=\$$ac_var
2570 case $ac_val in
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002571 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002573 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002574 done | sort
2575 echo
2576
2577 if test -n "$ac_subst_files"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002578 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002581 echo
2582 for ac_var in $ac_subst_files
2583 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584 eval ac_val=\$$ac_var
2585 case $ac_val in
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002586 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002588 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002589 done | sort
2590 echo
2591 fi
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 if test -s confdefs.h; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002594 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002595## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002596## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 echo
2600 fi
2601 test "$ac_signal" != 0 &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002602 $as_echo "$as_me: caught signal $ac_signal"
2603 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 rm -f core *.core core.conftest.* &&
2606 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002609for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002610 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002611done
2612ac_signal=0
2613
2614# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002616
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002617$as_echo "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002618
Martin v. Löwis11437992002-04-12 09:54:03 +00002619# Predefined preprocessor variables.
2620
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_NAME "$PACKAGE_NAME"
2623_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002624
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2627_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002628
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_VERSION "$PACKAGE_VERSION"
2631_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002632
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_STRING "$PACKAGE_STRING"
2635_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002636
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2639_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002640
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002641cat >>confdefs.h <<_ACEOF
2642#define PACKAGE_URL "$PACKAGE_URL"
2643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00002644
Martin v. Löwis11437992002-04-12 09:54:03 +00002645
2646# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002647# Prefer an explicitly selected file to automatically selected ones.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002648ac_site_file1=NONE
2649ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650if test -n "$CONFIG_SITE"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002651 # We do not want a PATH search for config.site.
2652 case $CONFIG_SITE in #((
2653 -*) ac_site_file1=./$CONFIG_SITE;;
2654 */*) ac_site_file1=$CONFIG_SITE;;
2655 *) ac_site_file1=./$CONFIG_SITE;;
2656 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657elif test "x$prefix" != xNONE; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002658 ac_site_file1=$prefix/share/config.site
2659 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002661 ac_site_file1=$ac_default_prefix/share/config.site
2662 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002663fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002664for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002665do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002666 test "x$ac_site_file" = xNONE && continue
2667 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2669$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002671 . "$ac_site_file" \
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002672 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002675See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676 fi
2677done
2678
2679if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 # Some versions of bash will fail to source /dev/null (special files
2681 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2682 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002683 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2684$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2687 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 esac
2689 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002691 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2692$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 >$cache_file
2694fi
2695
2696# Check that the precious variables saved in the cache have kept the same
2697# value.
2698ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2701 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2703 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 case $ac_old_set,$ac_new_set in
2705 set,)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2707$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 +00002708 ac_cache_corrupted=: ;;
2709 ,set)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002710 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2711$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 ac_cache_corrupted=: ;;
2713 ,);;
2714 *)
2715 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 # differences in whitespace do not lead to failure.
2717 ac_old_val_w=`echo x $ac_old_val`
2718 ac_new_val_w=`echo x $ac_new_val`
2719 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2721$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 ac_cache_corrupted=:
2723 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002724 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2725$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 eval $ac_var=\$ac_old_val
2727 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002728 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2729$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2731$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 fi;;
2733 esac
2734 # Pass precious variables to config.status.
2735 if test "$ac_new_set" = set; then
2736 case $ac_new_val in
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002737 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 *) ac_arg=$ac_var=$ac_new_val ;;
2739 esac
2740 case " $ac_configure_args " in
2741 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002742 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 esac
2744 fi
2745done
2746if $ac_cache_corrupted; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2750$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2751 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002753## -------------------- ##
2754## Main body of script. ##
2755## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756
Guido van Rossum7f43da71994-08-01 12:15:30 +00002757ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002759ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2760ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2761ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762
Guido van Rossum627b2d71993-12-24 10:39:16 +00002763
Michael W. Hudson54241132001-12-07 15:38:26 +00002764
Trent Nelson4d4ec652012-10-16 08:51:24 -04002765
Christian Heimesff5be6e2018-01-20 13:19:21 +01002766
2767
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002768if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002769 # If we're building out-of-tree, we need to make sure the following
2770 # resources get picked up before their $srcdir counterparts.
2771 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01002772 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002773 # Python/ -> importlib.h
2774 # (A side effect of this is that these resources will automatically be
2775 # regenerated when building out-of-tree, regardless of whether or not
2776 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2777 # off.)
2778 BASECPPFLAGS="-IObjects -IInclude -IPython"
2779else
2780 BASECPPFLAGS=""
2781fi
2782
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002783
2784
2785
2786
Victor Stinner9ed34a82017-05-02 22:35:58 +02002787if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002789# Extract the first word of "git", so it can be a program name with args.
2790set dummy git; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2792$as_echo_n "checking for $ac_word... " >&6; }
2793if ${ac_cv_prog_HAS_GIT+:} false; then :
2794 $as_echo_n "(cached) " >&6
2795else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002796 if test -n "$HAS_GIT"; then
2797 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002798else
2799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2800for as_dir in $PATH
2801do
2802 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002803 test -z "$as_dir" && as_dir=.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002806 ac_cv_prog_HAS_GIT="found"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002808 break 2
2809 fi
2810done
2811 done
2812IFS=$as_save_IFS
2813
Ned Deily5c4b0d02017-03-04 00:19:55 -05002814 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815fi
2816fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002817HAS_GIT=$ac_cv_prog_HAS_GIT
2818if test -n "$HAS_GIT"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2820$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002821else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2823$as_echo "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002824fi
2825
2826
2827else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002828HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002829fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002830if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002831then
Xiang Zhang4c855572018-08-20 22:36:19 +08002832 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2833 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2834 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002835else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002836 GITVERSION=""
2837 GITTAG=""
2838 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839fi
2840
2841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002842ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002843
2844
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002845ac_aux_dir=
2846for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2847 if test -f "$ac_dir/install-sh"; then
2848 ac_aux_dir=$ac_dir
2849 ac_install_sh="$ac_aux_dir/install-sh -c"
2850 break
2851 elif test -f "$ac_dir/install.sh"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/install.sh -c"
2854 break
2855 elif test -f "$ac_dir/shtool"; then
2856 ac_aux_dir=$ac_dir
2857 ac_install_sh="$ac_aux_dir/shtool install -c"
2858 break
2859 fi
2860done
2861if test -z "$ac_aux_dir"; then
2862 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2863fi
2864
2865# These three variables are undocumented and unsupported,
2866# and are intended to be withdrawn in a future Autoconf release.
2867# They can cause serious problems if a builder's source tree is in a directory
2868# whose full name contains unusual characters.
2869ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2870ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2871ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002872
2873
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002874# Make sure we can run config.sub.
2875$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2876 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002877
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2879$as_echo_n "checking build system type... " >&6; }
2880if ${ac_cv_build+:} false; then :
2881 $as_echo_n "(cached) " >&6
2882else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002883 ac_build_alias=$build_alias
2884test "x$ac_build_alias" = x &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002885 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002886test "x$ac_build_alias" = x &&
2887 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002888ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2889 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002890
2891fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2893$as_echo "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002894case $ac_cv_build in
2895*-*-*) ;;
2896*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2897esac
2898build=$ac_cv_build
2899ac_save_IFS=$IFS; IFS='-'
2900set x $ac_cv_build
2901shift
2902build_cpu=$1
2903build_vendor=$2
2904shift; shift
2905# Remember, the first character of IFS is used to create $*,
2906# except with old shells:
2907build_os=$*
2908IFS=$ac_save_IFS
2909case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2910
2911
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2913$as_echo_n "checking host system type... " >&6; }
2914if ${ac_cv_host+:} false; then :
2915 $as_echo_n "(cached) " >&6
2916else
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002917 if test "x$host_alias" = x; then
2918 ac_cv_host=$ac_cv_build
2919else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002920 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2921 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002922fi
2923
2924fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2926$as_echo "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002927case $ac_cv_host in
2928*-*-*) ;;
2929*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2930esac
2931host=$ac_cv_host
2932ac_save_IFS=$IFS; IFS='-'
2933set x $ac_cv_host
2934shift
2935host_cpu=$1
2936host_vendor=$2
2937shift; shift
2938# Remember, the first character of IFS is used to create $*,
2939# except with old shells:
2940host_os=$*
2941IFS=$ac_save_IFS
2942case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2943
2944
2945
doko@python.orga10e4a92013-01-25 18:45:12 +01002946
2947
Ned Deilyfcbc2462014-08-22 13:32:49 -07002948# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2949rm -f pybuilddir.txt
2950
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002951for ac_prog in python$PACKAGE_VERSION python3 python
2952do
2953 # Extract the first word of "$ac_prog", so it can be a program name with args.
2954set dummy $ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2956$as_echo_n "checking for $ac_word... " >&6; }
2957if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2958 $as_echo_n "(cached) " >&6
2959else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002960 if test -n "$PYTHON_FOR_REGEN"; then
2961 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002962else
2963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2964for as_dir in $PATH
2965do
2966 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002967 test -z "$as_dir" && as_dir=.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002968 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002970 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002972 break 2
2973 fi
2974done
2975 done
2976IFS=$as_save_IFS
2977
2978fi
2979fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002980PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2981if test -n "$PYTHON_FOR_REGEN"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2983$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002984else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2986$as_echo "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002987fi
2988
2989
Victor Stinnera5c62a82017-05-03 18:21:48 +02002990 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002991done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002992test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002993
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002994
2995
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002996if test "$cross_compiling" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01002997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2998$as_echo_n "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002999 if test -z "$PYTHON_FOR_BUILD"; then
3000 for interp in python$PACKAGE_VERSION python3 python; do
3001 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003002 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 +02003003 break
3004 fi
3005 interp=
3006 done
3007 if test x$interp = x; then
3008 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3009 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3011$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003012 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 +02003013 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003014elif test "$cross_compiling" = maybe; then
3015 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003016else
3017 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3018fi
3019
3020
Martin v. Löwis11437992002-04-12 09:54:03 +00003021
Benjamin Petersond23f8222009-04-05 19:13:16 +00003022if test "$prefix" != "/"; then
3023 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3024fi
3025
3026
Martin v. Löwis11437992002-04-12 09:54:03 +00003027
3028
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003029# We don't use PACKAGE_ variables, and they cause conflicts
3030# with other autoconf-based packages that include Python.h
3031grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3032rm confdefs.h
3033mv confdefs.h.new confdefs.h
3034
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003035
Pablo Galindod4fe0982020-05-19 03:33:01 +01003036VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003037
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003038# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003039
3040SOVERSION=1.0
3041
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003042# The later defininition of _XOPEN_SOURCE disables certain features
3043# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3044
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003045$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003046
3047
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003048# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3049# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3050# them.
3051
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003052$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003053
3054
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003055# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3056# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3057# them.
3058
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003059$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003060
3061
Martin v. Löwisd6320502004-08-12 13:45:08 +00003062# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3064# them.
3065
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003066$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003067
3068
3069
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003070define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003071
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003072# Arguments passed to configure.
3073
3074CONFIG_ARGS="$ac_configure_args"
3075
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3077$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078# Check whether --enable-universalsdk was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003079if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003080 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003081 case $enableval in
3082 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003083 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003084 # information
3085 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003086 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003088 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3089 if test ! -d "${enableval}"
3090 then
3091 enableval=/
3092 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003093 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003094 ;;
3095 esac
3096 case $enableval in
3097 no)
3098 UNIVERSALSDK=
3099 enable_universalsdk=
3100 ;;
3101 *)
3102 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003103 if test ! -d "${UNIVERSALSDK}"
3104 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003105 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003106 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003107 ;;
3108 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003109
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003110
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003111else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112
3113 UNIVERSALSDK=
3114 enable_universalsdk=
3115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003118if test -n "${UNIVERSALSDK}"
3119then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3121$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003122else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3124$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003125fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003128
Ned Deily87adb6e2013-10-18 21:09:56 -07003129ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003130
Ned Deilycbfb9a52012-06-23 16:02:19 -07003131# For backward compatibility reasons we prefer to select '32-bit' if available,
3132# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003134if test "`uname -s`" = "Darwin"
3135then
3136 if test -n "${UNIVERSALSDK}"
3137 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003138 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003139 then
3140 UNIVERSAL_ARCHS="intel"
3141 fi
3142 fi
3143fi
3144
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003145
Ned Deily0cb33da2021-05-02 04:48:29 -04003146
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3148$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003149
3150# Check whether --with-universal-archs was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003151if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003152 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153 UNIVERSAL_ARCHS="$withval"
3154
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003155fi
3156
Ned Deily87adb6e2013-10-18 21:09:56 -07003157if test -n "${UNIVERSALSDK}"
3158then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3160$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003161else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3163$as_echo "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003164fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003165
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003166
3167# Check whether --with-framework-name was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003168if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003169 withval=$with_framework_name;
3170 PYTHONFRAMEWORK=${withval}
3171 PYTHONFRAMEWORKDIR=${withval}.framework
3172 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3173
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003174else
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003175
3176 PYTHONFRAMEWORK=Python
3177 PYTHONFRAMEWORKDIR=Python.framework
3178 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3179
3180fi
3181
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182# Check whether --enable-framework was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003183if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003185 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003186 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003187 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 esac
3189 case $enableval in
3190 no)
3191 PYTHONFRAMEWORK=
3192 PYTHONFRAMEWORKDIR=no-framework
3193 PYTHONFRAMEWORKPREFIX=
3194 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 FRAMEWORKINSTALLFIRST=
3196 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003197 FRAMEWORKALTINSTALLFIRST=
3198 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003199 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003200 if test "x${prefix}" = "xNONE"; then
3201 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3202 else
3203 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3204 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003205 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003206 ;;
3207 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003208 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003211 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003212 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3213 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003214 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003216
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003219
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 else
3221 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3222 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003223
3224 case "${enableval}" in
3225 /System*)
3226 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3227 if test "${prefix}" = "NONE" ; then
3228 # See below
3229 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3230 fi
3231 ;;
3232
3233 /Library*)
3234 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3235 ;;
3236
3237 */Library/Frameworks)
3238 MDIR="`dirname "${enableval}"`"
3239 MDIR="`dirname "${MDIR}"`"
3240 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3241
3242 if test "${prefix}" = "NONE"; then
3243 # User hasn't specified the
3244 # --prefix option, but wants to install
3245 # the framework in a non-default location,
3246 # ensure that the compatibility links get
3247 # installed relative to that prefix as well
3248 # instead of in /usr/local.
3249 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3250 fi
3251 ;;
3252
3253 *)
3254 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3255 ;;
3256 esac
3257
Jack Jansen127e56e2001-09-11 14:41:54 +00003258 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003260 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003261 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003265
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003266 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3267
3268 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3269
Jack Jansene578a632001-08-15 01:27:14 +00003270 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003271
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003272else
Martin v. Löwis11437992002-04-12 09:54:03 +00003273
Jack Jansene578a632001-08-15 01:27:14 +00003274 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003275 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003276 PYTHONFRAMEWORKPREFIX=
3277 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003278 FRAMEWORKINSTALLFIRST=
3279 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003280 FRAMEWORKALTINSTALLFIRST=
3281 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003282 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003283 if test "x${prefix}" = "xNONE" ; then
3284 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3285 else
3286 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3287 fi
Jack Jansene578a632001-08-15 01:27:14 +00003288 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291fi
3292
Thomas Wouters477c8d52006-05-27 19:21:47 +00003293
3294
Michael W. Hudson54241132001-12-07 15:38:26 +00003295
3296
3297
3298
Jack Jansene578a632001-08-15 01:27:14 +00003299
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003300
3301
3302
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003303
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003304
Ned Deilyb8f944f2013-11-21 22:42:25 -08003305
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003306
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003307cat >>confdefs.h <<_ACEOF
3308#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
3309_ACEOF
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003310
3311
Jack Jansene578a632001-08-15 01:27:14 +00003312##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003313## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003314## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003315##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003316# Set name for machine-dependent library files
3317
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3319$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320if test -z "$MACHDEP"
3321then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 # avoid using uname for cross builds
3323 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003324 # ac_sys_system and ac_sys_release are used for setting
3325 # a lot of different things including 'define_xopen_source'
3326 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003327 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003328 *-*-linux-android*)
3329 ac_sys_system=Linux-android
3330 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003331 *-*-linux*)
3332 ac_sys_system=Linux
3333 ;;
3334 *-*-cygwin*)
3335 ac_sys_system=Cygwin
3336 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003337 *-*-vxworks*)
3338 ac_sys_system=VxWorks
3339 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003340 *)
3341 # for now, limit cross builds to known configurations
3342 MACHDEP="unknown"
3343 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3344 esac
3345 ac_sys_release=
3346 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003347 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003348 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003349 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003350 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003351 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003352 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003353 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003354 fi
3355 ac_md_system=`echo $ac_sys_system |
3356 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3357 ac_md_release=`echo $ac_sys_release |
3358 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3359 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003360
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003361 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003362 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003363 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003364 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003365 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003366 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003367 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003368fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3370$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003371
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003372
3373if test "$cross_compiling" = yes; then
3374 case "$host" in
3375 *-*-linux*)
3376 case "$host_cpu" in
3377 arm*)
3378 _host_cpu=arm
3379 ;;
3380 *)
3381 _host_cpu=$host_cpu
3382 esac
3383 ;;
3384 *-*-cygwin*)
3385 _host_cpu=
3386 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003387 *-*-vxworks*)
3388 _host_cpu=$host_cpu
3389 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003390 *)
3391 # for now, limit cross builds to known configurations
3392 MACHDEP="unknown"
3393 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3394 esac
3395 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3396fi
3397
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003398# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3399# disable features if it is defined, without any means to access these
3400# features as extensions. For these systems, we skip the definition of
3401# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3402# some feature, make sure there is no alternative way to access this
3403# feature. Also, when using wildcards, make sure you have verified the
3404# need for not defining _XOPEN_SOURCE on all systems matching the
3405# wildcard, and that the wildcard does not include future systems
3406# (which may remove their limitations).
3407case $ac_sys_system/$ac_sys_release in
3408 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3409 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003410 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003411 # In addition, Stefan Krah confirms that issue #1244610 exists through
3412 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003413 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003414 define_xopen_source=no
3415 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3416 # also defined. This can be overridden by defining _BSD_SOURCE
3417 # As this has a different meaning on Linux, only define it on OpenBSD
3418
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003419$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003420
3421 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003422 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003423 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3424 # also defined. This can be overridden by defining _BSD_SOURCE
3425 # As this has a different meaning on Linux, only define it on OpenBSD
3426
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003427$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003428
3429 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003430 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3431 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3432 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003433 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 +00003434 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003435 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3436 # request to enable features supported by the standard as a request
3437 # to disable features not supported by the standard. The best way
3438 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3439 # entirely and define __EXTENSIONS__ instead.
3440 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003441 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003442 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3443 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003444 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003445 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003446 define_xopen_source=no;;
3447 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003448 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003449 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003450 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003451 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3452 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3453 # identifies itself as Darwin/7.*
3454 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3455 # disables platform specific features beyond repair.
3456 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3457 # has no effect, don't bother defining them
3458 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003459 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003460 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003461 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003462 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3463 # defining NI_NUMERICHOST.
3464 QNX/6.3.2)
3465 define_xopen_source=no
3466 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003467 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3468 # in network headers still using system V types.
3469 VxWorks/*)
3470 define_xopen_source=no
3471 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003472
Ian Nortona9edf442020-02-14 03:09:11 +00003473 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3474 # chroot() and other functions
3475 hp*|HP*)
3476 define_xopen_source=no
3477 ;;
3478
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003479esac
3480
3481if test $define_xopen_source = yes
3482then
Victor Stinner14d098d2011-09-07 22:29:43 +02003483 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003484
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003485$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003486
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003487
3488 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3489 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3490 # several APIs are not declared. Since this is also needed in some
3491 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003492
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003493$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003494
3495
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003496
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003497$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003498
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003499fi
3500
Christian Heimes647cd872013-12-07 23:39:33 +01003501# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3502case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003503 hp*|HP*)
3504 define_stdc_a1=yes;;
3505 *)
3506 define_stdc_a1=no;;
3507esac
3508
3509if test $define_stdc_a1 = yes
3510then
Christian Heimes647cd872013-12-07 23:39:33 +01003511
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003512$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003513
Christian Heimesb02bcae2013-12-08 15:21:08 +01003514fi
Christian Heimes647cd872013-12-07 23:39:33 +01003515
Jack Jansen6b08a402004-06-03 12:41:45 +00003516# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3517# it may influence the way we can build extensions, so distutils
3518# needs to check it
3519
Thomas Wouters477c8d52006-05-27 19:21:47 +00003520
Jack Jansen6b08a402004-06-03 12:41:45 +00003521CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003522EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003523
Guido van Rossum627b2d71993-12-24 10:39:16 +00003524# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003525
3526# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3527# for debug/optimization stuff. BASECFLAGS is for flags that are required
3528# just to get things to compile and link. Users are free to override OPT
3529# when running configure or make. The build should not break if they do.
3530# BASECFLAGS should generally not be messed with, however.
3531
Guido van Rossum8b131c51995-03-09 14:10:13 +00003532# If the user switches compilers, we can't believe the cache
3533if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3534then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003535 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003536(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003537fi
3538
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003539# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3540# when the compiler supports them, but we don't always want -O2, and
3541# we set -g later.
3542if test -z "$CFLAGS"; then
3543 CFLAGS=
3544fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003545
3546if test "$ac_sys_system" = "Darwin"
3547then
3548 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003549 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003550 # information
3551 if test -z "${CC}"
3552 then
3553 found_gcc=
3554 found_clang=
3555 as_save_IFS=$IFS; IFS=:
3556 for as_dir in $PATH
3557 do
3558 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003559 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003560 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003561 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003562 fi
3563 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003564 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003565 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003566 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003567 fi
3568 fi
3569 done
3570 IFS=$as_save_IFS
3571
3572 if test -n "$found_gcc" -a -n "$found_clang"
3573 then
3574 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3575 then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003576 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3577$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003578 CC="$found_clang"
3579 CXX="$found_clang++"
3580 fi
3581
3582
3583 elif test -z "$found_gcc" -a -n "$found_clang"
3584 then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003585 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3586$as_echo "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003587 CC="$found_clang"
3588 CXX="$found_clang++"
3589
3590 elif test -z "$found_gcc" -a -z "$found_clang"
3591 then
3592 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3593 if test -n "${found_clang}"
3594 then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003595 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3596$as_echo "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003597 CC="${found_clang}"
3598 CXX="`/usr/bin/xcrun -find clang++`"
3599
3600 # else: use default behaviour
3601 fi
3602 fi
3603 fi
3604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003605ac_ext=c
3606ac_cpp='$CPP $CPPFLAGS'
3607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3609ac_compiler_gnu=$ac_cv_c_compiler_gnu
3610if test -n "$ac_tool_prefix"; then
3611 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3612set dummy ${ac_tool_prefix}gcc; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3614$as_echo_n "checking for $ac_word... " >&6; }
3615if ${ac_cv_prog_CC+:} false; then :
3616 $as_echo_n "(cached) " >&6
3617else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003618 if test -n "$CC"; then
3619 ac_cv_prog_CC="$CC" # Let the user override the test.
3620else
Martin v. Löwis11437992002-04-12 09:54:03 +00003621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622for as_dir in $PATH
3623do
3624 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003625 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003629 $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 +00003630 break 2
3631 fi
3632done
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003635
Jack Jansendd19cf82001-12-06 22:36:17 +00003636fi
3637fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003638CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003639if test -n "$CC"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3641$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003642else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3644$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003645fi
3646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647
Martin v. Löwis11437992002-04-12 09:54:03 +00003648fi
3649if test -z "$ac_cv_prog_CC"; then
3650 ac_ct_CC=$CC
3651 # Extract the first word of "gcc", so it can be a program name with args.
3652set dummy gcc; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3654$as_echo_n "checking for $ac_word... " >&6; }
3655if ${ac_cv_prog_ac_ct_CC+:} false; then :
3656 $as_echo_n "(cached) " >&6
3657else
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 if test -n "$ac_ct_CC"; then
3659 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3660else
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH
3663do
3664 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003665 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 ac_cv_prog_ac_ct_CC="gcc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003669 $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 +00003670 break 2
3671 fi
3672done
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003675
3676fi
3677fi
3678ac_ct_CC=$ac_cv_prog_ac_ct_CC
3679if test -n "$ac_ct_CC"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3681$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003682else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3684$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003685fi
3686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687 if test "x$ac_ct_CC" = x; then
3688 CC=""
3689 else
3690 case $cross_compiling:$ac_tool_warned in
3691yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003692{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3693$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694ac_tool_warned=yes ;;
3695esac
3696 CC=$ac_ct_CC
3697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003698else
3699 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003700fi
3701
Jack Jansendd19cf82001-12-06 22:36:17 +00003702if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703 if test -n "$ac_tool_prefix"; then
3704 # 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 +00003705set dummy ${ac_tool_prefix}cc; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3707$as_echo_n "checking for $ac_word... " >&6; }
3708if ${ac_cv_prog_CC+:} false; then :
3709 $as_echo_n "(cached) " >&6
3710else
Jack Jansendd19cf82001-12-06 22:36:17 +00003711 if test -n "$CC"; then
3712 ac_cv_prog_CC="$CC" # Let the user override the test.
3713else
Martin v. Löwis11437992002-04-12 09:54:03 +00003714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3715for as_dir in $PATH
3716do
3717 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003718 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 ac_cv_prog_CC="${ac_tool_prefix}cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003722 $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 +00003723 break 2
3724 fi
3725done
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003728
3729fi
3730fi
3731CC=$ac_cv_prog_CC
3732if test -n "$CC"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3734$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003735else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3737$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003738fi
3739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003740
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003742fi
3743if test -z "$CC"; then
3744 # Extract the first word of "cc", so it can be a program name with args.
3745set dummy cc; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3747$as_echo_n "checking for $ac_word... " >&6; }
3748if ${ac_cv_prog_CC+:} false; then :
3749 $as_echo_n "(cached) " >&6
3750else
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 if test -n "$CC"; then
3752 ac_cv_prog_CC="$CC" # Let the user override the test.
3753else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3756for as_dir in $PATH
3757do
3758 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3762 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 ac_prog_rejected=yes
3764 continue
3765 fi
3766 ac_cv_prog_CC="cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003767 $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 +00003768 break 2
3769 fi
3770done
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774if test $ac_prog_rejected = yes; then
3775 # We found a bogon in the path, so make sure we never use it.
3776 set dummy $ac_cv_prog_CC
3777 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779 # We chose a different compiler from the bogus one.
3780 # However, it has the same basename, so the bogon will be chosen
3781 # first if we set CC to just the basename; use the full file name.
3782 shift
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003783 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784 fi
3785fi
3786fi
3787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003788CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003789if test -n "$CC"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3791$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003792else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3794$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003795fi
3796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
3799if test -z "$CC"; then
3800 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 do
3803 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3806$as_echo_n "checking for $ac_word... " >&6; }
3807if ${ac_cv_prog_CC+:} false; then :
3808 $as_echo_n "(cached) " >&6
3809else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003810 if test -n "$CC"; then
3811 ac_cv_prog_CC="$CC" # Let the user override the test.
3812else
Martin v. Löwis11437992002-04-12 09:54:03 +00003813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3814for as_dir in $PATH
3815do
3816 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003821 $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 +00003822 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003823 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003824done
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828fi
3829fi
3830CC=$ac_cv_prog_CC
3831if test -n "$CC"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3833$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003834else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3836$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003837fi
3838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 test -n "$CC" && break
3841 done
3842fi
3843if test -z "$CC"; then
3844 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003846do
3847 # Extract the first word of "$ac_prog", so it can be a program name with args.
3848set dummy $ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3850$as_echo_n "checking for $ac_word... " >&6; }
3851if ${ac_cv_prog_ac_ct_CC+:} false; then :
3852 $as_echo_n "(cached) " >&6
3853else
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 if test -n "$ac_ct_CC"; then
3855 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3856else
3857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3858for as_dir in $PATH
3859do
3860 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003861 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003862 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003863 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003864 ac_cv_prog_ac_ct_CC="$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003865 $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 +00003866 break 2
3867 fi
3868done
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003871
Martin v. Löwis11437992002-04-12 09:54:03 +00003872fi
3873fi
3874ac_ct_CC=$ac_cv_prog_ac_ct_CC
3875if test -n "$ac_ct_CC"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3877$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003878else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3880$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003881fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 test -n "$ac_ct_CC" && break
3885done
Michael W. Hudson54241132001-12-07 15:38:26 +00003886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887 if test "x$ac_ct_CC" = x; then
3888 CC=""
3889 else
3890 case $cross_compiling:$ac_tool_warned in
3891yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894ac_tool_warned=yes ;;
3895esac
3896 CC=$ac_ct_CC
3897 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003898fi
3899
3900fi
3901
3902
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003903test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003905as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003906See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003907
3908# Provide some information about the compiler.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003909$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003910set X $ac_compile
3911ac_compiler=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003912for ac_option in --version -v -V -qversion; do
Matthias Kloseb9621712010-04-24 17:59:49 +00003913 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914case "(($ac_try" in
3915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3916 *) ac_try_echo=$ac_try;;
3917esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003918eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003919$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003921 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 if test -s conftest.err; then
3923 sed '10a\
3924... rest of stderr output deleted ...
3925 10q' conftest.err >conftest.er1
3926 cat conftest.er1 >&5
3927 fi
3928 rm -f conftest.er1 conftest.err
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003929 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00003930 test $ac_status = 0; }
3931done
Martin v. Löwis11437992002-04-12 09:54:03 +00003932
Matthias Kloseb9621712010-04-24 17:59:49 +00003933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003934/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003935
Martin v. Löwis11437992002-04-12 09:54:03 +00003936int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003937main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00003938{
3939
3940 ;
3941 return 0;
3942}
3943_ACEOF
3944ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003945ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003946# Try to create an executable without -o first, disregard a.out.
3947# It will help us diagnose broken compilers, and finding out an intuition
3948# of exeext.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3950$as_echo_n "checking whether the C compiler works... " >&6; }
3951ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00003952
3953# The possible output files:
3954ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956ac_rmfiles=
3957for ac_file in $ac_files
3958do
3959 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3962 esac
3963done
3964rm -f $ac_rmfiles
3965
Matthias Kloseb9621712010-04-24 17:59:49 +00003966if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967case "(($ac_try" in
3968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3969 *) ac_try_echo=$ac_try;;
3970esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003972$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 ac_status=$?
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3976 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3978# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3979# in a Makefile. We should not override ac_cv_exeext if it was cached,
3980# so that the user can short-circuit this test for compilers unknown to
3981# Autoconf.
3982for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003983do
3984 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987 ;;
3988 [ab].out )
3989 # We found the default executable, but exeext='' is most
3990 # certainly right.
3991 break;;
3992 *.* )
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01003993 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 then :; else
3995 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3996 fi
3997 # We set ac_cv_exeext here because the later test for it is not
3998 # safe: cross compilers may not add the suffix if given an `-o'
3999 # argument, so we may need to know it at that point already.
4000 # Even if this section looks crufty: it has the advantage of
4001 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002 break;;
4003 * )
4004 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004005 esac
4006done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007test "$ac_cv_exeext" = no && ac_cv_exeext=
4008
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004009else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 ac_file=''
4011fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004012if test -z "$ac_file"; then :
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4014$as_echo "no" >&6; }
4015$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004016sed 's/^/| /' conftest.$ac_ext >&5
4017
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004018{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004022else
4023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4024$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004025fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4027$as_echo_n "checking for C compiler default output file name... " >&6; }
4028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4029$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004030ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033ac_clean_files=$ac_clean_files_save
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4035$as_echo_n "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004036if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037case "(($ac_try" in
4038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4039 *) ac_try_echo=$ac_try;;
4040esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004041eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004042$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004044 ac_status=$?
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004045 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4046 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4048# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4049# work properly (i.e., refer to `conftest.exe'), while it won't with
4050# `rm'.
4051for ac_file in conftest.exe conftest conftest.*; do
4052 test -f "$ac_file" || continue
4053 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004055 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4056 break;;
4057 * ) break;;
4058 esac
4059done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004060else
4061 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004063as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004064See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004066rm -f conftest conftest$ac_cv_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4068$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004069
4070rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004071EXEEXT=$ac_cv_exeext
4072ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4074/* end confdefs.h. */
4075#include <stdio.h>
4076int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004077main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{
4079FILE *f = fopen ("conftest.out", "w");
4080 return ferror (f) || fclose (f) != 0;
4081
4082 ;
4083 return 0;
4084}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004086ac_clean_files="$ac_clean_files conftest.out"
4087# Check that the compiler produces executables we can run. If not, either
4088# the compiler is broken, or we cross compile.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4090$as_echo_n "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004091if test "$cross_compiling" != yes; then
4092 { { ac_try="$ac_link"
4093case "(($ac_try" in
4094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4095 *) ac_try_echo=$ac_try;;
4096esac
4097eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004098$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 (eval "$ac_link") 2>&5
4100 ac_status=$?
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004101 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 test $ac_status = 0; }
4103 if { ac_try='./conftest$ac_cv_exeext'
4104 { { case "(($ac_try" in
4105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4106 *) ac_try_echo=$ac_try;;
4107esac
4108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004109$as_echo "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 (eval "$ac_try") 2>&5
4111 ac_status=$?
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 test $ac_status = 0; }; }; then
4114 cross_compiling=no
4115 else
4116 if test "$cross_compiling" = maybe; then
4117 cross_compiling=yes
4118 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4121as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004122If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004123See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 fi
4125 fi
4126fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4128$as_echo "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004129
4130rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4131ac_clean_files=$ac_clean_files_save
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4133$as_echo_n "checking for suffix of object files... " >&6; }
4134if ${ac_cv_objext+:} false; then :
4135 $as_echo_n "(cached) " >&6
4136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004138/* end confdefs.h. */
4139
4140int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004141main ()
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004142{
4143
4144 ;
4145 return 0;
4146}
4147_ACEOF
4148rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004149if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150case "(($ac_try" in
4151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4152 *) ac_try_echo=$ac_try;;
4153esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004154eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004155$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 ac_status=$?
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004158 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4159 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004160 for ac_file in conftest.o conftest.obj conftest.*; do
4161 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4165 break;;
4166 esac
4167done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004168else
4169 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004170sed 's/^/| /' conftest.$ac_ext >&5
4171
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004172{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004174as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004175See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004177rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004178fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4180$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004181OBJEXT=$ac_cv_objext
4182ac_objext=$OBJEXT
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4184$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4185if ${ac_cv_c_compiler_gnu+:} false; then :
4186 $as_echo_n "(cached) " >&6
4187else
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Martin v. Löwis11437992002-04-12 09:54:03 +00004191int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004192main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004193{
4194#ifndef __GNUC__
4195 choke me
4196#endif
4197
4198 ;
4199 return 0;
4200}
4201_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 ac_compiler_gnu=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004204else
Matthias Kloseb9621712010-04-24 17:59:49 +00004205 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004206fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004208ac_cv_c_compiler_gnu=$ac_compiler_gnu
4209
4210fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4212$as_echo "$ac_cv_c_compiler_gnu" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if test $ac_compiler_gnu = yes; then
4214 GCC=yes
4215else
4216 GCC=
4217fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004218ac_test_CFLAGS=${CFLAGS+set}
Martin v. Löwis11437992002-04-12 09:54:03 +00004219ac_save_CFLAGS=$CFLAGS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4221$as_echo_n "checking whether $CC accepts -g... " >&6; }
4222if ${ac_cv_prog_cc_g+:} false; then :
4223 $as_echo_n "(cached) " >&6
4224else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225 ac_save_c_werror_flag=$ac_c_werror_flag
4226 ac_c_werror_flag=yes
4227 ac_cv_prog_cc_g=no
4228 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004231
Martin v. Löwis11437992002-04-12 09:54:03 +00004232int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004233main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00004234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004240if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004241 ac_cv_prog_cc_g=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004242else
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 CFLAGS=""
4244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245/* end confdefs.h. */
4246
4247int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004248main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249{
4250
4251 ;
4252 return 0;
4253}
4254_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004255if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004257else
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261/* end confdefs.h. */
4262
4263int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004264main ()
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004271if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004273fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 ac_c_werror_flag=$ac_save_c_werror_flag
4280fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4282$as_echo "$ac_cv_prog_cc_g" >&6; }
4283if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004284 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004285elif test $ac_cv_prog_cc_g = yes; then
4286 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004287 CFLAGS="-g -O2"
4288 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004289 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290 fi
4291else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004292 if test "$GCC" = yes; then
4293 CFLAGS="-O2"
4294 else
4295 CFLAGS=
4296 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004297fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4299$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4300if ${ac_cv_prog_cc_c89+:} false; then :
4301 $as_echo_n "(cached) " >&6
4302else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004304ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004306/* end confdefs.h. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004307#include <stdarg.h>
4308#include <stdio.h>
4309struct stat;
4310/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4311struct buf { int x; };
4312FILE * (*rcsopen) (struct buf *, struct stat *, int);
4313static char *e (p, i)
4314 char **p;
4315 int i;
4316{
4317 return p[i];
4318}
4319static char *f (char * (*g) (char **, int), char **p, ...)
4320{
4321 char *s;
4322 va_list v;
4323 va_start (v,p);
4324 s = g (p, va_arg (v,int));
4325 va_end (v);
4326 return s;
4327}
4328
4329/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4330 function prototypes and stuff, but not '\xHH' hex character constants.
4331 These don't provoke an error unfortunately, instead are silently treated
4332 as 'x'. The following induces an error, until -std is added to get
4333 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4334 array size at least. It's necessary to write '\x00'==0 to get something
4335 that's true only with -std. */
4336int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4337
4338/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4339 inside strings and character constants. */
4340#define FOO(x) 'x'
4341int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4342
4343int test (int i, double x);
4344struct s1 {int (*f) (int a);};
4345struct s2 {int (*f) (double a);};
4346int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4347int argc;
4348char **argv;
4349int
4350main ()
4351{
4352return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4353 ;
4354 return 0;
4355}
Skip Montanaro6dead952003-09-25 14:50:04 +00004356_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004357for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4358 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004359do
4360 CC="$ac_save_CC $ac_arg"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004361 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004363fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004364rm -f core conftest.err conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004366done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004368CC=$ac_save_CC
Christian Heimes39258d32021-04-17 11:36:35 +02004369
Pablo Galindoba421752021-05-03 20:33:17 +01004370fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004371# AC_CACHE_VAL
4372case "x$ac_cv_prog_cc_c89" in
4373 x)
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4375$as_echo "none needed" >&6; } ;;
4376 xno)
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4378$as_echo "unsupported" >&6; } ;;
4379 *)
4380 CC="$CC $ac_cv_prog_cc_c89"
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4382$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4383esac
4384if test "x$ac_cv_prog_cc_c89" != xno; then :
4385
Matthias Kloseb9621712010-04-24 17:59:49 +00004386fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004387
Martin v. Löwis11437992002-04-12 09:54:03 +00004388ac_ext=c
4389ac_cpp='$CPP $CPPFLAGS'
4390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4392ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004394ac_ext=c
4395ac_cpp='$CPP $CPPFLAGS'
4396ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4397ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4398ac_compiler_gnu=$ac_cv_c_compiler_gnu
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4400$as_echo_n "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004401# On Suns, sometimes $CPP names a directory.
4402if test -n "$CPP" && test -d "$CPP"; then
4403 CPP=
4404fi
4405if test -z "$CPP"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004406 if ${ac_cv_prog_CPP+:} false; then :
4407 $as_echo_n "(cached) " >&6
4408else
4409 # Double quotes because CPP needs to be expanded
4410 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004411 do
4412 ac_preproc_ok=false
4413for ac_c_preproc_warn_flag in '' yes
4414do
4415 # Use a header file that comes with gcc, so configuring glibc
4416 # with a fresh cross-compiler works.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004417 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4418 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004419 # On the NeXT, cc -E runs the code through the compiler's parser,
4420 # not just through cpp. "Syntax error" is here to catch this case.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004423#ifdef __STDC__
4424# include <limits.h>
4425#else
4426# include <assert.h>
4427#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004428 Syntax error
4429_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004430if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004431
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004432else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004433 # Broken: fails on valid input.
4434continue
4435fi
4436rm -f conftest.err conftest.i conftest.$ac_ext
4437
4438 # OK, works on sane cases. Now check whether nonexistent headers
4439 # can be detected and how.
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441/* end confdefs.h. */
4442#include <ac_nonexistent.h>
4443_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004444if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004445 # Broken: success on invalid input.
4446continue
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004447else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004448 # Passes both tests.
4449ac_preproc_ok=:
4450break
4451fi
4452rm -f conftest.err conftest.i conftest.$ac_ext
4453
4454done
4455# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4456rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004457if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004458 break
4459fi
4460
4461 done
4462 ac_cv_prog_CPP=$CPP
4463
4464fi
4465 CPP=$ac_cv_prog_CPP
4466else
4467 ac_cv_prog_CPP=$CPP
4468fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4470$as_echo "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004471ac_preproc_ok=false
4472for ac_c_preproc_warn_flag in '' yes
4473do
4474 # Use a header file that comes with gcc, so configuring glibc
4475 # with a fresh cross-compiler works.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004476 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4477 # <limits.h> exists even on freestanding compilers.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004478 # On the NeXT, cc -E runs the code through the compiler's parser,
4479 # not just through cpp. "Syntax error" is here to catch this case.
4480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4481/* end confdefs.h. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004482#ifdef __STDC__
4483# include <limits.h>
4484#else
4485# include <assert.h>
4486#endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004487 Syntax error
4488_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004489if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004490
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004491else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004492 # Broken: fails on valid input.
4493continue
4494fi
4495rm -f conftest.err conftest.i conftest.$ac_ext
4496
4497 # OK, works on sane cases. Now check whether nonexistent headers
4498 # can be detected and how.
4499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4500/* end confdefs.h. */
4501#include <ac_nonexistent.h>
4502_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004503if ac_fn_c_try_cpp "$LINENO"; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004504 # Broken: success on invalid input.
4505continue
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004506else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004507 # Passes both tests.
4508ac_preproc_ok=:
4509break
4510fi
4511rm -f conftest.err conftest.i conftest.$ac_ext
4512
4513done
4514# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4515rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004516if $ac_preproc_ok; then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004517
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004518else
4519 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004521as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4522See \`config.log' for more details" "$LINENO" 5; }
4523fi
4524
4525ac_ext=c
4526ac_cpp='$CPP $CPPFLAGS'
4527ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4528ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4529ac_compiler_gnu=$ac_cv_c_compiler_gnu
4530
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4532$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4533if ${ac_cv_path_GREP+:} false; then :
4534 $as_echo_n "(cached) " >&6
4535else
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004536 if test -z "$GREP"; then
4537 ac_path_GREP_found=false
4538 # Loop through the user's path and test for each of PROGNAME-LIST
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4541do
4542 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004543 test -z "$as_dir" && as_dir=.
4544 for ac_prog in grep ggrep; do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004545 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004546 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004547 as_fn_executable_p "$ac_path_GREP" || continue
4548# Check for GNU ac_path_GREP and select it if it is found.
4549 # Check for GNU $ac_path_GREP
4550case `"$ac_path_GREP" --version 2>&1` in
4551*GNU*)
4552 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4553*)
4554 ac_count=0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004555 $as_echo_n 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004556 while :
4557 do
4558 cat "conftest.in" "conftest.in" >"conftest.tmp"
4559 mv "conftest.tmp" "conftest.in"
4560 cp "conftest.in" "conftest.nl"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004561 $as_echo 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004562 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4563 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4564 as_fn_arith $ac_count + 1 && ac_count=$as_val
4565 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4566 # Best one so far, save it but keep looking for a better one
4567 ac_cv_path_GREP="$ac_path_GREP"
4568 ac_path_GREP_max=$ac_count
4569 fi
4570 # 10*(2^10) chars as input seems more than enough
4571 test $ac_count -gt 10 && break
4572 done
4573 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4574esac
4575
4576 $ac_path_GREP_found && break 3
4577 done
4578 done
4579 done
4580IFS=$as_save_IFS
4581 if test -z "$ac_cv_path_GREP"; then
4582 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4583 fi
4584else
4585 ac_cv_path_GREP=$GREP
4586fi
4587
4588fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4590$as_echo "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004591 GREP="$ac_cv_path_GREP"
4592
4593
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4595$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4596if ${ac_cv_path_SED+:} false; then :
4597 $as_echo_n "(cached) " >&6
4598else
Łukasz Langaa785c872016-09-09 17:37:37 -07004599 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4600 for ac_i in 1 2 3 4 5 6 7; do
4601 ac_script="$ac_script$as_nl$ac_script"
4602 done
4603 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4604 { ac_script=; unset ac_script;}
4605 if test -z "$SED"; then
4606 ac_path_SED_found=false
4607 # Loop through the user's path and test for each of PROGNAME-LIST
4608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH
4610do
4611 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004612 test -z "$as_dir" && as_dir=.
4613 for ac_prog in sed gsed; do
Łukasz Langaa785c872016-09-09 17:37:37 -07004614 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004615 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07004616 as_fn_executable_p "$ac_path_SED" || continue
4617# Check for GNU ac_path_SED and select it if it is found.
4618 # Check for GNU $ac_path_SED
4619case `"$ac_path_SED" --version 2>&1` in
4620*GNU*)
4621 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4622*)
4623 ac_count=0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004624 $as_echo_n 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07004625 while :
4626 do
4627 cat "conftest.in" "conftest.in" >"conftest.tmp"
4628 mv "conftest.tmp" "conftest.in"
4629 cp "conftest.in" "conftest.nl"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004630 $as_echo '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07004631 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4632 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4633 as_fn_arith $ac_count + 1 && ac_count=$as_val
4634 if test $ac_count -gt ${ac_path_SED_max-0}; then
4635 # Best one so far, save it but keep looking for a better one
4636 ac_cv_path_SED="$ac_path_SED"
4637 ac_path_SED_max=$ac_count
4638 fi
4639 # 10*(2^10) chars as input seems more than enough
4640 test $ac_count -gt 10 && break
4641 done
4642 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4643esac
4644
4645 $ac_path_SED_found && break 3
4646 done
4647 done
4648 done
4649IFS=$as_save_IFS
4650 if test -z "$ac_cv_path_SED"; then
4651 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4652 fi
4653else
4654 ac_cv_path_SED=$SED
4655fi
4656
4657fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4659$as_echo "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07004660 SED="$ac_cv_path_SED"
4661 rm -f conftest.sed
4662
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004663
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004664
4665
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4667$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669# Check whether --with-cxx_main was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004670if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004671 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004672
4673 case $withval in
4674 no) with_cxx_main=no
4675 MAINCC='$(CC)';;
4676 yes) with_cxx_main=yes
4677 MAINCC='$(CXX)';;
4678 *) with_cxx_main=yes
4679 MAINCC=$withval
4680 if test -z "$CXX"
4681 then
4682 CXX=$withval
4683 fi;;
4684 esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004685else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004686
4687 with_cxx_main=no
4688 MAINCC='$(CC)'
4689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004690fi
4691
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4693$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004694
4695preset_cxx="$CXX"
4696if test -z "$CXX"
4697then
4698 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004699 gcc) if test -n "$ac_tool_prefix"; then
4700 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4701set dummy ${ac_tool_prefix}g++; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4703$as_echo_n "checking for $ac_word... " >&6; }
4704if ${ac_cv_path_CXX+:} false; then :
4705 $as_echo_n "(cached) " >&6
4706else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707 case $CXX in
4708 [\\/]* | ?:[\\/]*)
4709 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4710 ;;
4711 *)
4712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4713for as_dir in notfound
4714do
4715 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004716 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004717 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4719 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004721 break 2
4722 fi
4723done
4724 done
4725IFS=$as_save_IFS
4726
4727 ;;
4728esac
4729fi
4730CXX=$ac_cv_path_CXX
4731if test -n "$CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4733$as_echo "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004737fi
4738
4739
4740fi
4741if test -z "$ac_cv_path_CXX"; then
4742 ac_pt_CXX=$CXX
4743 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004744set dummy g++; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
4747if ${ac_cv_path_ac_pt_CXX+:} false; then :
4748 $as_echo_n "(cached) " >&6
4749else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 case $ac_pt_CXX in
4751 [\\/]* | ?:[\\/]*)
4752 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4753 ;;
4754 *)
4755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756for as_dir in notfound
4757do
4758 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004759 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4762 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 break 2
4765 fi
4766done
4767 done
4768IFS=$as_save_IFS
4769
4770 ;;
4771esac
4772fi
4773ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4774if test -n "$ac_pt_CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4776$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780fi
4781
4782 if test "x$ac_pt_CXX" = x; then
4783 CXX="g++"
4784 else
4785 case $cross_compiling:$ac_tool_warned in
4786yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004787{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4788$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789ac_tool_warned=yes ;;
4790esac
4791 CXX=$ac_pt_CXX
4792 fi
4793else
4794 CXX="$ac_cv_path_CXX"
4795fi
4796 ;;
4797 cc) if test -n "$ac_tool_prefix"; then
4798 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4799set dummy ${ac_tool_prefix}c++; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4801$as_echo_n "checking for $ac_word... " >&6; }
4802if ${ac_cv_path_CXX+:} false; then :
4803 $as_echo_n "(cached) " >&6
4804else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805 case $CXX in
4806 [\\/]* | ?:[\\/]*)
4807 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4808 ;;
4809 *)
4810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4811for as_dir in notfound
4812do
4813 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004814 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4817 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819 break 2
4820 fi
4821done
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004823IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825 ;;
4826esac
4827fi
4828CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004829if test -n "$CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4831$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004832else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4834$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004836
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837
4838fi
4839if test -z "$ac_cv_path_CXX"; then
4840 ac_pt_CXX=$CXX
4841 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842set dummy c++; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4844$as_echo_n "checking for $ac_word... " >&6; }
4845if ${ac_cv_path_ac_pt_CXX+:} false; then :
4846 $as_echo_n "(cached) " >&6
4847else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004850 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 +00004851 ;;
4852 *)
4853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4854for as_dir in notfound
4855do
4856 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004857 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004858 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4860 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862 break 2
4863 fi
4864done
Matthias Kloseb9621712010-04-24 17:59:49 +00004865 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004866IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004868 ;;
4869esac
4870fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004871ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4872if test -n "$ac_pt_CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4874$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004875else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004879
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880 if test "x$ac_pt_CXX" = x; then
4881 CXX="c++"
4882 else
4883 case $cross_compiling:$ac_tool_warned in
4884yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004885{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4886$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004887ac_tool_warned=yes ;;
4888esac
4889 CXX=$ac_pt_CXX
4890 fi
4891else
4892 CXX="$ac_cv_path_CXX"
4893fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004894 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004895 clang|*/clang) if test -n "$ac_tool_prefix"; then
4896 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4897set dummy ${ac_tool_prefix}clang++; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899$as_echo_n "checking for $ac_word... " >&6; }
4900if ${ac_cv_path_CXX+:} false; then :
4901 $as_echo_n "(cached) " >&6
4902else
Ned Deilycbfb9a52012-06-23 16:02:19 -07004903 case $CXX in
4904 [\\/]* | ?:[\\/]*)
4905 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4906 ;;
4907 *)
4908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in notfound
4910do
4911 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004912 test -z "$as_dir" && as_dir=.
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4915 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07004917 break 2
4918 fi
4919done
4920 done
4921IFS=$as_save_IFS
4922
Ned Deilycbfb9a52012-06-23 16:02:19 -07004923 ;;
4924esac
4925fi
4926CXX=$ac_cv_path_CXX
4927if test -n "$CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4929$as_echo "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004930else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932$as_echo "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07004933fi
4934
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004935
4936fi
4937if test -z "$ac_cv_path_CXX"; then
4938 ac_pt_CXX=$CXX
4939 # Extract the first word of "clang++", so it can be a program name with args.
4940set dummy clang++; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4942$as_echo_n "checking for $ac_word... " >&6; }
4943if ${ac_cv_path_ac_pt_CXX+:} false; then :
4944 $as_echo_n "(cached) " >&6
4945else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004946 case $ac_pt_CXX in
4947 [\\/]* | ?:[\\/]*)
4948 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4949 ;;
4950 *)
4951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4952for as_dir in notfound
4953do
4954 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004955 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004956 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004957 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4958 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004960 break 2
4961 fi
4962done
4963 done
4964IFS=$as_save_IFS
4965
4966 ;;
4967esac
4968fi
4969ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4970if test -n "$ac_pt_CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4972$as_echo "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004973else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4975$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004976fi
4977
4978 if test "x$ac_pt_CXX" = x; then
4979 CXX="clang++"
4980 else
4981 case $cross_compiling:$ac_tool_warned in
4982yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004983{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4984$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004985ac_tool_warned=yes ;;
4986esac
4987 CXX=$ac_pt_CXX
4988 fi
4989else
4990 CXX="$ac_cv_path_CXX"
4991fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004992 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004993 icc|*/icc) if test -n "$ac_tool_prefix"; then
4994 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4995set dummy ${ac_tool_prefix}icpc; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4997$as_echo_n "checking for $ac_word... " >&6; }
4998if ${ac_cv_path_CXX+:} false; then :
4999 $as_echo_n "(cached) " >&6
5000else
Zachary Ware5af85642015-12-21 12:09:17 -06005001 case $CXX in
5002 [\\/]* | ?:[\\/]*)
5003 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5004 ;;
5005 *)
5006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007for as_dir in notfound
5008do
5009 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005010 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005011 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5013 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005015 break 2
5016 fi
5017done
5018 done
5019IFS=$as_save_IFS
5020
5021 ;;
5022esac
5023fi
5024CXX=$ac_cv_path_CXX
5025if test -n "$CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5027$as_echo "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005028else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5030$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005031fi
5032
5033
5034fi
5035if test -z "$ac_cv_path_CXX"; then
5036 ac_pt_CXX=$CXX
5037 # Extract the first word of "icpc", so it can be a program name with args.
5038set dummy icpc; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5040$as_echo_n "checking for $ac_word... " >&6; }
5041if ${ac_cv_path_ac_pt_CXX+:} false; then :
5042 $as_echo_n "(cached) " >&6
5043else
Zachary Ware5af85642015-12-21 12:09:17 -06005044 case $ac_pt_CXX in
5045 [\\/]* | ?:[\\/]*)
5046 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5047 ;;
5048 *)
5049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5050for as_dir in notfound
5051do
5052 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005053 test -z "$as_dir" && as_dir=.
Zachary Ware5af85642015-12-21 12:09:17 -06005054 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5056 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005058 break 2
5059 fi
5060done
5061 done
5062IFS=$as_save_IFS
5063
5064 ;;
5065esac
5066fi
5067ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5068if test -n "$ac_pt_CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5070$as_echo "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005071else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5073$as_echo "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005074fi
5075
5076 if test "x$ac_pt_CXX" = x; then
5077 CXX="icpc"
5078 else
5079 case $cross_compiling:$ac_tool_warned in
5080yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005081{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5082$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005083ac_tool_warned=yes ;;
5084esac
5085 CXX=$ac_pt_CXX
5086 fi
5087else
5088 CXX="$ac_cv_path_CXX"
5089fi
5090 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005091 esac
5092 if test "$CXX" = "notfound"
5093 then
5094 CXX=""
5095 fi
5096fi
5097if test -z "$CXX"
5098then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005099 if test -n "$ac_tool_prefix"; then
5100 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5101 do
5102 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5105$as_echo_n "checking for $ac_word... " >&6; }
5106if ${ac_cv_prog_CXX+:} false; then :
5107 $as_echo_n "(cached) " >&6
5108else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109 if test -n "$CXX"; then
5110 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5111else
5112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5113for as_dir in $PATH
5114do
5115 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005116 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005119 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121 break 2
5122 fi
5123done
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005126
5127fi
5128fi
5129CXX=$ac_cv_prog_CXX
5130if test -n "$CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5132$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5135$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136fi
5137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005138
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005139 test -n "$CXX" && break
5140 done
5141fi
5142if test -z "$CXX"; then
5143 ac_ct_CXX=$CXX
5144 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5145do
5146 # Extract the first word of "$ac_prog", so it can be a program name with args.
5147set dummy $ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5149$as_echo_n "checking for $ac_word... " >&6; }
5150if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5151 $as_echo_n "(cached) " >&6
5152else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005153 if test -n "$ac_ct_CXX"; then
5154 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5155else
5156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157for as_dir in $PATH
5158do
5159 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005160 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005161 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 ac_cv_prog_ac_ct_CXX="$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005165 break 2
5166 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005168 done
5169IFS=$as_save_IFS
5170
5171fi
5172fi
5173ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5174if test -n "$ac_ct_CXX"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5176$as_echo "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005177else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005180fi
5181
5182
5183 test -n "$ac_ct_CXX" && break
5184done
5185
5186 if test "x$ac_ct_CXX" = x; then
5187 CXX="notfound"
5188 else
5189 case $cross_compiling:$ac_tool_warned in
5190yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005193ac_tool_warned=yes ;;
5194esac
5195 CXX=$ac_ct_CXX
5196 fi
5197fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005198
5199 if test "$CXX" = "notfound"
5200 then
5201 CXX=""
5202 fi
5203fi
5204if test "$preset_cxx" != "$CXX"
5205then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005206 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005207
5208 By default, distutils will build C++ extension modules with \"$CXX\".
5209 If this is not intended, then set CXX on the configure command line.
5210 " >&5
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005211$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005212
5213 By default, distutils will build C++ extension modules with \"$CXX\".
5214 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005215 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005216fi
5217
5218
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5220
5221
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5223$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005225#undef bfin
5226#undef cris
5227#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005228#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005229#undef hppa
5230#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005231#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005232#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005233#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005234#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005235#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005236#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005237 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005238#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005239# if defined(__x86_64__) && defined(__LP64__)
5240 x86_64-linux-gnu
5241# elif defined(__x86_64__) && defined(__ILP32__)
5242 x86_64-linux-gnux32
5243# elif defined(__i386__)
5244 i386-linux-gnu
5245# elif defined(__aarch64__) && defined(__AARCH64EL__)
5246# if defined(__ILP32__)
5247 aarch64_ilp32-linux-gnu
5248# else
5249 aarch64-linux-gnu
5250# endif
5251# elif defined(__aarch64__) && defined(__AARCH64EB__)
5252# if defined(__ILP32__)
5253 aarch64_be_ilp32-linux-gnu
5254# else
5255 aarch64_be-linux-gnu
5256# endif
5257# elif defined(__alpha__)
5258 alpha-linux-gnu
5259# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5260# if defined(__ARMEL__)
5261 arm-linux-gnueabihf
5262# else
5263 armeb-linux-gnueabihf
5264# endif
5265# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5266# if defined(__ARMEL__)
5267 arm-linux-gnueabi
5268# else
5269 armeb-linux-gnueabi
5270# endif
5271# elif defined(__hppa__)
5272 hppa-linux-gnu
5273# elif defined(__ia64__)
5274 ia64-linux-gnu
5275# elif defined(__m68k__) && !defined(__mcoldfire__)
5276 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005277# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5278# if _MIPS_SIM == _ABIO32
5279 mipsisa32r6el-linux-gnu
5280# elif _MIPS_SIM == _ABIN32
5281 mipsisa64r6el-linux-gnuabin32
5282# elif _MIPS_SIM == _ABI64
5283 mipsisa64r6el-linux-gnuabi64
5284# else
5285# error unknown platform triplet
5286# endif
5287# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5288# if _MIPS_SIM == _ABIO32
5289 mipsisa32r6-linux-gnu
5290# elif _MIPS_SIM == _ABIN32
5291 mipsisa64r6-linux-gnuabin32
5292# elif _MIPS_SIM == _ABI64
5293 mipsisa64r6-linux-gnuabi64
5294# else
5295# error unknown platform triplet
5296# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005297# elif defined(__mips_hard_float) && defined(_MIPSEL)
5298# if _MIPS_SIM == _ABIO32
5299 mipsel-linux-gnu
5300# elif _MIPS_SIM == _ABIN32
5301 mips64el-linux-gnuabin32
5302# elif _MIPS_SIM == _ABI64
5303 mips64el-linux-gnuabi64
5304# else
5305# error unknown platform triplet
5306# endif
5307# elif defined(__mips_hard_float)
5308# if _MIPS_SIM == _ABIO32
5309 mips-linux-gnu
5310# elif _MIPS_SIM == _ABIN32
5311 mips64-linux-gnuabin32
5312# elif _MIPS_SIM == _ABI64
5313 mips64-linux-gnuabi64
5314# else
5315# error unknown platform triplet
5316# endif
5317# elif defined(__or1k__)
5318 or1k-linux-gnu
5319# elif defined(__powerpc__) && defined(__SPE__)
5320 powerpc-linux-gnuspe
5321# elif defined(__powerpc64__)
5322# if defined(__LITTLE_ENDIAN__)
5323 powerpc64le-linux-gnu
5324# else
5325 powerpc64-linux-gnu
5326# endif
5327# elif defined(__powerpc__)
5328 powerpc-linux-gnu
5329# elif defined(__s390x__)
5330 s390x-linux-gnu
5331# elif defined(__s390__)
5332 s390-linux-gnu
5333# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5334 sh4-linux-gnu
5335# elif defined(__sparc__) && defined(__arch64__)
5336 sparc64-linux-gnu
5337# elif defined(__sparc__)
5338 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005339# elif defined(__riscv)
5340# if __riscv_xlen == 32
5341 riscv32-linux-gnu
5342# elif __riscv_xlen == 64
5343 riscv64-linux-gnu
5344# else
5345# error unknown platform triplet
5346# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005347# else
5348# error unknown platform triplet
5349# endif
5350#elif defined(__FreeBSD_kernel__)
5351# if defined(__LP64__)
5352 x86_64-kfreebsd-gnu
5353# elif defined(__i386__)
5354 i386-kfreebsd-gnu
5355# else
5356# error unknown platform triplet
5357# endif
5358#elif defined(__gnu_hurd__)
5359 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005360#elif defined(__APPLE__)
5361 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005362#elif defined(__VXWORKS__)
5363 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005364#else
5365# error unknown platform triplet
5366#endif
5367
5368EOF
5369
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005370if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005371 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5373$as_echo "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005374else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5376$as_echo "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005377fi
5378rm -f conftest.c conftest.out
5379
5380if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5381 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5382 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5383 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005384elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5385 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005386fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005387
doko@ubuntu.com55532312016-06-14 08:55:19 +02005388if test x$MULTIARCH != x; then
5389 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5390fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005391
5392
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5394$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005395save_LDFLAGS="$LDFLAGS"
5396LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005397
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5399/* end confdefs.h. */
5400
5401int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005402main ()
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005403{
5404
5405 ;
5406 return 0;
5407}
5408_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005410 NO_AS_NEEDED="-Wl,--no-as-needed"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5412$as_echo "yes" >&6; }
5413else
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005414 NO_AS_NEEDED=""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5416$as_echo "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005417fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005418rm -f core conftest.err conftest.$ac_objext \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005419 conftest$ac_exeext conftest.$ac_ext
5420LDFLAGS="$save_LDFLAGS"
5421
5422
5423
5424# checks for UNIX variants that set C preprocessor variables
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005425
5426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5427$as_echo_n "checking for egrep... " >&6; }
5428if ${ac_cv_path_EGREP+:} false; then :
5429 $as_echo_n "(cached) " >&6
5430else
5431 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5432 then ac_cv_path_EGREP="$GREP -E"
5433 else
5434 if test -z "$EGREP"; then
5435 ac_path_EGREP_found=false
5436 # Loop through the user's path and test for each of PROGNAME-LIST
5437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5438for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005440 IFS=$as_save_IFS
5441 test -z "$as_dir" && as_dir=.
5442 for ac_prog in egrep; do
5443 for ac_exec_ext in '' $ac_executable_extensions; do
5444 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5445 as_fn_executable_p "$ac_path_EGREP" || continue
5446# Check for GNU ac_path_EGREP and select it if it is found.
5447 # Check for GNU $ac_path_EGREP
5448case `"$ac_path_EGREP" --version 2>&1` in
5449*GNU*)
5450 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5451*)
5452 ac_count=0
5453 $as_echo_n 0123456789 >"conftest.in"
5454 while :
5455 do
5456 cat "conftest.in" "conftest.in" >"conftest.tmp"
5457 mv "conftest.tmp" "conftest.in"
5458 cp "conftest.in" "conftest.nl"
5459 $as_echo 'EGREP' >> "conftest.nl"
5460 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5461 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5462 as_fn_arith $ac_count + 1 && ac_count=$as_val
5463 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5464 # Best one so far, save it but keep looking for a better one
5465 ac_cv_path_EGREP="$ac_path_EGREP"
5466 ac_path_EGREP_max=$ac_count
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005468 # 10*(2^10) chars as input seems more than enough
5469 test $ac_count -gt 10 && break
5470 done
5471 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5472esac
5473
5474 $ac_path_EGREP_found && break 3
5475 done
5476 done
5477 done
5478IFS=$as_save_IFS
5479 if test -z "$ac_cv_path_EGREP"; then
5480 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 +00005481 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005482else
5483 ac_cv_path_EGREP=$EGREP
5484fi
5485
5486 fi
5487fi
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5489$as_echo "$ac_cv_path_EGREP" >&6; }
5490 EGREP="$ac_cv_path_EGREP"
5491
5492
5493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5494$as_echo_n "checking for ANSI C header files... " >&6; }
5495if ${ac_cv_header_stdc+:} false; then :
5496 $as_echo_n "(cached) " >&6
5497else
5498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5499/* end confdefs.h. */
5500#include <stdlib.h>
5501#include <stdarg.h>
5502#include <string.h>
5503#include <float.h>
5504
5505int
5506main ()
5507{
5508
5509 ;
5510 return 0;
5511}
5512_ACEOF
5513if ac_fn_c_try_compile "$LINENO"; then :
5514 ac_cv_header_stdc=yes
5515else
5516 ac_cv_header_stdc=no
5517fi
5518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5519
5520if test $ac_cv_header_stdc = yes; then
5521 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5523/* end confdefs.h. */
5524#include <string.h>
5525
5526_ACEOF
5527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5528 $EGREP "memchr" >/dev/null 2>&1; then :
5529
5530else
5531 ac_cv_header_stdc=no
5532fi
5533rm -f conftest*
5534
5535fi
5536
5537if test $ac_cv_header_stdc = yes; then
5538 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5540/* end confdefs.h. */
5541#include <stdlib.h>
5542
5543_ACEOF
5544if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5545 $EGREP "free" >/dev/null 2>&1; then :
5546
5547else
5548 ac_cv_header_stdc=no
5549fi
5550rm -f conftest*
5551
5552fi
5553
5554if test $ac_cv_header_stdc = yes; then
5555 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5556 if test "$cross_compiling" = yes; then :
5557 :
5558else
5559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5560/* end confdefs.h. */
5561#include <ctype.h>
5562#include <stdlib.h>
5563#if ((' ' & 0x0FF) == 0x020)
5564# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5565# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5566#else
5567# define ISLOWER(c) \
5568 (('a' <= (c) && (c) <= 'i') \
5569 || ('j' <= (c) && (c) <= 'r') \
5570 || ('s' <= (c) && (c) <= 'z'))
5571# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5572#endif
5573
5574#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5575int
5576main ()
5577{
5578 int i;
5579 for (i = 0; i < 256; i++)
5580 if (XOR (islower (i), ISLOWER (i))
5581 || toupper (i) != TOUPPER (i))
5582 return 2;
5583 return 0;
5584}
5585_ACEOF
5586if ac_fn_c_try_run "$LINENO"; then :
5587
5588else
5589 ac_cv_header_stdc=no
5590fi
5591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5592 conftest.$ac_objext conftest.beam conftest.$ac_ext
5593fi
5594
5595fi
5596fi
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5598$as_echo "$ac_cv_header_stdc" >&6; }
5599if test $ac_cv_header_stdc = yes; then
5600
5601$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5602
5603fi
5604
5605# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5606for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5607 inttypes.h stdint.h unistd.h
5608do :
5609 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5610ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5611"
5612if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5613 cat >>confdefs.h <<_ACEOF
5614#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5615_ACEOF
5616
5617fi
5618
Matthias Kloseb9621712010-04-24 17:59:49 +00005619done
5620
5621
5622
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005623 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5624if test "x$ac_cv_header_minix_config_h" = xyes; then :
5625 MINIX=yes
5626else
5627 MINIX=
Matthias Kloseb9621712010-04-24 17:59:49 +00005628fi
5629
5630
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005631 if test "$MINIX" = yes; then
5632
5633$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005634
5635
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005636$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005637
5638
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005639$as_echo "#define _MINIX 1" >>confdefs.h
5640
5641 fi
5642
5643
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5645$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5646if ${ac_cv_safe_to_define___extensions__+:} false; then :
5647 $as_echo_n "(cached) " >&6
5648else
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5650/* end confdefs.h. */
5651
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005652# define __EXTENSIONS__ 1
5653 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005654int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005655main ()
Matthias Kloseb9621712010-04-24 17:59:49 +00005656{
5657
5658 ;
5659 return 0;
5660}
5661_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005662if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 ac_cv_safe_to_define___extensions__=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005664else
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 ac_cv_safe_to_define___extensions__=no
5666fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005668fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5670$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5671 test $ac_cv_safe_to_define___extensions__ = yes &&
5672 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005673
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005674 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005675
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005676 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005677
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005678 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005679
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005680 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005681
5682
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005683
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5685$as_echo_n "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005686cat >> conftest.c <<EOF
5687#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005688android_api = __ANDROID_API__
5689arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005690#else
5691#error not Android
5692#endif
5693EOF
5694
5695if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005696 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5697 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5699$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005700 if test -z "$ANDROID_API_LEVEL"; then
5701 echo 'Fatal: you must define __ANDROID_API__'
5702 exit 1
5703 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005704
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005705cat >>confdefs.h <<_ACEOF
5706#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5707_ACEOF
Xavier de Gaye95750b12016-07-09 11:05:42 +02005708
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005709
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5711$as_echo_n "checking for the Android arm ABI... " >&6; }
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5713$as_echo "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005714 if test "$_arm_arch" = 7; then
5715 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5716 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5717 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005718else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5720$as_echo "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02005721fi
5722rm -f conftest.c conftest.out
5723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724# Check for unsupported systems
5725case $ac_sys_system/$ac_sys_release in
5726atheos*|Linux*/1*)
5727 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5728 echo See README for details.
5729 exit 1;;
5730esac
5731
5732
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5734$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735
5736# Check whether --with-suffix was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005737if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738 withval=$with_suffix;
5739 case $withval in
5740 no) EXEEXT=;;
5741 yes) EXEEXT=.exe;;
5742 *) EXEEXT=$withval;;
5743 esac
5744fi
5745
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5747$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748
5749# Test whether we're running on a non-case-sensitive system, in which
5750# case we give a warning if no ext is given
5751
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5753$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754if test ! -d CaseSensitiveTestDir; then
5755mkdir CaseSensitiveTestDir
5756fi
5757
5758if test -d casesensitivetestdir
5759then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5761$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 BUILDEXEEXT=.exe
5763else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 BUILDEXEEXT=$EXEEXT
5767fi
5768rmdir CaseSensitiveTestDir
5769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770case $ac_sys_system in
5771hp*|HP*)
5772 case $CC in
5773 cc|*/cc) CC="$CC -Ae";;
5774 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775esac
5776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5779$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780if test -z "$LIBRARY"
5781then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005782 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5785$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786
5787# LDLIBRARY is the name of the library to link against (as opposed to the
5788# name of the library into which to insert object files). BLDLIBRARY is also
5789# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5790# is blank as the main program is not linked directly against LDLIBRARY.
5791# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5792# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5793# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5794# DLLLIBRARY is the shared (i.e., DLL) library.
5795#
5796# RUNSHARED is used to run shared python without installed libraries
5797#
5798# INSTSONAME is the name of the shared library that will be use to install
5799# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005800#
5801# LDVERSION is the shared library version number, normally the Python version
5802# with the ABI build flags appended.
5803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804
5805
5806
5807
5808
5809
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811LDLIBRARY="$LIBRARY"
5812BLDLIBRARY='$(LDLIBRARY)'
5813INSTSONAME='$(LDLIBRARY)'
5814DLLLIBRARY=''
5815LDLIBRARYDIR=''
5816RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005817LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818
5819# LINKCC is the command that links the python executable -- default is $(CC).
5820# If CXX is set, and if it is needed to link a main function that was
5821# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5822# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5825$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826if test -z "$LINKCC"
5827then
5828 LINKCC='$(PURIFY) $(MAINCC)'
5829 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830 QNX*)
5831 # qcc must be used because the other compilers do not
5832 # support -N.
5833 LINKCC=qcc;;
5834 esac
5835fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5837$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
Stefan Krahe6dcd372020-08-29 17:00:08 +02005839# EXPORTSYMS holds the list of exported symbols for AIX.
5840# EXPORTSFROM holds the module name exporting symbols on AIX.
5841EXPORTSYMS=
5842EXPORTSFROM=
5843
5844
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5846$as_echo_n "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005847case $ac_sys_system in
5848AIX*)
5849 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005850 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005851 ;;
5852esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5854$as_echo "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02005855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5857# make sure we default having it set to "no": this is used by
5858# distutils.unixccompiler to know if it should add --enable-new-dtags
5859# to linker command lines, and failing to detect GNU ld simply results
5860# in the same bahaviour as before.
5861
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5863$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864ac_prog=ld
5865if test "$GCC" = yes; then
5866 ac_prog=`$CC -print-prog-name=ld`
5867fi
5868case `"$ac_prog" -V 2>&1 < /dev/null` in
5869 *GNU*)
5870 GNULD=yes;;
5871 *)
5872 GNULD=no;;
5873esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5875$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5878$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879# Check whether --enable-shared was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005880if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 enableval=$enable_shared;
5882fi
5883
5884
5885if test -z "$enable_shared"
5886then
5887 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005888 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 enable_shared="yes";;
5890 *)
5891 enable_shared="no";;
5892 esac
5893fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5895$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5898$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899# Check whether --enable-profiling was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005900if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005901 enableval=$enable_profiling;
5902fi
5903
5904if test "x$enable_profiling" = xyes; then
5905 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005906 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908/* end confdefs.h. */
5909int main() { return 0; }
5910_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005911if ac_fn_c_try_link "$LINENO"; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005912
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005913else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005914 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005916rm -f core conftest.err conftest.$ac_objext \
doko@ubuntu.comba015832012-06-30 16:52:05 +02005917 conftest$ac_exeext conftest.$ac_ext
5918 CC="$ac_save_cc"
5919else
5920 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5923$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924
doko@ubuntu.comba015832012-06-30 16:52:05 +02005925if test "x$enable_profiling" = xyes; then
5926 BASECFLAGS="-pg $BASECFLAGS"
5927 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928fi
5929
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5931$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
5933# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5934# library that we build, but we do not want to link against it (we
5935# will find it with a -framework option). For this reason there is an
5936# extra variable BLDLIBRARY against which Python and the extension
5937# modules are linked, BLDLIBRARY. This is normally the same as
5938# LDLIBRARY, but empty for MacOSX framework builds.
5939if test "$enable_framework"
5940then
5941 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005942 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 BLDLIBRARY=''
5944else
5945 BLDLIBRARY='$(LDLIBRARY)'
5946fi
5947
5948# Other platforms follow
5949if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005950 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01005952$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
5954 case $ac_sys_system in
5955 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).dll.a'
5957 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 ;;
5959 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005960 LDLIBRARY='libpython$(LDVERSION).so'
5961 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005962 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005964 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005965 then
5966 PY3LIBRARY=libpython3.so
5967 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 ;;
pxinwrc1174262020-12-15 06:14:43 +08005969 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005970 LDLIBRARY='libpython$(LDVERSION).so'
5971 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005972 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005974 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005975 then
5976 PY3LIBRARY=libpython3.so
5977 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 ;;
5979 hp*|HP*)
5980 case `uname -m` in
5981 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005982 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983 ;;
5984 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005985 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ;;
5987 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005988 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005989 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005992 LDLIBRARY='libpython$(LDVERSION).dylib'
5993 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005994 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005996 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005997 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005998 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005999 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000
6001 esac
6002else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006003 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004 case $ac_sys_system in
6005 CYGWIN*)
6006 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006007 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 ;;
6009 esac
6010fi
6011
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006012if test "$cross_compiling" = yes; then
6013 RUNSHARED=
6014fi
6015
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6017$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006020if test -n "$ac_tool_prefix"; then
6021 for ac_prog in ar aal
6022 do
6023 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6024set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026$as_echo_n "checking for $ac_word... " >&6; }
6027if ${ac_cv_prog_AR+:} false; then :
6028 $as_echo_n "(cached) " >&6
6029else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030 if test -n "$AR"; then
6031 ac_cv_prog_AR="$AR" # Let the user override the test.
6032else
6033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034for as_dir in $PATH
6035do
6036 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006040 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 break 2
6043 fi
6044done
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046IFS=$as_save_IFS
6047
6048fi
6049fi
6050AR=$ac_cv_prog_AR
6051if test -n "$AR"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6053$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6056$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057fi
6058
6059
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006060 test -n "$AR" && break
6061 done
6062fi
6063if test -z "$AR"; then
6064 ac_ct_AR=$AR
6065 for ac_prog in ar aal
6066do
6067 # Extract the first word of "$ac_prog", so it can be a program name with args.
6068set dummy $ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6070$as_echo_n "checking for $ac_word... " >&6; }
6071if ${ac_cv_prog_ac_ct_AR+:} false; then :
6072 $as_echo_n "(cached) " >&6
6073else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006074 if test -n "$ac_ct_AR"; then
6075 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6076else
6077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6078for as_dir in $PATH
6079do
6080 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006081 test -z "$as_dir" && as_dir=.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006082 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006084 ac_cv_prog_ac_ct_AR="$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006086 break 2
6087 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006089 done
6090IFS=$as_save_IFS
6091
6092fi
6093fi
6094ac_ct_AR=$ac_cv_prog_ac_ct_AR
6095if test -n "$ac_ct_AR"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6097$as_echo "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006098else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6100$as_echo "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006101fi
6102
6103
6104 test -n "$ac_ct_AR" && break
6105done
6106
6107 if test "x$ac_ct_AR" = x; then
6108 AR="ar"
6109 else
6110 case $cross_compiling:$ac_tool_warned in
6111yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006114ac_tool_warned=yes ;;
6115esac
6116 AR=$ac_ct_AR
6117 fi
6118fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119
6120
6121# tweak ARFLAGS only if the user didn't set it on the command line
6122
6123if test -z "$ARFLAGS"
6124then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006125 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126fi
6127
doko@ubuntu.com58844492012-06-30 18:25:32 +02006128if test -n "$ac_tool_prefix"; then
6129 for ac_prog in readelf
6130 do
6131 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6132set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6134$as_echo_n "checking for $ac_word... " >&6; }
6135if ${ac_cv_prog_READELF+:} false; then :
6136 $as_echo_n "(cached) " >&6
6137else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006138 if test -n "$READELF"; then
6139 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6140else
6141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142for as_dir in $PATH
6143do
6144 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006145 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006146 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006148 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006150 break 2
6151 fi
6152done
6153 done
6154IFS=$as_save_IFS
6155
6156fi
6157fi
6158READELF=$ac_cv_prog_READELF
6159if test -n "$READELF"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6161$as_echo "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006162else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006165fi
6166
6167
6168 test -n "$READELF" && break
6169 done
6170fi
6171if test -z "$READELF"; then
6172 ac_ct_READELF=$READELF
6173 for ac_prog in readelf
6174do
6175 # Extract the first word of "$ac_prog", so it can be a program name with args.
6176set dummy $ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6178$as_echo_n "checking for $ac_word... " >&6; }
6179if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6180 $as_echo_n "(cached) " >&6
6181else
doko@ubuntu.com58844492012-06-30 18:25:32 +02006182 if test -n "$ac_ct_READELF"; then
6183 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6184else
6185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006189 test -z "$as_dir" && as_dir=.
doko@ubuntu.com58844492012-06-30 18:25:32 +02006190 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006191 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006192 ac_cv_prog_ac_ct_READELF="$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006194 break 2
6195 fi
6196done
6197 done
6198IFS=$as_save_IFS
6199
6200fi
6201fi
6202ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6203if test -n "$ac_ct_READELF"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6205$as_echo "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006206else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6208$as_echo "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006209fi
6210
6211
6212 test -n "$ac_ct_READELF" && break
6213done
6214
6215 if test "x$ac_ct_READELF" = x; then
6216 READELF=":"
6217 else
6218 case $cross_compiling:$ac_tool_warned in
6219yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006220{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6221$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006222ac_tool_warned=yes ;;
6223esac
6224 READELF=$ac_ct_READELF
6225 fi
6226fi
6227
6228if test "$cross_compiling" = yes; then
6229 case "$READELF" in
6230 readelf|:)
6231 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6232 ;;
6233 esac
6234fi
6235
6236
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006239hp*|HP*)
6240 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241 if test -z "$INSTALL"
6242 then
6243 INSTALL="${srcdir}/install-sh -c"
6244 fi
6245esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006246# Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247# so one script is as good as another. But avoid the broken or
6248# incompatible versions:
6249# SysV /etc/install, /usr/sbin/install
6250# SunOS /usr/etc/install
6251# IRIX /sbin/install
6252# AIX /bin/install
6253# AmigaOS /C/install, which installs bootblocks on floppy discs
6254# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6255# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6256# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6257# OS/2's system install, which has a completely different semantic
6258# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006259# Reject install programs that cannot install multiple files.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6261$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262if test -z "$INSTALL"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006263if ${ac_cv_path_install+:} false; then :
6264 $as_echo_n "(cached) " >&6
6265else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267for as_dir in $PATH
6268do
6269 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006270 test -z "$as_dir" && as_dir=.
6271 # Account for people who put trailing slashes in PATH elements.
6272case $as_dir/ in #((
6273 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276 /usr/ucb/* ) ;;
6277 *)
6278 # OSF1 and SCO ODT 3.0 have their own names for install.
6279 # Don't use installbsd from OSF since it installs stuff as root
6280 # by default.
6281 for ac_prog in ginstall scoinst install; do
6282 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006283 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284 if test $ac_prog = install &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006285 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286 # AIX install. It has an incompatible calling convention.
6287 :
6288 elif test $ac_prog = install &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006289 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290 # program-specific install script used by HP pwplus--don't use.
6291 :
6292 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 rm -rf conftest.one conftest.two conftest.dir
6294 echo one > conftest.one
6295 echo two > conftest.two
6296 mkdir conftest.dir
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006297 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 test -s conftest.one && test -s conftest.two &&
6299 test -s conftest.dir/conftest.one &&
6300 test -s conftest.dir/conftest.two
6301 then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006302 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006303 break 3
6304 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305 fi
6306 fi
6307 done
6308 done
6309 ;;
6310esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006311
6312 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313IFS=$as_save_IFS
6314
Matthias Kloseb9621712010-04-24 17:59:49 +00006315rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316
6317fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006318 if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 INSTALL=$ac_cv_path_install
6320 else
6321 # As a last resort, use the slow shell script. Don't cache a
6322 # value for INSTALL within a source directory, because that will
6323 # break other packages using the cache if that directory is
6324 # removed, or if the value is a relative name.
6325 INSTALL=$ac_install_sh
6326 fi
6327fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6329$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330
6331# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6332# It thinks the first close brace ends the variable substitution.
6333test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6334
6335test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6336
6337test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6338
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6340$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006341if test -z "$MKDIR_P"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006342 if ${ac_cv_path_mkdir+:} false; then :
6343 $as_echo_n "(cached) " >&6
6344else
Matthias Klose93a0ef12012-03-15 18:08:34 +01006345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6346for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6347do
6348 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006349 test -z "$as_dir" && as_dir=.
Matthias Klose93a0ef12012-03-15 18:08:34 +01006350 for ac_prog in mkdir gmkdir; do
6351 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006352 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6353 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6354 'mkdir (GNU coreutils) '* | \
6355 'mkdir (coreutils) '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006356 'mkdir (fileutils) '4.1*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006357 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006358 break 3;;
6359 esac
6360 done
6361 done
6362 done
6363IFS=$as_save_IFS
6364
6365fi
6366
6367 test -d ./--version && rmdir ./--version
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006368 if test "${ac_cv_path_mkdir+set}" = set; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006369 MKDIR_P="$ac_cv_path_mkdir -p"
6370 else
6371 # As a last resort, use the slow shell script. Don't cache a
6372 # value for MKDIR_P within a source directory, because that will
6373 # break other packages using the cache if that directory is
6374 # removed, or if the value is a relative name.
6375 MKDIR_P="$ac_install_sh -d"
6376 fi
6377fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6379$as_echo "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006380
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381
6382# Not every filesystem supports hard links
6383
6384if test -z "$LN" ; then
6385 case $ac_sys_system in
6386 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387 *) LN=ln;;
6388 esac
6389fi
6390
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006391# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006392
6393ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006394
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006395# Check for --with-pydebug
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6397$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006398
6399# Check whether --with-pydebug was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006400if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401 withval=$with_pydebug;
6402if test "$withval" != no
6403then
6404
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006405$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006406
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6408$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006410 ABIFLAGS="${ABIFLAGS}d"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006411else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006414else
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417fi
6418
6419
Victor Stinnerf4e47032019-04-25 00:56:28 +02006420# Check for --with-trace-refs
6421# --with-trace-refs
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6423$as_echo_n "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006424
6425# Check whether --with-trace-refs was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006426if test "${with_trace_refs+set}" = set; then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02006427 withval=$with_trace_refs;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006428else
Victor Stinnerf4e47032019-04-25 00:56:28 +02006429 with_trace_refs=no
6430fi
6431
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6433$as_echo "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02006434
6435if test "$with_trace_refs" = "yes"
6436then
6437
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006438$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02006439
6440fi
6441
6442# Check for --with-assertions.
6443# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006444assertions='false'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6446$as_echo_n "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006447
6448# Check whether --with-assertions was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006449if test "${with_assertions+set}" = set; then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02006450 withval=$with_assertions;
6451if test "$withval" != no
6452then
6453 assertions='true'
6454fi
6455fi
6456
6457if test "$assertions" = 'true'; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6459$as_echo "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006460elif test "$Py_DEBUG" = 'true'; then
6461 assertions='true'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6463$as_echo "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006464else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02006467fi
6468
Brett Cannon63d98bc2016-09-06 17:12:40 -07006469# Enable optimization flags
6470
6471
6472Py_OPT='false'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6474$as_echo_n "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006475# Check whether --enable-optimizations was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006476if test "${enable_optimizations+set}" = set; then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006477 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006478if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006479then
6480 Py_OPT='true'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6482$as_echo "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006483else
6484 Py_OPT='false'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6486$as_echo "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07006487fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006488else
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07006491fi
6492
6493if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006494 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6495 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006496 # 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 +00006497 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006498 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006499 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006500 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006501 case $CC in
6502 *gcc*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6504$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6505if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6506 $as_echo_n "(cached) " >&6
6507else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006508
6509 ax_check_save_flags=$CFLAGS
6510 CFLAGS="$CFLAGS -fno-semantic-interposition"
6511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6512/* end confdefs.h. */
6513
6514int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006515main ()
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006516{
6517
6518 ;
6519 return 0;
6520}
6521_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006522if ac_fn_c_try_compile "$LINENO"; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006523 ax_cv_check_cflags___fno_semantic_interposition=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006524else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006525 ax_cv_check_cflags___fno_semantic_interposition=no
6526fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006528 CFLAGS=$ax_check_save_flags
6529fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6531$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6532if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006533
Pablo Galindob451b0e2020-10-21 22:46:52 +01006534 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6535 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006536
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006537else
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006538 :
6539fi
6540
Pablo Galindob451b0e2020-10-21 22:46:52 +01006541 ;;
6542 esac
6543
6544
Brett Cannon63d98bc2016-09-06 17:12:40 -07006545else
6546 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006547 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006548 DEF_MAKE_RULE="all"
6549fi
6550
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006551
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6553$as_echo_n "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006554if test -z "$PROFILE_TASK"
6555then
Victor Stinner67900052021-01-27 11:16:15 +01006556 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006557fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6559$as_echo "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006560
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006561# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6562# normal names in the default $PATH (ie: Ubuntu). They exist under the
6563# non-suffixed name in their versioned llvm directory.
6564
6565llvm_bin_dir=''
6566llvm_path="${PATH}"
6567if test "${CC}" = "clang"
6568then
6569 clang_bin=`which clang`
6570 # Some systems install clang elsewhere as a symlink to the real path
6571 # which is where the related llvm tools are located.
6572 if test -L "${clang_bin}"
6573 then
6574 clang_dir=`dirname "${clang_bin}"`
6575 clang_bin=`readlink "${clang_bin}"`
6576 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6577 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6578 fi
6579fi
6580
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006581# Enable LTO flags
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6583$as_echo_n "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006584
6585# Check whether --with-lto was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006586if test "${with_lto+set}" = set; then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006587 withval=$with_lto;
6588if test "$withval" != no
6589then
6590 Py_LTO='true'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6592$as_echo "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006593else
6594 Py_LTO='false'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596$as_echo "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006597fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006598else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006601fi
6602
6603if test "$Py_LTO" = 'true' ; then
6604 case $CC in
6605 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006606
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006607 if test -n "$ac_tool_prefix"; then
6608 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6609set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_LLVM_AR+:} false; then :
6613 $as_echo_n "(cached) " >&6
6614else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006615 case $LLVM_AR in
6616 [\\/]* | ?:[\\/]*)
6617 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6618 ;;
6619 *)
6620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in ${llvm_path}
6622do
6623 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006624 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006625 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006629 break 2
6630 fi
6631done
6632 done
6633IFS=$as_save_IFS
6634
6635 ;;
6636esac
6637fi
6638LLVM_AR=$ac_cv_path_LLVM_AR
6639if test -n "$LLVM_AR"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6641$as_echo "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006642else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006645fi
6646
6647
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006648fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006649if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006650 ac_pt_LLVM_AR=$LLVM_AR
6651 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006652set dummy llvm-ar; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6654$as_echo_n "checking for $ac_word... " >&6; }
6655if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6656 $as_echo_n "(cached) " >&6
6657else
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006658 case $ac_pt_LLVM_AR in
6659 [\\/]* | ?:[\\/]*)
6660 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6661 ;;
6662 *)
6663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6664for as_dir in ${llvm_path}
6665do
6666 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006667 test -z "$as_dir" && as_dir=.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006668 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6670 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006672 break 2
6673 fi
6674done
6675 done
6676IFS=$as_save_IFS
6677
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006678 ;;
6679esac
6680fi
6681ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6682if test -n "$ac_pt_LLVM_AR"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6684$as_echo "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006685else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687$as_echo "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006688fi
6689
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006690 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006691 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006692 else
6693 case $cross_compiling:$ac_tool_warned in
6694yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006695{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6696$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006697ac_tool_warned=yes ;;
6698esac
6699 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006700 fi
6701else
6702 LLVM_AR="$ac_cv_path_LLVM_AR"
6703fi
6704
6705
6706 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6707 then
6708 LLVM_AR_FOUND="found"
6709 else
6710 LLVM_AR_FOUND="not-found"
6711 fi
6712 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6713 then
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07006714 # The Apple-supplied ar in Xcode or the Command Line Tools is apparently sufficient
6715 found_llvm_ar=`/usr/bin/xcrun -find ar 2>/dev/null`
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006716 if test -n "${found_llvm_ar}"
6717 then
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07006718 LLVM_AR='/usr/bin/xcrun ar'
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006719 LLVM_AR_FOUND=found
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006720 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6721$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006722 fi
6723 fi
6724 if test $LLVM_AR_FOUND = not-found
6725 then
6726 LLVM_PROFR_ERR=yes
6727 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6728 else
6729 LLVM_AR_ERR=no
6730 fi
6731 AR="${LLVM_AR}"
6732 case $ac_sys_system in
6733 Darwin*)
6734 # Any changes made here should be reflected in the GCC+Darwin case below
6735 LTOFLAGS="-flto -Wl,-export_dynamic"
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07006736 LTOCFLAGS="-flto"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006737 ;;
6738 *)
6739 LTOFLAGS="-flto"
6740 ;;
6741 esac
6742 ;;
6743 *gcc*)
6744 case $ac_sys_system in
6745 Darwin*)
6746 LTOFLAGS="-flto -Wl,-export_dynamic"
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07006747 LTOCFLAGS="-flto"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006748 ;;
6749 *)
6750 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6751 ;;
6752 esac
6753 ;;
6754 esac
6755
6756 if test "$ac_cv_prog_cc_g" = "yes"
6757 then
6758 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6759 # to get debug symbols.
6760 LTOFLAGS="$LTOFLAGS -g"
6761 fi
6762
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07006763 CFLAGS_NODIST="$CFLAGS_NODIST ${LTOCFLAGS-$LTOFLAGS}"
stratakiscf10a752018-12-19 18:19:01 +01006764 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006765fi
6766
6767# Enable PGO flags.
6768
6769
6770
6771
6772
6773
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006774if test -n "$ac_tool_prefix"; then
6775 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6776set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6778$as_echo_n "checking for $ac_word... " >&6; }
6779if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6780 $as_echo_n "(cached) " >&6
6781else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006782 case $LLVM_PROFDATA in
6783 [\\/]* | ?:[\\/]*)
6784 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6785 ;;
6786 *)
6787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6788for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006789do
6790 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006791 test -z "$as_dir" && as_dir=.
Brett Cannon7188a3e2015-09-18 15:13:44 -07006792 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6794 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796 break 2
6797 fi
6798done
6799 done
6800IFS=$as_save_IFS
6801
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 ;;
6803esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006805LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6806if test -n "$LLVM_PROFDATA"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6808$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6811$as_echo "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006812fi
6813
6814
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006815fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006816if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006817 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6818 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006819set dummy llvm-profdata; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821$as_echo_n "checking for $ac_word... " >&6; }
6822if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6823 $as_echo_n "(cached) " >&6
6824else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006825 case $ac_pt_LLVM_PROFDATA in
6826 [\\/]* | ?:[\\/]*)
6827 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6828 ;;
6829 *)
6830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6831for as_dir in ${llvm_path}
6832do
6833 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006834 test -z "$as_dir" && as_dir=.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006835 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6837 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006839 break 2
6840 fi
6841done
6842 done
6843IFS=$as_save_IFS
6844
Gregory P. Smith799520c2016-09-07 16:10:00 -07006845 ;;
6846esac
6847fi
6848ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6849if test -n "$ac_pt_LLVM_PROFDATA"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6851$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006852else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854$as_echo "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07006855fi
6856
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006857 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006858 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006859 else
6860 case $cross_compiling:$ac_tool_warned in
6861yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006864ac_tool_warned=yes ;;
6865esac
6866 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006867 fi
6868else
6869 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6870fi
6871
6872
6873if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6874then
6875 LLVM_PROF_FOUND="found"
6876else
6877 LLVM_PROF_FOUND="not-found"
6878fi
6879if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6880then
6881 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6882 if test -n "${found_llvm_profdata}"
6883 then
6884 # llvm-profdata isn't directly in $PATH in some cases.
6885 # https://apple.stackexchange.com/questions/197053/
6886 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6887 LLVM_PROF_FOUND=found
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01006888 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6889$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07006890 fi
6891fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006892LLVM_PROF_ERR=no
6893case $CC in
6894 *clang*)
6895 # Any changes made here should be reflected in the GCC+Darwin case below
6896 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6897 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006898 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006899 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6900 if test $LLVM_PROF_FOUND = not-found
6901 then
6902 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006903 if test "${REQUIRE_PGO}" = "yes"
6904 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006905 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 -07006906 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006907 fi
6908 ;;
6909 *gcc*)
6910 case $ac_sys_system in
6911 Darwin*)
6912 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6913 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006914 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006915 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006916 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006917 then
6918 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006919 if test "${REQUIRE_PGO}" = "yes"
6920 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006921 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 -07006922 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006923 fi
6924 ;;
6925 *)
6926 PGO_PROF_GEN_FLAG="-fprofile-generate"
6927 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6928 LLVM_PROF_MERGER="true"
6929 LLVM_PROF_FILE=""
6930 ;;
6931 esac
6932 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006933 *icc*)
6934 PGO_PROF_GEN_FLAG="-prof-gen"
6935 PGO_PROF_USE_FLAG="-prof-use"
6936 LLVM_PROF_MERGER="true"
6937 LLVM_PROF_FILE=""
6938 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006939esac
6940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006941# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6942# merged with this chunk of code?
6943
6944# Optimizer/debugger flags
6945# ------------------------
6946# (The following bit of code is complicated enough - please keep things
6947# indented properly. Just pretend you're editing Python code. ;-)
6948
6949# There are two parallel sets of case statements below, one that checks to
6950# see if OPT was set and one that does BASECFLAGS setting based upon
6951# compiler and platform. BASECFLAGS tweaks need to be made even if the
6952# user set OPT.
6953
Victor Stinner23a683a2019-04-12 21:27:37 +02006954case $CC in
6955 *clang*)
6956 cc_is_clang=1
6957 ;;
6958 *)
6959 if $CC --version 2>&1 | grep -q clang
6960 then
6961 cc_is_clang=1
6962 else
6963 cc_is_clang=
6964 fi
6965esac
6966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967# tweak OPT based on compiler and platform, only if the user didn't set
6968# it on the command line
6969
Victor Stinner9ed34a82017-05-02 22:35:58 +02006970
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006971if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972then
6973 case $GCC in
6974 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6976 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6977 WRAP="-fwrapv"
6978 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006979
Victor Stinner35f3d242017-04-21 12:35:24 +02006980 if test -n "${cc_is_clang}"
6981 then
6982 # Clang also needs -fwrapv
6983 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006984 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6985 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006986 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006987 fi
6988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989 case $ac_cv_prog_cc_g in
6990 yes)
6991 if test "$Py_DEBUG" = 'true' ; then
6992 # Optimization messes up debuggers, so turn it off for
6993 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006994 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006995 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006996 else
Victor Stinner28205b22017-04-21 11:24:34 +02006997 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006998 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006999 else
Victor Stinner28205b22017-04-21 11:24:34 +02007000 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001 fi
7002 ;;
7003 *)
Victor Stinner28205b22017-04-21 11:24:34 +02007004 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005 ;;
7006 esac
Victor Stinner28205b22017-04-21 11:24:34 +02007007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008 case $ac_sys_system in
7009 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7010 ;;
7011 esac
7012 ;;
7013
7014 *)
7015 OPT="-O"
7016 ;;
7017 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018fi
7019
7020
7021
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007022
stratakiscf10a752018-12-19 18:19:01 +01007023
Ronald Oussoren41761932020-11-08 10:05:27 +01007024# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007025UNIVERSAL_ARCH_FLAGS=
7026
7027
7028# tweak BASECFLAGS based on compiler and platform
7029case $GCC in
7030yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007031 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007032
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7034$as_echo_n "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007035 ac_save_cc="$CC"
7036 CC="$CC -Wextra -Werror"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007037 if ${ac_cv_extra_warnings+:} false; then :
7038 $as_echo_n "(cached) " >&6
7039else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7041/* end confdefs.h. */
7042
7043
7044int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007045main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007046{
7047
7048 ;
7049 return 0;
7050}
7051
7052_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007053if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007054
7055 ac_cv_extra_warnings=yes
7056
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007057else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007058
7059 ac_cv_extra_warnings=no
7060
7061fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007063fi
7064
7065 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7067$as_echo "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007068
7069 if test $ac_cv_extra_warnings = yes
7070 then
7071 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7072 fi
7073
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007074 # Python doesn't violate C99 aliasing rules, but older versions of
7075 # GCC produce warnings for legal Python code. Enable
7076 # -fno-strict-aliasing on versions of GCC that support but produce
7077 # warnings. See Issue3326
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7079$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007080 ac_save_cc="$CC"
7081 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007082 save_CFLAGS="$CFLAGS"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007083 if ${ac_cv_no_strict_aliasing+:} false; then :
7084 $as_echo_n "(cached) " >&6
7085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007087/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007088
Matthias Kloseb159a552010-04-25 21:00:44 +00007089
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007090int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007091main ()
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007092{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007093
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007094 ;
7095 return 0;
7096}
Matthias Kloseb159a552010-04-25 21:00:44 +00007097
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007098_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007099if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007100
7101 CC="$ac_save_cc -fstrict-aliasing"
7102 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007104/* end confdefs.h. */
7105
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007106 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007107int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007108main ()
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007109{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007110double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007111 ;
7112 return 0;
7113}
Matthias Kloseb159a552010-04-25 21:00:44 +00007114
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007115_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007116if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007117
7118 ac_cv_no_strict_aliasing=no
7119
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007120else
Matthias Kloseb159a552010-04-25 21:00:44 +00007121
7122 ac_cv_no_strict_aliasing=yes
7123
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007124fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007126
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007127else
Matthias Kloseb159a552010-04-25 21:00:44 +00007128
7129 ac_cv_no_strict_aliasing=no
7130
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007131fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007133fi
7134
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007135 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007136 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7138$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007139 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007140 then
7141 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7142 fi
7143
Zachary Ware5af85642015-12-21 12:09:17 -06007144 # ICC doesn't recognize the option, but only emits a warning
7145 ## XXX does it emit an unused result warning and can it be disabled?
7146 case "$CC" in
7147 *icc*)
7148 ac_cv_disable_unused_result_warning=no
7149 ;;
7150 *)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7152$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007153 ac_save_cc="$CC"
7154 CC="$CC -Wunused-result -Werror"
7155 save_CFLAGS="$CFLAGS"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007156 if ${ac_cv_disable_unused_result_warning+:} false; then :
7157 $as_echo_n "(cached) " >&6
7158else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7160/* end confdefs.h. */
7161
7162
7163int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007164main ()
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007165{
7166
7167 ;
7168 return 0;
7169}
7170
7171_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007172if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007173
7174 ac_cv_disable_unused_result_warning=yes
7175
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007176else
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007177
7178 ac_cv_disable_unused_result_warning=no
7179
7180fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007182fi
7183
7184 CFLAGS="$save_CFLAGS"
7185 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7187$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007188 ;;
7189 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007190
7191 if test $ac_cv_disable_unused_result_warning = yes
7192 then
7193 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007194 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7195 fi
7196
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7198$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007199 ac_save_cc="$CC"
7200 CC="$CC -Wunused-parameter -Werror"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007201 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7202 $as_echo_n "(cached) " >&6
7203else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7205/* end confdefs.h. */
7206
7207
7208int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007209main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007210{
7211
7212 ;
7213 return 0;
7214}
7215
7216_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007217if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007218
7219 ac_cv_disable_unused_parameter_warning=yes
7220
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007221else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007222
7223 ac_cv_disable_unused_parameter_warning=no
7224
7225fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007227fi
7228
7229 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7231$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007232
7233 if test $ac_cv_disable_unused_parameter_warning = yes
7234 then
7235 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7236 fi
7237
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7239$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007240 ac_save_cc="$CC"
7241 CC="$CC -Wmissing-field-initializers -Werror"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007242 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7243 $as_echo_n "(cached) " >&6
7244else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7246/* end confdefs.h. */
7247
7248
7249int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007250main ()
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007251{
7252
7253 ;
7254 return 0;
7255}
7256
7257_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007258if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007259
7260 ac_cv_disable_missing_field_initializers=yes
7261
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007262else
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007263
7264 ac_cv_disable_missing_field_initializers=no
7265
7266fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007268fi
7269
7270 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7272$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007273
7274 if test $ac_cv_disable_missing_field_initializers = yes
7275 then
7276 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007277 fi
7278
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7280$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007281 ac_save_cc="$CC"
7282 CC="$CC -Wsign-compare"
7283 save_CFLAGS="$CFLAGS"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007284 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7285 $as_echo_n "(cached) " >&6
7286else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7288/* end confdefs.h. */
7289
7290
7291int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007292main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007293{
7294
7295 ;
7296 return 0;
7297}
7298
7299_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007300if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007301
7302 ac_cv_enable_sign_compare_warning=yes
7303
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007304else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007305
7306 ac_cv_enable_sign_compare_warning=no
7307
7308fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007310fi
7311
7312 CFLAGS="$save_CFLAGS"
7313 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7315$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007316
7317 if test $ac_cv_enable_sign_compare_warning = yes
7318 then
7319 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7320 fi
7321
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7323$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007324 ac_save_cc="$CC"
7325 CC="$CC -Wunreachable-code"
7326 save_CFLAGS="$CFLAGS"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007327 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7328 $as_echo_n "(cached) " >&6
7329else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7331/* end confdefs.h. */
7332
7333
7334int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007335main ()
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007336{
7337
7338 ;
7339 return 0;
7340}
7341
7342_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007343if ac_fn_c_try_compile "$LINENO"; then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007344
7345 ac_cv_enable_unreachable_code_warning=yes
7346
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007347else
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007348
7349 ac_cv_enable_unreachable_code_warning=no
7350
7351fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007353fi
7354
7355 CFLAGS="$save_CFLAGS"
7356 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007357
7358 # Don't enable unreachable code warning in debug mode, since it usually
7359 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007360 # Issue #24324: Unfortunately, the unreachable code warning does not work
7361 # correctly on gcc and has been silently removed from the compiler.
7362 # It is supported on clang but on OS X systems gcc may be an alias
7363 # for clang. Try to determine if the compiler is not really gcc and,
7364 # if so, only then enable the warning.
7365 if test $ac_cv_enable_unreachable_code_warning = yes && \
7366 test "$Py_DEBUG" != "true" && \
7367 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007368 then
7369 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007370 else
7371 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007372 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7374$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007375
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7377$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007378 ac_save_cc="$CC"
7379 CC="$CC -Werror -Wstrict-prototypes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007380 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7381 $as_echo_n "(cached) " >&6
7382else
INADA Naokie3364842018-06-05 20:40:53 +09007383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7384/* end confdefs.h. */
7385
7386
7387int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007388main ()
INADA Naokie3364842018-06-05 20:40:53 +09007389{
7390
7391 ;
7392 return 0;
7393}
7394
7395_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007396if ac_fn_c_try_compile "$LINENO"; then :
INADA Naokie3364842018-06-05 20:40:53 +09007397
7398 ac_cv_enable_strict_prototypes_warning=yes
7399
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007400else
INADA Naokie3364842018-06-05 20:40:53 +09007401
7402 ac_cv_enable_strict_prototypes_warning=no
7403
7404fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09007406fi
7407
7408 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7410$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09007411
7412 if test $ac_cv_enable_strict_prototypes_warning = yes
7413 then
7414 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7415 fi
7416
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7418$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007419 ac_save_cc="$CC"
7420 CC="$CC -Werror=implicit-function-declaration"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007421 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7422 $as_echo_n "(cached) " >&6
7423else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7425/* end confdefs.h. */
7426
7427
7428int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007429main ()
Victor Stinner193ee0a2017-02-06 14:24:00 +01007430{
7431
7432 ;
7433 return 0;
7434}
7435
7436_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007437if ac_fn_c_try_compile "$LINENO"; then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01007438
7439 ac_cv_enable_implicit_function_declaration_error=yes
7440
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007441else
Victor Stinner193ee0a2017-02-06 14:24:00 +01007442
7443 ac_cv_enable_implicit_function_declaration_error=no
7444
7445fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01007447fi
7448
7449 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7451$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01007452
7453 if test $ac_cv_enable_implicit_function_declaration_error = yes
7454 then
7455 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7456 fi
7457
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7459$as_echo_n "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007460 ac_save_cc="$CC"
7461 CC="$CC -fvisibility=hidden"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007462 if ${ac_cv_enable_visibility+:} false; then :
7463 $as_echo_n "(cached) " >&6
7464else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7466/* end confdefs.h. */
7467
7468
7469int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007470main ()
Vinay Sajip0b60f642019-10-15 08:26:12 +01007471{
7472
7473 ;
7474 return 0;
7475}
7476
7477_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007478if ac_fn_c_try_compile "$LINENO"; then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01007479
7480 ac_cv_enable_visibility=yes
7481
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007482else
Vinay Sajip0b60f642019-10-15 08:26:12 +01007483
7484 ac_cv_enable_visibility=no
7485
7486fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01007488fi
7489
7490 CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7492$as_echo "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01007493
7494 if test $ac_cv_enable_visibility = yes
7495 then
7496 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7497 fi
7498
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7500 # support. Without this, treatment of subnormals doesn't follow
7501 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007502 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503 alpha*)
7504 BASECFLAGS="$BASECFLAGS -mieee"
7505 ;;
7506 esac
7507
7508 case $ac_sys_system in
7509 SCO_SV*)
7510 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7511 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007512
Ned Deily87adb6e2013-10-18 21:09:56 -07007513 Darwin*)
7514 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7515 # used to be here, but non-Apple gcc doesn't accept them.
7516 if test "${CC}" = gcc
7517 then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
7519$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007520 case "${UNIVERSALSDK}" in
7521 */MacOSX10.4u.sdk)
7522 # Build using 10.4 SDK, force usage of gcc when the
7523 # compiler is gcc, otherwise the user will get very
7524 # confusing error messages when building on OSX 10.6
7525 CC=gcc-4.0
7526 CPP=cpp-4.0
7527 ;;
7528 esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7530$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007531 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532
Ned Deily0cb33da2021-05-02 04:48:29 -04007533 LIPO_INTEL64_FLAGS=""
Ned Deily87adb6e2013-10-18 21:09:56 -07007534 if test "${enable_universalsdk}"
7535 then
7536 case "$UNIVERSAL_ARCHS" in
7537 32-bit)
7538 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7539 LIPO_32BIT_FLAGS=""
7540 ARCH_RUN_32BIT=""
7541 ;;
7542 64-bit)
7543 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7544 LIPO_32BIT_FLAGS=""
7545 ARCH_RUN_32BIT="true"
7546 ;;
7547 all)
7548 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7549 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7550 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7551 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007552 universal2)
7553 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7554 LIPO_32BIT_FLAGS=""
Ned Deily0cb33da2021-05-02 04:48:29 -04007555 LIPO_INTEL64_FLAGS="-extract x86_64"
Ronald Oussoren41761932020-11-08 10:05:27 +01007556 ARCH_RUN_32BIT="true"
Ned Deily0cb33da2021-05-02 04:48:29 -04007557 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007558 intel)
7559 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7560 LIPO_32BIT_FLAGS="-extract i386"
7561 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7562 ;;
7563 intel-32)
7564 UNIVERSAL_ARCH_FLAGS="-arch i386"
7565 LIPO_32BIT_FLAGS=""
7566 ARCH_RUN_32BIT=""
7567 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007568 intel-64)
7569 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7570 LIPO_32BIT_FLAGS=""
7571 ARCH_RUN_32BIT="true"
7572 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007573 3-way)
7574 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7575 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7576 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7577 ;;
7578 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007579 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 -07007580 ;;
7581 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582
Ned Deily87adb6e2013-10-18 21:09:56 -07007583 if test "${UNIVERSALSDK}" != "/"
7584 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007585 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7586 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007587 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007588 else
7589 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7590 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007591 fi
7592 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593
Ned Deily87adb6e2013-10-18 21:09:56 -07007594 # Calculate an appropriate deployment target for this build:
7595 # The deployment target value is used explicitly to enable certain
7596 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007597 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007598 # component of the string returned by distutils.get_platform().
7599 #
7600 # Use the value from:
7601 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7602 # 2. the operating system version of the build machine if >= 10.6
7603 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7604 # below to pick either 10.3, 10.4, or 10.5 as the target.
7605 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7608$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007609 cur_target_major=`sw_vers -productVersion | \
7610 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7611 cur_target_minor=`sw_vers -productVersion | \
7612 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7613 cur_target="${cur_target_major}.${cur_target_minor}"
7614 if test ${cur_target_major} -eq 10 && \
7615 test ${cur_target_minor} -ge 3 && \
7616 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007617 then
Ned Deily36820b62014-06-25 13:44:22 -07007618 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007619 cur_target=10.3
7620 if test ${enable_universalsdk}
7621 then
7622 case "$UNIVERSAL_ARCHS" in
7623 all|3-way|intel|64-bit)
7624 # These configurations were first supported in 10.5
7625 cur_target='10.5'
7626 ;;
7627 esac
7628 else
7629 if test `/usr/bin/arch` = "i386"
7630 then
7631 # 10.4 was the first release to support Intel archs
7632 cur_target="10.4"
7633 fi
7634 fi
7635 fi
7636 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007637
Ned Deily87adb6e2013-10-18 21:09:56 -07007638 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7639 # environment with a value that is the same as what we'll use
7640 # in the Makefile to ensure that we'll get the same compiler
7641 # environment during configure and build time.
7642 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7643 export MACOSX_DEPLOYMENT_TARGET
7644 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7646$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007647
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7649$as_echo_n "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7651/* end confdefs.h. */
7652#include <stdio.h>
7653int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007654main ()
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007655{
7656printf("%d", 42);
7657 ;
7658 return 0;
7659}
7660_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007661if ac_fn_c_try_link "$LINENO"; then :
7662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7663$as_echo "yes" >&6; }
7664else
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7666$as_echo "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007667 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7668
7669fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007670rm -f core conftest.err conftest.$ac_objext \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007671 conftest$ac_exeext conftest.$ac_ext
7672
Ned Deily87adb6e2013-10-18 21:09:56 -07007673 # end of Darwin* tests
7674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675 esac
7676 ;;
7677
7678*)
7679 case $ac_sys_system in
7680 OpenUNIX*|UnixWare*)
7681 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7682 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683 SCO_SV*)
7684 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7685 ;;
7686 esac
7687 ;;
7688esac
7689
Zachary Ware5af85642015-12-21 12:09:17 -06007690case "$CC" in
7691*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007692 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007693 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7694 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007695*xlc*)
7696 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7697 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007698esac
7699
T. Woutersddbfa2c2017-05-23 01:30:49 +02007700if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701 :
7702else
7703 OPT="-DNDEBUG $OPT"
7704fi
7705
7706if test "$ac_arch_flags"
7707then
7708 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7709fi
7710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711# On some compilers, pthreads are available without further options
7712# (e.g. MacOS X). On some of these systems, the compiler will not
7713# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7714# So we have to see first whether pthreads are available without
7715# options before we can check whether -Kpthread improves anything.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7717$as_echo_n "checking whether pthreads are available without options... " >&6; }
7718if ${ac_cv_pthread_is_default+:} false; then :
7719 $as_echo_n "(cached) " >&6
7720else
7721 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722 ac_cv_pthread_is_default=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007723else
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725/* end confdefs.h. */
7726
Stefan Krah7dba5942012-11-22 22:49:11 +01007727#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728#include <pthread.h>
7729
7730void* routine(void* p){return NULL;}
7731
7732int main(){
7733 pthread_t p;
7734 if(pthread_create(&p,NULL,routine,NULL)!=0)
7735 return 1;
7736 (void)pthread_detach(p);
7737 return 0;
7738}
7739
7740_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742
7743 ac_cv_pthread_is_default=yes
7744 ac_cv_kthread=no
7745 ac_cv_pthread=no
7746
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007747else
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752fi
7753
7754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755fi
7756
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7758$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759
7760
7761if test $ac_cv_pthread_is_default = yes
7762then
7763 ac_cv_kpthread=no
7764else
7765# -Kpthread, if available, provides the right #defines
7766# and linker options to make pthread_create available
7767# Some compilers won't report that they do not support -Kpthread,
7768# so we need to run a program to see whether it really made the
7769# function available.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7771$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
7772if ${ac_cv_kpthread+:} false; then :
7773 $as_echo_n "(cached) " >&6
7774else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775 ac_save_cc="$CC"
7776CC="$CC -Kpthread"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007777if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778 ac_cv_kpthread=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007779else
Matthias Kloseb9621712010-04-24 17:59:49 +00007780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781/* end confdefs.h. */
7782
Stefan Krah7dba5942012-11-22 22:49:11 +01007783#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007784#include <pthread.h>
7785
7786void* routine(void* p){return NULL;}
7787
7788int main(){
7789 pthread_t p;
7790 if(pthread_create(&p,NULL,routine,NULL)!=0)
7791 return 1;
7792 (void)pthread_detach(p);
7793 return 0;
7794}
7795
7796_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007797if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798 ac_cv_kpthread=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804fi
7805
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806CC="$ac_save_cc"
7807fi
7808
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7810$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811fi
7812
7813if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7814then
7815# -Kthread, if available, provides the right #defines
7816# and linker options to make pthread_create available
7817# Some compilers won't report that they do not support -Kthread,
7818# so we need to run a program to see whether it really made the
7819# function available.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7821$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
7822if ${ac_cv_kthread+:} false; then :
7823 $as_echo_n "(cached) " >&6
7824else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825 ac_save_cc="$CC"
7826CC="$CC -Kthread"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007827if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828 ac_cv_kthread=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007831/* end confdefs.h. */
7832
Stefan Krah7dba5942012-11-22 22:49:11 +01007833#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007834#include <pthread.h>
7835
7836void* routine(void* p){return NULL;}
7837
7838int main(){
7839 pthread_t p;
7840 if(pthread_create(&p,NULL,routine,NULL)!=0)
7841 return 1;
7842 (void)pthread_detach(p);
7843 return 0;
7844}
7845
7846_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007847if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848 ac_cv_kthread=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854fi
7855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856CC="$ac_save_cc"
7857fi
7858
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7860$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861fi
7862
7863if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7864then
7865# -pthread, if available, provides the right #defines
7866# and linker options to make pthread_create available
7867# Some compilers won't report that they do not support -pthread,
7868# so we need to run a program to see whether it really made the
7869# function available.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7871$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
7872if ${ac_cv_pthread+:} false; then :
7873 $as_echo_n "(cached) " >&6
7874else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875 ac_save_cc="$CC"
7876CC="$CC -pthread"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007877if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878 ac_cv_pthread=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007879else
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881/* end confdefs.h. */
7882
Stefan Krah7dba5942012-11-22 22:49:11 +01007883#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884#include <pthread.h>
7885
7886void* routine(void* p){return NULL;}
7887
7888int main(){
7889 pthread_t p;
7890 if(pthread_create(&p,NULL,routine,NULL)!=0)
7891 return 1;
7892 (void)pthread_detach(p);
7893 return 0;
7894}
7895
7896_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007897if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007898 ac_cv_pthread=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007899else
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7903 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007904fi
7905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007906CC="$ac_save_cc"
7907fi
7908
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7910$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007911fi
7912
7913# If we have set a CC compiler flag for thread support then
7914# check if it works for CXX, too.
7915ac_cv_cxx_thread=no
7916if test ! -z "$CXX"
7917then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7919$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007920ac_save_cxx="$CXX"
7921
7922if test "$ac_cv_kpthread" = "yes"
7923then
7924 CXX="$CXX -Kpthread"
7925 ac_cv_cxx_thread=yes
7926elif test "$ac_cv_kthread" = "yes"
7927then
7928 CXX="$CXX -Kthread"
7929 ac_cv_cxx_thread=yes
7930elif test "$ac_cv_pthread" = "yes"
7931then
7932 CXX="$CXX -pthread"
7933 ac_cv_cxx_thread=yes
7934fi
7935
7936if test $ac_cv_cxx_thread = yes
7937then
7938 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7939 $CXX -c conftest.$ac_ext 2>&5
7940 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7941 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7942 then
7943 ac_cv_cxx_thread=yes
7944 else
7945 ac_cv_cxx_thread=no
7946 fi
7947 rm -fr conftest*
7948fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7950$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007951fi
7952CXX="$ac_save_cxx"
7953
7954
7955# checks for header files
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7957$as_echo_n "checking for ANSI C header files... " >&6; }
7958if ${ac_cv_header_stdc+:} false; then :
7959 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007960else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7962/* end confdefs.h. */
7963#include <stdlib.h>
7964#include <stdarg.h>
7965#include <string.h>
7966#include <float.h>
Pablo Galindo53e55292021-04-05 17:38:40 +01007967
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007968int
7969main ()
7970{
Pablo Galindoba421752021-05-03 20:33:17 +01007971
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007972 ;
7973 return 0;
7974}
7975_ACEOF
7976if ac_fn_c_try_compile "$LINENO"; then :
7977 ac_cv_header_stdc=yes
7978else
7979 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01007980fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01007982
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007983if test $ac_cv_header_stdc = yes; then
7984 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7986/* end confdefs.h. */
7987#include <string.h>
Pablo Galindo53e55292021-04-05 17:38:40 +01007988
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007989_ACEOF
7990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7991 $EGREP "memchr" >/dev/null 2>&1; then :
Pablo Galindo53e55292021-04-05 17:38:40 +01007992
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007993else
7994 ac_cv_header_stdc=no
Pablo Galindo53e55292021-04-05 17:38:40 +01007995fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01007996rm -f conftest*
Pablo Galindo53e55292021-04-05 17:38:40 +01007997
Pablo Galindoba421752021-05-03 20:33:17 +01007998fi
Pablo Galindoba421752021-05-03 20:33:17 +01007999
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008000if test $ac_cv_header_stdc = yes; then
8001 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8003/* end confdefs.h. */
8004#include <stdlib.h>
Pablo Galindoba421752021-05-03 20:33:17 +01008005
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008006_ACEOF
8007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8008 $EGREP "free" >/dev/null 2>&1; then :
Pablo Galindoba421752021-05-03 20:33:17 +01008009
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008010else
8011 ac_cv_header_stdc=no
Pablo Galindoba421752021-05-03 20:33:17 +01008012fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008013rm -f conftest*
Pablo Galindoba421752021-05-03 20:33:17 +01008014
8015fi
Pablo Galindoba421752021-05-03 20:33:17 +01008016
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008017if test $ac_cv_header_stdc = yes; then
8018 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8019 if test "$cross_compiling" = yes; then :
8020 :
8021else
8022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8023/* end confdefs.h. */
8024#include <ctype.h>
8025#include <stdlib.h>
8026#if ((' ' & 0x0FF) == 0x020)
8027# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8028# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8029#else
8030# define ISLOWER(c) \
8031 (('a' <= (c) && (c) <= 'i') \
8032 || ('j' <= (c) && (c) <= 'r') \
8033 || ('s' <= (c) && (c) <= 'z'))
8034# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8035#endif
Pablo Galindoba421752021-05-03 20:33:17 +01008036
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008037#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8038int
8039main ()
8040{
8041 int i;
8042 for (i = 0; i < 256; i++)
8043 if (XOR (islower (i), ISLOWER (i))
8044 || toupper (i) != TOUPPER (i))
8045 return 2;
8046 return 0;
8047}
8048_ACEOF
8049if ac_fn_c_try_run "$LINENO"; then :
Pablo Galindoba421752021-05-03 20:33:17 +01008050
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008051else
8052 ac_cv_header_stdc=no
Pablo Galindoba421752021-05-03 20:33:17 +01008053fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +01008056fi
Pablo Galindoba421752021-05-03 20:33:17 +01008057
8058fi
Pablo Galindoba421752021-05-03 20:33:17 +01008059fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8061$as_echo "$ac_cv_header_stdc" >&6; }
8062if test $ac_cv_header_stdc = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01008063
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008064$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +01008065
8066fi
Pablo Galindoba421752021-05-03 20:33:17 +01008067
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008068for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
8069fcntl.h grp.h \
8070ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
8071sched.h shadow.h signal.h stropts.h termios.h \
8072utime.h \
8073poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
8074sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
8075sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
8076sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
8077sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
8078sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
8079libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
8080linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
8081sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8082sys/mman.h sys/eventfd.h
8083do :
8084 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8085ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8086if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8087 cat >>confdefs.h <<_ACEOF
8088#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8089_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008090
8091fi
Pablo Galindoba421752021-05-03 20:33:17 +01008092
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008093done
Guido van Rossum627b2d71993-12-24 10:39:16 +00008094
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008095ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008096for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008097 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8099$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8100if eval \${$as_ac_Header+:} false; then :
8101 $as_echo_n "(cached) " >&6
8102else
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008104/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008105#include <sys/types.h>
8106#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
Martin v. Löwis11437992002-04-12 09:54:03 +00008108int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008109main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008110{
8111if ((DIR *) 0)
8112return 0;
8113 ;
8114 return 0;
8115}
8116_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008117if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 eval "$as_ac_Header=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008119else
Matthias Kloseb9621712010-04-24 17:59:49 +00008120 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008121fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124eval ac_res=\$$as_ac_Header
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8126$as_echo "$ac_res" >&6; }
8127if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 cat >>confdefs.h <<_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008129#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008130_ACEOF
8131
8132ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008133fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008135done
8136# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8137if test $ac_header_dirent = dirent.h; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8139$as_echo_n "checking for library containing opendir... " >&6; }
8140if ${ac_cv_search_opendir+:} false; then :
8141 $as_echo_n "(cached) " >&6
8142else
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147/* Override any GCC internal prototype to avoid an error.
8148 Use char because int might match the return type of a GCC
8149 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008150#ifdef __cplusplus
8151extern "C"
8152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008153char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008154int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008155main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008156{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ;
8159 return 0;
8160}
8161_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008162for ac_lib in '' dir; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 if test -z "$ac_lib"; then
8164 ac_res="none required"
8165 else
8166 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008167 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008169 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008171fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008172rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 conftest$ac_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008174 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008175 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008178if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008179
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008180else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181 ac_cv_search_opendir=no
8182fi
8183rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184LIBS=$ac_func_search_save_LIBS
8185fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8187$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188ac_res=$ac_cv_search_opendir
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008189if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008191
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Michael W. Hudson54241132001-12-07 15:38:26 +00008194else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8196$as_echo_n "checking for library containing opendir... " >&6; }
8197if ${ac_cv_search_opendir+:} false; then :
8198 $as_echo_n "(cached) " >&6
8199else
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204/* Override any GCC internal prototype to avoid an error.
8205 Use char because int might match the return type of a GCC
8206 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008207#ifdef __cplusplus
8208extern "C"
8209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008210char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008211int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008212main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00008213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ;
8216 return 0;
8217}
8218_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008219for ac_lib in '' x; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 if test -z "$ac_lib"; then
8221 ac_res="none required"
8222 else
8223 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008224 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008226 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008228fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008229rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 conftest$ac_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008231 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008235if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008236
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008237else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238 ac_cv_search_opendir=no
8239fi
8240rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008241LIBS=$ac_func_search_save_LIBS
8242fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8244$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245ac_res=$ac_cv_search_opendir
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008246if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008249fi
8250
8251fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008252
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8254$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
8255if ${ac_cv_header_sys_types_h_makedev+:} false; then :
8256 $as_echo_n "(cached) " >&6
8257else
8258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8259/* end confdefs.h. */
8260#include <sys/types.h>
8261int
8262main ()
8263{
8264return makedev(0, 0);
8265 ;
8266 return 0;
8267}
8268_ACEOF
8269if ac_fn_c_try_link "$LINENO"; then :
8270 ac_cv_header_sys_types_h_makedev=yes
8271else
8272 ac_cv_header_sys_types_h_makedev=no
8273fi
8274rm -f core conftest.err conftest.$ac_objext \
8275 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008276
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008277fi
8278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8279$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008280
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008281if test $ac_cv_header_sys_types_h_makedev = no; then
8282ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8283if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
8284
8285$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008286
8287fi
8288
8289
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008290
8291 if test $ac_cv_header_sys_mkdev_h = no; then
8292 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
8293if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
8294
8295$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008296
8297fi
8298
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008299
8300 fi
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008301fi
8302
Michael W. Hudson54241132001-12-07 15:38:26 +00008303
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008304# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8305# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8306SAVE_CFLAGS=$CFLAGS
8307CFLAGS="-std=c99 $CFLAGS"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008308for ac_header in bluetooth/bluetooth.h
8309do :
8310 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8311if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8312 cat >>confdefs.h <<_ACEOF
8313#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8314_ACEOF
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008315
8316fi
8317
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008318done
8319
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008320CFLAGS=$SAVE_CFLAGS
8321
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008322# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008323for ac_header in net/if.h
8324do :
8325 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 -07008326#ifdef STDC_HEADERS
8327# include <stdlib.h>
8328# include <stddef.h>
8329#else
8330# ifdef HAVE_STDLIB_H
8331# include <stdlib.h>
8332# endif
8333#endif
8334#ifdef HAVE_SYS_SOCKET_H
8335# include <sys/socket.h>
8336#endif
8337
8338"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008339if test "x$ac_cv_header_net_if_h" = xyes; then :
8340 cat >>confdefs.h <<_ACEOF
8341#define HAVE_NET_IF_H 1
8342_ACEOF
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008343
8344fi
8345
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008346done
8347
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008348
Martin v. Löwis11017b12006-01-14 18:12:57 +00008349# On Linux, netlink.h requires asm/types.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008350for ac_header in linux/netlink.h
8351do :
8352 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 +00008353#ifdef HAVE_ASM_TYPES_H
8354#include <asm/types.h>
8355#endif
8356#ifdef HAVE_SYS_SOCKET_H
8357#include <sys/socket.h>
8358#endif
8359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008361if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
8362 cat >>confdefs.h <<_ACEOF
8363#define HAVE_LINUX_NETLINK_H 1
8364_ACEOF
Martin v. Löwis11017b12006-01-14 18:12:57 +00008365
8366fi
8367
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008368done
8369
Martin v. Löwis11017b12006-01-14 18:12:57 +00008370
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008371# On Linux, qrtr.h requires asm/types.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008372for ac_header in linux/qrtr.h
8373do :
8374 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008375#ifdef HAVE_ASM_TYPES_H
8376#include <asm/types.h>
8377#endif
8378#ifdef HAVE_SYS_SOCKET_H
8379#include <sys/socket.h>
8380#endif
8381
8382"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008383if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8384 cat >>confdefs.h <<_ACEOF
8385#define HAVE_LINUX_QRTR_H 1
8386_ACEOF
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008387
8388fi
8389
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008390done
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008391
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008392
8393for ac_header in linux/vm_sockets.h
8394do :
8395 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04008396#ifdef HAVE_SYS_SOCKET_H
8397#include <sys/socket.h>
8398#endif
8399
8400"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008401if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8402 cat >>confdefs.h <<_ACEOF
8403#define HAVE_LINUX_VM_SOCKETS_H 1
8404_ACEOF
caaveryeffc12f2017-09-06 18:18:10 -04008405
8406fi
8407
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008408done
8409
caaveryeffc12f2017-09-06 18:18:10 -04008410
karl ding360371f2020-04-29 15:31:19 -07008411# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008412for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
8413do :
8414 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8415ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
Charles-François Natali47413c12011-10-06 19:47:44 +02008416#ifdef HAVE_SYS_SOCKET_H
8417#include <sys/socket.h>
8418#endif
8419
8420"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008421if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8422 cat >>confdefs.h <<_ACEOF
8423#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8424_ACEOF
Charles-François Natali47413c12011-10-06 19:47:44 +02008425
8426fi
8427
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008428done
Charles-François Natali47413c12011-10-06 19:47:44 +02008429
8430
Guido van Rossum627b2d71993-12-24 10:39:16 +00008431# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008432was_it_defined=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8434$as_echo_n "checking for clock_t in time.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008436/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008437#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
8439_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008441 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008442 was_it_defined=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008446$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008447
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008448
Guido van Rossum627b2d71993-12-24 10:39:16 +00008449fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008450rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008451
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8453$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008454
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8456$as_echo_n "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00008457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008458/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008459
Jesus Cea740f53a2010-04-28 11:35:30 +00008460#if defined(MAJOR_IN_MKDEV)
8461#include <sys/mkdev.h>
8462#elif defined(MAJOR_IN_SYSMACROS)
8463#include <sys/sysmacros.h>
8464#else
8465#include <sys/types.h>
8466#endif
8467
Neal Norwitz11690112002-07-30 01:08:28 +00008468int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008469main ()
Neal Norwitz11690112002-07-30 01:08:28 +00008470{
Jesus Cea740f53a2010-04-28 11:35:30 +00008471
8472 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008473 ;
8474 return 0;
8475}
Matthias Kloseb159a552010-04-25 21:00:44 +00008476
Neal Norwitz11690112002-07-30 01:08:28 +00008477_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008478if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008479 ac_cv_has_makedev=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008480else
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008482fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008483rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8486$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008487if test "$ac_cv_has_makedev" = "yes"; then
8488
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008489$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008490
8491fi
8492
Christian Heimes985ecdc2013-11-20 11:46:18 +01008493# byte swapping
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8495$as_echo_n "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8497/* end confdefs.h. */
8498
8499#ifdef HAVE_ENDIAN_H
8500#include <endian.h>
8501#elif defined(HAVE_SYS_ENDIAN_H)
8502#include <sys/endian.h>
8503#endif
8504
8505int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008506main ()
Christian Heimes985ecdc2013-11-20 11:46:18 +01008507{
8508
8509 le64toh(1)
8510 ;
8511 return 0;
8512}
8513
8514_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008515if ac_fn_c_try_link "$LINENO"; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01008516 ac_cv_has_le64toh=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008517else
Christian Heimes985ecdc2013-11-20 11:46:18 +01008518 ac_cv_has_le64toh=no
8519fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008520rm -f core conftest.err conftest.$ac_objext \
Christian Heimes985ecdc2013-11-20 11:46:18 +01008521 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8523$as_echo "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01008524if test "$ac_cv_has_le64toh" = "yes"; then
8525
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008526$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01008527
8528fi
8529
Martin v. Löwis399a6892002-10-04 10:22:02 +00008530use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008531# Don't use largefile support for GNU/Hurd
8532case $ac_sys_system in GNU*)
8533 use_lfs=no
8534esac
8535
Martin v. Löwis399a6892002-10-04 10:22:02 +00008536if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008537# Two defines needed to enable largefile support on various platforms
8538# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008539case $ac_sys_system/$ac_sys_release in
8540AIX*)
8541
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008542$as_echo "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00008543
8544 ;;
8545esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008546
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008547$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008548
8549
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008550$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008551
Martin v. Löwis399a6892002-10-04 10:22:02 +00008552fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008553
Guido van Rossum84e7b241996-08-19 21:59:00 +00008554# Add some code to confdefs.h so that the test for off_t works on SCO
8555cat >> confdefs.h <<\EOF
8556#if defined(SCO_DS)
8557#undef _OFF_T
8558#endif
8559EOF
8560
Guido van Rossumef2255b2000-03-10 22:30:29 +00008561# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008562ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008563if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008564
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008565else
Martin v. Löwis11437992002-04-12 09:54:03 +00008566
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008567cat >>confdefs.h <<_ACEOF
8568#define mode_t int
8569_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008570
8571fi
8572
Matthias Kloseb9621712010-04-24 17:59:49 +00008573ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008574if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008575
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008576else
Martin v. Löwis11437992002-04-12 09:54:03 +00008577
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008578cat >>confdefs.h <<_ACEOF
8579#define off_t long int
Christian Heimes39258d32021-04-17 11:36:35 +02008580_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008581
Pablo Galindoba421752021-05-03 20:33:17 +01008582fi
Pablo Galindoba421752021-05-03 20:33:17 +01008583
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008584ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8585if test "x$ac_cv_type_pid_t" = xyes; then :
Pablo Galindoba421752021-05-03 20:33:17 +01008586
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008587else
8588
8589cat >>confdefs.h <<_ACEOF
8590#define pid_t int
8591_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008592
8593fi
8594
8595
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008596cat >>confdefs.h <<_ACEOF
8597#define RETSIGTYPE void
8598_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008599
Matthias Kloseb9621712010-04-24 17:59:49 +00008600ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008601if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008602
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008603else
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008605cat >>confdefs.h <<_ACEOF
8606#define size_t unsigned int
8607_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
8609fi
8610
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8612$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8613if ${ac_cv_type_uid_t+:} false; then :
8614 $as_echo_n "(cached) " >&6
8615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008617/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008618#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008619
8620_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008622 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008623 ac_cv_type_uid_t=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008624else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008625 ac_cv_type_uid_t=no
8626fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008627rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008629fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8631$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008632if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008633
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008634$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008635
8636
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008637$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008638
8639fi
8640
Mark Dickinson983bc162012-12-02 12:11:38 +00008641
Matthias Kloseb9621712010-04-24 17:59:49 +00008642ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008643if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008645$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008646
8647fi
8648
Stefan Krah1919b7e2012-03-21 18:25:23 +01008649ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008650if test "x$ac_cv_type___uint128_t" = xyes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01008651
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008652$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01008653
8654fi
8655
Jack Jansendd19cf82001-12-06 22:36:17 +00008656
Jessica Clarkedec07572021-03-31 11:12:39 +01008657# Sizes and alignments of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008658# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659# The cast to long int works around a bug in the HP C Compiler
8660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8662# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8664$as_echo_n "checking size of int... " >&6; }
8665if ${ac_cv_sizeof_int+:} false; then :
8666 $as_echo_n "(cached) " >&6
8667else
8668 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 +00008669
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 if test "$ac_cv_type_int" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008674as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008675See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676 else
8677 ac_cv_sizeof_int=0
8678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680
Martin v. Löwis11437992002-04-12 09:54:03 +00008681fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8683$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684
8685
8686
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008687cat >>confdefs.h <<_ACEOF
8688#define SIZEOF_INT $ac_cv_sizeof_int
8689_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008690
8691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692# The cast to long int works around a bug in the HP C Compiler
8693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8695# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8697$as_echo_n "checking size of long... " >&6; }
8698if ${ac_cv_sizeof_long+:} false; then :
8699 $as_echo_n "(cached) " >&6
8700else
8701 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 +00008702
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008703else
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 if test "$ac_cv_type_long" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008707as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008708See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709 else
8710 ac_cv_sizeof_long=0
8711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8716$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008717
8718
8719
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008720cat >>confdefs.h <<_ACEOF
8721#define SIZEOF_LONG $ac_cv_sizeof_long
8722_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008723
8724
Jessica Clarkedec07572021-03-31 11:12:39 +01008725# The cast to long int works around a bug in the HP C Compiler,
8726# see AC_CHECK_SIZEOF for more information.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
8728$as_echo_n "checking alignment of long... " >&6; }
8729if ${ac_cv_alignof_long+:} false; then :
8730 $as_echo_n "(cached) " >&6
8731else
Jessica Clarkedec07572021-03-31 11:12:39 +01008732 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008733#ifndef offsetof
8734# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
8735#endif
8736typedef struct { char x; long y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01008737
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008738else
Jessica Clarkedec07572021-03-31 11:12:39 +01008739 if test "$ac_cv_type_long" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01008742as_fn_error 77 "cannot compute alignment of long
8743See \`config.log' for more details" "$LINENO" 5; }
8744 else
8745 ac_cv_alignof_long=0
8746 fi
8747fi
8748
8749fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
8751$as_echo "$ac_cv_alignof_long" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01008752
8753
8754
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008755cat >>confdefs.h <<_ACEOF
8756#define ALIGNOF_LONG $ac_cv_alignof_long
8757_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01008758
8759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760# The cast to long int works around a bug in the HP C Compiler
8761# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8762# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8763# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8765$as_echo_n "checking size of long long... " >&6; }
8766if ${ac_cv_sizeof_long_long+:} false; then :
8767 $as_echo_n "(cached) " >&6
8768else
8769 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 -07008770
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008771else
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008772 if test "$ac_cv_type_long_long" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008775as_fn_error 77 "cannot compute sizeof (long long)
8776See \`config.log' for more details" "$LINENO" 5; }
8777 else
8778 ac_cv_sizeof_long_long=0
8779 fi
8780fi
8781
8782fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8784$as_echo "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008785
8786
8787
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008788cat >>confdefs.h <<_ACEOF
8789#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8790_ACEOF
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008791
8792
8793# The cast to long int works around a bug in the HP C Compiler
8794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8796# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8798$as_echo_n "checking size of void *... " >&6; }
8799if ${ac_cv_sizeof_void_p+:} false; then :
8800 $as_echo_n "(cached) " >&6
8801else
8802 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 +00008803
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 if test "$ac_cv_type_void_p" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008808as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008809See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 else
8811 ac_cv_sizeof_void_p=0
8812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008814
Martin v. Löwis11437992002-04-12 09:54:03 +00008815fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8817$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818
8819
8820
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008821cat >>confdefs.h <<_ACEOF
8822#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8823_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008824
8825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826# The cast to long int works around a bug in the HP C Compiler
8827# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8828# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8829# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8831$as_echo_n "checking size of short... " >&6; }
8832if ${ac_cv_sizeof_short+:} false; then :
8833 $as_echo_n "(cached) " >&6
8834else
8835 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 +00008836
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008837else
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 if test "$ac_cv_type_short" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008841as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008842See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843 else
8844 ac_cv_sizeof_short=0
8845 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847
Martin v. Löwis11437992002-04-12 09:54:03 +00008848fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8850$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851
8852
8853
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008854cat >>confdefs.h <<_ACEOF
8855#define SIZEOF_SHORT $ac_cv_sizeof_short
8856_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008857
8858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859# The cast to long int works around a bug in the HP C Compiler
8860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8862# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8864$as_echo_n "checking size of float... " >&6; }
8865if ${ac_cv_sizeof_float+:} false; then :
8866 $as_echo_n "(cached) " >&6
8867else
8868 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 +00008869
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008870else
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 if test "$ac_cv_type_float" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008874as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008875See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876 else
8877 ac_cv_sizeof_float=0
8878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880
Martin v. Löwis11437992002-04-12 09:54:03 +00008881fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8883$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884
8885
8886
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008887cat >>confdefs.h <<_ACEOF
8888#define SIZEOF_FLOAT $ac_cv_sizeof_float
8889_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008890
8891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892# The cast to long int works around a bug in the HP C Compiler
8893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8895# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8897$as_echo_n "checking size of double... " >&6; }
8898if ${ac_cv_sizeof_double+:} false; then :
8899 $as_echo_n "(cached) " >&6
8900else
8901 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 +00008902
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 if test "$ac_cv_type_double" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008907as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008908See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909 else
8910 ac_cv_sizeof_double=0
8911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913
Martin v. Löwis11437992002-04-12 09:54:03 +00008914fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8916$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
8918
8919
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008920cat >>confdefs.h <<_ACEOF
8921#define SIZEOF_DOUBLE $ac_cv_sizeof_double
8922_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008923
8924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925# The cast to long int works around a bug in the HP C Compiler
8926# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8927# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8928# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8930$as_echo_n "checking size of fpos_t... " >&6; }
8931if ${ac_cv_sizeof_fpos_t+:} false; then :
8932 $as_echo_n "(cached) " >&6
8933else
8934 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 +00008935
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008936else
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 if test "$ac_cv_type_fpos_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008940as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008941See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008942 else
8943 ac_cv_sizeof_fpos_t=0
8944 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008946
Martin v. Löwis11437992002-04-12 09:54:03 +00008947fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8949$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950
8951
8952
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008953cat >>confdefs.h <<_ACEOF
8954#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
8955_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008956
Michael W. Hudson54241132001-12-07 15:38:26 +00008957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958# The cast to long int works around a bug in the HP C Compiler
8959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8961# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8963$as_echo_n "checking size of size_t... " >&6; }
8964if ${ac_cv_sizeof_size_t+:} false; then :
8965 $as_echo_n "(cached) " >&6
8966else
8967 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 +00008968
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008969else
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008971 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008973as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008974See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975 else
8976 ac_cv_sizeof_size_t=0
8977 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008979
Martin v. Löwis18e16552006-02-15 17:27:45 +00008980fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8982$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983
8984
8985
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008986cat >>confdefs.h <<_ACEOF
8987#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8988_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00008989
8990
Jessica Clarkedec07572021-03-31 11:12:39 +01008991# The cast to long int works around a bug in the HP C Compiler,
8992# see AC_CHECK_SIZEOF for more information.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5
8994$as_echo_n "checking alignment of size_t... " >&6; }
8995if ${ac_cv_alignof_size_t+:} false; then :
8996 $as_echo_n "(cached) " >&6
8997else
Jessica Clarkedec07572021-03-31 11:12:39 +01008998 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01008999#ifndef offsetof
9000# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
9001#endif
9002typedef struct { char x; size_t y; } ac__type_alignof_;"; then :
Jessica Clarkedec07572021-03-31 11:12:39 +01009003
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009004else
Jessica Clarkedec07572021-03-31 11:12:39 +01009005 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009006 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01009008as_fn_error 77 "cannot compute alignment of size_t
9009See \`config.log' for more details" "$LINENO" 5; }
9010 else
9011 ac_cv_alignof_size_t=0
9012 fi
9013fi
9014
9015fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
9017$as_echo "$ac_cv_alignof_size_t" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01009018
9019
9020
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009021cat >>confdefs.h <<_ACEOF
9022#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t
9023_ACEOF
Jessica Clarkedec07572021-03-31 11:12:39 +01009024
9025
Christian Heimes400adb02008-02-01 08:12:03 +00009026# The cast to long int works around a bug in the HP C Compiler
9027# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9028# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9029# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
9031$as_echo_n "checking size of pid_t... " >&6; }
9032if ${ac_cv_sizeof_pid_t+:} false; then :
9033 $as_echo_n "(cached) " >&6
9034else
9035 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 +00009036
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009037else
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 if test "$ac_cv_type_pid_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009041as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009042See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00009043 else
9044 ac_cv_sizeof_pid_t=0
9045 fi
9046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047
Christian Heimes400adb02008-02-01 08:12:03 +00009048fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
9050$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00009051
9052
9053
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009054cat >>confdefs.h <<_ACEOF
9055#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
9056_ACEOF
Christian Heimes400adb02008-02-01 08:12:03 +00009057
9058
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009059# The cast to long int works around a bug in the HP C Compiler
9060# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9061# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9062# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
9064$as_echo_n "checking size of uintptr_t... " >&6; }
9065if ${ac_cv_sizeof_uintptr_t+:} false; then :
9066 $as_echo_n "(cached) " >&6
9067else
9068 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 -07009069
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009070else
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009071 if test "$ac_cv_type_uintptr_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009074as_fn_error 77 "cannot compute sizeof (uintptr_t)
9075See \`config.log' for more details" "$LINENO" 5; }
9076 else
9077 ac_cv_sizeof_uintptr_t=0
9078 fi
9079fi
9080
9081fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
9083$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009084
9085
9086
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009087cat >>confdefs.h <<_ACEOF
9088#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
9089_ACEOF
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07009090
9091
Michael W. Hudson54241132001-12-07 15:38:26 +00009092
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009093
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
9095$as_echo_n "checking for long double... " >&6; }
9096if ${ac_cv_type_long_double+:} false; then :
9097 $as_echo_n "(cached) " >&6
9098else
Eitan Adler3055c942018-05-15 22:58:09 -07009099 if test "$GCC" = yes; then
9100 ac_cv_type_long_double=yes
9101 else
9102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9103/* end confdefs.h. */
9104/* The Stardent Vistra knows sizeof (long double), but does
9105 not support it. */
9106 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009107int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009108main ()
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009109{
Eitan Adler3055c942018-05-15 22:58:09 -07009110static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9111 sizeof (double) <= sizeof (long double))];
9112test_array [0] = 0;
9113return test_array [0];
9114
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009115 ;
9116 return 0;
9117}
9118_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009119if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009120 ac_cv_type_long_double=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009121else
Eitan Adler3055c942018-05-15 22:58:09 -07009122 ac_cv_type_long_double=no
9123fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -07009125 fi
9126fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9128$as_echo "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -07009129 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009130
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009131$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009132
Eitan Adler3055c942018-05-15 22:58:09 -07009133 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009134
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009135# The cast to long int works around a bug in the HP C Compiler
9136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9138# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9140$as_echo_n "checking size of long double... " >&6; }
9141if ${ac_cv_sizeof_long_double+:} false; then :
9142 $as_echo_n "(cached) " >&6
9143else
9144 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 +00009145
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009146else
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 if test "$ac_cv_type_long_double" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009150as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009151See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009152 else
9153 ac_cv_sizeof_long_double=0
9154 fi
9155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009156
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009157fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9159$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009160
9161
9162
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009163cat >>confdefs.h <<_ACEOF
9164#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9165_ACEOF
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009166
9167
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169# The cast to long int works around a bug in the HP C Compiler
9170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9172# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9174$as_echo_n "checking size of _Bool... " >&6; }
9175if ${ac_cv_sizeof__Bool+:} false; then :
9176 $as_echo_n "(cached) " >&6
9177else
9178 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 +00009179
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009180else
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 if test "$ac_cv_type__Bool" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009184as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009185See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009186 else
9187 ac_cv_sizeof__Bool=0
9188 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009190
Thomas Woutersb2137042007-02-01 18:02:27 +00009191fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9193$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194
9195
9196
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009197cat >>confdefs.h <<_ACEOF
9198#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9199_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +00009200
9201
Thomas Woutersb2137042007-02-01 18:02:27 +00009202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009203# The cast to long int works around a bug in the HP C Compiler
9204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9206# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9208$as_echo_n "checking size of off_t... " >&6; }
9209if ${ac_cv_sizeof_off_t+:} false; then :
9210 $as_echo_n "(cached) " >&6
9211else
Matthias Kloseb9621712010-04-24 17:59:49 +00009212 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009213#ifdef HAVE_SYS_TYPES_H
9214#include <sys/types.h>
9215#endif
9216
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009217"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009218
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009219else
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 if test "$ac_cv_type_off_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009221 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009223as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009224See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009225 else
9226 ac_cv_sizeof_off_t=0
9227 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009229
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009230fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9232$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009234
9235
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009236cat >>confdefs.h <<_ACEOF
9237#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
9238_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009239
Michael W. Hudson54241132001-12-07 15:38:26 +00009240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009241
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9243$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009244if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009245 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009246
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009247$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009248
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9250$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009251else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009254fi
9255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009256# The cast to long int works around a bug in the HP C Compiler
9257# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9258# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9259# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9261$as_echo_n "checking size of time_t... " >&6; }
9262if ${ac_cv_sizeof_time_t+:} false; then :
9263 $as_echo_n "(cached) " >&6
9264else
Matthias Kloseb9621712010-04-24 17:59:49 +00009265 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009266#ifdef HAVE_SYS_TYPES_H
9267#include <sys/types.h>
9268#endif
9269#ifdef HAVE_TIME_H
9270#include <time.h>
9271#endif
9272
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009273"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009274
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009275else
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 if test "$ac_cv_type_time_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009279as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009280See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009281 else
9282 ac_cv_sizeof_time_t=0
9283 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009285
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009286fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9288$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009290
9291
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009292cat >>confdefs.h <<_ACEOF
9293#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9294_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009295
Michael W. Hudson54241132001-12-07 15:38:26 +00009296
9297
Trent Mick635f6fb2000-08-23 21:33:05 +00009298# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009299ac_save_cc="$CC"
9300if test "$ac_cv_kpthread" = "yes"
9301then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009302elif test "$ac_cv_kthread" = "yes"
9303then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009304elif test "$ac_cv_pthread" = "yes"
9305then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009306fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009307
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9309$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009310have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009312/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009313
9314 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009315int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009316main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009317{
Guido van Rossum12580492000-09-24 16:47:19 +00009318pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 ;
9320 return 0;
9321}
Matthias Kloseb159a552010-04-25 21:00:44 +00009322
Martin v. Löwis11437992002-04-12 09:54:03 +00009323_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009324if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009325 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009326fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9329$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009330if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009331 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9334# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9336$as_echo_n "checking size of pthread_t... " >&6; }
9337if ${ac_cv_sizeof_pthread_t+:} false; then :
9338 $as_echo_n "(cached) " >&6
9339else
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009341#ifdef HAVE_PTHREAD_H
9342#include <pthread.h>
9343#endif
9344
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009345"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009346
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009347else
Matthias Kloseb9621712010-04-24 17:59:49 +00009348 if test "$ac_cv_type_pthread_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009351as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009352See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009353 else
9354 ac_cv_sizeof_pthread_t=0
9355 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009357
Trent Mick635f6fb2000-08-23 21:33:05 +00009358fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9360$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009361
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009362
9363
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009364cat >>confdefs.h <<_ACEOF
9365#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
9366_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009368
Trent Mick635f6fb2000-08-23 21:33:05 +00009369fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009370
9371# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9372# This checking will be unnecessary after removing deprecated TLS API.
9373# The cast to long int works around a bug in the HP C Compiler
9374# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9375# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9376# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9378$as_echo_n "checking size of pthread_key_t... " >&6; }
9379if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9380 $as_echo_n "(cached) " >&6
9381else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009382 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009383"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009384
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009385else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009386 if test "$ac_cv_type_pthread_key_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009389as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9390See \`config.log' for more details" "$LINENO" 5; }
9391 else
9392 ac_cv_sizeof_pthread_key_t=0
9393 fi
9394fi
9395
9396fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9398$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009399
9400
9401
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009402cat >>confdefs.h <<_ACEOF
9403#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9404_ACEOF
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009405
9406
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9408$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009409if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9411/* end confdefs.h. */
9412#include <pthread.h>
9413int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009414main ()
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009415{
9416pthread_key_t k; k * 1;
9417 ;
9418 return 0;
9419}
9420_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009421if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009422 ac_pthread_key_t_is_arithmetic_type=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009423else
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009424 ac_pthread_key_t_is_arithmetic_type=no
9425
9426fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9429$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009430 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9431
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009432$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009433
9434 fi
9435else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9437$as_echo "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009438fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009439CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009440
Michael W. Hudson54241132001-12-07 15:38:26 +00009441
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009442case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009443 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009444 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9445 ;;
9446 Darwin/*)
9447 OTHER_LIBTOOL_OPT=""
9448 ;;
9449esac
9450
9451
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009452
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009453case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009454 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009455 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9456 if test "${enable_universalsdk}"; then
9457 :
9458 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009459 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009460 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009461 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009462 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009463 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009464 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009465 if test ${gcc_version} '<' 4.0
9466 then
9467 LIBTOOL_CRUFT="-lcc_dynamic"
9468 else
9469 LIBTOOL_CRUFT=""
9470 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009471 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009472 ac_osx_32bit=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009473else
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009475/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009476
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009477 #include <unistd.h>
9478 int main(int argc, char*argv[])
9479 {
9480 if (sizeof(long) == 4) {
9481 return 0;
9482 } else {
9483 return 1;
9484 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009485 }
9486
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009487_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009488if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009489 ac_osx_32bit=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9494 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009495fi
9496
9497
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009498 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009499 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009500 i386)
9501 MACOSX_DEFAULT_ARCH="i386"
9502 ;;
9503 ppc)
9504 MACOSX_DEFAULT_ARCH="ppc"
9505 ;;
9506 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009507 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009508 ;;
9509 esac
9510 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009511 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009512 i386)
9513 MACOSX_DEFAULT_ARCH="x86_64"
9514 ;;
9515 ppc)
9516 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009517 ;;
9518 arm64)
9519 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009520 ;;
9521 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009522 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009523 ;;
9524 esac
9525
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009526 fi
9527
9528 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009529 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009530 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009531esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9533$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009534if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009535then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009536 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009538 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009539
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009540$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009541
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9543$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009544 if test $enable_shared = "yes"
9545 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009546 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 +00009547 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009548else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009551fi
9552
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9554$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009555case $ac_sys_system/$ac_sys_release in
9556 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009557
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009558$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009559
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9561$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009562 ;;
9563 *)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9565$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009566 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009567esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009568
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009570
Michael W. Hudson54241132001-12-07 15:38:26 +00009571
9572
9573
9574
Benjamin Peterson99f03762010-04-11 22:15:28 +00009575
Thomas Wouters477c8d52006-05-27 19:21:47 +00009576
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009577# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9578# -- usually .so, .sl on HP-UX, .dll on Cygwin
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9580$as_echo_n "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009581if test -z "$SHLIB_SUFFIX"; then
9582 case $ac_sys_system in
9583 hp*|HP*)
9584 case `uname -m` in
9585 ia64) SHLIB_SUFFIX=.so;;
9586 *) SHLIB_SUFFIX=.sl;;
9587 esac
9588 ;;
9589 CYGWIN*) SHLIB_SUFFIX=.dll;;
9590 *) SHLIB_SUFFIX=.so;;
9591 esac
9592fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9594$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009595
Guido van Rossum0a516c91994-09-12 10:58:40 +00009596# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009597# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009598# (Shared libraries in this instance are shared modules to be loaded into
9599# Python, as opposed to building Python itself as a shared library.)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9601$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009602if test -z "$LDSHARED"
9603then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009604 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009605 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009606 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009607 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009608 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009610 if test "$GCC" = "yes" ; then
9611 LDSHARED='$(CC) -shared'
9612 LDCXXSHARED='$(CXX) -shared'
9613 else
9614 LDSHARED='$(CC) -G'
9615 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009616 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009617 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009618 if test "$GCC" = "yes" ; then
9619 LDSHARED='$(CC) -shared'
9620 LDCXXSHARED='$(CXX) -shared'
9621 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009622 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009623 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009624 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009625 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009626 LDSHARED='$(CC) -bundle'
9627 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009628 if test "$enable_framework" ; then
9629 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009630 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9631 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009632 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009633 else
9634 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009635 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009636 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009637 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009638 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009639 LDSHARED='$(CC) -bundle'
9640 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009641 if test "$enable_framework" ; then
9642 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009643 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9644 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009645 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009646 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009647 # No framework, use the Python app as bundle-loader
9648 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009649 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009650 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009651 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009652 Darwin/*)
9653 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9654 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009655
Ned Deily36820b62014-06-25 13:44:22 -07009656 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9657 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9658 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9659 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9660 if test ${dep_target_major} -eq 10 && \
9661 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009662 then
Ned Deily36820b62014-06-25 13:44:22 -07009663 # building for OS X 10.0 through 10.2
Ned Deily87031782021-05-02 20:28:43 -04009664 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 -07009665 else
9666 # building for OS X 10.3 and later
9667 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9668 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9669 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009670 fi
9671 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009672 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009673 LDSHARED='$(CC) -shared'
9674 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009675 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009676 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009677 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009678 LDSHARED='$(CC) -shared'
9679 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009680 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009681 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009682 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009683 OpenBSD*)
9684 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9685 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009686 LDSHARED='$(CC) -shared $(CCSHARED)'
9687 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009688 else
9689 case `uname -r` in
9690 [01].* | 2.[0-7] | 2.[0-7].*)
9691 LDSHARED="ld -Bshareable ${LDFLAGS}"
9692 ;;
9693 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009694 LDSHARED='$(CC) -shared $(CCSHARED)'
9695 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009696 ;;
9697 esac
9698 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009699 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009700 LDSHARED='$(CC) -shared'
9701 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009702 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009703 if test "$GCC" = "yes" ; then
9704 LDSHARED='$(CC) -shared'
9705 LDCXXSHARED='$(CXX) -shared'
9706 else
9707 LDSHARED='$(CC) -G'
9708 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009709 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009710 SCO_SV*)
9711 LDSHARED='$(CC) -Wl,-G,-Bexport'
9712 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9713 CYGWIN*)
9714 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9715 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009716 *) LDSHARED="ld";;
9717 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009718fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9720$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009721LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009722BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009723# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009724# library (module) -- this is only needed for a few systems
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9726$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009727if test -z "$CCSHARED"
9728then
Guido van Rossum07397971997-04-29 21:49:50 +00009729 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009730 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009731 then CCSHARED="-fPIC";
9732 elif test `uname -p` = sparc;
9733 then CCSHARED="-xcode=pic32";
9734 else CCSHARED="-Kpic";
9735 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009736 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009737 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009738 else CCSHARED="+z";
9739 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009740 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009741 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009742 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009743 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009744 if test "$GCC" = "yes"
9745 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009746 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009747 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009748 SCO_SV*)
9749 if test "$GCC" = "yes"
9750 then CCSHARED="-fPIC"
9751 else CCSHARED="-Kpic -belf"
9752 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009753 VxWorks*)
9754 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009755 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009756fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9758$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009759# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009760# the python executable -- this is only needed for a few systems
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9762$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009763if test -z "$LINKFORSHARED"
9764then
Guido van Rossum07397971997-04-29 21:49:50 +00009765 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009766 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009767 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009768 LINKFORSHARED="-Wl,-E -Wl,+s";;
9769# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009770 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009771 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009772 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009774 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009775
9776 # Issue #18075: the default maximum stack size (8MBytes) is too
9777 # small for the default recursion limit. Increase the stack size
9778 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009779 # Note: This matches the value of THREAD_STACK_SIZE in
9780 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009781 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9782
Jack Jansene578a632001-08-15 01:27:14 +00009783 if test "$enable_framework"
9784 then
Jack Jansenda49e192005-01-07 13:08:22 +00009785 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009786 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009787 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009788 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009789 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009790 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009791 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009792 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9793 then
9794 LINKFORSHARED="-Wl,--export-dynamic"
9795 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009796 SunOS/5*) case $CC in
9797 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009798 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009799 then
9800 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009801 fi;;
9802 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009803 CYGWIN*)
9804 if test $enable_shared = "no"
9805 then
9806 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9807 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009808 QNX*)
9809 # -Wl,-E causes the symbols to be added to the dynamic
9810 # symbol table so that they can be found when a module
9811 # is loaded. -N 2048K causes the stack size to be set
9812 # to 2048 kilobytes so that the stack doesn't overflow
9813 # when running test_compile.py.
9814 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009815 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009816 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009817 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009818fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9820$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009821
Michael W. Hudson54241132001-12-07 15:38:26 +00009822
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009823
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9825$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009826if test ! "$LIBRARY" = "$LDLIBRARY"
9827then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009828 case $ac_sys_system in
9829 CYGWIN*)
9830 # Cygwin needs CCSHARED when building extension DLLs
9831 # but not when building the interpreter DLL.
9832 CFLAGSFORSHARED='';;
9833 *)
9834 CFLAGSFORSHARED='$(CCSHARED)'
9835 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009836fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9838$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009839
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009840# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9841# library (with --enable-shared).
9842# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009843# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9844# if it is not required, since it creates a dependency of the shared library
9845# to LIBS. This, in turn, means that applications linking the shared libpython
9846# don't need to link LIBS explicitly. The default should be only changed
9847# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009848
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9850$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009851case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009852 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009853 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009854esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9856$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009857
9858
Guido van Rossum627b2d71993-12-24 10:39:16 +00009859# checks for libraries
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9861$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
9862if ${ac_cv_lib_sendfile_sendfile+:} false; then :
9863 $as_echo_n "(cached) " >&6
9864else
Georg Brandl941f9562011-02-25 15:21:47 +00009865 ac_check_lib_save_LIBS=$LIBS
9866LIBS="-lsendfile $LIBS"
9867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9868/* end confdefs.h. */
9869
9870/* Override any GCC internal prototype to avoid an error.
9871 Use char because int might match the return type of a GCC
9872 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009873#ifdef __cplusplus
9874extern "C"
9875#endif
Georg Brandl941f9562011-02-25 15:21:47 +00009876char sendfile ();
9877int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009878main ()
Georg Brandl941f9562011-02-25 15:21:47 +00009879{
9880return sendfile ();
9881 ;
9882 return 0;
9883}
9884_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009885if ac_fn_c_try_link "$LINENO"; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009886 ac_cv_lib_sendfile_sendfile=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009887else
Georg Brandl941f9562011-02-25 15:21:47 +00009888 ac_cv_lib_sendfile_sendfile=no
9889fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009890rm -f core conftest.err conftest.$ac_objext \
Georg Brandl941f9562011-02-25 15:21:47 +00009891 conftest$ac_exeext conftest.$ac_ext
9892LIBS=$ac_check_lib_save_LIBS
9893fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9895$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
9896if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
9897 cat >>confdefs.h <<_ACEOF
9898#define HAVE_LIBSENDFILE 1
9899_ACEOF
Georg Brandl941f9562011-02-25 15:21:47 +00009900
9901 LIBS="-lsendfile $LIBS"
9902
9903fi
9904
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9906$as_echo_n "checking for dlopen in -ldl... " >&6; }
9907if ${ac_cv_lib_dl_dlopen+:} false; then :
9908 $as_echo_n "(cached) " >&6
9909else
Martin v. Löwis11437992002-04-12 09:54:03 +00009910 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009911LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915/* Override any GCC internal prototype to avoid an error.
9916 Use char because int might match the return type of a GCC
9917 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009918#ifdef __cplusplus
9919extern "C"
9920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009921char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009922int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009923main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 ;
9927 return 0;
9928}
9929_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ac_cv_lib_dl_dlopen=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009932else
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009934fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009935rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009937LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009938fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9940$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9941if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
9942 cat >>confdefs.h <<_ACEOF
9943#define HAVE_LIBDL 1
9944_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009945
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009946 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009948fi
9949 # Dynamic linking for SunOS/Solaris and SYSV
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9951$as_echo_n "checking for shl_load in -ldld... " >&6; }
9952if ${ac_cv_lib_dld_shl_load+:} false; then :
9953 $as_echo_n "(cached) " >&6
9954else
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009956LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009960/* Override any GCC internal prototype to avoid an error.
9961 Use char because int might match the return type of a GCC
9962 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009963#ifdef __cplusplus
9964extern "C"
9965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009966char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009967int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009968main ()
Martin v. Löwis11437992002-04-12 09:54:03 +00009969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009970return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 ;
9972 return 0;
9973}
9974_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009975if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 ac_cv_lib_dld_shl_load=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009979fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009980rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009982LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009983fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9985$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9986if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
9987 cat >>confdefs.h <<_ACEOF
9988#define HAVE_LIBDLD 1
9989_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009990
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009991 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009993fi
9994 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009995
Michael Felt0d3ccb42017-12-30 22:39:20 +01009996# checks for uuid.h location
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009997for ac_header in uuid/uuid.h uuid.h
9998do :
9999 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10000ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10001if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10002 cat >>confdefs.h <<_ACEOF
10003#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10004_ACEOF
Michael Felt0d3ccb42017-12-30 22:39:20 +010010005
10006fi
10007
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010008done
Michael Felt0d3ccb42017-12-30 22:39:20 +010010009
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010010
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
10012$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10014/* end confdefs.h. */
10015#include <uuid/uuid.h>
10016int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010017main ()
Berker Peksag9a10ff42017-11-08 23:09:16 +030010018{
10019
10020#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030010021void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030010022#endif
10023
10024 ;
10025 return 0;
10026}
10027_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010028if ac_fn_c_try_compile "$LINENO"; then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030010029
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010030$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030010031
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10033$as_echo "yes" >&6; }
10034else
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10036$as_echo "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010037
10038fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030010040
Michael Felt0d3ccb42017-12-30 22:39:20 +010010041# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000010042# FreeBSD and OpenBSD provides support as well
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
10044$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10046/* end confdefs.h. */
10047#include <uuid.h>
10048int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010049main ()
Michael Felt0d3ccb42017-12-30 22:39:20 +010010050{
10051
10052#ifndef uuid_create
10053void *x = uuid_create
10054#endif
10055
10056 ;
10057 return 0;
10058}
10059_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010060if ac_fn_c_try_compile "$LINENO"; then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010010061
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010062$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010010063
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10065$as_echo "yes" >&6; }
10066else
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10068$as_echo "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010010069
10070fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010010072
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010073# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
10074# stream in big-endian byte-order
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
10076$as_echo_n "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10078/* end confdefs.h. */
10079#include <uuid.h>
10080int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010081main ()
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010082{
10083
10084#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010085void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010086#endif
10087
10088 ;
10089 return 0;
10090}
10091_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010092if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010093
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010094$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010095
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10097$as_echo "yes" >&6; }
10098else
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100$as_echo "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010101
10102fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010104
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010105# 'Real Time' functions on Solaris
10106# posix4 on Solaris 2.6
10107# pthread (first!) on Linux
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
10109$as_echo_n "checking for library containing sem_init... " >&6; }
10110if ${ac_cv_search_sem_init+:} false; then :
10111 $as_echo_n "(cached) " >&6
10112else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010113 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117/* Override any GCC internal prototype to avoid an error.
10118 Use char because int might match the return type of a GCC
10119 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010120#ifdef __cplusplus
10121extern "C"
10122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010123char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010124int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010125main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ;
10129 return 0;
10130}
10131_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010132for ac_lib in '' pthread rt posix4; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133 if test -z "$ac_lib"; then
10134 ac_res="none required"
10135 else
10136 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010139 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010141fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010142rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 conftest$ac_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010144 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010148if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010149
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010150else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151 ac_cv_search_sem_init=no
10152fi
10153rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010154LIBS=$ac_func_search_save_LIBS
10155fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10157$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158ac_res=$ac_cv_search_sem_init
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010159if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010161
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010162fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010163
Martin v. Löwis519adae2003-09-20 10:47:47 +000010164
Martin v. Löwis19d17342003-06-14 21:03:05 +000010165# check if we need libintl for locale functions
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10167$as_echo_n "checking for textdomain in -lintl... " >&6; }
10168if ${ac_cv_lib_intl_textdomain+:} false; then :
10169 $as_echo_n "(cached) " >&6
10170else
Martin v. Löwis19d17342003-06-14 21:03:05 +000010171 ac_check_lib_save_LIBS=$LIBS
10172LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176/* Override any GCC internal prototype to avoid an error.
10177 Use char because int might match the return type of a GCC
10178 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010179#ifdef __cplusplus
10180extern "C"
10181#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010182char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010183int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010184main ()
Martin v. Löwis19d17342003-06-14 21:03:05 +000010185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010187 ;
10188 return 0;
10189}
10190_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010192 ac_cv_lib_intl_textdomain=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010193else
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010195fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010196rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010198LIBS=$ac_check_lib_save_LIBS
10199fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10201$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
10202if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010203
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010204$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010205
Brett Cannonc6d936e2009-06-07 20:09:53 +000010206 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010207fi
10208
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010209
10210# checks for system dependent C++ extensions support
10211case "$ac_sys_system" in
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010212 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10213$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010216
Georg Brandl59e87bd2011-02-15 19:48:59 +000010217 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010218int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010219main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010220{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010221loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 ;
10223 return 0;
10224}
Matthias Kloseb159a552010-04-25 21:00:44 +000010225
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010227if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010228
Matthias Kloseb159a552010-04-25 21:00:44 +000010229
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010230$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010231
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10233$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010234
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010235else
Matthias Kloseb159a552010-04-25 21:00:44 +000010236
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010239
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010240fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010241rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010242 conftest$ac_exeext conftest.$ac_ext
10243# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10244# of the AIX system used to build/package Python executable. This tag serves
10245# as a baseline for bdist module packages
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10247$as_echo_n "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010248 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10249
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010250cat >>confdefs.h <<_ACEOF
10251#define AIX_BUILDDATE $AIX_BUILDDATE
10252_ACEOF
Michael Felt39afa2d2019-12-15 15:17:53 +010010253
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10255$as_echo "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010010256 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010257 *) ;;
10258esac
10259
Christian Heimes985ecdc2013-11-20 11:46:18 +010010260# check for systems that require aligned memory access
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10262$as_echo_n "checking aligned memory access is required... " >&6; }
10263if ${ac_cv_aligned_required+:} false; then :
10264 $as_echo_n "(cached) " >&6
10265else
10266 if test "$cross_compiling" = yes; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010267 ac_cv_aligned_required=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010268else
Christian Heimes985ecdc2013-11-20 11:46:18 +010010269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10270/* end confdefs.h. */
10271
10272int main()
10273{
10274 char s[16];
10275 int i, *p1, *p2;
10276 for (i=0; i < 16; i++)
10277 s[i] = i;
10278 p1 = (int*)(s+1);
10279 p2 = (int*)(s+2);
10280 if (*p1 == *p2)
10281 return 1;
10282 return 0;
10283}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010284_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010285if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010286 ac_cv_aligned_required=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010287else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010288 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010289fi
10290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10291 conftest.$ac_objext conftest.beam conftest.$ac_ext
10292fi
10293
10294
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010295fi
10296
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10298$as_echo "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010299if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010300
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010301$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010302
10303fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010304
10305# str, bytes and memoryview hash algorithm
10306
10307
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10309$as_echo_n "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010310
10311# Check whether --with-hash_algorithm was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010312if test "${with_hash_algorithm+set}" = set; then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010010313 withval=$with_hash_algorithm;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10315$as_echo "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010316case "$withval" in
10317 siphash24)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010318 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010319
10320 ;;
10321 fnv)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010322 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010010323
10324 ;;
10325 *)
10326 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10327 ;;
10328esac
10329
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010330else
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10332$as_echo "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010010333fi
10334
10335
Paul Ganssle62972d92020-05-16 04:20:06 -040010336validate_tzpath() {
10337 # Checks that each element of hte path is an absolute path
10338 if test -z "$1"; then
10339 # Empty string is allowed: it indicates no system TZPATH
10340 return 0
10341 fi
10342
10343 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010344 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010345 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10346 return 1;
10347 fi
10348}
10349
10350TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10352$as_echo_n "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010353
10354# Check whether --with-tzpath was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010355if test "${with_tzpath+set}" = set; then :
Paul Ganssle62972d92020-05-16 04:20:06 -040010356 withval=$with_tzpath;
10357case "$withval" in
10358 yes)
10359 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10360 ;;
10361 *)
10362 validate_tzpath "$withval"
10363 TZPATH="$withval"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10365$as_echo "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010366 ;;
10367esac
10368
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010369else
Paul Ganssle62972d92020-05-16 04:20:06 -040010370 validate_tzpath "$TZPATH"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10372$as_echo "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040010373fi
10374
10375
10376
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10378$as_echo_n "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010379
10380# Check whether --with-address_sanitizer was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010381if test "${with_address_sanitizer+set}" = set; then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010010382 withval=$with_address_sanitizer;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10384$as_echo "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010385BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10386LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010387# ASan works by controlling memory allocation, our own malloc interferes.
10388with_pymalloc="no"
10389
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010390else
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010393fi
10394
10395
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10397$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010398
10399# Check whether --with-memory_sanitizer was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010400if test "${with_memory_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010401 withval=$with_memory_sanitizer;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10403$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010404BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10405LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10406# MSan works by controlling memory allocation, our own malloc interferes.
10407with_pymalloc="no"
10408
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010409else
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010412fi
10413
10414
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10416$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010417
10418# Check whether --with-undefined_behavior_sanitizer was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010419if test "${with_undefined_behavior_sanitizer+set}" = set; then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080010420 withval=$with_undefined_behavior_sanitizer;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10422$as_echo "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080010423BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10424LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010425
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010426else
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428$as_echo "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010010429fi
10430
10431
Guido van Rossum70c7f481998-03-26 18:44:10 +000010432# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10434$as_echo_n "checking for t_open in -lnsl... " >&6; }
10435if ${ac_cv_lib_nsl_t_open+:} false; then :
10436 $as_echo_n "(cached) " >&6
10437else
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010439LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443/* Override any GCC internal prototype to avoid an error.
10444 Use char because int might match the return type of a GCC
10445 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010446#ifdef __cplusplus
10447extern "C"
10448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010449char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010450int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010451main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ;
10455 return 0;
10456}
10457_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ac_cv_lib_nsl_t_open=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010460else
Matthias Kloseb9621712010-04-24 17:59:49 +000010461 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010462fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010463rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010465LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010466fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10468$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
10469if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010470 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010471fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010472 # SVR4
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10474$as_echo_n "checking for socket in -lsocket... " >&6; }
10475if ${ac_cv_lib_socket_socket+:} false; then :
10476 $as_echo_n "(cached) " >&6
10477else
Martin v. Löwis11437992002-04-12 09:54:03 +000010478 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010479LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483/* Override any GCC internal prototype to avoid an error.
10484 Use char because int might match the return type of a GCC
10485 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010486#ifdef __cplusplus
10487extern "C"
10488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010489char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010490int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010491main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 ;
10495 return 0;
10496}
10497_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ac_cv_lib_socket_socket=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010500else
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010502fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010503rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010505LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010506fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10508$as_echo "$ac_cv_lib_socket_socket" >&6; }
10509if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010510 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010511fi
10512 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010513
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10515$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517# Check whether --with-libs was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010518if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519 withval=$with_libs;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10521$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010522LIBS="$withval $LIBS"
10523
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010524else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10526$as_echo "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010527fi
10528
10529
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010530PKG_PROG_PKG_CONFIG
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010531
10532# Check for use of the system expat library
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10534$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010535
10536# Check whether --with-system_expat was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010537if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010538 withval=$with_system_expat;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010539else
Benjamin Peterson79263252010-10-31 16:50:44 +000010540 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010541fi
10542
10543
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10545$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010546
10547# Check for use of the system libffi library
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10549$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010550
10551# Check whether --with-system_ffi was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010552if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010553 withval=$with_system_ffi;
10554fi
10555
10556
Zachary Waref40d4dd2016-09-17 01:25:24 -050010557if test "$ac_sys_system" = "Darwin"
10558then
10559 case "$with_system_ffi" in
10560 "")
10561 with_system_ffi="no"
10562 ;;
10563 yes|no)
10564 ;;
10565 *)
10566 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10567 ;;
10568 esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10570$as_echo "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010571else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10573$as_echo "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050010574 if test "$with_system_ffi" != ""
10575 then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10577$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050010578 fi
10579 with_system_ffi="yes"
10580fi
Zachary Ware935043d2016-09-09 17:01:21 -070010581
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010582if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010583 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10584else
10585 LIBFFI_INCLUDEDIR=""
10586fi
10587
10588
Stefan Krah60187b52012-03-23 19:06:27 +010010589# Check for use of the system libmpdec library
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10591$as_echo_n "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010592
10593# Check whether --with-system_libmpdec was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010594if test "${with_system_libmpdec+set}" = set; then :
Stefan Krah60187b52012-03-23 19:06:27 +010010595 withval=$with_system_libmpdec;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010596else
Stefan Krah60187b52012-03-23 19:06:27 +010010597 with_system_libmpdec="no"
10598fi
10599
10600
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10602$as_echo "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010010603
Stefan Krah815280e2020-02-29 19:43:42 +010010604# Check whether _decimal should use a coroutine-local or thread-local context
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10606$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010607
10608# Check whether --with-decimal_contextvar was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010609if test "${with_decimal_contextvar+set}" = set; then :
Stefan Krah815280e2020-02-29 19:43:42 +010010610 withval=$with_decimal_contextvar;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010611else
Stefan Krah815280e2020-02-29 19:43:42 +010010612 with_decimal_contextvar="yes"
10613fi
10614
10615
10616if test "$with_decimal_contextvar" != "no"
10617then
10618
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010619$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010010620
10621fi
10622
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10624$as_echo "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010010625
Benjamin Peterson076ed002010-10-31 17:11:02 +000010626# Check for support for loadable sqlite extensions
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10628$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010629# Check whether --enable-loadable-sqlite-extensions was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010630if test "${enable_loadable_sqlite_extensions+set}" = set; then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000010631 enableval=$enable_loadable_sqlite_extensions;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010632else
Benjamin Peterson076ed002010-10-31 17:11:02 +000010633 enable_loadable_sqlite_extensions="no"
10634fi
10635
10636
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10638$as_echo "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000010639
Ned Deilyd819b932013-09-06 01:07:05 -070010640# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10641
10642
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10644$as_echo_n "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010645
10646# Check whether --with-tcltk-includes was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010647if test "${with_tcltk_includes+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010648 withval=$with_tcltk_includes;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010649else
Ned Deilyd819b932013-09-06 01:07:05 -070010650 with_tcltk_includes="default"
10651fi
10652
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10654$as_echo "$with_tcltk_includes" >&6; }
10655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10656$as_echo_n "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010657
10658# Check whether --with-tcltk-libs was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010659if test "${with_tcltk_libs+set}" = set; then :
Ned Deilyd819b932013-09-06 01:07:05 -070010660 withval=$with_tcltk_libs;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010661else
Ned Deilyd819b932013-09-06 01:07:05 -070010662 with_tcltk_libs="default"
10663fi
10664
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10666$as_echo "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070010667if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10668then
10669 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10670 then
10671 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10672 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010010673 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
10674 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
10675 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
10676 else
10677 TCLTK_INCLUDES=""
10678 TCLTK_LIBS=""
10679 fi
Ned Deilyd819b932013-09-06 01:07:05 -070010680else
10681 TCLTK_INCLUDES="$with_tcltk_includes"
10682 TCLTK_LIBS="$with_tcltk_libs"
10683fi
10684
Matthias Klose55708cc2009-04-30 08:06:49 +000010685# Check for --with-dbmliborder
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10687$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010688
10689# Check whether --with-dbmliborder was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010690if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010691 withval=$with_dbmliborder;
10692if test x$with_dbmliborder = xyes
10693then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010694as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010695else
10696 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10697 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10698 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010699 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010700 fi
10701 done
10702fi
10703fi
10704
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10706$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010707
Martin v. Löwis11437992002-04-12 09:54:03 +000010708# Templates for things AC_DEFINEd more than once.
10709# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010710
10711
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010712if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010713then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010714 # Defining _REENTRANT on system with POSIX threads should not hurt.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010715 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010716
10717 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010718 if test "$ac_sys_system" = "SunOS"; then
10719 CFLAGS="$CFLAGS -D_REENTRANT"
10720 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010721elif test "$ac_cv_kpthread" = "yes"
10722then
10723 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010724 if test "$ac_cv_cxx_thread" = "yes"; then
10725 CXX="$CXX -Kpthread"
10726 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010727 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010728elif test "$ac_cv_kthread" = "yes"
10729then
10730 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010731 if test "$ac_cv_cxx_thread" = "yes"; then
10732 CXX="$CXX -Kthread"
10733 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010734 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010735elif test "$ac_cv_pthread" = "yes"
10736then
10737 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010738 if test "$ac_cv_cxx_thread" = "yes"; then
10739 CXX="$CXX -pthread"
10740 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010741 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010742else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010743 if test ! -z "$withval" -a -d "$withval"
10744 then LDFLAGS="$LDFLAGS -L$withval"
10745 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010746
10747 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010748 # define _POSIX_THREADS in unistd.h. Some apparently don't
10749 # (e.g. gnu pth with pthread emulation)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10751$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010753/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010754
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010755#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010756#ifdef _POSIX_THREADS
10757yes
10758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
10760_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010762 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010763 unistd_defines_pthreads=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010764else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010765 unistd_defines_pthreads=no
10766fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010767rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010768
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10770$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010771
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010772 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010773
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010774 # Just looking for pthread_create in libpthread is not enough:
10775 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10776 # So we really have to include pthread.h, and then link.
10777 _libs=$LIBS
10778 LIBS="$LIBS -lpthread"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10780$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010782/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010783
10784#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010785#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010786
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010787void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010788int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010789main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010790{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010791
10792pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ;
10794 return 0;
10795}
10796_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10800$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010801 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010802
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010803else
Martin v. Löwis11437992002-04-12 09:54:03 +000010804
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010805 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010807if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010808
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010809 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010810
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010811else
Guido van Rossumad678af1998-10-02 14:42:15 +000010812
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10814$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
10815if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
10816 $as_echo_n "(cached) " >&6
10817else
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010819LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823/* Override any GCC internal prototype to avoid an error.
10824 Use char because int might match the return type of a GCC
10825 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010826#ifdef __cplusplus
10827extern "C"
10828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010829char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010830int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010831main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010834 ;
10835 return 0;
10836}
10837_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 ac_cv_lib_pthreads_pthread_create=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010840else
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010842fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010843rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010845LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010846fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10848$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
10849if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010850
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010851 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010852 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010853
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010854else
Greg Steinadf63d62000-07-05 10:38:09 +000010855
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10857$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
10858if ${ac_cv_lib_c_r_pthread_create+:} false; then :
10859 $as_echo_n "(cached) " >&6
10860else
Martin v. Löwis11437992002-04-12 09:54:03 +000010861 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010862LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866/* Override any GCC internal prototype to avoid an error.
10867 Use char because int might match the return type of a GCC
10868 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010869#ifdef __cplusplus
10870extern "C"
10871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010872char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010873int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010874main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 ;
10878 return 0;
10879}
10880_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 ac_cv_lib_c_r_pthread_create=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010883else
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010885fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010886rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010888LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010889fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10891$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
10892if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010893
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010894 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010895 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010896
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010897else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010898
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10900$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
10901if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
10902 $as_echo_n "(cached) " >&6
10903else
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010905LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010909/* Override any GCC internal prototype to avoid an error.
10910 Use char because int might match the return type of a GCC
10911 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010912#ifdef __cplusplus
10913extern "C"
10914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010915char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010916int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010917main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010919return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 ;
10921 return 0;
10922}
10923_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010925 ac_cv_lib_pthread___pthread_create_system=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010926else
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010928fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010929rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010932fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10934$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
10935if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010936
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010937 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010938 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010939
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010940else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010941
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10943$as_echo_n "checking for pthread_create in -lcma... " >&6; }
10944if ${ac_cv_lib_cma_pthread_create+:} false; then :
10945 $as_echo_n "(cached) " >&6
10946else
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010948LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952/* Override any GCC internal prototype to avoid an error.
10953 Use char because int might match the return type of a GCC
10954 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010955#ifdef __cplusplus
10956extern "C"
10957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010958char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010959int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010960main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000010961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 ;
10964 return 0;
10965}
10966_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010967if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ac_cv_lib_cma_pthread_create=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010971fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010972rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010974LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010975fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10977$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
10978if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010979
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010980 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010981 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010982
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010983else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010984
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010985 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10986
Guido van Rossum2d38f911996-06-26 19:47:01 +000010987fi
10988
Guido van Rossum627b2d71993-12-24 10:39:16 +000010989
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010990fi
10991
Guido van Rossum0be3e491997-05-22 20:33:33 +000010992fi
10993
Guido van Rossum49545951997-12-02 19:28:29 +000010994fi
10995
Guido van Rossumb93a8621998-05-07 13:27:32 +000010996fi
10997
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010998fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010010999rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011001
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11003$as_echo_n "checking for usconfig in -lmpc... " >&6; }
11004if ${ac_cv_lib_mpc_usconfig+:} false; then :
11005 $as_echo_n "(cached) " >&6
11006else
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011008LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012/* Override any GCC internal prototype to avoid an error.
11013 Use char because int might match the return type of a GCC
11014 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011015#ifdef __cplusplus
11016extern "C"
11017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011018char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011019int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011020main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011021{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 ;
11024 return 0;
11025}
11026_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011027if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 ac_cv_lib_mpc_usconfig=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011029else
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011031fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011032rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011034LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11037$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
11038if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011039
Martin v. Löwis130fb172001-07-19 11:00:41 +000011040 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011041
Guido van Rossum627b2d71993-12-24 10:39:16 +000011042fi
11043
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011044
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011045fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011046
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011047if test "$posix_threads" = "yes"; then
11048 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011049
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011050$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011051
11052 fi
11053
11054 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11055 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011056 SunOS/5.6)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011057$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011058
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011059 ;;
11060 SunOS/5.8)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011061$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011062
11063 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011064 AIX/*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011065$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011066
11067 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011068 esac
11069
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11071$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
11072 if ${ac_cv_pthread_system_supported+:} false; then :
11073 $as_echo_n "(cached) " >&6
11074else
11075 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011076 ac_cv_pthread_system_supported=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011077else
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011079/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011080
11081 #include <stdio.h>
11082 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011083 void *foo(void *parm) {
11084 return NULL;
11085 }
11086 main() {
11087 pthread_attr_t attr;
11088 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011089 if (pthread_attr_init(&attr)) return (-1);
11090 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11091 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11092 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011093 }
11094_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011095if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011096 ac_cv_pthread_system_supported=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011097else
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011102fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011104
Guido van Rossum627b2d71993-12-24 10:39:16 +000011105fi
11106
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11108$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011109 if test "$ac_cv_pthread_system_supported" = "yes"; then
11110
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011111$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011112
11113 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011114 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000011115do :
11116 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011117if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
11118 cat >>confdefs.h <<_ACEOF
11119#define HAVE_PTHREAD_SIGMASK 1
11120_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011121 case $ac_sys_system in
11122 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011123
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011124$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011125
11126 ;;
11127 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011128fi
Pablo Galindoba421752021-05-03 20:33:17 +010011129done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011130
11131 for ac_func in pthread_getcpuclockid
11132do :
11133 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11134if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11135 cat >>confdefs.h <<_ACEOF
11136#define HAVE_PTHREAD_GETCPUCLOCKID 1
11137_ACEOF
pdoxe14679c2017-10-05 00:01:56 -070011138
11139fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011140done
pdoxe14679c2017-10-05 00:01:56 -070011141
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011142fi
11143
11144
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011146
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11148$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149# Check whether --enable-ipv6 was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011150if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152 no)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11154$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155 ipv6=no
11156 ;;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011157 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11158$as_echo "yes" >&6; }
11159 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160
11161 ipv6=yes
11162 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011164else
Martin v. Löwis11437992002-04-12 09:54:03 +000011165
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011167/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011168 /* AF_INET6 available check */
11169#include <sys/types.h>
11170#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011171int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011172main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011173{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011174int domain = AF_INET6;
11175 ;
11176 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177}
Martin v. Löwis11437992002-04-12 09:54:03 +000011178_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011179if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011180
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11182$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011183 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011184
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011185else
Matthias Kloseb159a552010-04-25 21:00:44 +000011186
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011189 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011191fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011194if test "$ipv6" = "yes"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11196$as_echo_n "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011198/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011199
11200 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011201#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011202int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011203main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000011204{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011205struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011206 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 ;
11208 return 0;
11209}
Matthias Kloseb159a552010-04-25 21:00:44 +000011210
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011212if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011213
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11215$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011216 ipv6=yes
11217
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011218else
Matthias Kloseb159a552010-04-25 21:00:44 +000011219
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011222 ipv6=no
11223
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011224fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011226fi
11227
11228if test "$ipv6" = "yes"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011229 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011230
11231fi
11232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011233fi
11234
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235
11236ipv6type=unknown
11237ipv6lib=none
11238ipv6trylibc=no
11239
11240if test "$ipv6" = "yes"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11242$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011243 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11244 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011245 case $i in
11246 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011250#include <netinet/in.h>
11251#ifdef IPV6_INRIA_VERSION
11252yes
11253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011254_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011256 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011257 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011258fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011259rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011260
11261 ;;
11262 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011265
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011266#include <netinet/in.h>
11267#ifdef __KAME__
11268yes
11269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011270_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011272 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011273 ipv6type=$i;
11274 ipv6lib=inet6
11275 ipv6libdir=/usr/local/v6/lib
11276 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011277fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011278rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011279
11280 ;;
11281 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011284
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011285#include <features.h>
11286#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11287yes
11288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011289_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011291 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011292 ipv6type=$i;
11293 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011294fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011295rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011296
11297 ;;
11298 linux-inet6)
11299 if test -d /usr/inet6; then
11300 ipv6type=$i
11301 ipv6lib=inet6
11302 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011303 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304 fi
11305 ;;
11306 solaris)
11307 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011308 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011309 ipv6type=$i
11310 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011311 fi
11312 fi
11313 ;;
11314 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011317
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011318#include <sys/param.h>
11319#ifdef _TOSHIBA_INET6
11320yes
11321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011322_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011324 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011325 ipv6type=$i;
11326 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011327 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011328fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011329rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011330
11331 ;;
11332 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011334/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011335
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011336#include </usr/local/v6/include/sys/v6config.h>
11337#ifdef __V6D__
11338yes
11339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011340_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011342 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011343 ipv6type=$i;
11344 ipv6lib=v6;
11345 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011346 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011347fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011348rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011349
11350 ;;
11351 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011353/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011354
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011355#include <sys/param.h>
11356#ifdef _ZETA_MINAMI_INET6
11357yes
11358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011359_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011361 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362 ipv6type=$i;
11363 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011364 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011365fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011366rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011367
11368 ;;
11369 esac
11370 if test "$ipv6type" != "unknown"; then
11371 break
11372 fi
11373 done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11375$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011376fi
11377
11378if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11379 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11380 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11381 echo "using lib$ipv6lib"
11382 else
11383 if test $ipv6trylibc = "yes"; then
11384 echo "using libc"
11385 else
11386 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11387 echo "You need to fetch lib$ipv6lib.a from appropriate"
11388 echo 'ipv6 kit and compile beforehand.'
11389 exit 1
11390 fi
11391 fi
11392fi
11393
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11395$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397/* end confdefs.h. */
11398 /* CAN_RAW_FD_FRAMES available check */
11399#include <linux/can/raw.h>
11400int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011401main ()
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011402{
11403int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11404 ;
11405 return 0;
11406}
11407_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011408if ac_fn_c_try_compile "$LINENO"; then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011409
11410
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011411$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011412
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11414$as_echo "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011415
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011416else
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011417
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011420
11421fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011423
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11425$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11427/* end confdefs.h. */
11428
11429#include <linux/can/raw.h>
11430int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011431main ()
Zackery Spytz97e0de02020-04-09 06:03:49 -060011432{
11433int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11434 ;
11435 return 0;
11436}
11437_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011438if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060011439
11440
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011441$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060011442
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11444$as_echo "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011445
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011446else
Zackery Spytz97e0de02020-04-09 06:03:49 -060011447
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11449$as_echo "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060011450
11451fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060011453
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011454# Check for --with-doc-strings
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11456$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458# Check whether --with-doc-strings was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011459if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460 withval=$with_doc_strings;
11461fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011462
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011463
11464if test -z "$with_doc_strings"
11465then with_doc_strings="yes"
11466fi
11467if test "$with_doc_strings" != "no"
11468then
11469
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011470$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011471
11472fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11474$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011475
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011476# Check for Python-specific malloc support
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11478$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011480# Check whether --with-pymalloc was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011481if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482 withval=$with_pymalloc;
11483fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011484
Neil Schemenauera35c6882001-02-27 04:45:05 +000011485
Neil Schemenauer16c22972002-03-22 15:34:49 +000011486if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011487then
11488 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011489fi
11490if test "$with_pymalloc" != "no"
11491then
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011493$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011494
11495fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11497$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011498
Nick Coghlan6ea41862017-06-11 13:16:15 +100011499# Check for --with-c-locale-coercion
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11501$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011502
11503# Check whether --with-c-locale-coercion was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011504if test "${with_c_locale_coercion+set}" = set; then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100011505 withval=$with_c_locale_coercion;
11506fi
11507
11508
11509if test -z "$with_c_locale_coercion"
11510then
11511 with_c_locale_coercion="yes"
11512fi
11513if test "$with_c_locale_coercion" != "no"
11514then
11515
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011516$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100011517
11518fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11520$as_echo "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100011521
Benjamin Peterson05159c42009-12-03 03:01:27 +000011522# Check for Valgrind support
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11524$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011525
11526# Check whether --with-valgrind was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011527if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011528 withval=$with_valgrind;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011529else
Benjamin Peterson05159c42009-12-03 03:01:27 +000011530 with_valgrind=no
11531fi
11532
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11534$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011535if test "$with_valgrind" != no; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011536 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
11537if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011538
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011539$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011540
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011541else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011542 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011543
11544fi
11545
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011546
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011547 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011548fi
11549
Łukasz Langaa785c872016-09-09 17:37:37 -070011550# Check for DTrace support
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11552$as_echo_n "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011553
11554# Check whether --with-dtrace was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011555if test "${with_dtrace+set}" = set; then :
Łukasz Langaa785c872016-09-09 17:37:37 -070011556 withval=$with_dtrace;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011557else
Łukasz Langaa785c872016-09-09 17:37:37 -070011558 with_dtrace=no
11559fi
11560
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11562$as_echo "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011563
11564
11565
11566
11567
11568DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011569DTRACE_HEADERS=
11570DTRACE_OBJS=
11571
11572if test "$with_dtrace" = "yes"
11573then
11574 # Extract the first word of "dtrace", so it can be a program name with args.
11575set dummy dtrace; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11577$as_echo_n "checking for $ac_word... " >&6; }
11578if ${ac_cv_path_DTRACE+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580else
Łukasz Langaa785c872016-09-09 17:37:37 -070011581 case $DTRACE in
11582 [\\/]* | ?:[\\/]*)
11583 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11584 ;;
11585 *)
11586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11587for as_dir in $PATH
11588do
11589 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011590 test -z "$as_dir" && as_dir=.
Łukasz Langaa785c872016-09-09 17:37:37 -070011591 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11593 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070011595 break 2
11596 fi
11597done
11598 done
11599IFS=$as_save_IFS
11600
11601 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11602 ;;
11603esac
11604fi
11605DTRACE=$ac_cv_path_DTRACE
11606if test -n "$DTRACE"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11608$as_echo "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011609else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011612fi
11613
11614
11615 if test "$DTRACE" = "not found"; then
11616 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11617 fi
11618
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011619$as_echo "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070011620
11621 DTRACE_HEADERS="Include/pydtrace_probes.h"
11622
11623 # On OS X, DTrace providers do not need to be explicitly compiled and
11624 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11625 # generation flag '-G'. We check for presence of this flag, rather than
11626 # hardcoding support by OS, in the interest of robustness.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11628$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11629if ${ac_cv_dtrace_link+:} false; then :
11630 $as_echo_n "(cached) " >&6
11631else
Łukasz Langaa785c872016-09-09 17:37:37 -070011632 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011633 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011634 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011635 ac_cv_dtrace_link=yes
11636
11637fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11639$as_echo "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070011640 if test "$ac_cv_dtrace_link" = "yes"; then
11641 DTRACE_OBJS="Python/pydtrace.o"
11642 fi
11643fi
11644
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011645# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011646
Guido van Rossum98935bf2001-09-05 19:13:16 +000011647DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011648
Guido van Rossume97ee181999-12-20 21:27:22 +000011649# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011650# platforms have dlopen(), but don't want to use it.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011651for ac_func in dlopen
11652do :
11653 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11654if test "x$ac_cv_func_dlopen" = xyes; then :
11655 cat >>confdefs.h <<_ACEOF
11656#define HAVE_DLOPEN 1
11657_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011658
Guido van Rossume97ee181999-12-20 21:27:22 +000011659fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011660done
Guido van Rossume97ee181999-12-20 21:27:22 +000011661
Michael W. Hudson54241132001-12-07 15:38:26 +000011662
Guido van Rossume97ee181999-12-20 21:27:22 +000011663# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11664# loading of modules.
11665
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11667$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011668if test -z "$DYNLOADFILE"
11669then
11670 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011671 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011672 *)
11673 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11674 # out any dynamic loading
11675 if test "$ac_cv_func_dlopen" = yes
11676 then DYNLOADFILE="dynload_shlib.o"
11677 else DYNLOADFILE="dynload_stub.o"
11678 fi
11679 ;;
11680 esac
11681fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11683$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011684if test "$DYNLOADFILE" != "dynload_stub.o"
11685then
Martin v. Löwis11437992002-04-12 09:54:03 +000011686
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011687$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011688
11689fi
11690
Neil Schemenauer4e425612001-06-19 15:44:15 +000011691# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11692
Michael W. Hudson54241132001-12-07 15:38:26 +000011693
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11695$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011696if test -z "$MACHDEP_OBJS"
11697then
Jack Jansene578a632001-08-15 01:27:14 +000011698 MACHDEP_OBJS=$extra_machdep_objs
11699else
11700 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011701fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011702if test -z "$MACHDEP_OBJS"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11704$as_echo "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011705else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11707$as_echo "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011708fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011709
Guido van Rossum627b2d71993-12-24 10:39:16 +000011710# checks for library functions
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011711for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
11712 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11713 explicit_memset faccessat fchmod fchmodat fchown fchownat \
11714 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
11715 futimens futimes gai_strerror getentropy \
11716 getgrgid_r getgrnam_r \
11717 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
11718 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
11719 if_nameindex \
11720 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
11721 memrchr mbrtowc mkdirat mkfifo \
11722 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
11723 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
11724 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
11725 readlink readlinkat readv realpath renameat \
11726 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
11727 setgid sethostname \
11728 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
11729 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11730 sched_rr_get_interval \
11731 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
11732 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
11733 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
11734 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
11735 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
11736do :
11737 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11738ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11739if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11740 cat >>confdefs.h <<_ACEOF
11741#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11742_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011743
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011744fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011745done
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011746
Michael W. Hudson54241132001-12-07 15:38:26 +000011747
Benjamin Peterson40caa052018-09-12 15:52:40 -070011748# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11749# links. Some libc implementations have a stub lchmod implementation that always
11750# returns an error.
11751if test "$MACHDEP" != linux; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011752 for ac_func in lchmod
11753do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011754 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011755if test "x$ac_cv_func_lchmod" = xyes; then :
11756 cat >>confdefs.h <<_ACEOF
11757#define HAVE_LCHMOD 1
Benjamin Petersoned709d52018-09-12 17:22:11 -070011758_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011759
11760fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011761done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011762
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011763fi
11764
11765ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011766 #include <dirent.h>
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011767"
11768if test "x$ac_cv_have_decl_dirfd" = xyes; then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011769
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011770$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011771
11772fi
11773
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011774
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011775# For some functions, having a definition is not sufficient, since
11776# we want to take their address.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11778$as_echo_n "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011780/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011781#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011782int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011783main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011784{
11785void *x=chroot
11786 ;
11787 return 0;
11788}
11789_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011790if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011791
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011792$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011793
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11795$as_echo "yes" >&6; }
11796else
11797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11798$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011799
11800fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11803$as_echo_n "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011806#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011807int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011808main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011809{
11810void *x=link
11811 ;
11812 return 0;
11813}
11814_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011816
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011817$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011818
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11820$as_echo "yes" >&6; }
11821else
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11823$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011824
11825fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11828$as_echo_n "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011830/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011831#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011832int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011833main ()
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011834{
11835void *x=symlink
11836 ;
11837 return 0;
11838}
11839_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011841
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011842$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011843
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11845$as_echo "yes" >&6; }
11846else
11847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11848$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011849
11850fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11853$as_echo_n "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011855/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011856#include <unistd.h>
11857int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011858main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011859{
11860void *x=fchdir
11861 ;
11862 return 0;
11863}
11864_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011866
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011867$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011868
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11870$as_echo "yes" >&6; }
11871else
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011874
11875fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11878$as_echo_n "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011880/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011881#include <unistd.h>
11882int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011883main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011884{
11885void *x=fsync
11886 ;
11887 return 0;
11888}
11889_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011891
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011892$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011893
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11895$as_echo "yes" >&6; }
11896else
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11898$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011899
11900fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11903$as_echo_n "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011905/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011906#include <unistd.h>
11907int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011908main ()
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011909{
11910void *x=fdatasync
11911 ;
11912 return 0;
11913}
11914_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011916
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011917$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011918
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11920$as_echo "yes" >&6; }
11921else
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11923$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011924
11925fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11928$as_echo_n "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011930/* end confdefs.h. */
11931#include <sys/epoll.h>
11932int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011933main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011934{
11935void *x=epoll_create
11936 ;
11937 return 0;
11938}
11939_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011941
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011942$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011943
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11945$as_echo "yes" >&6; }
11946else
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011949
11950fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11953$as_echo_n "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060011954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955/* end confdefs.h. */
11956#include <sys/epoll.h>
11957int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011958main ()
Benjamin Peterson95c16622011-12-27 15:36:32 -060011959{
11960void *x=epoll_create1
11961 ;
11962 return 0;
11963}
11964_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011965if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060011966
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011967$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060011968
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11970$as_echo "yes" >&6; }
11971else
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11973$as_echo "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060011974
11975fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11978$as_echo_n "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011980/* end confdefs.h. */
11981
11982#include <sys/types.h>
11983#include <sys/event.h>
11984
11985int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011986main ()
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011987{
11988int x=kqueue()
11989 ;
11990 return 0;
11991}
11992_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011993if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011994
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011995$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011996
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11998$as_echo "yes" >&6; }
11999else
12000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12001$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012002
12003fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12006$as_echo_n "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12008/* end confdefs.h. */
12009
12010#include <sys/time.h>
12011#include <sys/resource.h>
12012
12013int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012014main ()
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012015{
12016void *x=prlimit
12017 ;
12018 return 0;
12019}
12020_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012021if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012022
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012023$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012024
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12026$as_echo "yes" >&6; }
12027else
12028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12029$as_echo "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012030
12031fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12034$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12036/* end confdefs.h. */
12037#include <mach-o/dyld.h>
12038int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012039main ()
Ronald Oussoren41761932020-11-08 10:05:27 +010012040{
12041void *x=_dyld_shared_cache_contains_path
12042 ;
12043 return 0;
12044}
12045_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012046if ac_fn_c_try_compile "$LINENO"; then :
Ronald Oussoren41761932020-11-08 10:05:27 +010012047
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012048$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010012049
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12051$as_echo "yes" >&6; }
12052else
12053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010012055
12056fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012058
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12060$as_echo_n "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12062/* end confdefs.h. */
12063
12064#ifdef HAVE_SYS_MMAN_H
12065#include <sys/mman.h>
12066#endif
12067#ifdef HAVE_SYS_MEMFD_H
12068#include <sys/memfd.h>
12069#endif
12070
12071int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012072main ()
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012073{
12074void *x=memfd_create
12075 ;
12076 return 0;
12077}
12078_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012079if ac_fn_c_try_compile "$LINENO"; then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012080
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012081$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012082
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012083 { $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; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012088
12089fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012091
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12093$as_echo_n "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12095/* end confdefs.h. */
12096
12097#ifdef HAVE_SYS_EVENTFD_H
12098#include <sys/eventfd.h>
12099#endif
12100
12101int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012102main ()
Christian Heimescd9fed62020-11-13 19:48:52 +010012103{
12104int x = eventfd(0, EFD_CLOEXEC)
12105 ;
12106 return 0;
12107}
12108_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012109if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimescd9fed62020-11-13 19:48:52 +010012110
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012111$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010012112
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12114$as_echo "yes" >&6; }
12115else
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12117$as_echo "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010012118
12119fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010012121
Martin v. Löwisd5843682002-11-21 20:41:28 +000012122# On some systems (eg. FreeBSD 5), we would find a definition of the
12123# functions ctermid_r, setgroups in the library, but no prototype
12124# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12125# address to avoid compiler warnings and potential miscompilations
12126# because of the missing prototypes.
12127
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12129$as_echo_n "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012132
Martin v. Löwisd5843682002-11-21 20:41:28 +000012133#include <stdio.h>
12134
Martin v. Löwisd5843682002-11-21 20:41:28 +000012135int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012136main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012137{
12138void* p = ctermid_r
12139 ;
12140 return 0;
12141}
12142_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012144
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012145$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12148$as_echo "yes" >&6; }
12149else
12150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012152
12153fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12157$as_echo_n "checking for flock declaration... " >&6; }
12158if ${ac_cv_flock_decl+:} false; then :
12159 $as_echo_n "(cached) " >&6
12160else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012162/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012163#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012164int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012165main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012166{
12167void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012168
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012169 ;
12170 return 0;
12171}
12172_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012173if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012174 ac_cv_flock_decl=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012175else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012176 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012177
12178fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012180
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012181fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12183$as_echo "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012184if test "x${ac_cv_flock_decl}" = xyes; then
12185 for ac_func in flock
12186do :
12187 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012188if test "x$ac_cv_func_flock" = xyes; then :
12189 cat >>confdefs.h <<_ACEOF
12190#define HAVE_FLOCK 1
12191_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012192
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012193else
12194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
12195$as_echo_n "checking for flock in -lbsd... " >&6; }
12196if ${ac_cv_lib_bsd_flock+:} false; then :
12197 $as_echo_n "(cached) " >&6
12198else
Antoine Pitroua3000072010-09-07 14:52:42 +000012199 ac_check_lib_save_LIBS=$LIBS
12200LIBS="-lbsd $LIBS"
12201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202/* end confdefs.h. */
12203
12204/* Override any GCC internal prototype to avoid an error.
12205 Use char because int might match the return type of a GCC
12206 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012207#ifdef __cplusplus
12208extern "C"
12209#endif
Antoine Pitroua3000072010-09-07 14:52:42 +000012210char flock ();
12211int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012212main ()
Antoine Pitroua3000072010-09-07 14:52:42 +000012213{
12214return flock ();
12215 ;
12216 return 0;
12217}
12218_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012219if ac_fn_c_try_link "$LINENO"; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012220 ac_cv_lib_bsd_flock=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012221else
Antoine Pitroua3000072010-09-07 14:52:42 +000012222 ac_cv_lib_bsd_flock=no
12223fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012224rm -f core conftest.err conftest.$ac_objext \
Antoine Pitroua3000072010-09-07 14:52:42 +000012225 conftest$ac_exeext conftest.$ac_ext
12226LIBS=$ac_check_lib_save_LIBS
12227fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12229$as_echo "$ac_cv_lib_bsd_flock" >&6; }
12230if test "x$ac_cv_lib_bsd_flock" = xyes; then :
12231 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012232
12233
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012234$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012235
12236
12237fi
12238
12239
12240fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012241done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012242
Antoine Pitroua3000072010-09-07 14:52:42 +000012243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12246$as_echo_n "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012249
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012250#include <unistd.h>
12251
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012252int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012253main ()
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012254{
12255void* p = getpagesize
12256 ;
12257 return 0;
12258}
12259_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012261
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012262$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012263
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12265$as_echo "yes" >&6; }
12266else
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12268$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012269
12270fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012272
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12274$as_echo_n "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12276/* end confdefs.h. */
12277
12278#include <stdlib.h>
12279
12280int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012281main ()
Victor Stinner984890f2011-11-24 13:53:38 +010012282{
12283int res = unsetenv("DUMMY")
12284 ;
12285 return 0;
12286}
12287_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012288if ac_fn_c_try_compile "$LINENO"; then :
12289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12290$as_echo "no" >&6; }
12291else
Victor Stinner984890f2011-11-24 13:53:38 +010012292
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012293$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010012294
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12296$as_echo "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010012297
12298fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010012300
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012301for ac_prog in true
12302do
12303 # Extract the first word of "$ac_prog", so it can be a program name with args.
12304set dummy $ac_prog; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12306$as_echo_n "checking for $ac_word... " >&6; }
12307if ${ac_cv_prog_TRUE+:} false; then :
12308 $as_echo_n "(cached) " >&6
12309else
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012310 if test -n "$TRUE"; then
12311 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12312else
12313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12314for as_dir in $PATH
12315do
12316 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012317 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012319 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012320 ac_cv_prog_TRUE="$ac_prog"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012321 $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 +000012322 break 2
12323 fi
12324done
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012327
12328fi
12329fi
12330TRUE=$ac_cv_prog_TRUE
12331if test -n "$TRUE"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12333$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012334else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012337fi
12338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012340 test -n "$TRUE" && break
12341done
12342test -n "$TRUE" || TRUE="/bin/true"
12343
12344
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12346$as_echo_n "checking for inet_aton in -lc... " >&6; }
12347if ${ac_cv_lib_c_inet_aton+:} false; then :
12348 $as_echo_n "(cached) " >&6
12349else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012350 ac_check_lib_save_LIBS=$LIBS
12351LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012353/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355/* Override any GCC internal prototype to avoid an error.
12356 Use char because int might match the return type of a GCC
12357 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012358#ifdef __cplusplus
12359extern "C"
12360#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012361char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012362int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012363main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012366 ;
12367 return 0;
12368}
12369_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012371 ac_cv_lib_c_inet_aton=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012372else
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012374fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012375rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012377LIBS=$ac_check_lib_save_LIBS
12378fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12380$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
12381if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012382 $ac_cv_prog_TRUE
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012383else
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12385$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
12386if ${ac_cv_lib_resolv_inet_aton+:} false; then :
12387 $as_echo_n "(cached) " >&6
12388else
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012389 ac_check_lib_save_LIBS=$LIBS
12390LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012392/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394/* Override any GCC internal prototype to avoid an error.
12395 Use char because int might match the return type of a GCC
12396 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012397#ifdef __cplusplus
12398extern "C"
12399#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012400char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012401int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012402main ()
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012405 ;
12406 return 0;
12407}
12408_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012410 ac_cv_lib_resolv_inet_aton=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012413fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012414rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012416LIBS=$ac_check_lib_save_LIBS
12417fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12419$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
12420if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
12421 cat >>confdefs.h <<_ACEOF
12422#define HAVE_LIBRESOLV 1
12423_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012424
12425 LIBS="-lresolv $LIBS"
12426
12427fi
12428
12429
12430fi
12431
12432
Christian Heimesd0764e22007-12-04 15:00:33 +000012433# On Tru64, chflags seems to be present, but calling it will
12434# exit Python
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12436$as_echo_n "checking for chflags... " >&6; }
12437if ${ac_cv_have_chflags+:} false; then :
12438 $as_echo_n "(cached) " >&6
12439else
12440 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012441 ac_cv_have_chflags=cross
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012442else
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012444/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012445
Christian Heimesd0764e22007-12-04 15:00:33 +000012446#include <sys/stat.h>
12447#include <unistd.h>
12448int main(int argc, char*argv[])
12449{
12450 if(chflags(argv[0], 0) != 0)
12451 return 1;
12452 return 0;
12453}
Ned Deily3eb67d52011-06-28 00:00:28 -070012454
Christian Heimesd0764e22007-12-04 15:00:33 +000012455_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012456if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012457 ac_cv_have_chflags=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12462 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012463fi
12464
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012465
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012466fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12468$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012469if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012471if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012472 ac_cv_have_chflags="yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012473else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012474 ac_cv_have_chflags="no"
12475fi
12476
12477fi
12478if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012479
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012480$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012481
12482fi
12483
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12485$as_echo_n "checking for lchflags... " >&6; }
12486if ${ac_cv_have_lchflags+:} false; then :
12487 $as_echo_n "(cached) " >&6
12488else
12489 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012490 ac_cv_have_lchflags=cross
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012491else
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012493/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012494
Christian Heimesd0764e22007-12-04 15:00:33 +000012495#include <sys/stat.h>
12496#include <unistd.h>
12497int main(int argc, char*argv[])
12498{
12499 if(lchflags(argv[0], 0) != 0)
12500 return 1;
12501 return 0;
12502}
Ned Deily3eb67d52011-06-28 00:00:28 -070012503
Christian Heimesd0764e22007-12-04 15:00:33 +000012504_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012505if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012506 ac_cv_have_lchflags=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012512fi
12513
12514
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012515fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12517$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012518if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012520if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012521 ac_cv_have_lchflags="yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012522else
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012523 ac_cv_have_lchflags="no"
12524fi
12525
12526fi
12527if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012528
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012529$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012530
12531fi
12532
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012533case $ac_sys_system/$ac_sys_release in
12534Darwin/*)
12535 _CUR_CFLAGS="${CFLAGS}"
12536 _CUR_LDFLAGS="${LDFLAGS}"
12537 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12538 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12539 ;;
12540esac
12541
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12543$as_echo_n "checking for inflateCopy in -lz... " >&6; }
12544if ${ac_cv_lib_z_inflateCopy+:} false; then :
12545 $as_echo_n "(cached) " >&6
12546else
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012547 ac_check_lib_save_LIBS=$LIBS
12548LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012550/* end confdefs.h. */
12551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012552/* Override any GCC internal prototype to avoid an error.
12553 Use char because int might match the return type of a GCC
12554 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012555#ifdef __cplusplus
12556extern "C"
12557#endif
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012558char inflateCopy ();
12559int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012560main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012563 ;
12564 return 0;
12565}
12566_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012567if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012568 ac_cv_lib_z_inflateCopy=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012569else
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012571fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012572rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012574LIBS=$ac_check_lib_save_LIBS
12575fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12577$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
12578if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012579
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012580$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012581
12582fi
12583
12584
12585case $ac_sys_system/$ac_sys_release in
12586Darwin/*)
12587 CFLAGS="${_CUR_CFLAGS}"
12588 LDFLAGS="${_CUR_LDFLAGS}"
12589 ;;
12590esac
12591
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12593$as_echo_n "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012595/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012596
Martin v. Löwise9416172003-05-03 10:12:45 +000012597#include <netdb.h>
12598
Martin v. Löwise9416172003-05-03 10:12:45 +000012599int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012600main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012601{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012602void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012603 ;
12604 return 0;
12605}
12606_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012608
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012609$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012610
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12612$as_echo "yes" >&6; }
12613else
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12615$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012616
12617fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012618rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12622$as_echo_n "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012625
Martin v. Löwis86d66262006-02-17 08:40:11 +000012626#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012627#include <sys/socket.h>
12628#include <netinet/in.h>
12629#include <arpa/inet.h>
12630
Martin v. Löwise9416172003-05-03 10:12:45 +000012631int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012632main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012633{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012634void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012635 ;
12636 return 0;
12637}
12638_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012640
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012641$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012642
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12644$as_echo "yes" >&6; }
12645else
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12647$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012648
12649fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012650rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12654$as_echo_n "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012657
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012658#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012659#include <sys/socket.h>
12660#include <netinet/in.h>
12661#include <arpa/inet.h>
12662
Martin v. Löwise9416172003-05-03 10:12:45 +000012663int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012664main ()
Martin v. Löwise9416172003-05-03 10:12:45 +000012665{
12666void* p = inet_pton
12667 ;
12668 return 0;
12669}
12670_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012672
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012673$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012674
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12676$as_echo "yes" >&6; }
12677else
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012680
12681fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012683
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012684# On some systems, setgroups is in unistd.h, on others, in grp.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12686$as_echo_n "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012688/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012689
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012690#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012691#ifdef HAVE_GRP_H
12692#include <grp.h>
12693#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012694
Martin v. Löwisd5843682002-11-21 20:41:28 +000012695int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012696main ()
Martin v. Löwisd5843682002-11-21 20:41:28 +000012697{
12698void* p = setgroups
12699 ;
12700 return 0;
12701}
12702_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012704
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012705$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012706
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12708$as_echo "yes" >&6; }
12709else
12710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12711$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012712
12713fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012715
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012716# check for openpty and forkpty
12717
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012718for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012719do :
12720 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012721if test "x$ac_cv_func_openpty" = xyes; then :
12722 cat >>confdefs.h <<_ACEOF
12723#define HAVE_OPENPTY 1
12724_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012725
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012726else
12727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12728$as_echo_n "checking for openpty in -lutil... " >&6; }
12729if ${ac_cv_lib_util_openpty+:} false; then :
12730 $as_echo_n "(cached) " >&6
12731else
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012733LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737/* Override any GCC internal prototype to avoid an error.
12738 Use char because int might match the return type of a GCC
12739 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012740#ifdef __cplusplus
12741extern "C"
12742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012743char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012744int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012745main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 ;
12749 return 0;
12750}
12751_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ac_cv_lib_util_openpty=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012754else
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012756fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012757rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012759LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012760fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12762$as_echo "$ac_cv_lib_util_openpty" >&6; }
12763if test "x$ac_cv_lib_util_openpty" = xyes; then :
12764 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012765 LIBS="$LIBS -lutil"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012766else
12767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12768$as_echo_n "checking for openpty in -lbsd... " >&6; }
12769if ${ac_cv_lib_bsd_openpty+:} false; then :
12770 $as_echo_n "(cached) " >&6
12771else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012772 ac_check_lib_save_LIBS=$LIBS
12773LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012775/* end confdefs.h. */
12776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777/* Override any GCC internal prototype to avoid an error.
12778 Use char because int might match the return type of a GCC
12779 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012780#ifdef __cplusplus
12781extern "C"
12782#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012783char openpty ();
12784int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012785main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012788 ;
12789 return 0;
12790}
12791_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012793 ac_cv_lib_bsd_openpty=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012796fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012797rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012799LIBS=$ac_check_lib_save_LIBS
12800fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12802$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
12803if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
12804 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012805 LIBS="$LIBS -lbsd"
12806fi
12807
12808
12809fi
12810
Fred Drake8cef4cf2000-06-28 16:40:38 +000012811
12812fi
12813done
12814
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012815for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012816do :
12817 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012818if test "x$ac_cv_func_forkpty" = xyes; then :
12819 cat >>confdefs.h <<_ACEOF
12820#define HAVE_FORKPTY 1
12821_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012822
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012823else
12824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12825$as_echo_n "checking for forkpty in -lutil... " >&6; }
12826if ${ac_cv_lib_util_forkpty+:} false; then :
12827 $as_echo_n "(cached) " >&6
12828else
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012830LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834/* Override any GCC internal prototype to avoid an error.
12835 Use char because int might match the return type of a GCC
12836 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012837#ifdef __cplusplus
12838extern "C"
12839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012840char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012841int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012842main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ;
12846 return 0;
12847}
12848_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 ac_cv_lib_util_forkpty=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012851else
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012853fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012854rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012856LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012857fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12859$as_echo "$ac_cv_lib_util_forkpty" >&6; }
12860if test "x$ac_cv_lib_util_forkpty" = xyes; then :
12861 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012862 LIBS="$LIBS -lutil"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012863else
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12865$as_echo_n "checking for forkpty in -lbsd... " >&6; }
12866if ${ac_cv_lib_bsd_forkpty+:} false; then :
12867 $as_echo_n "(cached) " >&6
12868else
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012869 ac_check_lib_save_LIBS=$LIBS
12870LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012872/* end confdefs.h. */
12873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874/* Override any GCC internal prototype to avoid an error.
12875 Use char because int might match the return type of a GCC
12876 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012877#ifdef __cplusplus
12878extern "C"
12879#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012880char forkpty ();
12881int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012882main ()
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012885 ;
12886 return 0;
12887}
12888_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012890 ac_cv_lib_bsd_forkpty=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012891else
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012893fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012894rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012896LIBS=$ac_check_lib_save_LIBS
12897fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12899$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
12900if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
12901 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012902 LIBS="$LIBS -lbsd"
12903fi
12904
12905
12906fi
12907
Fred Drake8cef4cf2000-06-28 16:40:38 +000012908
12909fi
Pablo Galindoba421752021-05-03 20:33:17 +010012910done
Christian Heimes39258d32021-04-17 11:36:35 +020012911
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012912
Michael W. Hudson54241132001-12-07 15:38:26 +000012913# check for long file support functions
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012914for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12915do :
12916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12917ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12918if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12919 cat >>confdefs.h <<_ACEOF
12920#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12921_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012922
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012924done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012925
Michael W. Hudson54241132001-12-07 15:38:26 +000012926
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012927ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012928if test "x$ac_cv_func_dup2" = xyes; then :
12929 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012930
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012931else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012933 *" dup2.$ac_objext "* ) ;;
12934 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012936esac
12937
Martin v. Löwis1142de32002-03-29 16:28:31 +000012938fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012939
Martin v. Löwis1142de32002-03-29 16:28:31 +000012940
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012941for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012942do :
12943 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012944if test "x$ac_cv_func_getpgrp" = xyes; then :
12945 cat >>confdefs.h <<_ACEOF
12946#define HAVE_GETPGRP 1
12947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012949/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012951int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012952main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000012953{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 ;
12956 return 0;
12957}
12958_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012959if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012960
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012961$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012962
Guido van Rossum627b2d71993-12-24 10:39:16 +000012963fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012965
Guido van Rossum627b2d71993-12-24 10:39:16 +000012966fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012967done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012968
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012969for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012970do :
12971 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012972if test "x$ac_cv_func_setpgrp" = xyes; then :
12973 cat >>confdefs.h <<_ACEOF
12974#define HAVE_SETPGRP 1
12975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012978#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012979int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012980main ()
Jack Jansen150753c2003-03-29 22:07:47 +000012981{
12982setpgrp(0,0);
12983 ;
12984 return 0;
12985}
12986_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012989$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012990
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012991fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012993
12994fi
12995done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012996
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012997
Gregory P. Smith387512c2018-12-30 15:42:32 -080012998# We search for both crypt and crypt_r as one or the other may be defined
12999# This gets us our -lcrypt in LIBS when required on the target platform.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13001$as_echo_n "checking for library containing crypt... " >&6; }
13002if ${ac_cv_search_crypt+:} false; then :
13003 $as_echo_n "(cached) " >&6
13004else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013005 ac_func_search_save_LIBS=$LIBS
13006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13007/* end confdefs.h. */
13008
13009/* Override any GCC internal prototype to avoid an error.
13010 Use char because int might match the return type of a GCC
13011 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013012#ifdef __cplusplus
13013extern "C"
13014#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013015char crypt ();
13016int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013017main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013018{
13019return crypt ();
13020 ;
13021 return 0;
13022}
13023_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013024for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013025 if test -z "$ac_lib"; then
13026 ac_res="none required"
13027 else
13028 ac_res=-l$ac_lib
13029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13030 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013031 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013032 ac_cv_search_crypt=$ac_res
13033fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013034rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013035 conftest$ac_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013036 if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013037 break
13038fi
13039done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013040if ${ac_cv_search_crypt+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013041
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013042else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013043 ac_cv_search_crypt=no
13044fi
13045rm conftest.$ac_ext
13046LIBS=$ac_func_search_save_LIBS
13047fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13049$as_echo "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013050ac_res=$ac_cv_search_crypt
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013051if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13053
13054fi
13055
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13057$as_echo_n "checking for library containing crypt_r... " >&6; }
13058if ${ac_cv_search_crypt_r+:} false; then :
13059 $as_echo_n "(cached) " >&6
13060else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013061 ac_func_search_save_LIBS=$LIBS
13062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063/* end confdefs.h. */
13064
13065/* Override any GCC internal prototype to avoid an error.
13066 Use char because int might match the return type of a GCC
13067 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013068#ifdef __cplusplus
13069extern "C"
13070#endif
Gregory P. Smith387512c2018-12-30 15:42:32 -080013071char crypt_r ();
13072int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013073main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013074{
13075return crypt_r ();
13076 ;
13077 return 0;
13078}
13079_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013080for ac_lib in '' crypt; do
Gregory P. Smith387512c2018-12-30 15:42:32 -080013081 if test -z "$ac_lib"; then
13082 ac_res="none required"
13083 else
13084 ac_res=-l$ac_lib
13085 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13086 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013087 if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013088 ac_cv_search_crypt_r=$ac_res
13089fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013090rm -f core conftest.err conftest.$ac_objext \
Gregory P. Smith387512c2018-12-30 15:42:32 -080013091 conftest$ac_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013092 if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013093 break
13094fi
13095done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013096if ${ac_cv_search_crypt_r+:} false; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013097
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013098else
Gregory P. Smith387512c2018-12-30 15:42:32 -080013099 ac_cv_search_crypt_r=no
13100fi
13101rm conftest.$ac_ext
13102LIBS=$ac_func_search_save_LIBS
13103fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13105$as_echo "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080013106ac_res=$ac_cv_search_crypt_r
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013107if test "$ac_res" != no; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013108 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13109
13110fi
13111
13112
13113ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013114if test "x$ac_cv_func_crypt_r" = xyes; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13116/* end confdefs.h. */
13117
13118#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13119#include <crypt.h>
13120
13121int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013122main ()
Gregory P. Smith387512c2018-12-30 15:42:32 -080013123{
13124
13125struct crypt_data d;
13126char *r = crypt_r("", "", &d);
13127
13128 ;
13129 return 0;
13130}
13131_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013132if ac_fn_c_try_compile "$LINENO"; then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080013133
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013134$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080013135
13136fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080013138
13139fi
13140
13141
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013142for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020013143do :
13144 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013145if test "x$ac_cv_func_clock_gettime" = xyes; then :
13146 cat >>confdefs.h <<_ACEOF
13147#define HAVE_CLOCK_GETTIME 1
13148_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013149
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013150else
Victor Stinnere0be4232011-10-25 13:06:09 +020013151
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13153$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13154if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13155 $as_echo_n "(cached) " >&6
13156else
Victor Stinnere0be4232011-10-25 13:06:09 +020013157 ac_check_lib_save_LIBS=$LIBS
13158LIBS="-lrt $LIBS"
13159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160/* end confdefs.h. */
13161
13162/* Override any GCC internal prototype to avoid an error.
13163 Use char because int might match the return type of a GCC
13164 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013165#ifdef __cplusplus
13166extern "C"
13167#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013168char clock_gettime ();
13169int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013170main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013171{
13172return clock_gettime ();
13173 ;
13174 return 0;
13175}
13176_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013177if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013178 ac_cv_lib_rt_clock_gettime=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013179else
Victor Stinnere0be4232011-10-25 13:06:09 +020013180 ac_cv_lib_rt_clock_gettime=no
13181fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013182rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013183 conftest$ac_exeext conftest.$ac_ext
13184LIBS=$ac_check_lib_save_LIBS
13185fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13187$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13188if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013189
Victor Stinner7efb8332014-08-29 15:41:08 +020013190 LIBS="$LIBS -lrt"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013191 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013192
13193
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013194$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013195
13196
13197fi
13198
13199
13200fi
13201done
13202
13203
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013204for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020013205do :
13206 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013207if test "x$ac_cv_func_clock_getres" = xyes; then :
13208 cat >>confdefs.h <<_ACEOF
13209#define HAVE_CLOCK_GETRES 1
13210_ACEOF
Victor Stinnere0be4232011-10-25 13:06:09 +020013211
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013212else
Victor Stinnere0be4232011-10-25 13:06:09 +020013213
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13215$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13216if ${ac_cv_lib_rt_clock_getres+:} false; then :
13217 $as_echo_n "(cached) " >&6
13218else
Victor Stinnere0be4232011-10-25 13:06:09 +020013219 ac_check_lib_save_LIBS=$LIBS
13220LIBS="-lrt $LIBS"
13221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13222/* end confdefs.h. */
13223
13224/* Override any GCC internal prototype to avoid an error.
13225 Use char because int might match the return type of a GCC
13226 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013227#ifdef __cplusplus
13228extern "C"
13229#endif
Victor Stinnere0be4232011-10-25 13:06:09 +020013230char clock_getres ();
13231int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013232main ()
Victor Stinnere0be4232011-10-25 13:06:09 +020013233{
13234return clock_getres ();
13235 ;
13236 return 0;
13237}
13238_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013239if ac_fn_c_try_link "$LINENO"; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013240 ac_cv_lib_rt_clock_getres=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013241else
Victor Stinnere0be4232011-10-25 13:06:09 +020013242 ac_cv_lib_rt_clock_getres=no
13243fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013244rm -f core conftest.err conftest.$ac_objext \
Victor Stinnere0be4232011-10-25 13:06:09 +020013245 conftest$ac_exeext conftest.$ac_ext
13246LIBS=$ac_check_lib_save_LIBS
13247fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13249$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13250if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
Victor Stinnere0be4232011-10-25 13:06:09 +020013251
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013252 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020013253
13254
13255fi
13256
13257
13258fi
13259done
13260
13261
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013262for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013263do :
13264 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013265if test "x$ac_cv_func_clock_settime" = xyes; then :
13266 cat >>confdefs.h <<_ACEOF
13267#define HAVE_CLOCK_SETTIME 1
13268_ACEOF
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013269
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013270else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013271
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13273$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13274if ${ac_cv_lib_rt_clock_settime+:} false; then :
13275 $as_echo_n "(cached) " >&6
13276else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013277 ac_check_lib_save_LIBS=$LIBS
13278LIBS="-lrt $LIBS"
13279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13280/* end confdefs.h. */
13281
13282/* Override any GCC internal prototype to avoid an error.
13283 Use char because int might match the return type of a GCC
13284 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013285#ifdef __cplusplus
13286extern "C"
13287#endif
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013288char clock_settime ();
13289int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013290main ()
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013291{
13292return clock_settime ();
13293 ;
13294 return 0;
13295}
13296_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013297if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013298 ac_cv_lib_rt_clock_settime=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013299else
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013300 ac_cv_lib_rt_clock_settime=no
13301fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013302rm -f core conftest.err conftest.$ac_objext \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013303 conftest$ac_exeext conftest.$ac_ext
13304LIBS=$ac_check_lib_save_LIBS
13305fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13307$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13308if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013309
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013310 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013311
13312
13313fi
13314
13315
13316fi
13317done
13318
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013319
13320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13321$as_echo_n "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013323/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013324
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013325#if defined(MAJOR_IN_MKDEV)
13326#include <sys/mkdev.h>
13327#elif defined(MAJOR_IN_SYSMACROS)
13328#include <sys/sysmacros.h>
13329#else
13330#include <sys/types.h>
13331#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013332
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013333int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013334main ()
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013335{
13336
13337 makedev(major(0),minor(0));
13338
13339 ;
13340 return 0;
13341}
13342_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013344
13345
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013346$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013347
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13349$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013350
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013351else
Skip Montanaro6dead952003-09-25 14:50:04 +000013352
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13354$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013355
13356fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013357rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013359
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013360# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013361# for [no]getaddrinfo in netdb.h.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13363$as_echo_n "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013365/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013366
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013367#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013368#include <sys/socket.h>
13369#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013370#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013373main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013374{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013375getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013380if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381 have_getaddrinfo=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013384fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013385rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13388$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013389if test $have_getaddrinfo = yes
13390then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13392$as_echo_n "checking getaddrinfo bug... " >&6; }
13393 if ${ac_cv_buggy_getaddrinfo+:} false; then :
13394 $as_echo_n "(cached) " >&6
13395else
13396 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013397
13398if test "${enable_ipv6+set}" = set; then
13399 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13400else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013401 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013402fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013405/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013406
Stefan Krah19c21392012-11-22 23:47:32 +010013407#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013408#include <sys/types.h>
13409#include <netdb.h>
13410#include <string.h>
13411#include <sys/socket.h>
13412#include <netinet/in.h>
13413
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013414int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013415{
13416 int passive, gaierr, inet4 = 0, inet6 = 0;
13417 struct addrinfo hints, *ai, *aitop;
13418 char straddr[INET6_ADDRSTRLEN], strport[16];
13419
13420 for (passive = 0; passive <= 1; passive++) {
13421 memset(&hints, 0, sizeof(hints));
13422 hints.ai_family = AF_UNSPEC;
13423 hints.ai_flags = passive ? AI_PASSIVE : 0;
13424 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013425 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013426 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13427 (void)gai_strerror(gaierr);
13428 goto bad;
13429 }
13430 for (ai = aitop; ai; ai = ai->ai_next) {
13431 if (ai->ai_addr == NULL ||
13432 ai->ai_addrlen == 0 ||
13433 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13434 straddr, sizeof(straddr), strport, sizeof(strport),
13435 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13436 goto bad;
13437 }
13438 switch (ai->ai_family) {
13439 case AF_INET:
13440 if (strcmp(strport, "54321") != 0) {
13441 goto bad;
13442 }
13443 if (passive) {
13444 if (strcmp(straddr, "0.0.0.0") != 0) {
13445 goto bad;
13446 }
13447 } else {
13448 if (strcmp(straddr, "127.0.0.1") != 0) {
13449 goto bad;
13450 }
13451 }
13452 inet4++;
13453 break;
13454 case AF_INET6:
13455 if (strcmp(strport, "54321") != 0) {
13456 goto bad;
13457 }
13458 if (passive) {
13459 if (strcmp(straddr, "::") != 0) {
13460 goto bad;
13461 }
13462 } else {
13463 if (strcmp(straddr, "::1") != 0) {
13464 goto bad;
13465 }
13466 }
13467 inet6++;
13468 break;
13469 case AF_UNSPEC:
13470 goto bad;
13471 break;
13472 default:
13473 /* another family support? */
13474 break;
13475 }
13476 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013477 freeaddrinfo(aitop);
13478 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013479 }
13480
13481 if (!(inet4 == 0 || inet4 == 2))
13482 goto bad;
13483 if (!(inet6 == 0 || inet6 == 2))
13484 goto bad;
13485
13486 if (aitop)
13487 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013488 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013489
13490 bad:
13491 if (aitop)
13492 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013493 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013494}
13495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013497if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013498 ac_cv_buggy_getaddrinfo=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013499else
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013505
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013506fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013507
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013509
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13511$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013512
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013513if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013514then
13515 if test $ipv6 = yes
13516 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013517 echo 'Fatal: You must get working getaddrinfo() function.'
13518 echo ' or you can specify "--disable-ipv6"'.
13519 exit 1
13520 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013521else
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013523$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013524
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013525fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013526
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013527for ac_func in getnameinfo
13528do :
13529 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
13530if test "x$ac_cv_func_getnameinfo" = xyes; then :
13531 cat >>confdefs.h <<_ACEOF
13532#define HAVE_GETNAMEINFO 1
13533_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013534
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013535fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013536done
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013537
Michael W. Hudson54241132001-12-07 15:38:26 +000013538
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539# checks for structures
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13541$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
13542if ${ac_cv_header_time+:} false; then :
13543 $as_echo_n "(cached) " >&6
13544else
13545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13546/* end confdefs.h. */
13547#include <sys/types.h>
13548#include <sys/time.h>
13549#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013551int
13552main ()
13553{
13554if ((struct tm *) 0)
13555return 0;
13556 ;
13557 return 0;
13558}
13559_ACEOF
13560if ac_fn_c_try_compile "$LINENO"; then :
13561 ac_cv_header_time=yes
13562else
13563 ac_cv_header_time=no
13564fi
13565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13566fi
13567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13568$as_echo "$ac_cv_header_time" >&6; }
13569if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013571$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572
13573fi
13574
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13576$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13577if ${ac_cv_struct_tm+:} false; then :
13578 $as_echo_n "(cached) " >&6
13579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582#include <sys/types.h>
13583#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013584
Martin v. Löwis11437992002-04-12 09:54:03 +000013585int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013586main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588struct tm tm;
13589 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 ;
13592 return 0;
13593}
13594_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013595if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013596 ac_cv_struct_tm=time.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013597else
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013599fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13603$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013604if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013605
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013606$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013607
13608fi
13609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610ac_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 +000013611#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013614if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013616cat >>confdefs.h <<_ACEOF
13617#define HAVE_STRUCT_TM_TM_ZONE 1
13618_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013619
13620
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013622
Martin v. Löwis11437992002-04-12 09:54:03 +000013623if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13624
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013625$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013626
13627else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013628 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13629"
13630if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634fi
13635
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013636cat >>confdefs.h <<_ACEOF
13637#define HAVE_DECL_TZNAME $ac_have_decl
13638_ACEOF
13639
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13641$as_echo_n "checking for tzname... " >&6; }
13642if ${ac_cv_var_tzname+:} false; then :
13643 $as_echo_n "(cached) " >&6
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013646/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013647#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013648#if !HAVE_DECL_TZNAME
13649extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013653main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 ;
13657 return 0;
13658}
13659_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013660if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013661 ac_cv_var_tzname=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013662else
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013664fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013665rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013667fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13669$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013670 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013671
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013672$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013674 fi
13675fi
13676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013678if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013679
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013680cat >>confdefs.h <<_ACEOF
13681#define HAVE_STRUCT_STAT_ST_RDEV 1
13682_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013683
13684
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013685fi
13686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013688if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013689
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013690cat >>confdefs.h <<_ACEOF
13691#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13692_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
13694
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013695fi
13696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013698if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013699
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013700cat >>confdefs.h <<_ACEOF
13701#define HAVE_STRUCT_STAT_ST_FLAGS 1
13702_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013703
13704
13705fi
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013708if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013709
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013710cat >>confdefs.h <<_ACEOF
13711#define HAVE_STRUCT_STAT_ST_GEN 1
13712_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013713
13714
13715fi
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013718if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013719
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013720cat >>confdefs.h <<_ACEOF
13721#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13722_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013723
13724
13725fi
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013728if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013729
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013730cat >>confdefs.h <<_ACEOF
13731#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13732_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
13734
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013735fi
13736
Stefan Krah267b6392016-04-26 01:09:18 +020013737ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13738 #include <sys/types.h>
13739 #include <pwd.h>
13740
13741"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013742if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013743
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013744cat >>confdefs.h <<_ACEOF
13745#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13746_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013747
13748
13749fi
13750ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13751 #include <sys/types.h>
13752 #include <pwd.h>
13753
13754"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013755if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
Stefan Krah267b6392016-04-26 01:09:18 +020013756
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013757cat >>confdefs.h <<_ACEOF
13758#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13759_ACEOF
Stefan Krah267b6392016-04-26 01:09:18 +020013760
13761
13762fi
13763
Zachary Ware6a6967e2016-10-01 00:47:27 -050013764# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13765ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13766"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013767if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050013768
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013769cat >>confdefs.h <<_ACEOF
13770#define HAVE_SIGINFO_T_SI_BAND 1
13771_ACEOF
Zachary Ware6a6967e2016-10-01 00:47:27 -050013772
13773
13774fi
13775
Michael W. Hudson54241132001-12-07 15:38:26 +000013776
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13778$as_echo_n "checking for time.h that defines altzone... " >&6; }
13779if ${ac_cv_header_time_altzone+:} false; then :
13780 $as_echo_n "(cached) " >&6
13781else
Matthias Kloseb159a552010-04-25 21:00:44 +000013782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013784/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013785#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013786int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013787main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013788{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013789return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 ;
13791 return 0;
13792}
13793_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013794if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795 ac_cv_header_time_altzone=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013798fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801fi
13802
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13804$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013807$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808
13809fi
13810
Guido van Rossumda88dad1995-01-26 00:46:29 +000013811was_it_defined=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13813$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013815/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013816
13817#include <sys/types.h>
13818#include <sys/select.h>
13819#include <sys/time.h>
13820
Martin v. Löwis11437992002-04-12 09:54:03 +000013821int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013822main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013823{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013824;
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 ;
13826 return 0;
13827}
13828_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013830
13831
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013832$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013833
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013834 was_it_defined=yes
13835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13839$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13842$as_echo_n "checking for addrinfo... " >&6; }
13843if ${ac_cv_struct_addrinfo+:} false; then :
13844 $as_echo_n "(cached) " >&6
13845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013847/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013848#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013849int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013850main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013851{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013852struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013853 ;
13854 return 0;
13855}
13856_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013858 ac_cv_struct_addrinfo=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013859else
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013861fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863fi
13864
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13866$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013867if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013869$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013870
13871fi
13872
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13874$as_echo_n "checking for sockaddr_storage... " >&6; }
13875if ${ac_cv_struct_sockaddr_storage+:} false; then :
13876 $as_echo_n "(cached) " >&6
13877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013879/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013880
13881# include <sys/types.h>
13882# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013883int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013884main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013885{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013886struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 ;
13888 return 0;
13889}
13890_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013892 ac_cv_struct_sockaddr_storage=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013893else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013895fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897fi
13898
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13900$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013901if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013903$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013904
13905fi
13906
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13908$as_echo_n "checking for sockaddr_alg... " >&6; }
13909if ${ac_cv_struct_sockaddr_alg+:} false; then :
13910 $as_echo_n "(cached) " >&6
13911else
Christian Heimesdffa3942016-09-05 23:54:41 +020013912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13913/* end confdefs.h. */
13914
13915# include <sys/types.h>
13916# include <sys/socket.h>
13917# include <linux/if_alg.h>
13918int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013919main ()
Christian Heimesdffa3942016-09-05 23:54:41 +020013920{
13921struct sockaddr_alg s
13922 ;
13923 return 0;
13924}
13925_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013926if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimesdffa3942016-09-05 23:54:41 +020013927 ac_cv_struct_sockaddr_alg=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013928else
Christian Heimesdffa3942016-09-05 23:54:41 +020013929 ac_cv_struct_sockaddr_alg=no
13930fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020013932fi
13933
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13935$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020013936if test $ac_cv_struct_sockaddr_alg = yes; then
13937
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013938$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020013939
13940fi
13941
Guido van Rossum627b2d71993-12-24 10:39:16 +000013942# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013943
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13945$as_echo_n "checking whether char is unsigned... " >&6; }
13946if ${ac_cv_c_char_unsigned+:} false; then :
13947 $as_echo_n "(cached) " >&6
13948else
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013951$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013952int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013953main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013954{
13955static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013956test_array [0] = 0;
13957return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
13959 ;
13960 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013961}
Martin v. Löwis11437992002-04-12 09:54:03 +000013962_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013963if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013964 ac_cv_c_char_unsigned=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013965else
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013967fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013969fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13971$as_echo "$ac_cv_c_char_unsigned" >&6; }
13972if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
13973 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013974
13975fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013976
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13978$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
13979if ${ac_cv_c_const+:} false; then :
13980 $as_echo_n "(cached) " >&6
13981else
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013983/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013984
Martin v. Löwis11437992002-04-12 09:54:03 +000013985int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013986main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000013987{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013988
Martin v. Löwis11437992002-04-12 09:54:03 +000013989#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013990 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013992 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013994 char const *const *pcpcc;
13995 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 /* NEC SVR4.0.2 mips cc rejects this. */
13997 struct point {int x, y;};
13998 static struct point const zero = {0,0};
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010013999 /* AIX XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 It does not let you subtract one const X* pointer from another in
14001 an arm of an if-expression whose if-part is not a constant
14002 expression */
14003 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006 ++pcpcc;
14007 ppc = (char**) pcpcc;
14008 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014009 { /* SCO 3.2v4 cc rejects this sort of thing. */
14010 char tx;
14011 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014012 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 }
14017 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14018 int x[] = {25, 17};
14019 const int *foo = &x[0];
14020 ++foo;
14021 }
14022 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14023 typedef const int *iptr;
14024 iptr p = 0;
14025 ++p;
14026 }
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014027 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014029 struct s { int j; const int *ap[3]; } bx;
14030 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 }
14032 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14033 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014037#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 ;
14040 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014041}
Martin v. Löwis11437992002-04-12 09:54:03 +000014042_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014043if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014044 ac_cv_c_const=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014045else
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014047fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014049fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14051$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014054$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014055
14056fi
14057
Michael W. Hudson54241132001-12-07 15:38:26 +000014058
Guido van Rossumda88dad1995-01-26 00:46:29 +000014059works=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14061$as_echo_n "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014063/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014064
Martin v. Löwis11437992002-04-12 09:54:03 +000014065int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014066main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014068signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ;
14070 return 0;
14071}
14072_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014073if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014074 works=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014075else
Skip Montanaro6dead952003-09-25 14:50:04 +000014076
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014077$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014078
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014079
Guido van Rossum7f43da71994-08-01 12:15:30 +000014080fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14083$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014084
Guido van Rossumda88dad1995-01-26 00:46:29 +000014085have_prototypes=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14087$as_echo_n "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014089/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014090int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014091int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014092main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014093{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014094return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 ;
14096 return 0;
14097}
14098_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014099if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014100
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014101$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014102
Matthias Kloseb159a552010-04-25 21:00:44 +000014103 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014104fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14107$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014108
Guido van Rossumda88dad1995-01-26 00:46:29 +000014109works=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14111$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014113/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014114
14115#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014116int foo(int x, ...) {
14117 va_list va;
14118 va_start(va, x);
14119 va_arg(va, int);
14120 va_arg(va, char *);
14121 va_arg(va, double);
14122 return 0;
14123}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014124
Martin v. Löwis11437992002-04-12 09:54:03 +000014125int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014126main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014127{
Guido van Rossum90eea071996-08-30 20:58:57 +000014128return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 ;
14130 return 0;
14131}
14132_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014133if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
14135
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014136$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014137
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014138 works=yes
14139
Guido van Rossum627b2d71993-12-24 10:39:16 +000014140fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14143$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014144
Martin v. Löwisd6320502004-08-12 13:45:08 +000014145# check for socketpair
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14147$as_echo_n "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014149/* end confdefs.h. */
14150
14151#include <sys/types.h>
14152#include <sys/socket.h>
14153
14154int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014155main ()
Martin v. Löwisd6320502004-08-12 13:45:08 +000014156{
14157void *x=socketpair
14158 ;
14159 return 0;
14160}
14161_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014163
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014164$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014165
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14167$as_echo "yes" >&6; }
14168else
14169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14170$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014171
14172fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014174
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014175# check if sockaddr has sa_len member
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14177$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014179/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014180#include <sys/types.h>
14181#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014182int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014183main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014184{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014185struct sockaddr x;
14186x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 ;
14188 return 0;
14189}
14190_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014191if ac_fn_c_try_compile "$LINENO"; then :
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14193$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014194
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014195$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014196
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014197else
14198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14199$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014200
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014201fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014203
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014204# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014205
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014208if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014209
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014210 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014211
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14213$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014214 OLD_CFLAGS=$CFLAGS
14215 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014217/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014218
14219# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014220
Martin v. Löwis11437992002-04-12 09:54:03 +000014221int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014222main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014223{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014224
14225 char *name;
14226 struct hostent *he, *res;
14227 char buffer[2048];
14228 int buflen = 2048;
14229 int h_errnop;
14230
14231 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
14233 ;
14234 return 0;
14235}
14236_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014238
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014239 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014240
Martin v. Löwis11437992002-04-12 09:54:03 +000014241
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014242$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014243
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14245$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014247else
Skip Montanaro6dead952003-09-25 14:50:04 +000014248
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14250$as_echo "no" >&6; }
14251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14252$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014254/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014255
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014256# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014257
Martin v. Löwis11437992002-04-12 09:54:03 +000014258int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014259main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014260{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014261
14262 char *name;
14263 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014264 char buffer[2048];
14265 int buflen = 2048;
14266 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014267
Matthias Kloseb159a552010-04-25 21:00:44 +000014268 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
14270 ;
14271 return 0;
14272}
14273_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014276 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014277
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014279$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014280
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14282$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014284else
Skip Montanaro6dead952003-09-25 14:50:04 +000014285
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14287$as_echo "no" >&6; }
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14289$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14291/* end confdefs.h. */
14292
14293# include <netdb.h>
14294
14295int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014296main ()
Matthias Kloseb159a552010-04-25 21:00:44 +000014297{
14298
14299 char *name;
14300 struct hostent *he;
14301 struct hostent_data data;
14302
14303 (void) gethostbyname_r(name, he, &data);
14304
14305 ;
14306 return 0;
14307}
14308_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014309if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000014310
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014311 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014312
14313
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014314$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000014315
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14317$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014318
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014319else
Matthias Kloseb159a552010-04-25 21:00:44 +000014320
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14322$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014324fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014327fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014330fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014332 CFLAGS=$OLD_CFLAGS
14333
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014334else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014335
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014336 for ac_func in gethostbyname
14337do :
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014339if test "x$ac_cv_func_gethostbyname" = xyes; then :
14340 cat >>confdefs.h <<_ACEOF
14341#define HAVE_GETHOSTBYNAME 1
14342_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014343
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014344fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014345done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014346
Michael W. Hudson54241132001-12-07 15:38:26 +000014347
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014348fi
14349
Michael W. Hudson54241132001-12-07 15:38:26 +000014350
14351
14352
14353
14354
14355
Guido van Rossum627b2d71993-12-24 10:39:16 +000014356# checks for system services
14357# (none yet)
14358
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014359# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014360ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014361if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014362
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014363else
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14365$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
14366if ${ac_cv_lib_ieee___fpu_control+:} false; then :
14367 $as_echo_n "(cached) " >&6
14368else
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014370LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374/* Override any GCC internal prototype to avoid an error.
14375 Use char because int might match the return type of a GCC
14376 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014377#ifdef __cplusplus
14378extern "C"
14379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014380char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014381int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014382main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000014383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014384return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 ;
14386 return 0;
14387}
14388_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014389if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 ac_cv_lib_ieee___fpu_control=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014391else
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014393fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014394rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014396LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014397fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14399$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
14400if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
14401 cat >>confdefs.h <<_ACEOF
14402#define HAVE_LIBIEEE 1
14403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014404
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014405 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014406
Guido van Rossum627b2d71993-12-24 10:39:16 +000014407fi
14408
Michael W. Hudson54241132001-12-07 15:38:26 +000014409
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014410fi
14411
Michael W. Hudson54241132001-12-07 15:38:26 +000014412
Guido van Rossum7f43da71994-08-01 12:15:30 +000014413# check for --with-libm=...
14414
Guido van Rossum563e7081996-09-10 18:20:48 +000014415case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014416Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014417*) LIBM=-lm
14418esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14420$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422# Check whether --with-libm was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014423if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014425if test "$withval" = no
14426then LIBM=
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14428$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014429elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014430then LIBM=$withval
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14432$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014433else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014434fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014435else
14436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14437$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438fi
14439
Guido van Rossum7f43da71994-08-01 12:15:30 +000014440
14441# check for --with-libc=...
14442
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14444$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446# Check whether --with-libc was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014447if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014449if test "$withval" = no
14450then LIBC=
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14452$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014453elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014454then LIBC=$withval
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14456$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014457else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014458fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014459else
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14461$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462fi
14463
Guido van Rossum7f43da71994-08-01 12:15:30 +000014464
Stefan Krah1919b7e2012-03-21 18:25:23 +010014465# **************************************
14466# * Check for gcc x64 inline assembler *
14467# **************************************
14468
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14470$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14472/* end confdefs.h. */
14473
14474int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014475main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010014476{
14477
14478 __asm__ __volatile__ ("movq %rcx, %rax");
14479
14480 ;
14481 return 0;
14482}
14483_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014484if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014485 have_gcc_asm_for_x64=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014486else
Stefan Krah1919b7e2012-03-21 18:25:23 +010014487 have_gcc_asm_for_x64=no
14488fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014489rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014490 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14492$as_echo "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010014493if test "$have_gcc_asm_for_x64" = yes
14494then
14495
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014496$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010014497
14498fi
14499
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014500# **************************************************
14501# * Check for various properties of floating point *
14502# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014503
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14505$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14506if ${ax_cv_c_float_words_bigendian+:} false; then :
14507 $as_echo_n "(cached) " >&6
14508else
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014509
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014510
14511ax_cv_c_float_words_bigendian=unknown
14512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014513/* end confdefs.h. */
14514
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014515
14516double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14517
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014518
14519_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014520if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014521
14522
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014523if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014524 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014525fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010014526if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014527 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14528 ax_cv_c_float_words_bigendian=no
14529 else
14530 ax_cv_c_float_words_bigendian=unknown
14531 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014532fi
14533
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014534
14535fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014537fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14539$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014540
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014541case $ax_cv_c_float_words_bigendian in
14542 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014543
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014544$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014545 ;;
14546 no)
14547 ;;
14548 *)
14549 as_fn_error $? "
14550
14551Unknown float word ordering. You need to manually preset
14552ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14553
14554 " "$LINENO" 5 ;;
14555esac
14556
14557
14558if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014559then
14560
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014561$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014562
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014563elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014564then
14565
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014566$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014567
14568else
14569 # Some ARM platforms use a mixed-endian representation for doubles.
14570 # While Python doesn't currently have full support for these platforms
14571 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14572 # conversions work.
14573 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14574 # or little, then it must be this?
14575
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014576$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014577
14578fi
14579
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014580# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014581# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014582# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014583# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014584# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014585# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014586
14587# This inline assembler syntax may also work for suncc and icc,
14588# so we try it on all platforms.
14589
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14591$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 +000014592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014593/* end confdefs.h. */
14594
14595int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014596main ()
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014597{
14598
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014599 unsigned short cw;
14600 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14601 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014602
14603 ;
14604 return 0;
14605}
14606_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014607if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014608 have_gcc_asm_for_x87=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014609else
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014611fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014612rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014613 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14615$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014616if test "$have_gcc_asm_for_x87" = yes
14617then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014618
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014619$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014620
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14624$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 -040014625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14626/* end confdefs.h. */
14627
14628int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014629main ()
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014630{
14631
14632 unsigned int fpcr;
14633 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14634 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14635
14636 ;
14637 return 0;
14638}
14639_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014640if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014641 have_gcc_asm_for_mc68881=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014642else
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014643 have_gcc_asm_for_mc68881=no
14644fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014645rm -f core conftest.err conftest.$ac_objext \
Stefan Krahe31db2a2015-07-02 20:27:56 +020014646 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14648$as_echo "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014649if test "$have_gcc_asm_for_mc68881" = yes
14650then
14651
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014652$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014653
14654fi
14655
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014656# Detect whether system arithmetic is subject to x87-style double
14657# rounding issues. The result of this test has little meaning on non
14658# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14659# mode is round-to-nearest and double rounding issues are present, and
14660# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14662$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014663# $BASECFLAGS may affect the result
14664ac_save_cc="$CC"
14665CC="$CC $BASECFLAGS"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014666if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014667 ac_cv_x87_double_rounding=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014668else
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014670/* end confdefs.h. */
14671
14672#include <stdlib.h>
14673#include <math.h>
14674int main() {
14675 volatile double x, y, z;
14676 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14677 x = 0.99999999999999989; /* 1-2**-53 */
14678 y = 1./x;
14679 if (y != 1.)
14680 exit(0);
14681 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14682 x = 1e16;
14683 y = 2.99999;
14684 z = x + y;
14685 if (z != 1e16+4.)
14686 exit(0);
14687 /* both tests show evidence of double rounding */
14688 exit(1);
14689}
14690
14691_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014692if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014693 ac_cv_x87_double_rounding=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14698 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014699fi
14700
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014701CC="$ac_save_cc"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14703$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014704if test "$ac_cv_x87_double_rounding" = yes
14705then
14706
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014707$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014708
14709fi
14710
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014711# ************************************
14712# * Check for mathematical functions *
14713# ************************************
14714
14715LIBS_SAVE=$LIBS
14716LIBS="$LIBS $LIBM"
14717
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014718for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14719do :
14720 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14721ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14722if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14723 cat >>confdefs.h <<_ACEOF
14724#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14725_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014726
14727fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014728done
14729
14730for ac_func in hypot lgamma log1p log2 round tgamma
14731do :
14732 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14733ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14734if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14735 cat >>confdefs.h <<_ACEOF
14736#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14737_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014738
14739fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014740done
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014741
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014742ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14743"
14744if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014745 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014746else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014747 ac_have_decl=0
14748fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014749
14750cat >>confdefs.h <<_ACEOF
14751#define HAVE_DECL_ISINF $ac_have_decl
14752_ACEOF
14753ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14754"
14755if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014756 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014757else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014758 ac_have_decl=0
14759fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014760
14761cat >>confdefs.h <<_ACEOF
14762#define HAVE_DECL_ISNAN $ac_have_decl
14763_ACEOF
14764ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14765"
14766if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014767 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014768else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014769 ac_have_decl=0
14770fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014771
14772cat >>confdefs.h <<_ACEOF
14773#define HAVE_DECL_ISFINITE $ac_have_decl
14774_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014775
14776
Mark Dickinsona614f042009-11-28 12:48:43 +000014777# For multiprocessing module, check that sem_open
14778# actually works. For FreeBSD versions <= 7.2,
14779# the kernel module that provides POSIX semaphores
14780# isn't loaded by default, so an attempt to call
14781# sem_open results in a 'Signal 12' error.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14783$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
14784if ${ac_cv_posix_semaphores_enabled+:} false; then :
14785 $as_echo_n "(cached) " >&6
14786else
14787 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014788 ac_cv_posix_semaphores_enabled=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014789else
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014791/* end confdefs.h. */
14792
14793#include <unistd.h>
14794#include <fcntl.h>
14795#include <stdio.h>
14796#include <semaphore.h>
14797#include <sys/stat.h>
14798
14799int main(void) {
14800 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14801 if (a == SEM_FAILED) {
14802 perror("sem_open");
14803 return 1;
14804 }
14805 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014806 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014807 return 0;
14808}
14809
14810_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014811if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014812 ac_cv_posix_semaphores_enabled=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014813else
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14817 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014818fi
14819
14820
Mark Dickinsona614f042009-11-28 12:48:43 +000014821fi
14822
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14824$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014825if test $ac_cv_posix_semaphores_enabled = no
14826then
14827
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014828$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014829
14830fi
14831
Mark Dickinson10683072009-04-18 21:18:19 +000014832# Multiprocessing check for broken sem_getvalue
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14834$as_echo_n "checking for broken sem_getvalue... " >&6; }
14835if ${ac_cv_broken_sem_getvalue+:} false; then :
14836 $as_echo_n "(cached) " >&6
14837else
14838 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014839 ac_cv_broken_sem_getvalue=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014840else
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014842/* end confdefs.h. */
14843
14844#include <unistd.h>
14845#include <fcntl.h>
14846#include <stdio.h>
14847#include <semaphore.h>
14848#include <sys/stat.h>
14849
14850int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014851 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014852 int count;
14853 int res;
14854 if(a==SEM_FAILED){
14855 perror("sem_open");
14856 return 1;
14857
14858 }
14859 res = sem_getvalue(a, &count);
14860 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014861 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014862 return res==-1 ? 1 : 0;
14863}
14864
Mark Dickinson10683072009-04-18 21:18:19 +000014865_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014866if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014867 ac_cv_broken_sem_getvalue=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014868else
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014873fi
14874
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014876fi
14877
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14879$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014880if test $ac_cv_broken_sem_getvalue = yes
14881then
14882
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014883$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014884
14885fi
14886
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014887ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14888"
14889if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014890 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014891else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014892 ac_have_decl=0
14893fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014894
14895cat >>confdefs.h <<_ACEOF
14896#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14897_ACEOF
14898ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14899"
14900if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014901 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014902else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014903 ac_have_decl=0
14904fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014905
14906cat >>confdefs.h <<_ACEOF
14907#define HAVE_DECL_RTLD_NOW $ac_have_decl
14908_ACEOF
14909ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14910"
14911if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014912 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014913else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014914 ac_have_decl=0
14915fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014916
14917cat >>confdefs.h <<_ACEOF
14918#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14919_ACEOF
14920ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14921"
14922if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014923 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014924else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014925 ac_have_decl=0
14926fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014927
14928cat >>confdefs.h <<_ACEOF
14929#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14930_ACEOF
14931ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14932"
14933if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014934 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014935else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014936 ac_have_decl=0
14937fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014938
14939cat >>confdefs.h <<_ACEOF
14940#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14941_ACEOF
14942ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14943"
14944if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014945 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014946else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014947 ac_have_decl=0
14948fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014949
14950cat >>confdefs.h <<_ACEOF
14951#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14952_ACEOF
14953ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14954"
14955if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014956 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014957else
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014958 ac_have_decl=0
14959fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014960
14961cat >>confdefs.h <<_ACEOF
14962#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14963_ACEOF
14964ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14965"
14966if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
Michael Feltc5ae1692017-12-19 13:58:49 +010014967 ac_have_decl=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014968else
Michael Feltc5ae1692017-12-19 13:58:49 +010014969 ac_have_decl=0
14970fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014971
14972cat >>confdefs.h <<_ACEOF
14973#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14974_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014975
14976
Mark Dickinsonbd792642009-03-18 20:06:12 +000014977# determine what size digit to use for Python's longs
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14979$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014980# Check whether --enable-big-digits was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014981if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014982 enableval=$enable_big_digits; case $enable_big_digits in
14983yes)
14984 enable_big_digits=30 ;;
14985no)
14986 enable_big_digits=15 ;;
1498715|30)
14988 ;;
14989*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014990 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 +000014991esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14993$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014994
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010014995cat >>confdefs.h <<_ACEOF
14996#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14997_ACEOF
Mark Dickinsonbd792642009-03-18 20:06:12 +000014998
14999
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015000else
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15002$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015003fi
15004
15005
Guido van Rossumef2255b2000-03-10 22:30:29 +000015006# check for wchar.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015007ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
15008if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
15010
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015011$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015013 wchar_h="yes"
15014
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015017
15018fi
15019
Michael W. Hudson54241132001-12-07 15:38:26 +000015020
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015021
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015022# determine wchar_t size
15023if test "$wchar_h" = yes
15024then
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15027# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15028# This bug is HP SR number 8606223364.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15030$as_echo_n "checking size of wchar_t... " >&6; }
15031if ${ac_cv_sizeof_wchar_t+:} false; then :
15032 $as_echo_n "(cached) " >&6
15033else
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015035"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015037else
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 if test "$ac_cv_type_wchar_t" = yes; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015041as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015042See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043 else
15044 ac_cv_sizeof_wchar_t=0
15045 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047
Martin v. Löwis11437992002-04-12 09:54:03 +000015048fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15050$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051
15052
15053
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015054cat >>confdefs.h <<_ACEOF
15055#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
15056_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015057
Michael W. Hudson54241132001-12-07 15:38:26 +000015058
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015059fi
15060
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15062$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015063have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015065/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015066
15067#include <tcl.h>
15068#if TCL_UTF_MAX != 6
15069# error "NOT UCS4_TCL"
15070#endif
15071int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015072main ()
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015073{
15074
15075 ;
15076 return 0;
15077}
15078_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015079if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015080
15081
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015082$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015083
15084 have_ucs4_tcl=yes
15085
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015086fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15089$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015090
Skip Montanaro6dead952003-09-25 14:50:04 +000015091# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015092if test "$wchar_h" = yes
15093then
15094 # check whether wchar_t is signed or not
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15096$as_echo_n "checking whether wchar_t is signed... " >&6; }
15097 if ${ac_cv_wchar_t_signed+:} false; then :
15098 $as_echo_n "(cached) " >&6
15099else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015100
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015101 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015102 ac_cv_wchar_t_signed=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015103else
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015105/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015106
15107 #include <wchar.h>
15108 int main()
15109 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015110 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015111 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015112 }
15113
15114_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015115if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015116 ac_cv_wchar_t_signed=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015117else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15121 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015122fi
15123
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015124fi
15125
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15127$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128fi
15129
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15131$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015132# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015133if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015134 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015135then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015136
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015137$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15140$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015141else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15143$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015144fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015145
Jakub Kulík9032cf52021-04-30 15:21:42 +020015146case $ac_sys_system/$ac_sys_release in
15147SunOS/*)
15148 if test -f /etc/os-release; then
15149 OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
15150 if test "x$OS_NAME" = "xOracle Solaris"; then
15151 # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
15152 # non-Unicode locales is not Unicode and hence cannot be used directly.
15153 # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html
15154
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015155$as_echo "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h
Jakub Kulík9032cf52021-04-30 15:21:42 +020015156
15157 fi
15158 fi
15159 ;;
15160esac
15161
Guido van Rossumef2255b2000-03-10 22:30:29 +000015162# check for endianness
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15164$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15165if ${ac_cv_c_bigendian+:} false; then :
15166 $as_echo_n "(cached) " >&6
15167else
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 ac_cv_c_bigendian=unknown
15169 # See if we're dealing with a universal compiler.
15170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15171/* end confdefs.h. */
15172#ifndef __APPLE_CC__
15173 not a universal capable compiler
15174 #endif
15175 typedef int dummy;
15176
Skip Montanaro6dead952003-09-25 14:50:04 +000015177_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015178if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015179
15180 # Check for potential -arch flags. It is not universal unless
15181 # there are at least two -arch flags with different values.
15182 ac_arch=
15183 ac_prev=
15184 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15185 if test -n "$ac_prev"; then
15186 case $ac_word in
15187 i?86 | x86_64 | ppc | ppc64)
15188 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15189 ac_arch=$ac_word
15190 else
15191 ac_cv_c_bigendian=universal
15192 break
15193 fi
15194 ;;
15195 esac
15196 ac_prev=
15197 elif test "x$ac_word" = "x-arch"; then
15198 ac_prev=arch
15199 fi
15200 done
15201fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 if test $ac_cv_c_bigendian = unknown; then
15204 # See if sys/param.h defines the BYTE_ORDER macro.
15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015206/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015207#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015209
Martin v. Löwis11437992002-04-12 09:54:03 +000015210int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015211main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015212{
Matthias Kloseb9621712010-04-24 17:59:49 +000015213#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15214 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15215 && LITTLE_ENDIAN)
15216 bogus endian macros
15217 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015218
15219 ;
15220 return 0;
15221}
15222_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015223if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015226/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015227#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015231main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015232{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015233#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 not big endian
15235 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
15237 ;
15238 return 0;
15239}
15240_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015241if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015242 ac_cv_c_bigendian=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015243else
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015245fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015247fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 fi
15250 if test $ac_cv_c_bigendian = unknown; then
15251 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015253/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015254#include <limits.h>
15255
Martin v. Löwis11437992002-04-12 09:54:03 +000015256int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015257main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015258{
Matthias Kloseb9621712010-04-24 17:59:49 +000015259#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15260 bogus endian macros
15261 #endif
15262
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 ;
15264 return 0;
15265}
15266_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015267if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015268 # It does; now see whether it defined to _BIG_ENDIAN or not.
15269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15270/* end confdefs.h. */
15271#include <limits.h>
15272
15273int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015274main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015275{
15276#ifndef _BIG_ENDIAN
15277 not big endian
15278 #endif
15279
15280 ;
15281 return 0;
15282}
15283_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ac_cv_c_bigendian=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015286else
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015288fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015290fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015292 fi
15293 if test $ac_cv_c_bigendian = unknown; then
15294 # Compile a test program.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015295 if test "$cross_compiling" = yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 # Try to guess by grepping values from an object file.
15297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15298/* end confdefs.h. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015299short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015301 short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15303 int use_ascii (int i) {
15304 return ascii_mm[i] + ascii_ii[i];
15305 }
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015306 short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015307 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015308 short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15310 int use_ebcdic (int i) {
15311 return ebcdic_mm[i] + ebcdic_ii[i];
15312 }
15313 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015316main ()
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{
15318return use_ascii (foo) == use_ebcdic (foo);
15319 ;
15320 return 0;
15321}
15322_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015323if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015324 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15325 ac_cv_c_bigendian=yes
15326 fi
15327 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15328 if test "$ac_cv_c_bigendian" = unknown; then
15329 ac_cv_c_bigendian=no
15330 else
15331 # finding both strings is unlikely to happen, but who knows?
15332 ac_cv_c_bigendian=unknown
15333 fi
15334 fi
15335fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15337else
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015339/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015341int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015342main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 /* Are we little or big endian? From Harbison&Steele. */
15346 union
15347 {
15348 long int l;
15349 char c[sizeof (long int)];
15350 } u;
15351 u.l = 1;
15352 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353
15354 ;
15355 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015356}
Martin v. Löwis11437992002-04-12 09:54:03 +000015357_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015358if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015359 ac_cv_c_bigendian=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015360else
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015368fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15370$as_echo "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 case $ac_cv_c_bigendian in #(
15372 yes)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015373 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015374;; #(
15375 no)
15376 ;; #(
15377 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015378
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015379$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 ;; #(
15382 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015383 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015384 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015386
Michael W. Hudson54241132001-12-07 15:38:26 +000015387
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015388# ABI version string for Python extension modules. This appears between the
15389# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15390# from the following attributes which affect the ABI of this Python build (in
15391# this order):
15392#
15393# * The Python implementation (always 'cpython-' for us)
15394# * The major and minor version numbers
15395# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015396#
15397# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015398# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15399# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015400#
15401# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15402# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015403
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15405$as_echo_n "checking ABIFLAGS... " >&6; }
15406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15407$as_echo "$ABIFLAGS" >&6; }
15408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15409$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015410SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15412$as_echo "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015413
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015414# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15415if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015416 # Similar to SOABI but remove "d" flag from ABIFLAGS
15417
15418 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15419
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015420cat >>confdefs.h <<_ACEOF
15421#define ALT_SOABI "${ALT_SOABI}"
15422_ACEOF
Victor Stinner5422e3c2019-04-26 01:40:00 +020015423
15424fi
15425
Victor Stinner52a327c2020-12-23 03:41:08 +010015426
Matti Picusa44ce6c2020-12-20 04:56:57 +020015427EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015428
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15430$as_echo_n "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015431LDVERSION='$(VERSION)$(ABIFLAGS)'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15433$as_echo "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015434
E. M. Brayc994c8f2019-05-24 17:33:47 +020015435# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015436
E. M. Brayb1fc4172019-05-24 18:39:39 +020015437if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015438 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015439else
15440 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015441fi
15442
doko@python.org87421192013-01-26 11:39:31 +010015443
Victor Stinner51ae31e2020-06-09 15:32:43 +020015444
15445BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15446
15447
15448# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015449# /usr/$LIDIRNAME/python$VERSION
15450
15451PLATLIBDIR="lib"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15453$as_echo_n "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015454
15455# Check whether --with-platlibdir was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015456if test "${with_platlibdir+set}" = set; then :
Victor Stinner8510f432020-03-10 09:53:09 +010015457 withval=$with_platlibdir;
15458# ignore 3 options:
15459# --with-platlibdir
15460# --with-platlibdir=
15461# --without-platlibdir
15462if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15463then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15465$as_echo "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015466 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015467 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015468else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15470$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015471fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015472else
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15474$as_echo "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010015475fi
15476
15477
15478
15479
15480if test x$PLATFORM_TRIPLET = x; then
15481 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15482else
15483 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015484fi
doko@python.org87421192013-01-26 11:39:31 +010015485
15486
Victor Stinner75e59a92021-01-20 17:07:21 +010015487# Check for --with-wheel-pkg-dir=PATH
15488
15489WHEEL_PKG_DIR=""
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15491$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015492
15493# Check whether --with-wheel-pkg-dir was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015494if test "${with_wheel_pkg_dir+set}" = set; then :
Victor Stinner75e59a92021-01-20 17:07:21 +010015495 withval=$with_wheel_pkg_dir;
15496if test -n "$withval"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15498$as_echo "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015499 WHEEL_PKG_DIR="$withval"
15500else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15502$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015503fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015504else
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15506$as_echo "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010015507fi
15508
15509
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015510# Check whether right shifting a negative integer extends the sign bit
15511# or fills with zeros (like the Cray J90, according to Tim Peters).
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15513$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
15514if ${ac_cv_rshift_extends_sign+:} false; then :
15515 $as_echo_n "(cached) " >&6
15516else
Martin v. Löwis11437992002-04-12 09:54:03 +000015517
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015518if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015519 ac_cv_rshift_extends_sign=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015522/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015523
15524int main()
15525{
Joshua Root674fa0a2020-12-14 07:56:34 +110015526 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015527}
15528
Martin v. Löwis11437992002-04-12 09:54:03 +000015529_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015530if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015531 ac_cv_rshift_extends_sign=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015532else
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015537fi
15538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015539fi
15540
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15542$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015543if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015544then
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015546$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015547
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015548fi
15549
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015550# check for getc_unlocked and related locking functions
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15552$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
15553if ${ac_cv_have_getc_unlocked+:} false; then :
15554 $as_echo_n "(cached) " >&6
15555else
Martin v. Löwis11437992002-04-12 09:54:03 +000015556
Matthias Kloseb9621712010-04-24 17:59:49 +000015557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015558/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015559#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015560int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015561main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015562{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015563
15564 FILE *f = fopen("/dev/null", "r");
15565 flockfile(f);
15566 getc_unlocked(f);
15567 funlockfile(f);
15568
Martin v. Löwis11437992002-04-12 09:54:03 +000015569 ;
15570 return 0;
15571}
15572_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015573if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015574 ac_cv_have_getc_unlocked=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015575else
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 ac_cv_have_getc_unlocked=no
15577fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015578rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15583$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015584if test "$ac_cv_have_getc_unlocked" = yes
15585then
Martin v. Löwis11437992002-04-12 09:54:03 +000015586
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015587$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015588
15589fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015590
Roland Hiebere1f77692021-02-09 02:05:25 +010015591
15592# Check whether --with-readline was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015593if test "${with_readline+set}" = set; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015594 withval=$with_readline;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015595else
Roland Hiebere1f77692021-02-09 02:05:25 +010015596 with_readline=yes
15597fi
15598
15599
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015600# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015601py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015602# save the value of LIBS so we don't actually link Python with readline
15603LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015604
Roland Hiebere1f77692021-02-09 02:05:25 +010015605if test "$with_readline" != no; then
15606 case "$with_readline" in
15607 editline|edit)
15608 LIBREADLINE=edit
15609
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015610$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010015611
15612 ;;
15613 yes|readline)
15614 LIBREADLINE=readline
15615 ;;
15616 *)
15617 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15618 ;;
15619 esac
15620
15621 # On some systems we need to link readline to a termcap compatible
15622 # library. NOTE: Keep the precedence of listed libraries synchronised
15623 # with setup.py.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15625$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015626 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15627 if test -z "$py_libtermcap"; then
15628 READLINE_LIBS="-l$LIBREADLINE"
15629 else
15630 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15631 fi
15632 LIBS="$READLINE_LIBS $LIBS_no_readline"
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015634/* end confdefs.h. */
15635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636/* Override any GCC internal prototype to avoid an error.
15637 Use char because int might match the return type of a GCC
15638 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015639#ifdef __cplusplus
15640extern "C"
15641#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015642char readline ();
15643int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015644main ()
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015647 ;
15648 return 0;
15649}
15650_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015651if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015652 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015653fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015654rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015656 if test $py_cv_lib_readline = yes; then
15657 break
15658 fi
15659 done
15660
15661 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15662 #AC_SUBST([READLINE_LIBS])
15663 if test $py_cv_lib_readline = no; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15665$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015666 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15668$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015669
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015670$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015671
Roland Hiebere1f77692021-02-09 02:05:25 +010015672 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015673fi
15674
Roland Hiebere1f77692021-02-09 02:05:25 +010015675if test "$py_cv_lib_readline" = yes; then
15676 # check for readline 2.2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015677 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 +010015678#include <stdio.h> /* Must be first for Gnu Readline */
15679#ifdef WITH_EDITLINE
15680# include <editline/readline.h>
15681#else
15682# include <readline/readline.h>
15683#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015684
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015685"
15686if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015687
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015688$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015689
15690fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015691
15692 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 +010015693#include <stdio.h> /* Must be first for Gnu Readline */
15694#ifdef WITH_EDITLINE
15695# include <editline/readline.h>
15696#else
15697# include <readline/readline.h>
15698#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015699
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015700"
15701if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015702
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015703$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015704
15705fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015706
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015707
Roland Hiebere1f77692021-02-09 02:05:25 +010015708 # check for readline 4.0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015709 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15711$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15712if eval \${$as_ac_Lib+:} false; then :
15713 $as_echo_n "(cached) " >&6
15714else
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015716LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720/* Override any GCC internal prototype to avoid an error.
15721 Use char because int might match the return type of a GCC
15722 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015723#ifdef __cplusplus
15724extern "C"
15725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015726char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015727int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015728main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015730return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 ;
15732 return 0;
15733}
15734_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015735if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015736 eval "$as_ac_Lib=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015737else
Roland Hiebere1f77692021-02-09 02:05:25 +010015738 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015739fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015740rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015742LIBS=$ac_check_lib_save_LIBS
15743fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015744eval ac_res=\$$as_ac_Lib
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15746$as_echo "$ac_res" >&6; }
15747if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015748
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015749$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015750
Martin v. Löwis0daad592001-09-30 21:09:59 +000015751fi
15752
Michael W. Hudson54241132001-12-07 15:38:26 +000015753
Roland Hiebere1f77692021-02-09 02:05:25 +010015754 # also in 4.0
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015755 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15757$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15758if eval \${$as_ac_Lib+:} false; then :
15759 $as_echo_n "(cached) " >&6
15760else
Thomas Wouters89d996e2007-09-08 17:39:28 +000015761 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015762LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015764/* end confdefs.h. */
15765
15766/* Override any GCC internal prototype to avoid an error.
15767 Use char because int might match the return type of a GCC
15768 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015769#ifdef __cplusplus
15770extern "C"
15771#endif
Thomas Wouters89d996e2007-09-08 17:39:28 +000015772char rl_completion_display_matches_hook ();
15773int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015774main ()
Thomas Wouters89d996e2007-09-08 17:39:28 +000015775{
15776return rl_completion_display_matches_hook ();
15777 ;
15778 return 0;
15779}
15780_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015781if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015782 eval "$as_ac_Lib=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015783else
Roland Hiebere1f77692021-02-09 02:05:25 +010015784 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015785fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015786rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015788LIBS=$ac_check_lib_save_LIBS
15789fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015790eval ac_res=\$$as_ac_Lib
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15792$as_echo "$ac_res" >&6; }
15793if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015794
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015795$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015796
15797fi
15798
15799
Roland Hiebere1f77692021-02-09 02:05:25 +010015800 # also in 4.0, but not in editline
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015801 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15803$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15804if eval \${$as_ac_Lib+:} false; then :
15805 $as_echo_n "(cached) " >&6
15806else
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015807 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015808LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15810/* end confdefs.h. */
15811
15812/* Override any GCC internal prototype to avoid an error.
15813 Use char because int might match the return type of a GCC
15814 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015815#ifdef __cplusplus
15816extern "C"
15817#endif
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015818char rl_resize_terminal ();
15819int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015820main ()
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015821{
15822return rl_resize_terminal ();
15823 ;
15824 return 0;
15825}
15826_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015827if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015828 eval "$as_ac_Lib=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015829else
Roland Hiebere1f77692021-02-09 02:05:25 +010015830 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015831fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015832rm -f core conftest.err conftest.$ac_objext \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015833 conftest$ac_exeext conftest.$ac_ext
15834LIBS=$ac_check_lib_save_LIBS
15835fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015836eval ac_res=\$$as_ac_Lib
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15838$as_echo "$ac_res" >&6; }
15839if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015840
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015841$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015842
15843fi
15844
15845
Roland Hiebere1f77692021-02-09 02:05:25 +010015846 # check for readline 4.2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015847 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15849$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15850if eval \${$as_ac_Lib+:} false; then :
15851 $as_echo_n "(cached) " >&6
15852else
Martin v. Löwis11437992002-04-12 09:54:03 +000015853 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015854LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858/* Override any GCC internal prototype to avoid an error.
15859 Use char because int might match the return type of a GCC
15860 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015861#ifdef __cplusplus
15862extern "C"
15863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015864char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015865int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015866main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000015867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ;
15870 return 0;
15871}
15872_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015873if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015874 eval "$as_ac_Lib=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015875else
Roland Hiebere1f77692021-02-09 02:05:25 +010015876 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000015877fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015878rm -f core conftest.err conftest.$ac_objext \
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015880LIBS=$ac_check_lib_save_LIBS
15881fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015882eval ac_res=\$$as_ac_Lib
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15884$as_echo "$ac_res" >&6; }
15885if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015886
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015887$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015888
Guido van Rossum353ae582001-07-10 16:45:32 +000015889fi
15890
Jack Jansendd19cf82001-12-06 22:36:17 +000015891
Roland Hiebere1f77692021-02-09 02:05:25 +010015892 # also in readline 4.2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015893 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010015894#include <stdio.h> /* Must be first for Gnu Readline */
15895#ifdef WITH_EDITLINE
15896# include <editline/readline.h>
15897#else
15898# include <readline/readline.h>
15899#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015900
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015901"
15902if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015903
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015904$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015905
15906fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015907
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015908
15909 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
15910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
15911$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
15912if eval \${$as_ac_Lib+:} false; then :
15913 $as_echo_n "(cached) " >&6
15914else
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015915 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015916LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15918/* end confdefs.h. */
15919
15920/* Override any GCC internal prototype to avoid an error.
15921 Use char because int might match the return type of a GCC
15922 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015923#ifdef __cplusplus
15924extern "C"
15925#endif
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015926char append_history ();
15927int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015928main ()
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015929{
15930return append_history ();
15931 ;
15932 return 0;
15933}
15934_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015935if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015936 eval "$as_ac_Lib=yes"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015937else
Roland Hiebere1f77692021-02-09 02:05:25 +010015938 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015939fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015940rm -f core conftest.err conftest.$ac_objext \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015941 conftest$ac_exeext conftest.$ac_ext
15942LIBS=$ac_check_lib_save_LIBS
15943fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015944eval ac_res=\$$as_ac_Lib
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15946$as_echo "$ac_res" >&6; }
15947if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015948
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015949$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015950
15951fi
15952
Roland Hiebere1f77692021-02-09 02:05:25 +010015953fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015954
Martin v. Löwis82bca632006-02-10 20:49:30 +000015955# End of readline checks: restore LIBS
15956LIBS=$LIBS_no_readline
15957
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15959$as_echo_n "checking for broken nice()... " >&6; }
15960if ${ac_cv_broken_nice+:} false; then :
15961 $as_echo_n "(cached) " >&6
15962else
Martin v. Löwis11437992002-04-12 09:54:03 +000015963
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015964if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015965 ac_cv_broken_nice=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015966else
Matthias Kloseb9621712010-04-24 17:59:49 +000015967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015968/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015969
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015970#include <stdlib.h>
15971#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015972int main()
15973{
15974 int val1 = nice(1);
15975 if (val1 != -1 && val1 == nice(2))
15976 exit(0);
15977 exit(1);
15978}
15979
Martin v. Löwis11437992002-04-12 09:54:03 +000015980_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015981if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015982 ac_cv_broken_nice=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015983else
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015988fi
15989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990fi
15991
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15993$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015994if test "$ac_cv_broken_nice" = yes
15995then
Martin v. Löwis11437992002-04-12 09:54:03 +000015996
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015997$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015998
15999fi
16000
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16002$as_echo_n "checking for broken poll()... " >&6; }
16003if ${ac_cv_broken_poll+:} false; then :
16004 $as_echo_n "(cached) " >&6
16005else
16006 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016007 ac_cv_broken_poll=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016008else
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016010/* end confdefs.h. */
16011
16012#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016013#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016015int main()
16016{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016017 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016018 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016019
16020 close (42);
16021
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016022 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016023 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016024 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016025 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016026 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016027 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016028 return 1;
16029}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016030
16031_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016032if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016033 ac_cv_broken_poll=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016034else
Matthias Kloseb9621712010-04-24 17:59:49 +000016035 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016040
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016041fi
16042
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16044$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016045if test "$ac_cv_broken_poll" = yes
16046then
16047
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016048$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016049
16050fi
16051
Martin v. Löwis1d459062005-03-14 21:23:33 +000016052# check tzset(3) exists and works like we expect it to
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16054$as_echo_n "checking for working tzset()... " >&6; }
16055if ${ac_cv_working_tzset+:} false; then :
16056 $as_echo_n "(cached) " >&6
16057else
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016058
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016059if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016060 ac_cv_working_tzset=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016061else
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016063/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016064
16065#include <stdlib.h>
16066#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016067#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016068
16069#if HAVE_TZNAME
16070extern char *tzname[];
16071#endif
16072
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016073int main()
16074{
Brett Cannon18367812003-09-19 00:59:16 +000016075 /* Note that we need to ensure that not only does tzset(3)
16076 do 'something' with localtime, but it works as documented
16077 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016078 This includes making sure that tzname is set properly if
16079 tm->tm_zone does not exist since it is the alternative way
16080 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016081
16082 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016083 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016084 */
16085
Martin v. Löwis1d459062005-03-14 21:23:33 +000016086 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016087 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16088
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016089 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016090 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016091 if (localtime(&groundhogday)->tm_hour != 0)
16092 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016093#if HAVE_TZNAME
16094 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16095 if (strcmp(tzname[0], "UTC") ||
16096 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16097 exit(1);
16098#endif
Brett Cannon18367812003-09-19 00:59:16 +000016099
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016100 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016101 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016102 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016103 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016104#if HAVE_TZNAME
16105 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16106 exit(1);
16107#endif
Brett Cannon18367812003-09-19 00:59:16 +000016108
16109 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16110 tzset();
16111 if (localtime(&groundhogday)->tm_hour != 11)
16112 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016113#if HAVE_TZNAME
16114 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16115 exit(1);
16116#endif
16117
16118#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016119 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16120 exit(1);
16121 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16122 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016123#endif
Brett Cannon18367812003-09-19 00:59:16 +000016124
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016125 exit(0);
16126}
16127
16128_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016129if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016130 ac_cv_working_tzset=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016131else
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16135 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016136fi
16137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138fi
16139
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16141$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016142if test "$ac_cv_working_tzset" = yes
16143then
16144
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016145$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016146
16147fi
16148
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016149# Look for subsecond timestamps in struct stat
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16151$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
16152if ${ac_cv_stat_tv_nsec+:} false; then :
16153 $as_echo_n "(cached) " >&6
16154else
Matthias Kloseb9621712010-04-24 17:59:49 +000016155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016156/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016157#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016158int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016159main ()
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016160{
16161
16162struct stat st;
16163st.st_mtim.tv_nsec = 1;
16164
16165 ;
16166 return 0;
16167}
16168_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016170 ac_cv_stat_tv_nsec=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016171else
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016173fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175fi
16176
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16178$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016179if test "$ac_cv_stat_tv_nsec" = yes
16180then
16181
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016182$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016183
16184fi
16185
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016186# Look for BSD style subsecond timestamps in struct stat
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16188$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
16189if ${ac_cv_stat_tv_nsec2+:} false; then :
16190 $as_echo_n "(cached) " >&6
16191else
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016193/* end confdefs.h. */
16194#include <sys/stat.h>
16195int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016196main ()
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016197{
16198
16199struct stat st;
16200st.st_mtimespec.tv_nsec = 1;
16201
16202 ;
16203 return 0;
16204}
16205_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016207 ac_cv_stat_tv_nsec2=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016208else
Matthias Kloseb9621712010-04-24 17:59:49 +000016209 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016210fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212fi
16213
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16215$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016216if test "$ac_cv_stat_tv_nsec2" = yes
16217then
16218
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016219$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016220
16221fi
16222
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016223# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016224ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016225if test "$cross_compiling" = no; then
16226 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16227fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016228
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016229for ac_header in curses.h ncurses.h
16230do :
16231 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16232ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16233if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16234 cat >>confdefs.h <<_ACEOF
16235#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16236_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016237
16238fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016239
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016240done
Pablo Galindocc128882021-03-01 16:47:53 +000016241
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016242
16243# On Solaris, term.h requires curses.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016244for ac_header in term.h
16245do :
16246 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016247#ifdef HAVE_CURSES_H
16248#include <curses.h>
16249#endif
16250
16251"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016252if test "x$ac_cv_header_term_h" = xyes; then :
16253 cat >>confdefs.h <<_ACEOF
16254#define HAVE_TERM_H 1
16255_ACEOF
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016256
16257fi
16258
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016259done
16260
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016261
Jack Jansen666b1e72001-10-31 12:11:48 +000016262# On HP/UX 11.0, mvwdelch is a block with a return statement
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16264$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
16265if ${ac_cv_mvwdelch_is_expression+:} false; then :
16266 $as_echo_n "(cached) " >&6
16267else
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016269/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016270#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016271int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016272main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016273{
Jack Jansen666b1e72001-10-31 12:11:48 +000016274
16275 int rtn;
16276 rtn = mvwdelch(0,0,0);
16277
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 ;
16279 return 0;
16280}
16281_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016282if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016283 ac_cv_mvwdelch_is_expression=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016284else
Matthias Kloseb9621712010-04-24 17:59:49 +000016285 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016286fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288fi
16289
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16291$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016292
16293if test "$ac_cv_mvwdelch_is_expression" = yes
16294then
Martin v. Löwis11437992002-04-12 09:54:03 +000016295
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016296$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016297
16298fi
16299
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016300# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16301# structs since version 5.7. If the macro is defined as zero before including
16302# [n]curses.h, ncurses will expose fields of the structs regardless of the
16303# configuration.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16305$as_echo_n "checking whether WINDOW has _flags... " >&6; }
16306if ${ac_cv_window_has_flags+:} false; then :
16307 $as_echo_n "(cached) " >&6
16308else
Matthias Kloseb9621712010-04-24 17:59:49 +000016309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016310/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016311
16312 #define NCURSES_OPAQUE 0
16313 #include <curses.h>
16314
Martin v. Löwis11437992002-04-12 09:54:03 +000016315int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016316main ()
Martin v. Löwis11437992002-04-12 09:54:03 +000016317{
Jack Jansen666b1e72001-10-31 12:11:48 +000016318
16319 WINDOW *w;
16320 w->_flags = 0;
16321
Martin v. Löwis11437992002-04-12 09:54:03 +000016322 ;
16323 return 0;
16324}
16325_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016326if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016327 ac_cv_window_has_flags=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016328else
Matthias Kloseb9621712010-04-24 17:59:49 +000016329 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016330fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016332fi
16333
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16335$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016336
Jack Jansen666b1e72001-10-31 12:11:48 +000016337
16338if test "$ac_cv_window_has_flags" = yes
16339then
Martin v. Löwis11437992002-04-12 09:54:03 +000016340
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016341$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016342
16343fi
16344
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16346$as_echo_n "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16348/* end confdefs.h. */
16349#include <curses.h>
16350int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016351main ()
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016352{
16353
16354#ifndef is_pad
16355void *x=is_pad
16356#endif
16357
16358 ;
16359 return 0;
16360}
16361_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016362if ac_fn_c_try_compile "$LINENO"; then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016363
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016364$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016365
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16367$as_echo "yes" >&6; }
16368else
16369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16370$as_echo "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016371
16372fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016374
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16376$as_echo_n "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016378/* end confdefs.h. */
16379#include <curses.h>
16380int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016381main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016382{
16383void *x=is_term_resized
16384 ;
16385 return 0;
16386}
16387_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016389
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016390$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016391
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16393$as_echo "yes" >&6; }
16394else
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16396$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016397
16398fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16402$as_echo_n "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016404/* end confdefs.h. */
16405#include <curses.h>
16406int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016407main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016408{
16409void *x=resize_term
16410 ;
16411 return 0;
16412}
16413_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016414if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016415
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016416$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016417
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16419$as_echo "yes" >&6; }
16420else
16421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16422$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016423
16424fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16428$as_echo_n "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016430/* end confdefs.h. */
16431#include <curses.h>
16432int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016433main ()
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016434{
16435void *x=resizeterm
16436 ;
16437 return 0;
16438}
16439_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016440if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016441
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016442$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016443
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16445$as_echo "yes" >&6; }
16446else
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16448$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016449
16450fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016452
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16454$as_echo_n "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16456/* end confdefs.h. */
16457#include <curses.h>
16458int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016459main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016460{
16461
16462#ifndef immedok
16463void *x=immedok
16464#endif
16465
16466 ;
16467 return 0;
16468}
16469_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016470if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016471
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016472$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016473
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16475$as_echo "yes" >&6; }
16476else
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16478$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016479
16480fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016482
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16484$as_echo_n "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16486/* end confdefs.h. */
16487#include <curses.h>
16488int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016489main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016490{
16491
16492#ifndef syncok
16493void *x=syncok
16494#endif
16495
16496 ;
16497 return 0;
16498}
16499_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016500if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016501
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016502$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016503
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16505$as_echo "yes" >&6; }
16506else
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16508$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016509
16510fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016512
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16514$as_echo_n "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16516/* end confdefs.h. */
16517#include <curses.h>
16518int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016519main ()
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016520{
16521
16522#ifndef wchgat
16523void *x=wchgat
16524#endif
16525
16526 ;
16527 return 0;
16528}
16529_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016530if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016531
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016532$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016533
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16535$as_echo "yes" >&6; }
16536else
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16538$as_echo "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016539
16540fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016542
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16544$as_echo_n "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16546/* end confdefs.h. */
16547#include <curses.h>
16548int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016549main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016550{
16551
16552#ifndef filter
16553void *x=filter
16554#endif
16555
16556 ;
16557 return 0;
16558}
16559_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016560if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016561
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016562$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016563
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16565$as_echo "yes" >&6; }
16566else
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16568$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016569
16570fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016572
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16574$as_echo_n "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16576/* end confdefs.h. */
16577#include <curses.h>
16578int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016579main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016580{
16581
16582#ifndef has_key
16583void *x=has_key
16584#endif
16585
16586 ;
16587 return 0;
16588}
16589_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016590if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016591
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016592$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016593
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16595$as_echo "yes" >&6; }
16596else
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16598$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016599
16600fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016602
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16604$as_echo_n "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16606/* end confdefs.h. */
16607#include <curses.h>
16608int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016609main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016610{
16611
16612#ifndef typeahead
16613void *x=typeahead
16614#endif
16615
16616 ;
16617 return 0;
16618}
16619_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016620if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016621
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016622$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016623
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16625$as_echo "yes" >&6; }
16626else
16627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16628$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016629
16630fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016632
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16634$as_echo_n "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16636/* end confdefs.h. */
16637#include <curses.h>
16638int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016639main ()
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016640{
16641
16642#ifndef use_env
16643void *x=use_env
16644#endif
16645
16646 ;
16647 return 0;
16648}
16649_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016650if ac_fn_c_try_compile "$LINENO"; then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016651
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016652$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016653
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16655$as_echo "yes" >&6; }
16656else
16657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16658$as_echo "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016659
16660fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016662# last curses configure check
16663CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16666$as_echo "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016667
16668if test "x$cross_compiling" = xyes; then
16669 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16671$as_echo_n "checking for /dev/ptmx... " >&6; }
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16673$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016674 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16675 fi
16676 if test "${ac_cv_file__dev_ptc+set}" != set; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16678$as_echo_n "checking for /dev/ptc... " >&6; }
16679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16680$as_echo "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016681 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16682 fi
16683fi
16684
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16686$as_echo_n "checking for /dev/ptmx... " >&6; }
16687if ${ac_cv_file__dev_ptmx+:} false; then :
16688 $as_echo_n "(cached) " >&6
16689else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016690 test "$cross_compiling" = yes &&
16691 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16692if test -r "/dev/ptmx"; then
16693 ac_cv_file__dev_ptmx=yes
16694else
16695 ac_cv_file__dev_ptmx=no
16696fi
16697fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16699$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16700if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016701
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016702fi
16703
16704if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016705
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016706$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016707
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016708fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16710$as_echo_n "checking for /dev/ptc... " >&6; }
16711if ${ac_cv_file__dev_ptc+:} false; then :
16712 $as_echo_n "(cached) " >&6
16713else
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016714 test "$cross_compiling" = yes &&
16715 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16716if test -r "/dev/ptc"; then
16717 ac_cv_file__dev_ptc=yes
16718else
16719 ac_cv_file__dev_ptc=no
16720fi
16721fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16723$as_echo "$ac_cv_file__dev_ptc" >&6; }
16724if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016725
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016726fi
16727
16728if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016729
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016730$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016731
Neal Norwitz865400f2003-03-21 01:42:58 +000016732fi
16733
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016734if test $ac_sys_system = Darwin
16735then
16736 LIBS="$LIBS -framework CoreFoundation"
16737fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016738
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16740$as_echo_n "checking for %zd printf() format support... " >&6; }
16741if ${ac_cv_have_size_t_format+:} false; then :
16742 $as_echo_n "(cached) " >&6
16743else
16744 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016745 ac_cv_have_size_t_format="cross -- assuming yes"
16746
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016747else
Matthias Kloseb9621712010-04-24 17:59:49 +000016748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016749/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016750
Thomas Wouters477c8d52006-05-27 19:21:47 +000016751#include <stdio.h>
16752#include <stddef.h>
16753#include <string.h>
16754
Christian Heimes2c181612007-12-17 20:04:13 +000016755#ifdef HAVE_SYS_TYPES_H
16756#include <sys/types.h>
16757#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016758
16759#ifdef HAVE_SSIZE_T
16760typedef ssize_t Py_ssize_t;
16761#elif SIZEOF_VOID_P == SIZEOF_LONG
16762typedef long Py_ssize_t;
16763#else
16764typedef int Py_ssize_t;
16765#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016766
Christian Heimes2c181612007-12-17 20:04:13 +000016767int main()
16768{
16769 char buffer[256];
16770
Thomas Wouters477c8d52006-05-27 19:21:47 +000016771 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16772 return 1;
16773
Thomas Wouters89f507f2006-12-13 04:49:30 +000016774 if (strcmp(buffer, "123"))
16775 return 1;
16776
16777 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16778 return 1;
16779
16780 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016781 return 1;
16782
16783 return 0;
16784}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016785
Thomas Wouters477c8d52006-05-27 19:21:47 +000016786_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016788 ac_cv_have_size_t_format=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016789else
Matthias Kloseb9621712010-04-24 17:59:49 +000016790 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016794fi
16795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016796fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16798$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016799if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016800
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016801$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016802
16803fi
16804
Matthias Kloseb9621712010-04-24 17:59:49 +000016805ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016806#ifdef HAVE_SYS_TYPES_H
16807#include <sys/types.h>
16808#endif
16809#ifdef HAVE_SYS_SOCKET_H
16810#include <sys/socket.h>
16811#endif
16812
Matthias Kloseb9621712010-04-24 17:59:49 +000016813"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016814if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016815
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016816else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016817
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016818$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016819
16820fi
16821
Michael W. Hudson54241132001-12-07 15:38:26 +000016822
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16824$as_echo_n "checking for broken mbstowcs... " >&6; }
16825if ${ac_cv_broken_mbstowcs+:} false; then :
16826 $as_echo_n "(cached) " >&6
16827else
16828 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016829 ac_cv_broken_mbstowcs=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016830else
Matthias Kloseb9621712010-04-24 17:59:49 +000016831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016832/* end confdefs.h. */
16833
Stefan Krah19c21392012-11-22 23:47:32 +010016834#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016835#include<stdlib.h>
16836int main() {
16837 size_t len = -1;
16838 const char *str = "text";
16839 len = mbstowcs(NULL, str, 0);
16840 return (len != 4);
16841}
16842
16843_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016844if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016845 ac_cv_broken_mbstowcs=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016846else
Matthias Kloseb9621712010-04-24 17:59:49 +000016847 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016851fi
16852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016853fi
16854
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16856$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016857if test "$ac_cv_broken_mbstowcs" = yes
16858then
16859
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016860$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016861
16862fi
16863
Antoine Pitroub52ec782009-01-25 16:34:23 +000016864# Check for --with-computed-gotos
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16866$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016867
16868# Check whether --with-computed-gotos was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016869if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016870 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016871if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016872then
16873
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016874$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016875
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16877$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016878fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016879if test "$withval" = no
16880then
16881
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016882$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000016883
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16885$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016886fi
16887
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016888else
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16890$as_echo "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000016891fi
16892
Antoine Pitroub52ec782009-01-25 16:34:23 +000016893
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16895$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16896if ${ac_cv_computed_gotos+:} false; then :
16897 $as_echo_n "(cached) " >&6
16898else
16899 if test "$cross_compiling" = yes; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010016900 if test "${with_computed_gotos+set}" = set; then
16901 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16902 else
16903 ac_cv_computed_gotos=no
16904 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016905else
Matthias Kloseb17289e2012-03-15 19:51:34 +010016906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16907/* end confdefs.h. */
16908
16909int main(int argc, char **argv)
16910{
16911 static void *targets[1] = { &&LABEL1 };
16912 goto LABEL2;
16913LABEL1:
16914 return 0;
16915LABEL2:
16916 goto *targets[0];
16917 return 1;
16918}
16919
16920_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016921if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010016922 ac_cv_computed_gotos=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016923else
Matthias Kloseb17289e2012-03-15 19:51:34 +010016924 ac_cv_computed_gotos=no
16925fi
16926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16927 conftest.$ac_objext conftest.beam conftest.$ac_ext
16928fi
16929
16930fi
16931
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16933$as_echo "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010016934case "$ac_cv_computed_gotos" in yes*)
16935
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016936$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010016937
16938esac
16939
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016940case $ac_sys_system in
16941AIX*)
16942
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016943$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016944 ;;
16945esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016946
Michael W. Hudson54241132001-12-07 15:38:26 +000016947
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016948
16949
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016950for h in `(cd $srcdir;echo Python/thread_*.h)`
16951do
16952 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16953done
16954
Michael W. Hudson54241132001-12-07 15:38:26 +000016955
Ned Deily8d02f912020-06-25 10:46:44 -040016956SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16958$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016959for dir in $SRCDIRS; do
16960 if test ! -d $dir; then
16961 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016962 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016963done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16965$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016966
Stefan Krah1919b7e2012-03-21 18:25:23 +010016967# Availability of -O2:
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16969$as_echo_n "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016970saved_cflags="$CFLAGS"
16971CFLAGS="-O2"
16972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16973/* end confdefs.h. */
16974
16975int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016976main ()
Stefan Krah1919b7e2012-03-21 18:25:23 +010016977{
16978
16979
16980 ;
16981 return 0;
16982}
16983_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016984if ac_fn_c_try_compile "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010016985 have_O2=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016986else
Stefan Krah1919b7e2012-03-21 18:25:23 +010016987 have_O2=no
16988fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16991$as_echo "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016992CFLAGS="$saved_cflags"
16993
16994# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16995# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010016996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16997$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016998saved_cflags="$CFLAGS"
16999CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17000if test "$have_O2" = no; then
17001 CFLAGS=""
17002fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017003if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017004 have_glibc_memmove_bug=undefined
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017005else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17007/* end confdefs.h. */
17008
17009#include <stdio.h>
17010#include <stdlib.h>
17011#include <string.h>
17012void foo(void *p, void *q) { memmove(p, q, 19); }
17013int main() {
17014 char a[32] = "123456789000000000";
17015 foo(&a[9], a);
17016 if (strcmp(a, "123456789123456789000000000") != 0)
17017 return 1;
17018 foo(a, &a[9]);
17019 if (strcmp(a, "123456789000000000") != 0)
17020 return 1;
17021 return 0;
17022}
17023
17024_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017025if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017026 have_glibc_memmove_bug=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017027else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017028 have_glibc_memmove_bug=yes
17029fi
17030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17031 conftest.$ac_objext conftest.beam conftest.$ac_ext
17032fi
17033
17034CFLAGS="$saved_cflags"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17036$as_echo "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017037if test "$have_glibc_memmove_bug" = yes; then
17038
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017039$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017040
17041fi
17042
17043if test "$have_gcc_asm_for_x87" = yes; then
17044 # Some versions of gcc miscompile inline asm:
17045 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17046 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17047 case $CC in
17048 *gcc*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17050$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017051 saved_cflags="$CFLAGS"
17052 CFLAGS="-O2"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017053 if test "$cross_compiling" = yes; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017054 have_ipa_pure_const_bug=undefined
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017055else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17057/* end confdefs.h. */
17058
17059 __attribute__((noinline)) int
17060 foo(int *p) {
17061 int r;
17062 asm ( "movl \$6, (%1)\n\t"
17063 "xorl %0, %0\n\t"
17064 : "=r" (r) : "r" (p) : "memory"
17065 );
17066 return r;
17067 }
17068 int main() {
17069 int p = 8;
17070 if ((foo(&p) ? : p) != 6)
17071 return 1;
17072 return 0;
17073 }
17074
17075_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017076if ac_fn_c_try_run "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010017077 have_ipa_pure_const_bug=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017078else
Stefan Krah1919b7e2012-03-21 18:25:23 +010017079 have_ipa_pure_const_bug=yes
17080fi
17081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17082 conftest.$ac_objext conftest.beam conftest.$ac_ext
17083fi
17084
17085 CFLAGS="$saved_cflags"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17087$as_echo "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010017088 if test "$have_ipa_pure_const_bug" = yes; then
17089
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017090$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010017091
17092 fi
17093 ;;
17094 esac
17095fi
17096
Victor Stinner4f5366e2015-01-09 02:13:19 +010017097# Check for stdatomic.h
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17099$as_echo_n "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17101/* end confdefs.h. */
17102
17103
17104 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017105 atomic_int int_var;
17106 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017107 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017108 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17109 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17110 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017111 return 0;
17112 }
17113
17114
17115_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017116if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017117 have_stdatomic_h=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017118else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017119 have_stdatomic_h=no
17120fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017121rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017122 conftest$ac_exeext conftest.$ac_ext
17123
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17125$as_echo "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017126
17127if test "$have_stdatomic_h" = yes; then
17128
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017129$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017130
17131fi
17132
Victor Stinner52a327c2020-12-23 03:41:08 +010017133# Check for GCC >= 4.7 and clang __atomic builtin functions
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17135$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17137/* end confdefs.h. */
17138
17139
Victor Stinner52a327c2020-12-23 03:41:08 +010017140 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017141 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017142 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17143 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017144 return 0;
17145 }
17146
17147
17148_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017149if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010017150 have_builtin_atomic=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017151else
Victor Stinner4f5366e2015-01-09 02:13:19 +010017152 have_builtin_atomic=no
17153fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017154rm -f core conftest.err conftest.$ac_objext \
Victor Stinner4f5366e2015-01-09 02:13:19 +010017155 conftest$ac_exeext conftest.$ac_ext
17156
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17158$as_echo "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017159
17160if test "$have_builtin_atomic" = yes; then
17161
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017162$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010017163
17164fi
17165
Ned Deily322f5ba2013-11-21 23:01:59 -080017166# ensurepip option
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17168$as_echo_n "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017169
17170# Check whether --with-ensurepip was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017171if test "${with_ensurepip+set}" = set; then :
Ned Deily322f5ba2013-11-21 23:01:59 -080017172 withval=$with_ensurepip;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017173else
Ned Deily322f5ba2013-11-21 23:01:59 -080017174 with_ensurepip=upgrade
17175fi
17176
17177case $with_ensurepip in #(
17178 yes|upgrade) :
17179 ENSUREPIP=upgrade ;; #(
17180 install) :
17181 ENSUREPIP=install ;; #(
17182 no) :
17183 ENSUREPIP=no ;; #(
17184 *) :
17185 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17186esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17188$as_echo "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080017189
17190
Victor Stinner35a97c02015-03-08 02:59:09 +010017191# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17193$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17195/* end confdefs.h. */
17196
17197
17198 #include <dirent.h>
17199
17200 int main() {
17201 struct dirent entry;
17202 return entry.d_type == DT_UNKNOWN;
17203 }
17204
17205
17206_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017207if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner35a97c02015-03-08 02:59:09 +010017208 have_dirent_d_type=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017209else
Victor Stinner35a97c02015-03-08 02:59:09 +010017210 have_dirent_d_type=no
17211fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017212rm -f core conftest.err conftest.$ac_objext \
Victor Stinner35a97c02015-03-08 02:59:09 +010017213 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17215$as_echo "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010017216
17217if test "$have_dirent_d_type" = yes; then
17218
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017219$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010017220
17221fi
17222
Victor Stinner9eb57c52015-03-19 22:21:49 +010017223# check if the Linux getrandom() syscall is available
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17225$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227/* end confdefs.h. */
17228
17229
Victor Stinner1b80b242016-04-12 22:34:58 +020017230 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017231 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017232 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017233
17234 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017235 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017236 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017237 const int flags = GRND_NONBLOCK;
17238 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017239 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017240 return 0;
17241 }
17242
17243
17244_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017245if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010017246 have_getrandom_syscall=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017247else
Victor Stinner9eb57c52015-03-19 22:21:49 +010017248 have_getrandom_syscall=no
17249fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017250rm -f core conftest.err conftest.$ac_objext \
Victor Stinner9eb57c52015-03-19 22:21:49 +010017251 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17253$as_echo "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010017254
17255if test "$have_getrandom_syscall" = yes; then
17256
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017257$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010017258
17259fi
17260
Victor Stinner3abf44e2015-09-18 15:38:37 +020017261# check if the getrandom() function is available
17262# the test was written for the Solaris function of <sys/random.h>
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17264$as_echo_n "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17266/* end confdefs.h. */
17267
17268
17269 #include <sys/random.h>
17270
17271 int main() {
17272 char buffer[1];
17273 const size_t buflen = sizeof(buffer);
17274 const int flags = 0;
17275 /* ignore the result, Python checks for ENOSYS at runtime */
17276 (void)getrandom(buffer, buflen, flags);
17277 return 0;
17278 }
17279
17280
17281_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017282if ac_fn_c_try_link "$LINENO"; then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020017283 have_getrandom=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017284else
Victor Stinner3abf44e2015-09-18 15:38:37 +020017285 have_getrandom=no
17286fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017287rm -f core conftest.err conftest.$ac_objext \
Victor Stinner3abf44e2015-09-18 15:38:37 +020017288 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17290$as_echo "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020017291
17292if test "$have_getrandom" = yes; then
17293
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017294$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020017295
17296fi
17297
Neil Schemenauer5741c452019-02-08 10:48:46 -080017298# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17299# shm_* may only be available if linking against librt
17300save_LIBS="$LIBS"
17301save_includes_default="$ac_includes_default"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17303$as_echo_n "checking for library containing shm_open... " >&6; }
17304if ${ac_cv_search_shm_open+:} false; then :
17305 $as_echo_n "(cached) " >&6
17306else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017307 ac_func_search_save_LIBS=$LIBS
17308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17309/* end confdefs.h. */
17310
17311/* Override any GCC internal prototype to avoid an error.
17312 Use char because int might match the return type of a GCC
17313 builtin and then its argument prototype would still apply. */
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017314#ifdef __cplusplus
17315extern "C"
17316#endif
Neil Schemenauer5741c452019-02-08 10:48:46 -080017317char shm_open ();
17318int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017319main ()
Neil Schemenauer5741c452019-02-08 10:48:46 -080017320{
17321return shm_open ();
17322 ;
17323 return 0;
17324}
17325_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017326for ac_lib in '' rt; do
Neil Schemenauer5741c452019-02-08 10:48:46 -080017327 if test -z "$ac_lib"; then
17328 ac_res="none required"
17329 else
17330 ac_res=-l$ac_lib
17331 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17332 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017333 if ac_fn_c_try_link "$LINENO"; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017334 ac_cv_search_shm_open=$ac_res
17335fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017336rm -f core conftest.err conftest.$ac_objext \
Neil Schemenauer5741c452019-02-08 10:48:46 -080017337 conftest$ac_exeext
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017338 if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017339 break
17340fi
17341done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017342if ${ac_cv_search_shm_open+:} false; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017343
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017344else
Neil Schemenauer5741c452019-02-08 10:48:46 -080017345 ac_cv_search_shm_open=no
17346fi
17347rm conftest.$ac_ext
17348LIBS=$ac_func_search_save_LIBS
17349fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17351$as_echo "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080017352ac_res=$ac_cv_search_shm_open
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017353if test "$ac_res" != no; then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080017354 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17355
17356fi
17357
17358if test "$ac_cv_search_shm_open" = "-lrt"; then
17359
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017360$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080017361
17362fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017363for ac_header in sys/mman.h
17364do :
17365 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17366if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17367 cat >>confdefs.h <<_ACEOF
17368#define HAVE_SYS_MMAN_H 1
17369_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017370
17371fi
17372
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017373done
17374
Neil Schemenauer5741c452019-02-08 10:48:46 -080017375# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17376ac_includes_default="\
17377${ac_includes_default}
17378#ifndef __cplusplus
17379# ifdef HAVE_SYS_MMAN_H
17380# include <sys/mman.h>
17381# endif
17382#endif
17383"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017384for ac_func in shm_open shm_unlink
17385do :
17386 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17387ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17388if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17389 cat >>confdefs.h <<_ACEOF
17390#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17391_ACEOF
Neil Schemenauer5741c452019-02-08 10:48:46 -080017392
17393fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017394done
Neil Schemenauer5741c452019-02-08 10:48:46 -080017395
17396# we don't want to link with librt always, restore LIBS
17397LIBS="$save_LIBS"
17398ac_includes_default="$save_includes_default"
17399
Christian Heimesff5be6e2018-01-20 13:19:21 +010017400# Check for usable OpenSSL
17401
17402 found=false
17403
17404# Check whether --with-openssl was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017405if test "${with_openssl+set}" = set; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017406 withval=$with_openssl;
17407 case "$withval" in
17408 "" | y | ye | yes | n | no)
17409 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17410 ;;
17411 *) ssldirs="$withval"
17412 ;;
17413 esac
17414
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017415else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017416
17417 # if pkg-config is installed and openssl has installed a .pc file,
17418 # then use that information and don't search ssldirs
17419 if test -n "$ac_tool_prefix"; then
17420 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17421set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17423$as_echo_n "checking for $ac_word... " >&6; }
17424if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17425 $as_echo_n "(cached) " >&6
17426else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017427 if test -n "$PKG_CONFIG"; then
17428 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17429else
17430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17431for as_dir in $PATH
17432do
17433 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017434 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017435 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017436 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017437 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017438 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017439 break 2
17440 fi
17441done
17442 done
17443IFS=$as_save_IFS
17444
17445fi
17446fi
17447PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17448if test -n "$PKG_CONFIG"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17450$as_echo "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017451else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17453$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017454fi
17455
17456
17457fi
17458if test -z "$ac_cv_prog_PKG_CONFIG"; then
17459 ac_ct_PKG_CONFIG=$PKG_CONFIG
17460 # Extract the first word of "pkg-config", so it can be a program name with args.
17461set dummy pkg-config; ac_word=$2
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17463$as_echo_n "checking for $ac_word... " >&6; }
17464if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17465 $as_echo_n "(cached) " >&6
17466else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017467 if test -n "$ac_ct_PKG_CONFIG"; then
17468 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17469else
17470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17471for as_dir in $PATH
17472do
17473 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017474 test -z "$as_dir" && as_dir=.
Christian Heimesff5be6e2018-01-20 13:19:21 +010017475 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017476 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010017477 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010017479 break 2
17480 fi
17481done
17482 done
17483IFS=$as_save_IFS
17484
17485fi
17486fi
17487ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17488if test -n "$ac_ct_PKG_CONFIG"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17490$as_echo "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017491else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17493$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017494fi
17495
17496 if test "x$ac_ct_PKG_CONFIG" = x; then
17497 PKG_CONFIG=""
17498 else
17499 case $cross_compiling:$ac_tool_warned in
17500yes:)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017501{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17502$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010017503ac_tool_warned=yes ;;
17504esac
17505 PKG_CONFIG=$ac_ct_PKG_CONFIG
17506 fi
17507else
17508 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17509fi
17510
17511 if test x"$PKG_CONFIG" != x""; then
17512 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17513 if test $? = 0; then
17514 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17515 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17516 found=true
17517 fi
17518 fi
17519
17520 # no such luck; use some default ssldirs
17521 if ! $found; then
17522 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17523 fi
17524
17525
17526fi
17527
17528
17529
17530 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17531 # an 'openssl' subdirectory
17532
17533 if ! $found; then
17534 OPENSSL_INCLUDES=
17535 for ssldir in $ssldirs; do
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17537$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017538 if test -f "$ssldir/include/openssl/ssl.h"; then
17539 OPENSSL_INCLUDES="-I$ssldir/include"
17540 OPENSSL_LDFLAGS="-L$ssldir/lib"
17541 OPENSSL_LIBS="-lssl -lcrypto"
17542 found=true
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17544$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017545 break
17546 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17548$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017549 fi
17550 done
17551
17552 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17553 # it will just work!
17554 fi
17555
17556 # try the preprocessor and linker with our new flags,
17557 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17558
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17560$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017561 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17562 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17563
17564 save_LIBS="$LIBS"
17565 save_LDFLAGS="$LDFLAGS"
17566 save_CPPFLAGS="$CPPFLAGS"
17567 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17568 LIBS="$OPENSSL_LIBS $LIBS"
17569 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17571/* end confdefs.h. */
17572#include <openssl/ssl.h>
17573int
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017574main ()
Christian Heimesff5be6e2018-01-20 13:19:21 +010017575{
17576SSL_new(NULL)
17577 ;
17578 return 0;
17579}
17580_ACEOF
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017581if ac_fn_c_try_link "$LINENO"; then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010017582
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17584$as_echo "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017585 have_openssl=yes
17586
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017587else
Christian Heimesff5be6e2018-01-20 13:19:21 +010017588
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17590$as_echo "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010017591 have_openssl=no
17592
17593fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017594rm -f core conftest.err conftest.$ac_objext \
Christian Heimesff5be6e2018-01-20 13:19:21 +010017595 conftest$ac_exeext conftest.$ac_ext
17596 CPPFLAGS="$save_CPPFLAGS"
17597 LDFLAGS="$save_LDFLAGS"
17598 LIBS="$save_LIBS"
17599
17600
17601
17602
17603
17604
Christian Heimes32eba612021-03-19 10:29:25 +010017605# rpath to libssl and libcrypto
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
17607$as_echo_n "checking for --with-openssl-rpath... " >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017608
17609# Check whether --with-openssl-rpath was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017610if test "${with_openssl_rpath+set}" = set; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017611 withval=$with_openssl_rpath;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017612else
Christian Heimes32eba612021-03-19 10:29:25 +010017613 with_openssl_rpath=no
17614
17615fi
17616
17617case $with_openssl_rpath in #(
17618 auto|yes) :
17619 OPENSSL_RPATH=auto ;; #(
17620 no) :
17621 OPENSSL_RPATH= ;; #(
17622 *) :
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017623 if test -d "$with_openssl_rpath"; then :
Christian Heimes32eba612021-03-19 10:29:25 +010017624 OPENSSL_RPATH="$with_openssl_rpath"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017625else
Christian Heimes32eba612021-03-19 10:29:25 +010017626 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
17627fi
17628
17629 ;;
17630esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
17632$as_echo "$OPENSSL_RPATH" >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010017633
17634
Christian Heimes892d66e2018-01-29 14:10:18 +010017635# ssl module default cipher suite string
17636
17637
17638
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17640$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017641
17642# Check whether --with-ssl-default-suites was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017643if test "${with_ssl_default_suites+set}" = set; then :
Christian Heimes892d66e2018-01-29 14:10:18 +010017644 withval=$with_ssl_default_suites;
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17646$as_echo "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010017647case "$withval" in
17648 python)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017649 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017650
17651 ;;
17652 openssl)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017653 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017654
17655 ;;
17656 *)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017657 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017658
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017659 cat >>confdefs.h <<_ACEOF
17660#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17661_ACEOF
Christian Heimes892d66e2018-01-29 14:10:18 +010017662
17663 ;;
17664esac
17665
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017666else
Christian Heimes892d66e2018-01-29 14:10:18 +010017667
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17669$as_echo "python" >&6; }
17670$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010017671
17672
17673fi
17674
17675
Christian Heimes9b60e552020-05-15 23:54:53 +020017676# builtin hash modules
17677default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17678
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017679$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020017680
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17682$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020017683
17684# Check whether --with-builtin-hashlib-hashes was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017685if test "${with_builtin_hashlib_hashes+set}" = set; then :
Christian Heimes9b60e552020-05-15 23:54:53 +020017686 withval=$with_builtin_hashlib_hashes;
17687case "$withval" in
17688 yes)
17689 withval=$default_hashlib_hashes
17690 ;;
17691 no)
17692 withval=""
17693 ;;
17694esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17696$as_echo "$withval" >&6; }
17697cat >>confdefs.h <<_ACEOF
17698#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17699_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017700
17701
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017702else
Christian Heimes9b60e552020-05-15 23:54:53 +020017703
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17705$as_echo "$default_hashlib_hashes" >&6; };
17706cat >>confdefs.h <<_ACEOF
17707#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17708_ACEOF
Christian Heimes9b60e552020-05-15 23:54:53 +020017709
17710
17711fi
17712
17713
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017714# --with-experimental-isolated-subinterpreters
17715
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17717$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017718
17719# Check whether --with-experimental-isolated-subinterpreters was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017720if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017721 withval=$with_experimental_isolated_subinterpreters;
17722if test "$withval" != no
17723then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17725$as_echo "yes" >&6; };
17726 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017727
17728else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17730$as_echo "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017731fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017732else
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17734$as_echo "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017735fi
17736
17737
Victor Stinner801bb0b2021-02-17 11:14:42 +010017738# --with-static-libpython
17739STATIC_LIBPYTHON=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
17741$as_echo_n "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017742
17743# Check whether --with-static-libpython was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017744if test "${with_static_libpython+set}" = set; then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010017745 withval=$with_static_libpython;
17746if test "$withval" = no
17747then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17749$as_echo "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017750 STATIC_LIBPYTHON=0
17751else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17753$as_echo "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010017754fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017755else
17756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17757$as_echo "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010017758fi
17759
17760LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050017761if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010017762 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
17763 if test "$STATIC_LIBPYTHON" = 1; then
17764 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17765 fi
17766else
17767 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17768fi
17769
17770
17771
pxinwr277ce302020-12-30 20:50:39 +080017772# Check whether to disable test modules. Once set, setup.py will not build
17773# test extension modules and "make install" will not install test suites.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17775$as_echo_n "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017776# Check whether --enable-test-modules was given.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017777if test "${enable_test_modules+set}" = set; then :
pxinwr277ce302020-12-30 20:50:39 +080017778 enableval=$enable_test_modules;
17779fi
17780
17781if test "$enable_test_modules" = no; then
17782 TEST_MODULES=no
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17784$as_echo "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017785else
17786 TEST_MODULES=yes
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17788$as_echo "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080017789fi
17790
17791
Christian Heimes892d66e2018-01-29 14:10:18 +010017792
Guido van Rossum627b2d71993-12-24 10:39:16 +000017793# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017794ac_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 +000017795
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017796ac_config_files="$ac_config_files Modules/ld_so_aix"
17797
Martin v. Löwis11437992002-04-12 09:54:03 +000017798cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017799# This file is a shell script that caches the results of configure
17800# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017801# scripts and configure runs, see configure's option --config-cache.
17802# It is not useful on other systems. If it contains results you don't
17803# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017804#
Martin v. Löwis11437992002-04-12 09:54:03 +000017805# config.status only pays attention to the cache file if you give it
17806# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017807#
Skip Montanaro6dead952003-09-25 14:50:04 +000017808# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017809# loading this file, other *unset* `ac_cv_foo' will be assigned the
17810# following values.
17811
17812_ACEOF
17813
Guido van Rossumf78abae1997-01-21 22:02:36 +000017814# The following way of writing the cache mishandles newlines in values,
17815# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017817# Ultrix sh set writes to stderr and can't be redirected directly,
17818# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819(
17820 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17821 eval ac_val=\$$ac_var
17822 case $ac_val in #(
17823 *${as_nl}*)
17824 case $ac_var in #(
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017825 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17826$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827 esac
17828 case $ac_var in #(
17829 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017830 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17831 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832 esac ;;
17833 esac
17834 done
17835
Martin v. Löwis11437992002-04-12 09:54:03 +000017836 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17838 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017839 # `set' does not quote correctly, so add quotes: double-quote
17840 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017842 "s/'/'\\\\''/g;
17843 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 *)
17846 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017848 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849 esac |
17850 sort
17851) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017854 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855 :clear
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017856 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17859 :end' >>confcache
17860if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17861 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017862 if test "x$cache_file" != "x/dev/null"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017863 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17864$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017865 if test ! -f "$cache_file" || test -h "$cache_file"; then
17866 cat confcache >"$cache_file"
17867 else
17868 case $cache_file in #(
17869 */* | ?:*)
17870 mv -f confcache "$cache_file"$$ &&
17871 mv -f "$cache_file"$$ "$cache_file" ;; #(
17872 *)
17873 mv -f confcache "$cache_file" ;;
17874 esac
17875 fi
17876 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017877 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017878 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17879$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017880 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017881fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017882rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017883
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017884test "x$prefix" = xNONE && prefix=$ac_default_prefix
17885# Let make expand exec_prefix.
17886test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017888DEFS=-DHAVE_CONFIG_H
17889
Skip Montanaro6dead952003-09-25 14:50:04 +000017890ac_libobjs=
17891ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017892U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017893for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17894 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017895 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017896 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17898 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017899 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17900 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017901done
17902LIBOBJS=$ac_libobjs
17903
17904LTLIBOBJS=$ac_ltlibobjs
17905
17906
Martin v. Löwis11437992002-04-12 09:54:03 +000017907
Matthias Kloseb9621712010-04-24 17:59:49 +000017908
Victor Stinnere0be4232011-10-25 13:06:09 +020017909: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017910ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017911ac_clean_files_save=$ac_clean_files
17912ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017913{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17914$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000017915as_write_fail=0
17916cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017917#! $SHELL
17918# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017919# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017920# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017921# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017922
Martin v. Löwis11437992002-04-12 09:54:03 +000017923debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017924ac_cs_recheck=false
17925ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017926
Matthias Kloseb9621712010-04-24 17:59:49 +000017927SHELL=\${CONFIG_SHELL-$SHELL}
17928export SHELL
17929_ASEOF
17930cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17931## -------------------- ##
17932## M4sh Initialization. ##
17933## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935# Be more Bourne compatible
17936DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017937if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017938 emulate sh
17939 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017940 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017941 # is contrary to our usage. Disable this feature.
17942 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017943 setopt NO_GLOB_SUBST
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017944else
Matthias Kloseb9621712010-04-24 17:59:49 +000017945 case `(set -o) 2>/dev/null` in #(
17946 *posix*) :
17947 set -o posix ;; #(
17948 *) :
17949 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017951fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017952
17953
Matthias Kloseb9621712010-04-24 17:59:49 +000017954as_nl='
17955'
17956export as_nl
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017957# Printing a long string crashes Solaris 7 /usr/bin/printf.
17958as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17959as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17960as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17961# Prefer a ksh shell builtin over an external printf program on Solaris,
17962# but without wasting forks for bash or zsh.
17963if test -z "$BASH_VERSION$ZSH_VERSION" \
17964 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17965 as_echo='print -r --'
17966 as_echo_n='print -rn --'
17967elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17968 as_echo='printf %s\n'
17969 as_echo_n='printf %s'
17970else
17971 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17972 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17973 as_echo_n='/usr/ucb/echo -n'
17974 else
17975 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17976 as_echo_n_body='eval
17977 arg=$1;
17978 case $arg in #(
17979 *"$as_nl"*)
17980 expr "X$arg" : "X\\(.*\\)$as_nl";
17981 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17982 esac;
17983 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17984 '
17985 export as_echo_n_body
17986 as_echo_n='sh -c $as_echo_n_body as_echo'
17987 fi
17988 export as_echo_body
17989 as_echo='sh -c $as_echo_body as_echo'
17990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017991
17992# The user is always right.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010017993if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017994 PATH_SEPARATOR=:
17995 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17996 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17997 PATH_SEPARATOR=';'
17998 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018002# IFS
18003# We need space, tab and new line, in precisely that order. Quoting is
18004# there to prevent editors from complaining about space-tab.
18005# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18006# splitting by setting IFS to empty value.)
18007IFS=" "" $as_nl"
18008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018010as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018011case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012 *[\\/]* ) as_myself=$0 ;;
18013 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018014for as_dir in $PATH
18015do
18016 IFS=$as_save_IFS
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018017 test -z "$as_dir" && as_dir=.
18018 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000018019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 ;;
18023esac
18024# We did not find ourselves, most probably we were run as `sh COMMAND'
18025# in which case we are not to be found in the path.
18026if test "x$as_myself" = x; then
18027 as_myself=$0
18028fi
18029if test ! -f "$as_myself"; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018030 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018031 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032fi
18033
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018034# Unset variables that we do not need and which cause bugs (e.g. in
18035# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18036# suppresses any "Segmentation fault" message there. '((' could
18037# trigger a bug in pdksh 5.2.14.
18038for as_var in BASH_ENV ENV MAIL MAILPATH
18039do eval test x\${$as_var+set} = xset \
18040 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18041done
18042PS1='$ '
18043PS2='> '
18044PS4='+ '
18045
18046# NLS nuisances.
18047LC_ALL=C
18048export LC_ALL
18049LANGUAGE=C
18050export LANGUAGE
18051
18052# CDPATH.
18053(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Matthias Kloseb9621712010-04-24 17:59:49 +000018054
18055
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018056# as_fn_error STATUS ERROR [LINENO LOG_FD]
18057# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018058# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18059# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018060# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018061as_fn_error ()
18062{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018063 as_status=$1; test $as_status -eq 0 && as_status=1
18064 if test "$4"; then
18065 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018066 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018067 fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018068 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018069 as_fn_exit $as_status
18070} # as_fn_error
18071
18072
18073# as_fn_set_status STATUS
18074# -----------------------
18075# Set $? to STATUS, without forking.
18076as_fn_set_status ()
18077{
18078 return $1
18079} # as_fn_set_status
18080
18081# as_fn_exit STATUS
18082# -----------------
18083# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18084as_fn_exit ()
18085{
18086 set +e
18087 as_fn_set_status $1
18088 exit $1
18089} # as_fn_exit
18090
18091# as_fn_unset VAR
18092# ---------------
18093# Portably unset VAR.
18094as_fn_unset ()
18095{
18096 { eval $1=; unset $1;}
18097}
18098as_unset=as_fn_unset
18099# as_fn_append VAR VALUE
18100# ----------------------
18101# Append the text in VALUE to the end of the definition contained in VAR. Take
18102# advantage of any shell optimizations that allow amortized linear growth over
18103# repeated appends, instead of the typical quadratic growth present in naive
18104# implementations.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018105if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018106 eval 'as_fn_append ()
18107 {
18108 eval $1+=\$2
18109 }'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018110else
Matthias Kloseb9621712010-04-24 17:59:49 +000018111 as_fn_append ()
18112 {
18113 eval $1=\$$1\$2
18114 }
18115fi # as_fn_append
18116
18117# as_fn_arith ARG...
18118# ------------------
18119# Perform arithmetic evaluation on the ARGs, and store the result in the
18120# global $as_val. Take advantage of shells that can avoid forks. The arguments
18121# must be portable across $(()) and expr.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018122if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000018123 eval 'as_fn_arith ()
18124 {
18125 as_val=$(( $* ))
18126 }'
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018127else
Matthias Kloseb9621712010-04-24 17:59:49 +000018128 as_fn_arith ()
18129 {
18130 as_val=`expr "$@" || test $? -eq 1`
18131 }
18132fi # as_fn_arith
18133
18134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135if expr a : '\(a\)' >/dev/null 2>&1 &&
18136 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18137 as_expr=expr
18138else
18139 as_expr=false
18140fi
18141
18142if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18143 as_basename=basename
18144else
18145 as_basename=false
18146fi
18147
Matthias Kloseb9621712010-04-24 17:59:49 +000018148if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18149 as_dirname=dirname
18150else
18151 as_dirname=false
18152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154as_me=`$as_basename -- "$0" ||
18155$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18156 X"$0" : 'X\(//\)$' \| \
18157 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018158$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159 sed '/^.*\/\([^/][^/]*\)\/*$/{
18160 s//\1/
18161 q
18162 }
18163 /^X\/\(\/\/\)$/{
18164 s//\1/
18165 q
18166 }
18167 /^X\/\(\/\).*/{
18168 s//\1/
18169 q
18170 }
18171 s/.*/./; q'`
18172
Matthias Kloseb9621712010-04-24 17:59:49 +000018173# Avoid depending upon Character Ranges.
18174as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18175as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18176as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18177as_cr_digits='0123456789'
18178as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179
18180ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018181case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018183 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018185 xy) ECHO_C='\c';;
18186 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18187 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188 esac;;
18189*)
18190 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018192
Martin v. Löwis11437992002-04-12 09:54:03 +000018193rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194if test -d conf$$.dir; then
18195 rm -f conf$$.dir/conf$$.file
18196else
18197 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018198 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018200if (echo >conf$$.file) 2>/dev/null; then
18201 if ln -s conf$$.file conf$$ 2>/dev/null; then
18202 as_ln_s='ln -s'
18203 # ... but there are two gotchas:
18204 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18205 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018206 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018207 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018208 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018209 elif ln conf$$.file conf$$ 2>/dev/null; then
18210 as_ln_s=ln
18211 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018212 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018213 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018214else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018215 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18218rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018219
Matthias Kloseb9621712010-04-24 17:59:49 +000018220
18221# as_fn_mkdir_p
18222# -------------
18223# Create "$as_dir" as a directory, including parents if necessary.
18224as_fn_mkdir_p ()
18225{
18226
18227 case $as_dir in #(
18228 -*) as_dir=./$as_dir;;
18229 esac
18230 test -d "$as_dir" || eval $as_mkdir_p || {
18231 as_dirs=
18232 while :; do
18233 case $as_dir in #(
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018234 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000018235 *) as_qdir=$as_dir;;
18236 esac
18237 as_dirs="'$as_qdir' $as_dirs"
18238 as_dir=`$as_dirname -- "$as_dir" ||
18239$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18240 X"$as_dir" : 'X\(//\)[^/]' \| \
18241 X"$as_dir" : 'X\(//\)$' \| \
18242 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018243$as_echo X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018244 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18245 s//\1/
18246 q
18247 }
18248 /^X\(\/\/\)[^/].*/{
18249 s//\1/
18250 q
18251 }
18252 /^X\(\/\/\)$/{
18253 s//\1/
18254 q
18255 }
18256 /^X\(\/\).*/{
18257 s//\1/
18258 q
18259 }
18260 s/.*/./; q'`
18261 test -d "$as_dir" && break
18262 done
18263 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018264 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018265
18266
18267} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018268if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018269 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018270else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018271 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018272 as_mkdir_p=false
18273fi
18274
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018275
18276# as_fn_executable_p FILE
18277# -----------------------
18278# Test if FILE is an executable regular file.
18279as_fn_executable_p ()
18280{
18281 test -f "$1" && test -x "$1"
18282} # as_fn_executable_p
18283as_test_x='test -x'
18284as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018285
18286# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018287as_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 +000018288
18289# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018290as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018291
18292
Martin v. Löwis11437992002-04-12 09:54:03 +000018293exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018294## ----------------------------------- ##
18295## Main body of $CONFIG_STATUS script. ##
18296## ----------------------------------- ##
18297_ASEOF
18298test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018299
Matthias Kloseb9621712010-04-24 17:59:49 +000018300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18301# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018302# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303# values after options handling.
18304ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018305This file was extended by python $as_me 3.10, which was
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018306generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018307
18308 CONFIG_FILES = $CONFIG_FILES
18309 CONFIG_HEADERS = $CONFIG_HEADERS
18310 CONFIG_LINKS = $CONFIG_LINKS
18311 CONFIG_COMMANDS = $CONFIG_COMMANDS
18312 $ $0 $@
18313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018314on `(hostname || uname -n) 2>/dev/null | sed 1q`
18315"
18316
Martin v. Löwis11437992002-04-12 09:54:03 +000018317_ACEOF
18318
Matthias Kloseb9621712010-04-24 17:59:49 +000018319case $ac_config_files in *"
18320"*) set x $ac_config_files; shift; ac_config_files=$*;;
18321esac
18322
18323case $ac_config_headers in *"
18324"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18325esac
18326
18327
18328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018329# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018330config_files="$ac_config_files"
18331config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018334
Matthias Kloseb9621712010-04-24 17:59:49 +000018335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018336ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018337\`$as_me' instantiates files and other configuration actions
18338from templates according to the current configuration. Unless the files
18339and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018340
Matthias Kloseb9621712010-04-24 17:59:49 +000018341Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018342
18343 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018344 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018345 --config print configuration, then exit
18346 -q, --quiet, --silent
18347 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 -d, --debug don't remove temporary files
18349 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018350 --file=FILE[:TEMPLATE]
18351 instantiate the configuration file FILE
18352 --header=FILE[:TEMPLATE]
18353 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018354
18355Configuration files:
18356$config_files
18357
18358Configuration headers:
18359$config_headers
18360
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018361Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018364cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018365ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018366ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018367python config.status 3.10
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018368configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018369 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018370
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018371Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018372This config.status script is free software; the Free Software Foundation
18373gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018374
18375ac_pwd='$ac_pwd'
18376srcdir='$srcdir'
18377INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018378MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018379test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018380_ACEOF
18381
Matthias Kloseb9621712010-04-24 17:59:49 +000018382cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18383# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018384ac_need_defaults=:
18385while test $# != 0
18386do
18387 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018388 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18390 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018391 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018393 --*=)
18394 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18395 ac_optarg=
18396 ac_shift=:
18397 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018399 ac_option=$1
18400 ac_optarg=$2
18401 ac_shift=shift
18402 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018403 esac
18404
Skip Montanaro6dead952003-09-25 14:50:04 +000018405 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018406 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018407 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18408 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018410 $as_echo "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018411 --config | --confi | --conf | --con | --co | --c )
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018412 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018414 debug=: ;;
18415 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018416 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018417 case $ac_optarg in
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018418 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018419 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018420 esac
18421 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018422 ac_need_defaults=false;;
18423 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018424 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018425 case $ac_optarg in
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018426 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018427 esac
18428 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430 --he | --h)
18431 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018432 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018433Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434 --help | --hel | -h )
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018435 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018436 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18437 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18438 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018439
18440 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018441 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018442Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018443
Matthias Kloseb9621712010-04-24 17:59:49 +000018444 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018446
18447 esac
18448 shift
18449done
18450
Skip Montanaro6dead952003-09-25 14:50:04 +000018451ac_configure_extra_args=
18452
18453if $ac_cs_silent; then
18454 exec 6>/dev/null
18455 ac_configure_extra_args="$ac_configure_extra_args --silent"
18456fi
18457
18458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018459cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018460if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018461 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018462 shift
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018463 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000018464 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018466 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018467fi
18468
Martin v. Löwis11437992002-04-12 09:54:03 +000018469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471exec 5>>config.log
18472{
18473 echo
18474 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18475## Running $as_me. ##
18476_ASBOX
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018477 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018483
Matthias Kloseb9621712010-04-24 17:59:49 +000018484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485
18486# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018487for ac_config_target in $ac_config_targets
18488do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489 case $ac_config_target in
18490 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18491 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18492 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018493 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18494 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018496 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018497 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018498 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018499 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500
Victor Stinnere0be4232011-10-25 13:06:09 +020018501 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018502 esac
18503done
18504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505
Martin v. Löwis11437992002-04-12 09:54:03 +000018506# If the user did not use the arguments to specify the items to instantiate,
18507# then the envvar interface is used. Set only those that are not.
18508# We use the long form for the default assignment because of an extremely
18509# bizarre bug on SunOS 4.1.3.
18510if $ac_need_defaults; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018511 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18512 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000018513fi
18514
Skip Montanaro6dead952003-09-25 14:50:04 +000018515# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018517# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518# Hook for its removal unless debugging.
18519# Note that there is a small window in which the directory will not be cleaned:
18520# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018521$debug ||
18522{
Victor Stinnere0be4232011-10-25 13:06:09 +020018523 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018525 : "${ac_tmp:=$tmp}"
18526 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018528 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018529}
Martin v. Löwis11437992002-04-12 09:54:03 +000018530# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018531
Martin v. Löwis11437992002-04-12 09:54:03 +000018532{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018534 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018535} ||
18536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537 tmp=./conf$$-$RANDOM
18538 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018539} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018540ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018541
Matthias Kloseb9621712010-04-24 17:59:49 +000018542# Set up the scripts for CONFIG_FILES section.
18543# No need to generate them if there are no CONFIG_FILES.
18544# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018545if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018546
Matthias Kloseb9621712010-04-24 17:59:49 +000018547
18548ac_cr=`echo X | tr X '\015'`
18549# On cygwin, bash can eat \r inside `` if the user requested igncr.
18550# But we know of no other shell where ac_cr would be empty at this
18551# point, so we can use a bashism as a fallback.
18552if test "x$ac_cr" = x; then
18553 eval ac_cr=\$\'\\r\'
18554fi
18555ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18556if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018557 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018558else
18559 ac_cs_awk_cr=$ac_cr
18560fi
18561
Victor Stinnere0be4232011-10-25 13:06:09 +020018562echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018563_ACEOF
18564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565
Matthias Kloseb9621712010-04-24 17:59:49 +000018566{
18567 echo "cat >conf$$subs.awk <<_ACEOF" &&
18568 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18569 echo "_ACEOF"
18570} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018571 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18572ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018573ac_delim='%!_!# '
18574for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018575 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018576 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018577
Matthias Kloseb9621712010-04-24 17:59:49 +000018578 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18579 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580 break
18581 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018582 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018583 else
18584 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018585 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018586done
Matthias Kloseb9621712010-04-24 17:59:49 +000018587rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018588
Matthias Kloseb9621712010-04-24 17:59:49 +000018589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018590cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018592sed -n '
18593h
18594s/^/S["/; s/!.*/"]=/
18595p
18596g
18597s/^[^!]*!//
18598:repl
18599t repl
18600s/'"$ac_delim"'$//
18601t delim
18602:nl
18603h
18604s/\(.\{148\}\)..*/\1/
18605t more1
18606s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18607p
18608n
18609b repl
18610:more1
18611s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18612p
18613g
18614s/.\{148\}//
18615t nl
18616:delim
18617h
18618s/\(.\{148\}\)..*/\1/
18619t more2
18620s/["\\]/\\&/g; s/^/"/; s/$/"/
18621p
18622b
18623:more2
18624s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18625p
18626g
18627s/.\{148\}//
18628t delim
18629' <conf$$subs.awk | sed '
18630/^[^""]/{
18631 N
18632 s/\n//
18633}
18634' >>$CONFIG_STATUS || ac_write_fail=1
18635rm -f conf$$subs.awk
18636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18637_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018638cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018639 for (key in S) S_is_set[key] = 1
18640 FS = ""
18641
18642}
18643{
18644 line = $ 0
18645 nfields = split(line, field, "@")
18646 substed = 0
18647 len = length(field[1])
18648 for (i = 2; i < nfields; i++) {
18649 key = field[i]
18650 keylen = length(key)
18651 if (S_is_set[key]) {
18652 value = S[key]
18653 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18654 len += length(value) + length(field[++i])
18655 substed = 1
18656 } else
18657 len += 1 + keylen
18658 }
18659
18660 print line
18661}
18662
18663_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18666if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18667 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18668else
18669 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018670fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018671 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018672_ACEOF
18673
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018674# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18675# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018676# trailing colons and then remove the whole line if VPATH becomes empty
18677# (actually we leave an empty line to preserve line numbers).
18678if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018679 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18680h
18681s///
18682s/^/:/
18683s/[ ]*$/:/
18684s/:\$(srcdir):/:/g
18685s/:\${srcdir}:/:/g
18686s/:@srcdir@:/:/g
18687s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018688s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018689x
18690s/\(=[ ]*\).*/\1/
18691G
18692s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018693s/^[^=]*=[ ]*$//
18694}'
18695fi
18696
Matthias Kloseb9621712010-04-24 17:59:49 +000018697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018698fi # test -n "$CONFIG_FILES"
18699
Matthias Kloseb9621712010-04-24 17:59:49 +000018700# Set up the scripts for CONFIG_HEADERS section.
18701# No need to generate them if there are no CONFIG_HEADERS.
18702# This happens for instance with `./config.status Makefile'.
18703if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018704cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018705BEGIN {
18706_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018707
Matthias Kloseb9621712010-04-24 17:59:49 +000018708# Transform confdefs.h into an awk script `defines.awk', embedded as
18709# here-document in config.status, that substitutes the proper values into
18710# config.h.in to produce config.h.
18711
18712# Create a delimiter string that does not exist in confdefs.h, to ease
18713# handling of long lines.
18714ac_delim='%!_!# '
18715for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018716 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18717 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018718 break
18719 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018720 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018721 else
18722 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18723 fi
18724done
18725
18726# For the awk script, D is an array of macro values keyed by name,
18727# likewise P contains macro parameters if any. Preserve backslash
18728# newline sequences.
18729
18730ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18731sed -n '
18732s/.\{148\}/&'"$ac_delim"'/g
18733t rset
18734:rset
18735s/^[ ]*#[ ]*define[ ][ ]*/ /
18736t def
18737d
18738:def
18739s/\\$//
18740t bsnl
18741s/["\\]/\\&/g
18742s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18743D["\1"]=" \3"/p
18744s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18745d
18746:bsnl
18747s/["\\]/\\&/g
18748s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18749D["\1"]=" \3\\\\\\n"\\/p
18750t cont
18751s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18752t cont
18753d
18754:cont
18755n
18756s/.\{148\}/&'"$ac_delim"'/g
18757t clear
18758:clear
18759s/\\$//
18760t bsnlc
18761s/["\\]/\\&/g; s/^/"/; s/$/"/p
18762d
18763:bsnlc
18764s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18765b cont
18766' <confdefs.h | sed '
18767s/'"$ac_delim"'/"\\\
18768"/g' >>$CONFIG_STATUS || ac_write_fail=1
18769
18770cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18771 for (key in D) D_is_set[key] = 1
18772 FS = ""
18773}
18774/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18775 line = \$ 0
18776 split(line, arg, " ")
18777 if (arg[1] == "#") {
18778 defundef = arg[2]
18779 mac1 = arg[3]
18780 } else {
18781 defundef = substr(arg[1], 2)
18782 mac1 = arg[2]
18783 }
18784 split(mac1, mac2, "(") #)
18785 macro = mac2[1]
18786 prefix = substr(line, 1, index(line, defundef) - 1)
18787 if (D_is_set[macro]) {
18788 # Preserve the white space surrounding the "#".
18789 print prefix "define", macro P[macro] D[macro]
18790 next
18791 } else {
18792 # Replace #undef with comments. This is necessary, for example,
18793 # in the case of _POSIX_SOURCE, which is predefined and required
18794 # on some systems where configure will not decide to define it.
18795 if (defundef == "undef") {
18796 print "/*", prefix defundef, macro, "*/"
18797 next
18798 }
18799 }
18800}
18801{ print }
18802_ACAWK
18803_ACEOF
18804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018805 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018806fi # test -n "$CONFIG_HEADERS"
18807
18808
18809eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18810shift
18811for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018812do
18813 case $ac_tag in
18814 :[FHLC]) ac_mode=$ac_tag; continue;;
18815 esac
18816 case $ac_mode$ac_tag in
18817 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018818 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018819 :[FH]-) ac_tag=-:-;;
18820 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18821 esac
18822 ac_save_IFS=$IFS
18823 IFS=:
18824 set x $ac_tag
18825 IFS=$ac_save_IFS
18826 shift
18827 ac_file=$1
18828 shift
18829
18830 case $ac_mode in
18831 :L) ac_source=$1;;
18832 :[FH])
18833 ac_file_inputs=
18834 for ac_f
18835 do
18836 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018837 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018838 *) # Look for the file first in the build tree, then in the source tree
18839 # (if the path is not absolute). The absolute path cannot be DOS-style,
18840 # because $ac_f cannot contain `:'.
18841 test -f "$ac_f" ||
18842 case $ac_f in
18843 [\\/$]*) false;;
18844 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18845 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018846 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018847 esac
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018848 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018849 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018850 done
18851
18852 # Let's still pretend it is `configure' which instantiates (i.e., don't
18853 # use $as_me), people would be surprised to read:
18854 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018855 configure_input='Generated from '`
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018856 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000018857 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018858 if test x"$ac_file" != x-; then
18859 configure_input="$ac_file. $configure_input"
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018860 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18861$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018862 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018863 # Neutralize special characters interpreted by sed in replacement strings.
18864 case $configure_input in #(
18865 *\&* | *\|* | *\\* )
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018866 ac_sed_conf_input=`$as_echo "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000018867 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18868 *) ac_sed_conf_input=$configure_input;;
18869 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018870
18871 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018872 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18873 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018874 esac
18875 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018876 esac
18877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018878 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018879$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018880 X"$ac_file" : 'X\(//\)[^/]' \| \
18881 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018882 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018883$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018884 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18885 s//\1/
18886 q
18887 }
18888 /^X\(\/\/\)[^/].*/{
18889 s//\1/
18890 q
18891 }
18892 /^X\(\/\/\)$/{
18893 s//\1/
18894 q
18895 }
18896 /^X\(\/\).*/{
18897 s//\1/
18898 q
18899 }
18900 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018901 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018902 ac_builddir=.
18903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018904case "$ac_dir" in
18905.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18906*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018907 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018908 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018909 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910 case $ac_top_builddir_sub in
18911 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18912 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18913 esac ;;
18914esac
18915ac_abs_top_builddir=$ac_pwd
18916ac_abs_builddir=$ac_pwd$ac_dir_suffix
18917# for backward compatibility:
18918ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018919
18920case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018921 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018922 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018923 ac_top_srcdir=$ac_top_builddir_sub
18924 ac_abs_top_srcdir=$ac_pwd ;;
18925 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018926 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018927 ac_top_srcdir=$srcdir
18928 ac_abs_top_srcdir=$srcdir ;;
18929 *) # Relative name.
18930 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18931 ac_top_srcdir=$ac_top_build_prefix$srcdir
18932 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018933esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018934ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018935
Martin v. Löwis11437992002-04-12 09:54:03 +000018936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937 case $ac_mode in
18938 :F)
18939 #
18940 # CONFIG_FILE
18941 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018942
18943 case $INSTALL in
18944 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018945 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018947 ac_MKDIR_P=$MKDIR_P
18948 case $MKDIR_P in
18949 [\\/$]* | ?:[\\/]* ) ;;
18950 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18951 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018952_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018953
Matthias Kloseb9621712010-04-24 17:59:49 +000018954cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018955# If the template does not know about datarootdir, expand it.
18956# FIXME: This hack should be removed a few years after 2.60.
18957ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018958ac_sed_dataroot='
18959/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960 p
18961 q
18962}
18963/@datadir@/p
18964/@docdir@/p
18965/@infodir@/p
18966/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018967/@mandir@/p'
18968case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018969*datarootdir*) ac_datarootdir_seen=yes;;
18970*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010018971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18972$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018975 ac_datarootdir_hack='
18976 s&@datadir@&$datadir&g
18977 s&@docdir@&$docdir&g
18978 s&@infodir@&$infodir&g
18979 s&@localedir@&$localedir&g
18980 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018981 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018982esac
18983_ACEOF
18984
18985# Neutralize VPATH when `$srcdir' = `.'.
18986# Shell code in configure.ac might set extrasub.
18987# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018988cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18989ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018990$extrasub
18991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018993:t
18994/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018995s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018996s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018997s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018998s&@srcdir@&$ac_srcdir&;t t
18999s&@abs_srcdir@&$ac_abs_srcdir&;t t
19000s&@top_srcdir@&$ac_top_srcdir&;t t
19001s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19002s&@builddir@&$ac_builddir&;t t
19003s&@abs_builddir@&$ac_abs_builddir&;t t
19004s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19005s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019006s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019007$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019008"
Victor Stinnere0be4232011-10-25 13:06:09 +020019009eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19010 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019012test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019013 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19014 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19015 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010019016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019017which seems to be undefined. Please make sure it is defined" >&5
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010019018$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019019which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019020
Victor Stinnere0be4232011-10-25 13:06:09 +020019021 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019023 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19024 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019025 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019026 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027 ;;
19028 :H)
19029 #
19030 # CONFIG_HEADER
19031 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019032 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019033 {
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010019034 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019035 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19036 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019037 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019038 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010019039 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19040$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019042 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019043 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019044 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 fi
19046 else
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010019047 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019048 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019049 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019050 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019051 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019053
19054 esac
19055
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019056
19057 case $ac_file$ac_mode in
19058 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19059
19060 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019061done # for ac_tag
19062
Guido van Rossum627b2d71993-12-24 10:39:16 +000019063
Matthias Kloseb9621712010-04-24 17:59:49 +000019064as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019065_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019066ac_clean_files=$ac_clean_files_save
19067
Matthias Kloseb9621712010-04-24 17:59:49 +000019068test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019069 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019070
Martin v. Löwis11437992002-04-12 09:54:03 +000019071
19072# configure is writing to config.log, and then calls config.status.
19073# config.status does its own redirection, appending to config.log.
19074# Unfortunately, on DOS this fails, as config.log is still kept open
19075# by configure, so config.status won't be able to write to it; its
19076# output is simply discarded. So we exec the FD to /dev/null,
19077# effectively closing config.log, so it can be properly (re)opened and
19078# appended to by config.status. When coming back to configure, we
19079# need to make the FD available again.
19080if test "$no_create" != yes; then
19081 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019082 ac_config_status_args=
19083 test "$silent" = yes &&
19084 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019085 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019086 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019087 exec 5>>config.log
19088 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19089 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019090 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019091fi
19092if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010019093 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19094$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019095fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019096
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019097
Christian Heimes75ed8902013-11-20 01:11:18 +010019098echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019099if test ! -f Modules/Setup.local
19100then
19101 echo "# Edit this file for local setup changes" >Modules/Setup.local
19102fi
19103
Christian Heimes75ed8902013-11-20 01:11:18 +010019104echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019105$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019106 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019107 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019108mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019109
19110if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19111 echo "" >&6
19112 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019113 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 +000019114 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019115 echo "" >&6
19116 echo "" >&6
19117fi