blob: 5559e6fb007419078885fd1844a63679d56c8f79 [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 Galindoba421752021-05-03 20:33:17 +01003# Generated by GNU Autoconf 2.71 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 Galindoba421752021-05-03 20:33:17 +01008# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindoba421752021-05-03 20:33:17 +010020as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Pablo Galindoba421752021-05-03 20:33:17 +010029else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Pablo Galindoba421752021-05-03 20:33:17 +010039
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
Matthias Kloseb9621712010-04-24 17:59:49 +000047as_nl='
48'
49export as_nl
Pablo Galindoba421752021-05-03 20:33:17 +010050IFS=" "" $as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
Pablo Galindoba421752021-05-03 20:33:17 +010078if ${PATH_SEPARATOR+false} :; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000087# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020088as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000089case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000090 *[\\/]* ) as_myself=$0 ;;
91 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000092for as_dir in $PATH
93do
94 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010095 case $as_dir in #(((
96 '') as_dir=./ ;;
97 */) ;;
98 *) as_dir=$as_dir/ ;;
99 esac
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 Galindoba421752021-05-03 20:33:17 +0100112 printf "%s\n" "$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
Matthias Kloseb9621712010-04-24 17:59:49 +0000116
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000117# Use a proper internal environment variable to ensure we don't fall
118 # into an infinite loop, continuously re-executing ourselves.
119 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120 _as_can_reexec=no; export _as_can_reexec;
121 # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129 *v*x* | *x*v* ) as_opts=-vx ;;
130 *v* ) as_opts=-v ;;
131 *x* ) as_opts=-x ;;
132 * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
Pablo Galindoba421752021-05-03 20:33:17 +0100137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000139 fi
140 # We don't want this to propagate to other subprocesses.
141 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000142if test "x$CONFIG_SHELL" = x; then
Pablo Galindoba421752021-05-03 20:33:17 +0100143 as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000146 emulate sh
147 NULLCMD=:
148 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149 # is contrary to our usage. Disable this feature.
150 alias -g '\${1+\"\$@\"}'='\"\$@\"'
151 setopt NO_GLOB_SUBST
Pablo Galindoba421752021-05-03 20:33:17 +0100152else \$as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000153 case \`(set -o) 2>/dev/null\` in #(
154 *posix*) :
155 set -o posix ;; #(
156 *) :
157 ;;
158esac
159fi
160"
161 as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Pablo Galindoba421752021-05-03 20:33:17 +0100172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000174
Pablo Galindoba421752021-05-03 20:33:17 +0100175else \$as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000176 exitcode=1; echo positional parameters were not saved.
177fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000178test x\$exitcode = x0 || exit 1
Pablo Galindoba421752021-05-03 20:33:17 +0100179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000181test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000182 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186test \$(( 1 + 1 )) = 2 || exit 1"
Pablo Galindoba421752021-05-03 20:33:17 +0100187 if (eval "$as_required") 2>/dev/null
188then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000189 as_have_required=yes
Pablo Galindoba421752021-05-03 20:33:17 +0100190else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000191 as_have_required=no
192fi
Pablo Galindoba421752021-05-03 20:33:17 +0100193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000195
Pablo Galindoba421752021-05-03 20:33:17 +0100196else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198as_found=false
199for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200do
201 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +0100202 case $as_dir in #(((
203 '') as_dir=./ ;;
204 */) ;;
205 *) as_dir=$as_dir/ ;;
206 esac
Matthias Kloseb9621712010-04-24 17:59:49 +0000207 as_found=:
208 case $as_dir in #(
209 /*)
210 for as_base in sh bash ksh sh5; do
211 # Try only shells that exist, to save several forks.
Pablo Galindoba421752021-05-03 20:33:17 +0100212 as_shell=$as_dir$as_base
Matthias Kloseb9621712010-04-24 17:59:49 +0000213 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Pablo Galindoba421752021-05-03 20:33:17 +0100214 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000216 CONFIG_SHELL=$as_shell as_have_required=yes
Pablo Galindoba421752021-05-03 20:33:17 +0100217 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000219 break 2
220fi
221fi
222 done;;
223 esac
224 as_found=false
225done
Christian Heimes39258d32021-04-17 11:36:35 +0200226IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +0100227if $as_found
228then :
229
230else $as_nop
231 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
235fi
236fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000237
238
Pablo Galindoba421752021-05-03 20:33:17 +0100239 if test "x$CONFIG_SHELL" != x
240then :
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 Galindoba421752021-05-03 20:33:17 +0100258printf "%s\n" "$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 Galindoba421752021-05-03 20:33:17 +0100262 if test x$as_have_required = xno
263then :
264 printf "%s\n" "$0: This script requires a shell more modern than all"
265 printf "%s\n" "$0: the shells that I found on your system."
266 if test ${ZSH_VERSION+y} ; then
267 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Matthias Kloseb9621712010-04-24 17:59:49 +0000269 else
Pablo Galindoba421752021-05-03 20:33:17 +0100270 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
Pablo Galindoba421752021-05-03 20:33:17 +0100298
Matthias Kloseb9621712010-04-24 17:59:49 +0000299# as_fn_set_status STATUS
300# -----------------------
301# Set $? to STATUS, without forking.
302as_fn_set_status ()
303{
304 return $1
305} # as_fn_set_status
306
307# as_fn_exit STATUS
308# -----------------
309# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310as_fn_exit ()
311{
312 set +e
313 as_fn_set_status $1
314 exit $1
315} # as_fn_exit
Pablo Galindoba421752021-05-03 20:33:17 +0100316# as_fn_nop
317# ---------
318# Do nothing but, unlike ":", preserve the value of $?.
319as_fn_nop ()
320{
321 return $?
322}
323as_nop=as_fn_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
325# as_fn_mkdir_p
326# -------------
327# Create "$as_dir" as a directory, including parents if necessary.
328as_fn_mkdir_p ()
329{
330
331 case $as_dir in #(
332 -*) as_dir=./$as_dir;;
333 esac
334 test -d "$as_dir" || eval $as_mkdir_p || {
335 as_dirs=
336 while :; do
337 case $as_dir in #(
Pablo Galindoba421752021-05-03 20:33:17 +0100338 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +0000339 *) as_qdir=$as_dir;;
340 esac
341 as_dirs="'$as_qdir' $as_dirs"
342 as_dir=`$as_dirname -- "$as_dir" ||
343$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
344 X"$as_dir" : 'X\(//\)[^/]' \| \
345 X"$as_dir" : 'X\(//\)$' \| \
346 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindoba421752021-05-03 20:33:17 +0100347printf "%s\n" X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +0000348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
349 s//\1/
350 q
351 }
352 /^X\(\/\/\)[^/].*/{
353 s//\1/
354 q
355 }
356 /^X\(\/\/\)$/{
357 s//\1/
358 q
359 }
360 /^X\(\/\).*/{
361 s//\1/
362 q
363 }
364 s/.*/./; q'`
365 test -d "$as_dir" && break
366 done
367 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200368 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000369
370
371} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000372
373# as_fn_executable_p FILE
374# -----------------------
375# Test if FILE is an executable regular file.
376as_fn_executable_p ()
377{
378 test -f "$1" && test -x "$1"
379} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000380# as_fn_append VAR VALUE
381# ----------------------
382# Append the text in VALUE to the end of the definition contained in VAR. Take
383# advantage of any shell optimizations that allow amortized linear growth over
384# repeated appends, instead of the typical quadratic growth present in naive
385# implementations.
Pablo Galindoba421752021-05-03 20:33:17 +0100386if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
387then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000388 eval 'as_fn_append ()
389 {
390 eval $1+=\$2
391 }'
Pablo Galindoba421752021-05-03 20:33:17 +0100392else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000393 as_fn_append ()
394 {
395 eval $1=\$$1\$2
396 }
397fi # as_fn_append
398
399# as_fn_arith ARG...
400# ------------------
401# Perform arithmetic evaluation on the ARGs, and store the result in the
402# global $as_val. Take advantage of shells that can avoid forks. The arguments
403# must be portable across $(()) and expr.
Pablo Galindoba421752021-05-03 20:33:17 +0100404if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
405then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000406 eval 'as_fn_arith ()
407 {
408 as_val=$(( $* ))
409 }'
Pablo Galindoba421752021-05-03 20:33:17 +0100410else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000411 as_fn_arith ()
412 {
413 as_val=`expr "$@" || test $? -eq 1`
414 }
415fi # as_fn_arith
416
Pablo Galindoba421752021-05-03 20:33:17 +0100417# as_fn_nop
418# ---------
419# Do nothing but, unlike ":", preserve the value of $?.
420as_fn_nop ()
421{
422 return $?
423}
424as_nop=as_fn_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000425
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200426# as_fn_error STATUS ERROR [LINENO LOG_FD]
427# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000428# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
429# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200430# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000431as_fn_error ()
432{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200433 as_status=$1; test $as_status -eq 0 && as_status=1
434 if test "$4"; then
435 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +0100436 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000437 fi
Pablo Galindoba421752021-05-03 20:33:17 +0100438 printf "%s\n" "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000439 as_fn_exit $as_status
440} # as_fn_error
441
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442if expr a : '\(a\)' >/dev/null 2>&1 &&
443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
444 as_expr=expr
445else
446 as_expr=false
447fi
448
449if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
450 as_basename=basename
451else
452 as_basename=false
453fi
454
Matthias Kloseb9621712010-04-24 17:59:49 +0000455if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
456 as_dirname=dirname
457else
458 as_dirname=false
459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000461as_me=`$as_basename -- "$0" ||
462$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
463 X"$0" : 'X\(//\)$' \| \
464 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindoba421752021-05-03 20:33:17 +0100465printf "%s\n" X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466 sed '/^.*\/\([^/][^/]*\)\/*$/{
467 s//\1/
468 q
469 }
470 /^X\/\(\/\/\)$/{
471 s//\1/
472 q
473 }
474 /^X\/\(\/\).*/{
475 s//\1/
476 q
477 }
478 s/.*/./; q'`
479
Matthias Kloseb9621712010-04-24 17:59:49 +0000480# Avoid depending upon Character Ranges.
481as_cr_letters='abcdefghijklmnopqrstuvwxyz'
482as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
483as_cr_Letters=$as_cr_letters$as_cr_LETTERS
484as_cr_digits='0123456789'
485as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486
487
Matthias Kloseb9621712010-04-24 17:59:49 +0000488 as_lineno_1=$LINENO as_lineno_1a=$LINENO
489 as_lineno_2=$LINENO as_lineno_2a=$LINENO
490 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
491 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
492 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493 sed -n '
494 p
495 /[$]LINENO/=
496 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000498 s/[$]LINENO.*/&-/
499 t lineno
500 b
501 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503 :loop
504 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000505 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000506 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000508 chmod +x "$as_me.lineno" ||
Pablo Galindoba421752021-05-03 20:33:17 +0100509 { printf "%s\n" "$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 +0000510
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000511 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
512 # already done that, so ensure we don't try to do so again and fall
513 # in an infinite loop. This has already happened in practice.
514 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000515 # Don't try to exec as it changes $[0], causing all sort of problems
516 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517 # original and so on. Autoconf is especially sensitive to this).
518 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000519 # Exit status is that of the last command.
520 exit
521}
522
Pablo Galindoba421752021-05-03 20:33:17 +0100523
524# Determine whether it's possible to make 'echo' print without a newline.
525# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
526# for compatibility with existing Makefiles.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000528case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000529-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 xy) ECHO_C='\c';;
533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
534 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000535 esac;;
536*)
537 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000538esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000539
Pablo Galindoba421752021-05-03 20:33:17 +0100540# For backward compatibility with old third-party macros, we provide
541# the shell variables $as_echo and $as_echo_n. New code should use
542# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
543as_echo='printf %s\n'
544as_echo_n='printf %s'
545
546
Martin v. Löwis11437992002-04-12 09:54:03 +0000547rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000548if test -d conf$$.dir; then
549 rm -f conf$$.dir/conf$$.file
550else
551 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000552 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000554if (echo >conf$$.file) 2>/dev/null; then
555 if ln -s conf$$.file conf$$ 2>/dev/null; then
556 as_ln_s='ln -s'
557 # ... but there are two gotchas:
558 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
559 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000560 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000561 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000562 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000563 elif ln conf$$.file conf$$ 2>/dev/null; then
564 as_ln_s=ln
565 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000566 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000568else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000569 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000573
Skip Montanaro6dead952003-09-25 14:50:04 +0000574if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000575 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000576else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000577 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000578 as_mkdir_p=false
579fi
580
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000581as_test_x='test -x'
582as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000583
584# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000585as_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 +0000586
587# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000588as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000589
590
Matthias Kloseb9621712010-04-24 17:59:49 +0000591test -n "$DJDIR" || exec 7<&0 </dev/null
592exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000593
594# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200595# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# so uname gets run too.
597ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
598
Martin v. Löwis11437992002-04-12 09:54:03 +0000599#
600# Initializations.
601#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000602ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000603ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000604ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000605LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000606cross_compiling=no
607subdirs=
608MFLAGS=
609MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000610
Martin v. Löwis11437992002-04-12 09:54:03 +0000611# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000612PACKAGE_NAME='python'
613PACKAGE_TARNAME='python'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100614PACKAGE_VERSION='3.10'
615PACKAGE_STRING='python 3.10'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700616PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000617PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000618
619ac_unique_file="Include/object.h"
620# Factoring default headers for most tests.
621ac_includes_default="\
Pablo Galindoba421752021-05-03 20:33:17 +0100622#include <stddef.h>
623#ifdef HAVE_STDIO_H
624# include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000625#endif
Pablo Galindoba421752021-05-03 20:33:17 +0100626#ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000627# include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000628#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000629#ifdef HAVE_STRING_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000630# include <string.h>
631#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000632#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000633# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000634#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000635#ifdef HAVE_STDINT_H
636# include <stdint.h>
637#endif
Pablo Galindoba421752021-05-03 20:33:17 +0100638#ifdef HAVE_STRINGS_H
639# include <strings.h>
640#endif
641#ifdef HAVE_SYS_TYPES_H
642# include <sys/types.h>
643#endif
644#ifdef HAVE_SYS_STAT_H
645# include <sys/stat.h>
646#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000647#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000648# include <unistd.h>
649#endif"
650
Pablo Galindoba421752021-05-03 20:33:17 +0100651ac_header_c_list=
Matthias Kloseb9621712010-04-24 17:59:49 +0000652ac_subst_vars='LTLIBOBJS
pxinwr277ce302020-12-30 20:50:39 +0800653TEST_MODULES
Victor Stinner801bb0b2021-02-17 11:14:42 +0100654LIBRARY_DEPS
655STATIC_LIBPYTHON
Christian Heimes32eba612021-03-19 10:29:25 +0100656OPENSSL_RPATH
Christian Heimesff5be6e2018-01-20 13:19:21 +0100657OPENSSL_LDFLAGS
658OPENSSL_LIBS
659OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800660ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000661SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000662THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100663WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100664LIBPL
665PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100666PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200667BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200668LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700669EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200670ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000671SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000672LIBC
673LIBM
674HAVE_GETHOSTBYNAME
675HAVE_GETHOSTBYNAME_R
676HAVE_GETHOSTBYNAME_R_3_ARG
677HAVE_GETHOSTBYNAME_R_5_ARG
678HAVE_GETHOSTBYNAME_R_6_ARG
679LIBOBJS
680TRUE
681MACHDEP_OBJS
682DYNLOADFILE
683DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700684DTRACE_OBJS
685DTRACE_HEADERS
686DFLAGS
687DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700688TCLTK_LIBS
689TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800691PKG_CONFIG_LIBDIR
692PKG_CONFIG_PATH
693PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400694TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695SHLIBS
696CFLAGSFORSHARED
697LINKFORSHARED
698CCSHARED
699BLDSHARED
700LDCXXSHARED
701LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700702SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000703LIBTOOL_CRUFT
704OTHER_LIBTOOL_OPT
Pablo Galindoba421752021-05-03 20:33:17 +0100705EGREP
Matthias Kloseb9621712010-04-24 17:59:49 +0000706UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100707LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700708CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000709BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200710CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000711OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700712LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700713LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700714LLVM_PROF_ERR
715LLVM_PROF_FILE
716LLVM_PROF_MERGER
717PGO_PROF_USE_FLAG
718PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200719LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200720LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700721PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700722DEF_MAKE_RULE
723DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000724ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000725LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100726MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000727INSTALL_DATA
728INSTALL_SCRIPT
729INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200730ac_ct_READELF
731READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000732ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200733ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000734AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000735GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200736EXPORTSFROM
737EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000738LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000739LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000740RUNSHARED
741INSTSONAME
742LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000743PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000744BLDLIBRARY
745DLLLIBRARY
746LDLIBRARY
747LIBRARY
748BUILDEXEEXT
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200749NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200750MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200751PLATFORM_TRIPLET
752MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200753ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000754MAINCC
755CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700756SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200757GREP
758CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000759OBJEXT
760EXEEXT
761ac_ct_CC
762CPPFLAGS
763LDFLAGS
764CFLAGS
765CC
766EXPORT_MACOSX_DEPLOYMENT_TARGET
767CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200768_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000769MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000770FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000771FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800772FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000773FRAMEWORKALTINSTALLLAST
774FRAMEWORKALTINSTALLFIRST
775FRAMEWORKINSTALLLAST
776FRAMEWORKINSTALLFIRST
777PYTHONFRAMEWORKINSTALLDIR
778PYTHONFRAMEWORKPREFIX
779PYTHONFRAMEWORKDIR
780PYTHONFRAMEWORKIDENTIFIER
781PYTHONFRAMEWORK
Ned Deily0cb33da2021-05-02 04:48:29 -0400782LIPO_INTEL64_FLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000783LIPO_32BIT_FLAGS
784ARCH_RUN_32BIT
785UNIVERSALSDK
786CONFIG_ARGS
787SOVERSION
788VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200789PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200790PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100791host_os
792host_vendor
793host_cpu
794host
795build_os
796build_vendor
797build_cpu
798build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500799HAS_GIT
800GITBRANCH
801GITTAG
802GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400803BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000804target_alias
805host_alias
806build_alias
807LIBS
808ECHO_T
809ECHO_N
810ECHO_C
811DEFS
812mandir
813localedir
814libdir
815psdir
816pdfdir
817dvidir
818htmldir
819infodir
820docdir
821oldincludedir
822includedir
Pablo Galindoba421752021-05-03 20:33:17 +0100823runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000824localstatedir
825sharedstatedir
826sysconfdir
827datadir
828datarootdir
829libexecdir
830sbindir
831bindir
832program_transform_name
833prefix
834exec_prefix
835PACKAGE_URL
836PACKAGE_BUGREPORT
837PACKAGE_STRING
838PACKAGE_VERSION
839PACKAGE_TARNAME
840PACKAGE_NAME
841PATH_SEPARATOR
842SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000843ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000844ac_user_opts='
845enable_option_checking
846enable_universalsdk
847with_universal_archs
848with_framework_name
849enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000850with_cxx_main
851with_suffix
852enable_shared
853enable_profiling
854with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200855with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200856with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000857enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700858with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100859with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400860with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100861with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800862with_memory_sanitizer
863with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000864with_libs
865with_system_expat
866with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100867with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100868with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000869enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700870with_tcltk_includes
871with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000872with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000873enable_ipv6
874with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000875with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000876with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000877with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700878with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000879with_libm
880with_libc
881enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100882with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100883with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100884with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000885with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800886with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100887with_openssl
Christian Heimes32eba612021-03-19 10:29:25 +0100888with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100889with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200890with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200891with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100892with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800893enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000894'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 ac_precious_vars='build_alias
896host_alias
897target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100898MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899CC
900CFLAGS
901LDFLAGS
902LIBS
903CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800904CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700905PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800906PKG_CONFIG
907PKG_CONFIG_PATH
908PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_init_help=
913ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000914ac_unrecognized_opts=
915ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916# The variables have the same names as the options, with
917# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000918cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921no_recursion=
922prefix=NONE
923program_prefix=NONE
924program_suffix=NONE
925program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930x_includes=NONE
931x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000932
933# Installation directory options.
934# These are left unexpanded so users can "make install exec_prefix=/foo"
935# and all the variables that are supposed to be based on exec_prefix
936# by default will actually change.
937# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939bindir='${exec_prefix}/bin'
940sbindir='${exec_prefix}/sbin'
941libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942datarootdir='${prefix}/share'
943datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944sysconfdir='${prefix}/etc'
945sharedstatedir='${prefix}/com'
946localstatedir='${prefix}/var'
Pablo Galindoba421752021-05-03 20:33:17 +0100947runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948includedir='${prefix}/include'
949oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
951infodir='${datarootdir}/info'
952htmldir='${docdir}'
953dvidir='${docdir}'
954pdfdir='${docdir}'
955psdir='${docdir}'
956libdir='${exec_prefix}/lib'
957localedir='${datarootdir}/locale'
958mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000963do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 # If the previous option needs an argument, assign it.
965 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000966 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 ac_prev=
968 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000969 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
973 *=) ac_optarg= ;;
974 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977 case $ac_dashdash$ac_option in
978 --)
979 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -bindir | --bindir | --bindi | --bind | --bin | --bi)
982 ac_prev=bindir ;;
983 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
986 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 -cache-file | --cache-file | --cache-fil | --cache-fi \
992 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
993 ac_prev=cache_file ;;
994 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
995 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 cache_file=$ac_optarg ;;
997
998 --config-cache | -C)
999 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001003 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1007 | --dataroo | --dataro | --datar)
1008 ac_prev=datarootdir ;;
1009 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1010 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1011 datarootdir=$ac_optarg ;;
1012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001014 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001016 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindoba421752021-05-03 20:33:17 +01001017 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001018 ac_useropt_orig=$ac_useropt
Pablo Galindoba421752021-05-03 20:33:17 +01001019 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001020 case $ac_user_opts in
1021 *"
1022"enable_$ac_useropt"
1023"*) ;;
1024 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1025 ac_unrecognized_sep=', ';;
1026 esac
1027 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028
1029 -docdir | --docdir | --docdi | --doc | --do)
1030 ac_prev=docdir ;;
1031 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1032 docdir=$ac_optarg ;;
1033
1034 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1035 ac_prev=dvidir ;;
1036 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1037 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
1039 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001040 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001042 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindoba421752021-05-03 20:33:17 +01001043 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001044 ac_useropt_orig=$ac_useropt
Pablo Galindoba421752021-05-03 20:33:17 +01001045 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001046 case $ac_user_opts in
1047 *"
1048"enable_$ac_useropt"
1049"*) ;;
1050 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1051 ac_unrecognized_sep=', ';;
1052 esac
1053 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1056 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1057 | --exec | --exe | --ex)
1058 ac_prev=exec_prefix ;;
1059 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1060 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1061 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Obsolete; use --with-gas.
1066 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 -help | --help | --hel | --he | -h)
1069 ac_init_help=long ;;
1070 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1071 ac_init_help=recursive ;;
1072 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1073 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001080 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1081 ac_prev=htmldir ;;
1082 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1083 | --ht=*)
1084 htmldir=$ac_optarg ;;
1085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -includedir | --includedir | --includedi | --included | --include \
1087 | --includ | --inclu | --incl | --inc)
1088 ac_prev=includedir ;;
1089 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1090 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
1093 -infodir | --infodir | --infodi | --infod | --info | --inf)
1094 ac_prev=infodir ;;
1095 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
1098 -libdir | --libdir | --libdi | --libd)
1099 ac_prev=libdir ;;
1100 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
1103 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1104 | --libexe | --libex | --libe)
1105 ac_prev=libexecdir ;;
1106 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1107 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001110 -localedir | --localedir | --localedi | --localed | --locale)
1111 ac_prev=localedir ;;
1112 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1113 localedir=$ac_optarg ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001116 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 ac_prev=localstatedir ;;
1118 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001119 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121
1122 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1123 ac_prev=mandir ;;
1124 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128 # Obsolete; use --without-fp.
1129 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
1131 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 no_create=yes ;;
1134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1136 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1137 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1140 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1141 | --oldin | --oldi | --old | --ol | --o)
1142 ac_prev=oldincludedir ;;
1143 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1144 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1145 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1149 ac_prev=prefix ;;
1150 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1154 | --program-pre | --program-pr | --program-p)
1155 ac_prev=program_prefix ;;
1156 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1157 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1161 | --program-suf | --program-su | --program-s)
1162 ac_prev=program_suffix ;;
1163 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1164 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167 -program-transform-name | --program-transform-name \
1168 | --program-transform-nam | --program-transform-na \
1169 | --program-transform-n | --program-transform- \
1170 | --program-transform | --program-transfor \
1171 | --program-transfo | --program-transf \
1172 | --program-trans | --program-tran \
1173 | --progr-tra | --program-tr | --program-t)
1174 ac_prev=program_transform_name ;;
1175 -program-transform-name=* | --program-transform-name=* \
1176 | --program-transform-nam=* | --program-transform-na=* \
1177 | --program-transform-n=* | --program-transform-=* \
1178 | --program-transform=* | --program-transfor=* \
1179 | --program-transfo=* | --program-transf=* \
1180 | --program-trans=* | --program-tran=* \
1181 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1185 ac_prev=pdfdir ;;
1186 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1187 pdfdir=$ac_optarg ;;
1188
1189 -psdir | --psdir | --psdi | --psd | --ps)
1190 ac_prev=psdir ;;
1191 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1192 psdir=$ac_optarg ;;
1193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1195 | -silent | --silent | --silen | --sile | --sil)
1196 silent=yes ;;
1197
Pablo Galindoba421752021-05-03 20:33:17 +01001198 -runstatedir | --runstatedir | --runstatedi | --runstated \
1199 | --runstate | --runstat | --runsta | --runst | --runs \
1200 | --run | --ru | --r)
1201 ac_prev=runstatedir ;;
1202 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1203 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1204 | --run=* | --ru=* | --r=*)
1205 runstatedir=$ac_optarg ;;
1206
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001207 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1208 ac_prev=sbindir ;;
1209 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1210 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001212
1213 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1214 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1215 | --sharedst | --shareds | --shared | --share | --shar \
1216 | --sha | --sh)
1217 ac_prev=sharedstatedir ;;
1218 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1219 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1220 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1221 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 -site | --site | --sit)
1225 ac_prev=site ;;
1226 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1230 ac_prev=srcdir ;;
1231 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001234 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1235 | --syscon | --sysco | --sysc | --sys | --sy)
1236 ac_prev=sysconfdir ;;
1237 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1238 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001240
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
1246 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1247 verbose=yes ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 -version | --version | --versio | --versi | --vers | -V)
1250 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251
1252 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001254 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindoba421752021-05-03 20:33:17 +01001256 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 ac_useropt_orig=$ac_useropt
Pablo Galindoba421752021-05-03 20:33:17 +01001258 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 case $ac_user_opts in
1260 *"
1261"with_$ac_useropt"
1262"*) ;;
1263 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1264 ac_unrecognized_sep=', ';;
1265 esac
1266 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267
1268 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindoba421752021-05-03 20:33:17 +01001272 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 ac_useropt_orig=$ac_useropt
Pablo Galindoba421752021-05-03 20:33:17 +01001274 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 case $ac_user_opts in
1276 *"
1277"with_$ac_useropt"
1278"*) ;;
1279 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1280 ac_unrecognized_sep=', ';;
1281 esac
1282 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284 --x)
1285 # Obsolete; use --with-x.
1286 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287
1288 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1289 | --x-incl | --x-inc | --x-in | --x-i)
1290 ac_prev=x_includes ;;
1291 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1292 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001293 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294
1295 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1296 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1297 ac_prev=x_libraries ;;
1298 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1299 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1303Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 ;;
1305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 *=*)
1307 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1308 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001309 case $ac_envvar in #(
1310 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001312 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 export $ac_envvar ;;
1315
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001316 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 # FIXME: should be removed in autoconf 3.0.
Pablo Galindoba421752021-05-03 20:33:17 +01001318 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Pablo Galindoba421752021-05-03 20:33:17 +01001320 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001321 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001322 ;;
1323
1324 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325done
1326
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001328 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001330fi
1331
Matthias Kloseb9621712010-04-24 17:59:49 +00001332if test -n "$ac_unrecognized_opts"; then
1333 case $enable_option_checking in
1334 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Pablo Galindoba421752021-05-03 20:33:17 +01001336 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 esac
1338fi
1339
1340# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1342 datadir sysconfdir sharedstatedir localstatedir includedir \
1343 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindoba421752021-05-03 20:33:17 +01001344 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 # Remove trailing slashes.
1348 case $ac_val in
1349 */ )
1350 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1351 eval $ac_var=\$ac_val;;
1352 esac
1353 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001354 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 [\\/$]* | ?:[\\/]* ) continue;;
1356 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001357 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001358 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001359done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360
Martin v. Löwis11437992002-04-12 09:54:03 +00001361# There might be people who depend on the old broken behavior: `$host'
1362# used to hold the argument of --host etc.
1363# FIXME: To remove some day.
1364build=$build_alias
1365host=$host_alias
1366target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367
Martin v. Löwis11437992002-04-12 09:54:03 +00001368# FIXME: To remove some day.
1369if test "x$host_alias" != x; then
1370 if test "x$build_alias" = x; then
1371 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 elif test "x$build_alias" != "x$host_alias"; then
1373 cross_compiling=yes
1374 fi
1375fi
1376
1377ac_tool_prefix=
1378test -n "$host_alias" && ac_tool_prefix=$host_alias-
1379
1380test "$silent" = yes && exec 6>/dev/null
1381
Guido van Rossum627b2d71993-12-24 10:39:16 +00001382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_pwd=`pwd` && test -n "$ac_pwd" &&
1384ac_ls_di=`ls -di .` &&
1385ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001388 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001389
1390
Guido van Rossum627b2d71993-12-24 10:39:16 +00001391# Find the source files, if location was not specified.
1392if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001393 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001394 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 ac_confdir=`$as_dirname -- "$as_myself" ||
1396$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1397 X"$as_myself" : 'X\(//\)[^/]' \| \
1398 X"$as_myself" : 'X\(//\)$' \| \
1399 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindoba421752021-05-03 20:33:17 +01001400printf "%s\n" X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001401 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1402 s//\1/
1403 q
1404 }
1405 /^X\(\/\/\)[^/].*/{
1406 s//\1/
1407 q
1408 }
1409 /^X\(\/\/\)$/{
1410 s//\1/
1411 q
1412 }
1413 /^X\(\/\).*/{
1414 s//\1/
1415 q
1416 }
1417 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001418 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001420 srcdir=..
1421 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001422else
1423 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001425if test ! -r "$srcdir/$ac_unique_file"; then
1426 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001427 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001429ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1430ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001431 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 pwd)`
1433# When building in place, set srcdir=.
1434if test "$ac_abs_confdir" = "$ac_pwd"; then
1435 srcdir=.
1436fi
1437# Remove unnecessary trailing slashes from srcdir.
1438# Double slashes in file names in object file debugging info
1439# mess up M-x gdb in Emacs.
1440case $srcdir in
1441*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1442esac
1443for ac_var in $ac_precious_vars; do
1444 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1445 eval ac_env_${ac_var}_value=\$${ac_var}
1446 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1447 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1448done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001449
Martin v. Löwis11437992002-04-12 09:54:03 +00001450#
1451# Report the --help message.
1452#
1453if test "$ac_init_help" = "long"; then
1454 # Omit some internal or obsolete options to make the list less imposing.
1455 # This message is too long to be a string in the A/UX 3.1 sh.
1456 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001457\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458
1459Usage: $0 [OPTION]... [VAR=VALUE]...
1460
1461To assign environment variables (e.g., CC, CFLAGS...), specify them as
1462VAR=VALUE. See below for descriptions of some of the useful variables.
1463
1464Defaults for the options are specified in brackets.
1465
1466Configuration:
1467 -h, --help display this help and exit
1468 --help=short display options specific to this package
1469 --help=recursive display the short help of all the included packages
1470 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001471 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 --cache-file=FILE cache test results in FILE [disabled]
1473 -C, --config-cache alias for \`--cache-file=config.cache'
1474 -n, --no-create do not create output files
1475 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1476
Martin v. Löwis11437992002-04-12 09:54:03 +00001477Installation directories:
1478 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001479 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001482
1483By default, \`make install' will install all the files in
1484\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1485an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1486for instance \`--prefix=\$HOME'.
1487
1488For better control, use the options below.
1489
1490Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 --bindir=DIR user executables [EPREFIX/bin]
1492 --sbindir=DIR system admin executables [EPREFIX/sbin]
1493 --libexecdir=DIR program executables [EPREFIX/libexec]
1494 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1495 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1496 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Pablo Galindoba421752021-05-03 20:33:17 +01001497 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 --libdir=DIR object code libraries [EPREFIX/lib]
1499 --includedir=DIR C header files [PREFIX/include]
1500 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1501 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1502 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1503 --infodir=DIR info documentation [DATAROOTDIR/info]
1504 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1505 --mandir=DIR man documentation [DATAROOTDIR/man]
1506 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1507 --htmldir=DIR html documentation [DOCDIR]
1508 --dvidir=DIR dvi documentation [DOCDIR]
1509 --pdfdir=DIR pdf documentation [DOCDIR]
1510 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001511_ACEOF
1512
1513 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001514
1515System types:
1516 --build=BUILD configure for building on BUILD [guessed]
1517 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001518_ACEOF
1519fi
1520
1521if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001522 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001523 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001524 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001525 cat <<\_ACEOF
1526
1527Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001528 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1530 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001531 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001532 create a universal binary build. SDKDIR specifies
1533 which macOS SDK should be used to perform the build,
1534 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001536 create a Python.framework rather than a traditional
1537 Unix install. optional INSTALLDIR specifies the
1538 installation path. see Mac/README.rst (default is
1539 no)
1540 --enable-shared enable building a shared Python library (default is
1541 no)
1542 --enable-profiling enable C-level code profiling with gprof (default is
1543 no)
1544 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1545 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001546 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001547 support loadable extensions in _sqlite module, see
1548 Doc/library/sqlite3.rst (default is no)
1549 --enable-ipv6 enable ipv6 (with ipv4) support, see
1550 Doc/library/socket.rst (default is yes if supported)
1551 --enable-big-digits[=15|30]
1552 use big digits (30 or 15 bits) for Python longs
1553 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001554 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556Optional Packages:
1557 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1558 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001559 --with-universal-archs=ARCH
Ned Deily0cb33da2021-05-02 04:48:29 -04001560 specify the kind of macOS universal binary that
1561 should be created. This option is only valid when
Anthony Shaw2de064e2020-01-14 17:40:10 +11001562 --enable-universalsdk is set; options are:
Ned Deily0cb33da2021-05-02 04:48:29 -04001563 ("universal2", "intel-64", "intel-32", "intel",
1564 "32-bit", "64-bit", "3-way", or "all") see
1565 Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001566 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001567 specify the name for the python framework on macOS
1568 only valid when --enable-framework is set. see
1569 Mac/README.rst (default is 'Python')
1570 --with-cxx-main[=COMPILER]
1571 compile main() and link Python executable with C++
1572 compiler specified in COMPILER (default is $CXX)
1573 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1574 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001575 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 (default is no)
1577 --with-assertions build with C assertions enabled (default is no)
1578 --with-lto enable Link-Time-Optimization in any build (default
1579 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001580 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001581 select hash algorithm for use in Python/pyhash.c
1582 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001583 --with-tzpath=<list of absolute paths separated by pathsep>
1584 Select the default time zone search path for zoneinfo.TZPATH
1585
Charles-François Natalid30b0222014-05-08 23:08:51 +01001586 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001587 enable AddressSanitizer memory error detector,
1588 'asan' (default is no)
1589 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1590 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001591 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001592 enable UndefinedBehaviorSanitizer undefined
1593 behaviour detector, 'ubsan' (default is no)
1594 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001595 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001596 library, see Doc/library/pyexpat.rst (default is no)
1597 --with-system-ffi build _ctypes module using an installed ffi library,
1598 see Doc/library/ctypes.rst (default is
1599 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001600 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001601 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001602 --with-decimal-contextvar
1603 build _decimal module using a coroutine-local rather
1604 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001605 --with-tcltk-includes='-I...'
1606 override search for Tcl and Tk include files
1607 --with-tcltk-libs='-L...'
1608 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001609 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001610 override order to check db backends for dbm; a valid
1611 value is a colon separated string with the backend
1612 names `ndbm', `gdbm' and `bdb'.
1613 --with-doc-strings enable documentation strings (default is yes)
1614 --with-pymalloc enable specialized mallocs (default is yes)
1615 --with-c-locale-coercion
1616 enable C locale coercion to a UTF-8 based locale
1617 (default is yes)
1618 --with-valgrind enable Valgrind support (default is no)
1619 --with-dtrace enable DTrace support (default is no)
1620 --with-libm=STRING override libm math library to STRING (default is
1621 system-dependent)
1622 --with-libc=STRING override libc C library to STRING (default is
1623 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001624 --with-platlibdir=DIRNAME
1625 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001626 --with-wheel-pkg-dir=PATH
1627 Directory of wheel packages used by ensurepip
1628 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001629 --with(out)-readline[=editline]
1630 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001631 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001632 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001633 --with-ensurepip[=install|upgrade|no]
1634 "install" or "upgrade" using bundled pip (default is
1635 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001636 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001637 --with-openssl-rpath=[DIR|auto|no]
1638 Set runtime library directory (rpath) for OpenSSL
1639 libraries, no (default): don't set rpath, auto:
1640 auto-detect rpath from --with-openssl and
1641 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001642 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001643 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001644 Python's preferred selection (default), openssl:
1645 leave OpenSSL's defaults untouched, STRING: use a
Christian Heimese9832522021-05-01 20:53:10 +02001646 custom string, python and STRING also set TLS 1.2 as
1647 minimum TLS version
Christian Heimes9b60e552020-05-15 23:54:53 +02001648 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1649 builtin hash modules, md5, sha1, sha256, sha512,
1650 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001651 --with-experimental-isolated-subinterpreters
1652 better isolate subinterpreters, experimental build
1653 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001654 --without-static-libpython
1655 do not build libpythonMAJOR.MINOR.a and do not
1656 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001657
1658Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001659 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 CC C compiler command
1661 CFLAGS C compiler flags
1662 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1663 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001664 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001665 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001667 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001668 PROFILE_TASK
1669 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001670 PKG_CONFIG path to pkg-config utility
1671 PKG_CONFIG_PATH
1672 directories to add to pkg-config's search path
1673 PKG_CONFIG_LIBDIR
1674 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001675
1676Use these variables to override the choices made by `configure' or to help
1677it to find libraries and programs with nonstandard names/locations.
1678
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001679Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001680_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001681ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001682fi
1683
1684if test "$ac_init_help" = "recursive"; then
1685 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001686 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 test -d "$ac_dir" ||
1688 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1689 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 ac_builddir=.
1691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692case "$ac_dir" in
1693.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1694*)
Pablo Galindoba421752021-05-03 20:33:17 +01001695 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindoba421752021-05-03 20:33:17 +01001697 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001698 case $ac_top_builddir_sub in
1699 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1700 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1701 esac ;;
1702esac
1703ac_abs_top_builddir=$ac_pwd
1704ac_abs_builddir=$ac_pwd$ac_dir_suffix
1705# for backward compatibility:
1706ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001707
1708case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001709 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001710 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001711 ac_top_srcdir=$ac_top_builddir_sub
1712 ac_abs_top_srcdir=$ac_pwd ;;
1713 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001715 ac_top_srcdir=$srcdir
1716 ac_abs_top_srcdir=$srcdir ;;
1717 *) # Relative name.
1718 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1719 ac_top_srcdir=$ac_top_build_prefix$srcdir
1720 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001721esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001722ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001724 cd "$ac_dir" || { ac_status=$?; continue; }
Pablo Galindoba421752021-05-03 20:33:17 +01001725 # Check for configure.gnu first; this name is used for a wrapper for
1726 # Metaconfig's "Configure" on case-insensitive file systems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001727 if test -f "$ac_srcdir/configure.gnu"; then
1728 echo &&
1729 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1730 elif test -f "$ac_srcdir/configure"; then
1731 echo &&
1732 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001733 else
Pablo Galindoba421752021-05-03 20:33:17 +01001734 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001735 fi || ac_status=$?
1736 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 done
1738fi
1739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001740test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001741if $ac_init_version; then
1742 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001743python configure 3.10
Pablo Galindoba421752021-05-03 20:33:17 +01001744generated by GNU Autoconf 2.71
Martin v. Löwis11437992002-04-12 09:54:03 +00001745
Pablo Galindoba421752021-05-03 20:33:17 +01001746Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001747This configure script is free software; the Free Software Foundation
1748gives unlimited permission to copy, distribute and modify it.
1749_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001750 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001752
1753## ------------------------ ##
1754## Autoconf initialization. ##
1755## ------------------------ ##
1756
1757# ac_fn_c_try_compile LINENO
1758# --------------------------
1759# Try to compile conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_compile ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +01001763 rm -f conftest.$ac_objext conftest.beam
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 if { { ac_try="$ac_compile"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01001770printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 (eval "$ac_compile") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
Pablo Galindoba421752021-05-03 20:33:17 +01001778 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
Pablo Galindoba421752021-05-03 20:33:17 +01001782 } && test -s conftest.$ac_objext
1783then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001784 ac_retval=0
Pablo Galindoba421752021-05-03 20:33:17 +01001785else $as_nop
1786 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001787sed 's/^/| /' conftest.$ac_ext >&5
1788
1789 ac_retval=1
1790fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001791 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 as_fn_set_status $ac_retval
1793
1794} # ac_fn_c_try_compile
1795
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001796# ac_fn_c_try_cpp LINENO
1797# ----------------------
1798# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1799ac_fn_c_try_cpp ()
1800{
1801 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1802 if { { ac_try="$ac_cpp conftest.$ac_ext"
1803case "(($ac_try" in
1804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1805 *) ac_try_echo=$ac_try;;
1806esac
1807eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01001808printf "%s\n" "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001809 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1810 ac_status=$?
1811 if test -s conftest.err; then
1812 grep -v '^ *+' conftest.err >conftest.er1
1813 cat conftest.er1 >&5
1814 mv -f conftest.er1 conftest.err
1815 fi
Pablo Galindoba421752021-05-03 20:33:17 +01001816 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001817 test $ac_status = 0; } > conftest.i && {
1818 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1819 test ! -s conftest.err
Pablo Galindoba421752021-05-03 20:33:17 +01001820 }
1821then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001822 ac_retval=0
Pablo Galindoba421752021-05-03 20:33:17 +01001823else $as_nop
1824 printf "%s\n" "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001825sed 's/^/| /' conftest.$ac_ext >&5
1826
1827 ac_retval=1
1828fi
1829 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1830 as_fn_set_status $ac_retval
1831
1832} # ac_fn_c_try_cpp
1833
Matthias Kloseb9621712010-04-24 17:59:49 +00001834# ac_fn_c_try_link LINENO
1835# -----------------------
1836# Try to link conftest.$ac_ext, and return whether this succeeded.
1837ac_fn_c_try_link ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +01001840 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 if { { ac_try="$ac_link"
1842case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01001847printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 (eval "$ac_link") 2>conftest.err
1849 ac_status=$?
1850 if test -s conftest.err; then
1851 grep -v '^ *+' conftest.err >conftest.er1
1852 cat conftest.er1 >&5
1853 mv -f conftest.er1 conftest.err
1854 fi
Pablo Galindoba421752021-05-03 20:33:17 +01001855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001856 test $ac_status = 0; } && {
1857 test -z "$ac_c_werror_flag" ||
1858 test ! -s conftest.err
1859 } && test -s conftest$ac_exeext && {
1860 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001861 test -x conftest$ac_exeext
Pablo Galindoba421752021-05-03 20:33:17 +01001862 }
1863then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001864 ac_retval=0
Pablo Galindoba421752021-05-03 20:33:17 +01001865else $as_nop
1866 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001867sed 's/^/| /' conftest.$ac_ext >&5
1868
1869 ac_retval=1
1870fi
1871 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1872 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1873 # interfere with the next link command; also delete a directory that is
1874 # left behind by Apple's compiler. We do this before executing the actions.
1875 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 as_fn_set_status $ac_retval
1878
1879} # ac_fn_c_try_link
1880
Pablo Galindoba421752021-05-03 20:33:17 +01001881# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001882# -------------------------------------------------------
Pablo Galindoba421752021-05-03 20:33:17 +01001883# Tests whether HEADER exists and can be compiled using the include files in
1884# INCLUDES, setting the cache variable VAR accordingly.
1885ac_fn_c_check_header_compile ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +01001888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1889printf %s "checking for $2... " >&6; }
1890if eval test \${$3+y}
1891then :
1892 printf %s "(cached) " >&6
1893else $as_nop
1894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001895/* end confdefs.h. */
1896$4
1897#include <$2>
1898_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01001899if ac_fn_c_try_compile "$LINENO"
1900then :
1901 eval "$3=yes"
1902else $as_nop
1903 eval "$3=no"
Matthias Kloseb9621712010-04-24 17:59:49 +00001904fi
Pablo Galindoba421752021-05-03 20:33:17 +01001905rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001906fi
1907eval ac_res=\$$3
Pablo Galindoba421752021-05-03 20:33:17 +01001908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001911
Pablo Galindoba421752021-05-03 20:33:17 +01001912} # ac_fn_c_check_header_compile
Matthias Kloseb9621712010-04-24 17:59:49 +00001913
1914# ac_fn_c_try_run LINENO
1915# ----------------------
Pablo Galindoba421752021-05-03 20:33:17 +01001916# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1917# executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001918ac_fn_c_try_run ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 if { { ac_try="$ac_link"
1922case "(($ac_try" in
1923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1924 *) ac_try_echo=$ac_try;;
1925esac
1926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01001927printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 (eval "$ac_link") 2>&5
1929 ac_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01001930 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001931 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1932 { { case "(($ac_try" in
1933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1934 *) ac_try_echo=$ac_try;;
1935esac
1936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01001937printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 (eval "$ac_try") 2>&5
1939 ac_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01001940 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1941 test $ac_status = 0; }; }
1942then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 ac_retval=0
Pablo Galindoba421752021-05-03 20:33:17 +01001944else $as_nop
1945 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1946 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001947sed 's/^/| /' conftest.$ac_ext >&5
1948
1949 ac_retval=$ac_status
1950fi
1951 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001952 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 as_fn_set_status $ac_retval
1954
1955} # ac_fn_c_try_run
1956
Matthias Kloseb9621712010-04-24 17:59:49 +00001957# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1958# -------------------------------------------
1959# Tests whether TYPE exists after having included INCLUDES, setting cache
1960# variable VAR accordingly.
1961ac_fn_c_check_type ()
1962{
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +01001964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1965printf %s "checking for $2... " >&6; }
1966if eval test \${$3+y}
1967then :
1968 printf %s "(cached) " >&6
1969else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00001970 eval "$3=no"
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972/* end confdefs.h. */
1973$4
1974int
Pablo Galindoba421752021-05-03 20:33:17 +01001975main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001976{
1977if (sizeof ($2))
1978 return 0;
1979 ;
1980 return 0;
1981}
1982_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01001983if ac_fn_c_try_compile "$LINENO"
1984then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$4
1988int
Pablo Galindoba421752021-05-03 20:33:17 +01001989main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001990{
1991if (sizeof (($2)))
1992 return 0;
1993 ;
1994 return 0;
1995}
1996_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01001997if ac_fn_c_try_compile "$LINENO"
1998then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
Pablo Galindoba421752021-05-03 20:33:17 +01002000else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002001 eval "$3=yes"
2002fi
Pablo Galindoba421752021-05-03 20:33:17 +01002003rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002004fi
Pablo Galindoba421752021-05-03 20:33:17 +01002005rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002006fi
2007eval ac_res=\$$3
Pablo Galindoba421752021-05-03 20:33:17 +01002008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2009printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002010 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002011
2012} # ac_fn_c_check_type
2013
Matthias Kloseb9621712010-04-24 17:59:49 +00002014# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2015# --------------------------------------------
2016# Tries to find the compile-time value of EXPR in a program that includes
2017# INCLUDES, setting VAR accordingly. Returns whether the value could be
2018# computed
2019ac_fn_c_compute_int ()
2020{
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 if test "$cross_compiling" = yes; then
2023 # Depending upon the size, compute the lo and hi bounds.
2024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
Pablo Galindoba421752021-05-03 20:33:17 +01002028main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002029{
2030static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002031test_array [0] = 0;
2032return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002038if ac_fn_c_try_compile "$LINENO"
2039then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002040 ac_lo=0 ac_mid=0
2041 while :; do
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
Pablo Galindoba421752021-05-03 20:33:17 +01002046main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002047{
2048static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002056if ac_fn_c_try_compile "$LINENO"
2057then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002058 ac_hi=$ac_mid; break
Pablo Galindoba421752021-05-03 20:33:17 +01002059else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002060 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2061 if test $ac_lo -le $ac_mid; then
2062 ac_lo= ac_hi=
2063 break
2064 fi
2065 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2066fi
Pablo Galindoba421752021-05-03 20:33:17 +01002067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002068 done
Pablo Galindoba421752021-05-03 20:33:17 +01002069else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
Pablo Galindoba421752021-05-03 20:33:17 +01002074main (void)
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 Galindoba421752021-05-03 20:33:17 +01002084if ac_fn_c_try_compile "$LINENO"
2085then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002086 ac_hi=-1 ac_mid=-1
2087 while :; do
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
Pablo Galindoba421752021-05-03 20:33:17 +01002092main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002093{
2094static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002102if ac_fn_c_try_compile "$LINENO"
2103then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002104 ac_lo=$ac_mid; break
Pablo Galindoba421752021-05-03 20:33:17 +01002105else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002106 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2107 if test $ac_mid -le $ac_hi; then
2108 ac_lo= ac_hi=
2109 break
2110 fi
2111 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2112fi
Pablo Galindoba421752021-05-03 20:33:17 +01002113rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002114 done
Pablo Galindoba421752021-05-03 20:33:17 +01002115else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002116 ac_lo= ac_hi=
2117fi
Pablo Galindoba421752021-05-03 20:33:17 +01002118rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002119fi
Pablo Galindoba421752021-05-03 20:33:17 +01002120rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002121# Binary search between lo and hi bounds.
2122while test "x$ac_lo" != "x$ac_hi"; do
2123 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
Pablo Galindoba421752021-05-03 20:33:17 +01002128main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002129{
2130static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002131test_array [0] = 0;
2132return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002133
2134 ;
2135 return 0;
2136}
2137_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002138if ac_fn_c_try_compile "$LINENO"
2139then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002140 ac_hi=$ac_mid
Pablo Galindoba421752021-05-03 20:33:17 +01002141else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002142 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2143fi
Pablo Galindoba421752021-05-03 20:33:17 +01002144rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002145done
2146case $ac_lo in #((
2147?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2148'') ac_retval=1 ;;
2149esac
2150 else
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h. */
2153$4
Pablo Galindoba421752021-05-03 20:33:17 +01002154static long int longval (void) { return $2; }
2155static unsigned long int ulongval (void) { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002156#include <stdio.h>
2157#include <stdlib.h>
2158int
Pablo Galindoba421752021-05-03 20:33:17 +01002159main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002160{
2161
2162 FILE *f = fopen ("conftest.val", "w");
2163 if (! f)
2164 return 1;
2165 if (($2) < 0)
2166 {
2167 long int i = longval ();
2168 if (i != ($2))
2169 return 1;
2170 fprintf (f, "%ld", i);
2171 }
2172 else
2173 {
2174 unsigned long int i = ulongval ();
2175 if (i != ($2))
2176 return 1;
2177 fprintf (f, "%lu", i);
2178 }
2179 /* Do not output a trailing newline, as this causes \r\n confusion
2180 on some platforms. */
2181 return ferror (f) || fclose (f) != 0;
2182
2183 ;
2184 return 0;
2185}
2186_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002187if ac_fn_c_try_run "$LINENO"
2188then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Pablo Galindoba421752021-05-03 20:33:17 +01002190else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002191 ac_retval=1
2192fi
2193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2194 conftest.$ac_objext conftest.beam conftest.$ac_ext
2195rm -f conftest.val
2196
2197 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002198 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002199 as_fn_set_status $ac_retval
2200
2201} # ac_fn_c_compute_int
2202
2203# ac_fn_c_check_func LINENO FUNC VAR
2204# ----------------------------------
2205# Tests whether FUNC exists, setting the cache variable VAR accordingly
2206ac_fn_c_check_func ()
2207{
2208 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +01002209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2210printf %s "checking for $2... " >&6; }
2211if eval test \${$3+y}
2212then :
2213 printf %s "(cached) " >&6
2214else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2218 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2219#define $2 innocuous_$2
2220
2221/* System header to define __stub macros and hopefully few prototypes,
Pablo Galindoba421752021-05-03 20:33:17 +01002222 which can conflict with char $2 (); below. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002223
Pablo Galindoba421752021-05-03 20:33:17 +01002224#include <limits.h>
Matthias Kloseb9621712010-04-24 17:59:49 +00002225#undef $2
2226
2227/* Override any GCC internal prototype to avoid an error.
2228 Use char because int might match the return type of a GCC
2229 builtin and then its argument prototype would still apply. */
2230#ifdef __cplusplus
2231extern "C"
2232#endif
2233char $2 ();
2234/* The GNU C library defines this for functions which it implements
2235 to always fail with ENOSYS. Some functions are actually named
2236 something starting with __ and the normal name is an alias. */
2237#if defined __stub_$2 || defined __stub___$2
2238choke me
2239#endif
2240
2241int
Pablo Galindoba421752021-05-03 20:33:17 +01002242main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002243{
2244return $2 ();
2245 ;
2246 return 0;
2247}
2248_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002249if ac_fn_c_try_link "$LINENO"
2250then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002251 eval "$3=yes"
Pablo Galindoba421752021-05-03 20:33:17 +01002252else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002253 eval "$3=no"
2254fi
Pablo Galindoba421752021-05-03 20:33:17 +01002255rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00002256 conftest$ac_exeext conftest.$ac_ext
2257fi
2258eval ac_res=\$$3
Pablo Galindoba421752021-05-03 20:33:17 +01002259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2260printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002261 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002262
2263} # ac_fn_c_check_func
2264
Pablo Galindoba421752021-05-03 20:33:17 +01002265# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2266# ------------------------------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002267# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Pablo Galindoba421752021-05-03 20:33:17 +01002268# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2269ac_fn_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002270{
2271 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272 as_decl_name=`echo $2|sed 's/ *(.*//'`
Pablo Galindoba421752021-05-03 20:33:17 +01002273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2274printf %s "checking whether $as_decl_name is declared... " >&6; }
2275if eval test \${$3+y}
2276then :
2277 printf %s "(cached) " >&6
2278else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002279 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Pablo Galindoba421752021-05-03 20:33:17 +01002280 eval ac_save_FLAGS=\$$6
2281 as_fn_append $6 " $5"
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h. */
2284$4
2285int
Pablo Galindoba421752021-05-03 20:33:17 +01002286main (void)
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002287{
2288#ifndef $as_decl_name
2289#ifdef __cplusplus
2290 (void) $as_decl_use;
2291#else
2292 (void) $as_decl_name;
2293#endif
2294#endif
2295
2296 ;
2297 return 0;
2298}
2299_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002300if ac_fn_c_try_compile "$LINENO"
2301then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002302 eval "$3=yes"
Pablo Galindoba421752021-05-03 20:33:17 +01002303else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002304 eval "$3=no"
2305fi
Pablo Galindoba421752021-05-03 20:33:17 +01002306rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2307 eval $6=\$ac_save_FLAGS
2308
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002309fi
2310eval ac_res=\$$3
Pablo Galindoba421752021-05-03 20:33:17 +01002311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312printf "%s\n" "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002313 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2314
Pablo Galindoba421752021-05-03 20:33:17 +01002315} # ac_fn_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002316
Matthias Kloseb9621712010-04-24 17:59:49 +00002317# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2318# ----------------------------------------------------
2319# Tries to find if the field MEMBER exists in type AGGR, after including
2320# INCLUDES, setting cache variable VAR accordingly.
2321ac_fn_c_check_member ()
2322{
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +01002324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2325printf %s "checking for $2.$3... " >&6; }
2326if eval test \${$4+y}
2327then :
2328 printf %s "(cached) " >&6
2329else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$5
2333int
Pablo Galindoba421752021-05-03 20:33:17 +01002334main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002335{
2336static $2 ac_aggr;
2337if (ac_aggr.$3)
2338return 0;
2339 ;
2340 return 0;
2341}
2342_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002343if ac_fn_c_try_compile "$LINENO"
2344then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002345 eval "$4=yes"
Pablo Galindoba421752021-05-03 20:33:17 +01002346else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$5
2350int
Pablo Galindoba421752021-05-03 20:33:17 +01002351main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002352{
2353static $2 ac_aggr;
2354if (sizeof ac_aggr.$3)
2355return 0;
2356 ;
2357 return 0;
2358}
2359_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01002360if ac_fn_c_try_compile "$LINENO"
2361then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002362 eval "$4=yes"
Pablo Galindoba421752021-05-03 20:33:17 +01002363else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002364 eval "$4=no"
2365fi
Pablo Galindoba421752021-05-03 20:33:17 +01002366rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002367fi
Pablo Galindoba421752021-05-03 20:33:17 +01002368rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002369fi
2370eval ac_res=\$$4
Pablo Galindoba421752021-05-03 20:33:17 +01002371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002373 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002374
2375} # ac_fn_c_check_member
Pablo Galindoba421752021-05-03 20:33:17 +01002376ac_configure_args_raw=
2377for ac_arg
2378do
2379 case $ac_arg in
2380 *\'*)
2381 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2382 esac
2383 as_fn_append ac_configure_args_raw " '$ac_arg'"
2384done
2385
2386case $ac_configure_args_raw in
2387 *$as_nl*)
2388 ac_safe_unquote= ;;
2389 *)
2390 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2391 ac_unsafe_a="$ac_unsafe_z#~"
2392 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2393 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2394esac
2395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002397This file contains any messages produced by compilers while
2398running configure, to aid debugging if configure makes a mistake.
2399
Pablo Galindod4fe0982020-05-19 03:33:01 +01002400It was created by python $as_me 3.10, which was
Pablo Galindoba421752021-05-03 20:33:17 +01002401generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Pablo Galindoba421752021-05-03 20:33:17 +01002403 $ $0$ac_configure_args_raw
Martin v. Löwis11437992002-04-12 09:54:03 +00002404
2405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002407{
2408cat <<_ASUNAME
2409## --------- ##
2410## Platform. ##
2411## --------- ##
2412
2413hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2414uname -m = `(uname -m) 2>/dev/null || echo unknown`
2415uname -r = `(uname -r) 2>/dev/null || echo unknown`
2416uname -s = `(uname -s) 2>/dev/null || echo unknown`
2417uname -v = `(uname -v) 2>/dev/null || echo unknown`
2418
2419/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2420/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2421
2422/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2423/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2424/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002426/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2427/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2428/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2429
2430_ASUNAME
2431
2432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433for as_dir in $PATH
2434do
2435 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01002436 case $as_dir in #(((
2437 '') as_dir=./ ;;
2438 */) ;;
2439 *) as_dir=$as_dir/ ;;
2440 esac
2441 printf "%s\n" "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445} >&5
2446
2447cat >&5 <<_ACEOF
2448
2449
2450## ----------- ##
2451## Core tests. ##
2452## ----------- ##
2453
2454_ACEOF
2455
2456
2457# Keep a trace of the command line.
2458# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002459# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002460# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002461# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002462ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002463ac_configure_args0=
2464ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002465ac_must_keep_next=false
2466for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002467do
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 for ac_arg
2469 do
2470 case $ac_arg in
2471 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2472 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2473 | -silent | --silent | --silen | --sile | --sil)
2474 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 *\'*)
Pablo Galindoba421752021-05-03 20:33:17 +01002476 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 esac
2478 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002483 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 case $ac_arg in
2486 *=* | --config-cache | -C | -disable-* | --disable-* \
2487 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2488 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2489 | -with-* | --with-* | -without-* | --without-* | --x)
2490 case "$ac_configure_args0 " in
2491 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2492 esac
2493 ;;
2494 -* ) ac_must_keep_next=true ;;
2495 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 ;;
2499 esac
2500 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002501done
Matthias Kloseb9621712010-04-24 17:59:49 +00002502{ ac_configure_args0=; unset ac_configure_args0;}
2503{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002504
2505# When interrupted or exit'd, cleanup temporary files, and complete
2506# config.log. We remove comments because anyway the quotes in there
2507# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508# WARNING: Use '\'' to represent an apostrophe within the trap.
2509# 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 +00002510trap 'exit_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01002511 # Sanitize IFS.
2512 IFS=" "" $as_nl"
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 # Save into config.log some information that might help in debugging.
2514 {
2515 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002516
Pablo Galindoba421752021-05-03 20:33:17 +01002517 printf "%s\n" "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 echo
2521 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522(
2523 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2524 eval ac_val=\$$ac_var
2525 case $ac_val in #(
2526 *${as_nl}*)
2527 case $ac_var in #(
Pablo Galindoba421752021-05-03 20:33:17 +01002528 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2529printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac
2531 case $ac_var in #(
2532 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2534 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 esac ;;
2536 esac
2537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2540 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 "s/'\''/'\''\\\\'\'''\''/g;
2543 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2544 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002545 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002547 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 esac |
2549 sort
2550)
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002552
Pablo Galindoba421752021-05-03 20:33:17 +01002553 printf "%s\n" "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002554## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002555## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002556 echo
2557 for ac_var in $ac_subst_vars
2558 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 eval ac_val=\$$ac_var
2560 case $ac_val in
Pablo Galindoba421752021-05-03 20:33:17 +01002561 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 esac
Pablo Galindoba421752021-05-03 20:33:17 +01002563 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 done | sort
2565 echo
2566
2567 if test -n "$ac_subst_files"; then
Pablo Galindoba421752021-05-03 20:33:17 +01002568 printf "%s\n" "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002570## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002571 echo
2572 for ac_var in $ac_subst_files
2573 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 eval ac_val=\$$ac_var
2575 case $ac_val in
Pablo Galindoba421752021-05-03 20:33:17 +01002576 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 esac
Pablo Galindoba421752021-05-03 20:33:17 +01002578 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 done | sort
2580 echo
2581 fi
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 if test -s confdefs.h; then
Pablo Galindoba421752021-05-03 20:33:17 +01002584 printf "%s\n" "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002585## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 echo
2590 fi
2591 test "$ac_signal" != 0 &&
Pablo Galindoba421752021-05-03 20:33:17 +01002592 printf "%s\n" "$as_me: caught signal $ac_signal"
2593 printf "%s\n" "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 rm -f core *.core core.conftest.* &&
2596 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002599for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002601done
2602ac_signal=0
2603
2604# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002606
Pablo Galindoba421752021-05-03 20:33:17 +01002607printf "%s\n" "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609# Predefined preprocessor variables.
2610
Pablo Galindoba421752021-05-03 20:33:17 +01002611printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002612
Pablo Galindoba421752021-05-03 20:33:17 +01002613printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
Pablo Galindoba421752021-05-03 20:33:17 +01002615printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002616
Pablo Galindoba421752021-05-03 20:33:17 +01002617printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002618
Pablo Galindoba421752021-05-03 20:33:17 +01002619printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
Pablo Galindoba421752021-05-03 20:33:17 +01002621printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623
2624# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002625# Prefer an explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626if test -n "$CONFIG_SITE"; then
Pablo Galindoba421752021-05-03 20:33:17 +01002627 ac_site_files="$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628elif test "x$prefix" != xNONE; then
Pablo Galindoba421752021-05-03 20:33:17 +01002629 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630else
Pablo Galindoba421752021-05-03 20:33:17 +01002631 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632fi
Pablo Galindoba421752021-05-03 20:33:17 +01002633
2634for ac_site_file in $ac_site_files
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635do
Pablo Galindoba421752021-05-03 20:33:17 +01002636 case $ac_site_file in #(
2637 */*) :
2638 ;; #(
2639 *) :
2640 ac_site_file=./$ac_site_file ;;
2641esac
2642 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2644printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002646 . "$ac_site_file" \
Pablo Galindoba421752021-05-03 20:33:17 +01002647 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2648printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002649as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002650See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651 fi
2652done
2653
2654if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 # Some versions of bash will fail to source /dev/null (special files
2656 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2657 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Pablo Galindoba421752021-05-03 20:33:17 +01002658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2659printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2662 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 esac
2664 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665else
Pablo Galindoba421752021-05-03 20:33:17 +01002666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2667printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 >$cache_file
2669fi
2670
Pablo Galindoba421752021-05-03 20:33:17 +01002671# Test code for whether the C compiler supports C89 (global declarations)
2672ac_c_conftest_c89_globals='
2673/* Does the compiler advertise C89 conformance?
2674 Do not test the value of __STDC__, because some compilers set it to 0
2675 while being otherwise adequately conformant. */
2676#if !defined __STDC__
2677# error "Compiler does not advertise C89 conformance"
2678#endif
2679
2680#include <stddef.h>
2681#include <stdarg.h>
2682struct stat;
2683/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2684struct buf { int x; };
2685struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2686static char *e (p, i)
2687 char **p;
2688 int i;
2689{
2690 return p[i];
2691}
2692static char *f (char * (*g) (char **, int), char **p, ...)
2693{
2694 char *s;
2695 va_list v;
2696 va_start (v,p);
2697 s = g (p, va_arg (v,int));
2698 va_end (v);
2699 return s;
2700}
2701
2702/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2703 function prototypes and stuff, but not \xHH hex character constants.
2704 These do not provoke an error unfortunately, instead are silently treated
2705 as an "x". The following induces an error, until -std is added to get
2706 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2707 array size at least. It is necessary to write \x00 == 0 to get something
2708 that is true only with -std. */
2709int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2710
2711/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2712 inside strings and character constants. */
2713#define FOO(x) '\''x'\''
2714int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2715
2716int test (int i, double x);
2717struct s1 {int (*f) (int a);};
2718struct s2 {int (*f) (double a);};
2719int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2720 int, int);'
2721
2722# Test code for whether the C compiler supports C89 (body of main).
2723ac_c_conftest_c89_main='
2724ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2725'
2726
2727# Test code for whether the C compiler supports C99 (global declarations)
2728ac_c_conftest_c99_globals='
2729// Does the compiler advertise C99 conformance?
2730#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2731# error "Compiler does not advertise C99 conformance"
2732#endif
2733
2734#include <stdbool.h>
2735extern int puts (const char *);
2736extern int printf (const char *, ...);
2737extern int dprintf (int, const char *, ...);
2738extern void *malloc (size_t);
2739
2740// Check varargs macros. These examples are taken from C99 6.10.3.5.
2741// dprintf is used instead of fprintf to avoid needing to declare
2742// FILE and stderr.
2743#define debug(...) dprintf (2, __VA_ARGS__)
2744#define showlist(...) puts (#__VA_ARGS__)
2745#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2746static void
2747test_varargs_macros (void)
2748{
2749 int x = 1234;
2750 int y = 5678;
2751 debug ("Flag");
2752 debug ("X = %d\n", x);
2753 showlist (The first, second, and third items.);
2754 report (x>y, "x is %d but y is %d", x, y);
2755}
2756
2757// Check long long types.
2758#define BIG64 18446744073709551615ull
2759#define BIG32 4294967295ul
2760#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2761#if !BIG_OK
2762 #error "your preprocessor is broken"
2763#endif
2764#if BIG_OK
2765#else
2766 #error "your preprocessor is broken"
2767#endif
2768static long long int bignum = -9223372036854775807LL;
2769static unsigned long long int ubignum = BIG64;
2770
2771struct incomplete_array
2772{
2773 int datasize;
2774 double data[];
2775};
2776
2777struct named_init {
2778 int number;
2779 const wchar_t *name;
2780 double average;
2781};
2782
2783typedef const char *ccp;
2784
2785static inline int
2786test_restrict (ccp restrict text)
2787{
2788 // See if C++-style comments work.
2789 // Iterate through items via the restricted pointer.
2790 // Also check for declarations in for loops.
2791 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2792 continue;
2793 return 0;
2794}
2795
2796// Check varargs and va_copy.
2797static bool
2798test_varargs (const char *format, ...)
2799{
2800 va_list args;
2801 va_start (args, format);
2802 va_list args_copy;
2803 va_copy (args_copy, args);
2804
2805 const char *str = "";
2806 int number = 0;
2807 float fnumber = 0;
2808
2809 while (*format)
2810 {
2811 switch (*format++)
2812 {
2813 case '\''s'\'': // string
2814 str = va_arg (args_copy, const char *);
2815 break;
2816 case '\''d'\'': // int
2817 number = va_arg (args_copy, int);
2818 break;
2819 case '\''f'\'': // float
2820 fnumber = va_arg (args_copy, double);
2821 break;
2822 default:
2823 break;
2824 }
2825 }
2826 va_end (args_copy);
2827 va_end (args);
2828
2829 return *str && number && fnumber;
2830}
2831'
2832
2833# Test code for whether the C compiler supports C99 (body of main).
2834ac_c_conftest_c99_main='
2835 // Check bool.
2836 _Bool success = false;
2837 success |= (argc != 0);
2838
2839 // Check restrict.
2840 if (test_restrict ("String literal") == 0)
2841 success = true;
2842 char *restrict newvar = "Another string";
2843
2844 // Check varargs.
2845 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2846 test_varargs_macros ();
2847
2848 // Check flexible array members.
2849 struct incomplete_array *ia =
2850 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2851 ia->datasize = 10;
2852 for (int i = 0; i < ia->datasize; ++i)
2853 ia->data[i] = i * 1.234;
2854
2855 // Check named initializers.
2856 struct named_init ni = {
2857 .number = 34,
2858 .name = L"Test wide string",
2859 .average = 543.34343,
2860 };
2861
2862 ni.number = 58;
2863
2864 int dynamic_array[ni.number];
2865 dynamic_array[0] = argv[0][0];
2866 dynamic_array[ni.number - 1] = 543;
2867
2868 // work around unused variable warnings
2869 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2870 || dynamic_array[ni.number - 1] != 543);
2871'
2872
2873# Test code for whether the C compiler supports C11 (global declarations)
2874ac_c_conftest_c11_globals='
2875// Does the compiler advertise C11 conformance?
2876#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2877# error "Compiler does not advertise C11 conformance"
2878#endif
2879
2880// Check _Alignas.
2881char _Alignas (double) aligned_as_double;
2882char _Alignas (0) no_special_alignment;
2883extern char aligned_as_int;
2884char _Alignas (0) _Alignas (int) aligned_as_int;
2885
2886// Check _Alignof.
2887enum
2888{
2889 int_alignment = _Alignof (int),
2890 int_array_alignment = _Alignof (int[100]),
2891 char_alignment = _Alignof (char)
2892};
2893_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2894
2895// Check _Noreturn.
2896int _Noreturn does_not_return (void) { for (;;) continue; }
2897
2898// Check _Static_assert.
2899struct test_static_assert
2900{
2901 int x;
2902 _Static_assert (sizeof (int) <= sizeof (long int),
2903 "_Static_assert does not work in struct");
2904 long int y;
2905};
2906
2907// Check UTF-8 literals.
2908#define u8 syntax error!
2909char const utf8_literal[] = u8"happens to be ASCII" "another string";
2910
2911// Check duplicate typedefs.
2912typedef long *long_ptr;
2913typedef long int *long_ptr;
2914typedef long_ptr long_ptr;
2915
2916// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2917struct anonymous
2918{
2919 union {
2920 struct { int i; int j; };
2921 struct { int k; long int l; } w;
2922 };
2923 int m;
2924} v1;
2925'
2926
2927# Test code for whether the C compiler supports C11 (body of main).
2928ac_c_conftest_c11_main='
2929 _Static_assert ((offsetof (struct anonymous, i)
2930 == offsetof (struct anonymous, w.k)),
2931 "Anonymous union alignment botch");
2932 v1.i = 2;
2933 v1.w.k = 5;
2934 ok |= v1.i != 5;
2935'
2936
2937# Test code for whether the C compiler supports C11 (complete).
2938ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2939${ac_c_conftest_c99_globals}
2940${ac_c_conftest_c11_globals}
2941
2942int
2943main (int argc, char **argv)
2944{
2945 int ok = 0;
2946 ${ac_c_conftest_c89_main}
2947 ${ac_c_conftest_c99_main}
2948 ${ac_c_conftest_c11_main}
2949 return ok;
2950}
2951"
2952
2953# Test code for whether the C compiler supports C99 (complete).
2954ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2955${ac_c_conftest_c99_globals}
2956
2957int
2958main (int argc, char **argv)
2959{
2960 int ok = 0;
2961 ${ac_c_conftest_c89_main}
2962 ${ac_c_conftest_c99_main}
2963 return ok;
2964}
2965"
2966
2967# Test code for whether the C compiler supports C89 (complete).
2968ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2969
2970int
2971main (int argc, char **argv)
2972{
2973 int ok = 0;
2974 ${ac_c_conftest_c89_main}
2975 return ok;
2976}
2977"
2978
2979as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2980as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2981as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2982as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2983as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2984as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2985as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2986as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2987as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2988as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
2989as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
2990as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2991
2992# Auxiliary files required by this configure script.
2993ac_aux_files="install-sh config.guess config.sub"
2994
2995# Locations in which to look for auxiliary files.
2996ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2997
2998# Search for a directory containing all of the required auxiliary files,
2999# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3000# If we don't find one directory that contains all the files we need,
3001# we report the set of missing files from the *first* directory in
3002# $ac_aux_dir_candidates and give up.
3003ac_missing_aux_files=""
3004ac_first_candidate=:
3005printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3007as_found=false
3008for as_dir in $ac_aux_dir_candidates
3009do
3010 IFS=$as_save_IFS
3011 case $as_dir in #(((
3012 '') as_dir=./ ;;
3013 */) ;;
3014 *) as_dir=$as_dir/ ;;
3015 esac
3016 as_found=:
3017
3018 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
3019 ac_aux_dir_found=yes
3020 ac_install_sh=
3021 for ac_aux in $ac_aux_files
3022 do
3023 # As a special case, if "install-sh" is required, that requirement
3024 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3025 # and $ac_install_sh is set appropriately for whichever one is found.
3026 if test x"$ac_aux" = x"install-sh"
3027 then
3028 if test -f "${as_dir}install-sh"; then
3029 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
3030 ac_install_sh="${as_dir}install-sh -c"
3031 elif test -f "${as_dir}install.sh"; then
3032 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
3033 ac_install_sh="${as_dir}install.sh -c"
3034 elif test -f "${as_dir}shtool"; then
3035 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
3036 ac_install_sh="${as_dir}shtool install -c"
3037 else
3038 ac_aux_dir_found=no
3039 if $ac_first_candidate; then
3040 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3041 else
3042 break
3043 fi
3044 fi
3045 else
3046 if test -f "${as_dir}${ac_aux}"; then
3047 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3048 else
3049 ac_aux_dir_found=no
3050 if $ac_first_candidate; then
3051 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3052 else
3053 break
3054 fi
3055 fi
3056 fi
3057 done
3058 if test "$ac_aux_dir_found" = yes; then
3059 ac_aux_dir="$as_dir"
3060 break
3061 fi
3062 ac_first_candidate=false
3063
3064 as_found=false
3065done
3066IFS=$as_save_IFS
3067if $as_found
3068then :
3069
3070else $as_nop
3071 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3072fi
3073
3074
3075# These three variables are undocumented and unsupported,
3076# and are intended to be withdrawn in a future Autoconf release.
3077# They can cause serious problems if a builder's source tree is in a directory
3078# whose full name contains unusual characters.
3079if test -f "${ac_aux_dir}config.guess"; then
3080 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3081fi
3082if test -f "${ac_aux_dir}config.sub"; then
3083 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3084fi
3085if test -f "$ac_aux_dir/configure"; then
3086 ac_configure="$SHELL ${ac_aux_dir}configure"
3087fi
3088
Martin v. Löwis11437992002-04-12 09:54:03 +00003089# Check that the precious variables saved in the cache have kept the same
3090# value.
3091ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003092for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00003093 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3094 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003095 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3096 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00003097 case $ac_old_set,$ac_new_set in
3098 set,)
Pablo Galindoba421752021-05-03 20:33:17 +01003099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3100printf "%s\n" "$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 +00003101 ac_cache_corrupted=: ;;
3102 ,set)
Pablo Galindoba421752021-05-03 20:33:17 +01003103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3104printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003105 ac_cache_corrupted=: ;;
3106 ,);;
3107 *)
3108 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003109 # differences in whitespace do not lead to failure.
3110 ac_old_val_w=`echo x $ac_old_val`
3111 ac_new_val_w=`echo x $ac_new_val`
3112 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Pablo Galindoba421752021-05-03 20:33:17 +01003113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3114printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003115 ac_cache_corrupted=:
3116 else
Pablo Galindoba421752021-05-03 20:33:17 +01003117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3118printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003119 eval $ac_var=\$ac_old_val
3120 fi
Pablo Galindoba421752021-05-03 20:33:17 +01003121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3122printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3124printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 fi;;
3126 esac
3127 # Pass precious variables to config.status.
3128 if test "$ac_new_set" = set; then
3129 case $ac_new_val in
Pablo Galindoba421752021-05-03 20:33:17 +01003130 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003131 *) ac_arg=$ac_var=$ac_new_val ;;
3132 esac
3133 case " $ac_configure_args " in
3134 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00003135 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003136 esac
3137 fi
3138done
3139if $ac_cache_corrupted; then
Pablo Galindoba421752021-05-03 20:33:17 +01003140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3141printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3143printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3144 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3145 and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003147## -------------------- ##
3148## Main body of script. ##
3149## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150
Guido van Rossum7f43da71994-08-01 12:15:30 +00003151ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003152ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00003153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3155ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003156
Guido van Rossum627b2d71993-12-24 10:39:16 +00003157
Michael W. Hudson54241132001-12-07 15:38:26 +00003158
Trent Nelson4d4ec652012-10-16 08:51:24 -04003159
Christian Heimesff5be6e2018-01-20 13:19:21 +01003160
3161
Martin Panterc5ee3ca2016-09-12 01:32:03 +00003162if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04003163 # If we're building out-of-tree, we need to make sure the following
3164 # resources get picked up before their $srcdir counterparts.
3165 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01003166 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04003167 # Python/ -> importlib.h
3168 # (A side effect of this is that these resources will automatically be
3169 # regenerated when building out-of-tree, regardless of whether or not
3170 # the $srcdir counterpart is up-to-date. This is an acceptable trade
3171 # off.)
3172 BASECPPFLAGS="-IObjects -IInclude -IPython"
3173else
3174 BASECPPFLAGS=""
3175fi
3176
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003177
3178
3179
3180
Victor Stinner9ed34a82017-05-02 22:35:58 +02003181if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003182then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003183# Extract the first word of "git", so it can be a program name with args.
3184set dummy git; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01003185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3186printf %s "checking for $ac_word... " >&6; }
3187if test ${ac_cv_prog_HAS_GIT+y}
3188then :
3189 printf %s "(cached) " >&6
3190else $as_nop
Ned Deily5c4b0d02017-03-04 00:19:55 -05003191 if test -n "$HAS_GIT"; then
3192 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003193else
3194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3195for as_dir in $PATH
3196do
3197 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01003198 case $as_dir in #(((
3199 '') as_dir=./ ;;
3200 */) ;;
3201 *) as_dir=$as_dir/ ;;
3202 esac
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003203 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01003204 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003205 ac_cv_prog_HAS_GIT="found"
Pablo Galindoba421752021-05-03 20:33:17 +01003206 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003207 break 2
3208 fi
3209done
3210 done
3211IFS=$as_save_IFS
3212
Ned Deily5c4b0d02017-03-04 00:19:55 -05003213 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003214fi
3215fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003216HAS_GIT=$ac_cv_prog_HAS_GIT
3217if test -n "$HAS_GIT"; then
Pablo Galindoba421752021-05-03 20:33:17 +01003218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
3219printf "%s\n" "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003220else
Pablo Galindoba421752021-05-03 20:33:17 +01003221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3222printf "%s\n" "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003223fi
3224
3225
3226else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003227HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003228fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003229if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003230then
Xiang Zhang4c855572018-08-20 22:36:19 +08003231 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
3232 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
3233 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003234else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003235 GITVERSION=""
3236 GITTAG=""
3237 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003238fi
3239
3240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003242
3243
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003244
3245
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003246
Pablo Galindoba421752021-05-03 20:33:17 +01003247 # Make sure we can run config.sub.
3248$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3249 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3250
3251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3252printf %s "checking build system type... " >&6; }
3253if test ${ac_cv_build+y}
3254then :
3255 printf %s "(cached) " >&6
3256else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003257 ac_build_alias=$build_alias
3258test "x$ac_build_alias" = x &&
Pablo Galindoba421752021-05-03 20:33:17 +01003259 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003260test "x$ac_build_alias" = x &&
3261 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Pablo Galindoba421752021-05-03 20:33:17 +01003262ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3263 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003264
3265fi
Pablo Galindoba421752021-05-03 20:33:17 +01003266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3267printf "%s\n" "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003268case $ac_cv_build in
3269*-*-*) ;;
3270*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3271esac
3272build=$ac_cv_build
3273ac_save_IFS=$IFS; IFS='-'
3274set x $ac_cv_build
3275shift
3276build_cpu=$1
3277build_vendor=$2
3278shift; shift
3279# Remember, the first character of IFS is used to create $*,
3280# except with old shells:
3281build_os=$*
3282IFS=$ac_save_IFS
3283case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3284
3285
Pablo Galindoba421752021-05-03 20:33:17 +01003286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3287printf %s "checking host system type... " >&6; }
3288if test ${ac_cv_host+y}
3289then :
3290 printf %s "(cached) " >&6
3291else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003292 if test "x$host_alias" = x; then
3293 ac_cv_host=$ac_cv_build
3294else
Pablo Galindoba421752021-05-03 20:33:17 +01003295 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3296 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003297fi
3298
3299fi
Pablo Galindoba421752021-05-03 20:33:17 +01003300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3301printf "%s\n" "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003302case $ac_cv_host in
3303*-*-*) ;;
3304*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3305esac
3306host=$ac_cv_host
3307ac_save_IFS=$IFS; IFS='-'
3308set x $ac_cv_host
3309shift
3310host_cpu=$1
3311host_vendor=$2
3312shift; shift
3313# Remember, the first character of IFS is used to create $*,
3314# except with old shells:
3315host_os=$*
3316IFS=$ac_save_IFS
3317case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3318
3319
3320
doko@python.orga10e4a92013-01-25 18:45:12 +01003321
3322
Ned Deilyfcbc2462014-08-22 13:32:49 -07003323# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
3324rm -f pybuilddir.txt
3325
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003326for ac_prog in python$PACKAGE_VERSION python3 python
3327do
3328 # Extract the first word of "$ac_prog", so it can be a program name with args.
3329set dummy $ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01003330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3331printf %s "checking for $ac_word... " >&6; }
3332if test ${ac_cv_prog_PYTHON_FOR_REGEN+y}
3333then :
3334 printf %s "(cached) " >&6
3335else $as_nop
Victor Stinnera5c62a82017-05-03 18:21:48 +02003336 if test -n "$PYTHON_FOR_REGEN"; then
3337 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003338else
3339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3340for as_dir in $PATH
3341do
3342 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01003343 case $as_dir in #(((
3344 '') as_dir=./ ;;
3345 */) ;;
3346 *) as_dir=$as_dir/ ;;
3347 esac
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003348 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01003349 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02003350 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01003351 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003352 break 2
3353 fi
3354done
3355 done
3356IFS=$as_save_IFS
3357
3358fi
3359fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02003360PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
3361if test -n "$PYTHON_FOR_REGEN"; then
Pablo Galindoba421752021-05-03 20:33:17 +01003362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
3363printf "%s\n" "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003364else
Pablo Galindoba421752021-05-03 20:33:17 +01003365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3366printf "%s\n" "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003367fi
3368
3369
Victor Stinnera5c62a82017-05-03 18:21:48 +02003370 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003371done
Victor Stinnera5c62a82017-05-03 18:21:48 +02003372test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003373
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003374
3375
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003376if test "$cross_compiling" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01003377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3378printf %s "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003379 if test -z "$PYTHON_FOR_BUILD"; then
3380 for interp in python$PACKAGE_VERSION python3 python; do
3381 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003382 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 +02003383 break
3384 fi
3385 interp=
3386 done
3387 if test x$interp = x; then
3388 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3389 fi
Pablo Galindoba421752021-05-03 20:33:17 +01003390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3391printf "%s\n" "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003392 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 +02003393 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003394elif test "$cross_compiling" = maybe; then
3395 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003396else
3397 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3398fi
3399
3400
Martin v. Löwis11437992002-04-12 09:54:03 +00003401
Benjamin Petersond23f8222009-04-05 19:13:16 +00003402if test "$prefix" != "/"; then
3403 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3404fi
3405
3406
Martin v. Löwis11437992002-04-12 09:54:03 +00003407
3408
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003409# We don't use PACKAGE_ variables, and they cause conflicts
3410# with other autoconf-based packages that include Python.h
3411grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3412rm confdefs.h
3413mv confdefs.h.new confdefs.h
3414
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003415
Pablo Galindod4fe0982020-05-19 03:33:01 +01003416VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003417
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003418# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003419
3420SOVERSION=1.0
3421
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003422# The later defininition of _XOPEN_SOURCE disables certain features
3423# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3424
Pablo Galindoba421752021-05-03 20:33:17 +01003425printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003426
3427
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003428# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3429# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3430# them.
3431
Pablo Galindoba421752021-05-03 20:33:17 +01003432printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003433
3434
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003435# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3436# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3437# them.
3438
Pablo Galindoba421752021-05-03 20:33:17 +01003439printf "%s\n" "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003440
3441
Martin v. Löwisd6320502004-08-12 13:45:08 +00003442# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003443# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3444# them.
3445
Pablo Galindoba421752021-05-03 20:33:17 +01003446printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003447
3448
3449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003451
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003452# Arguments passed to configure.
3453
3454CONFIG_ARGS="$ac_configure_args"
3455
Pablo Galindoba421752021-05-03 20:33:17 +01003456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3457printf %s "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458# Check whether --enable-universalsdk was given.
Pablo Galindoba421752021-05-03 20:33:17 +01003459if test ${enable_universalsdk+y}
3460then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003462 case $enableval in
3463 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003464 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003465 # information
3466 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003467 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003468 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003469 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3470 if test ! -d "${enableval}"
3471 then
3472 enableval=/
3473 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003474 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003475 ;;
3476 esac
3477 case $enableval in
3478 no)
3479 UNIVERSALSDK=
3480 enable_universalsdk=
3481 ;;
3482 *)
3483 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003484 if test ! -d "${UNIVERSALSDK}"
3485 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003486 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003487 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003488 ;;
3489 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003490
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003491
Pablo Galindoba421752021-05-03 20:33:17 +01003492else $as_nop
Thomas Wouters477c8d52006-05-27 19:21:47 +00003493
3494 UNIVERSALSDK=
3495 enable_universalsdk=
3496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003498
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003499if test -n "${UNIVERSALSDK}"
3500then
Pablo Galindoba421752021-05-03 20:33:17 +01003501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3502printf "%s\n" "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003503else
Pablo Galindoba421752021-05-03 20:33:17 +01003504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3505printf "%s\n" "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003506fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003509
Ned Deily87adb6e2013-10-18 21:09:56 -07003510ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003511
Ned Deilycbfb9a52012-06-23 16:02:19 -07003512# For backward compatibility reasons we prefer to select '32-bit' if available,
3513# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003514UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003515if test "`uname -s`" = "Darwin"
3516then
3517 if test -n "${UNIVERSALSDK}"
3518 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003519 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003520 then
3521 UNIVERSAL_ARCHS="intel"
3522 fi
3523 fi
3524fi
3525
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003526
Ned Deily0cb33da2021-05-02 04:48:29 -04003527
Pablo Galindoba421752021-05-03 20:33:17 +01003528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3529printf %s "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003530
3531# Check whether --with-universal-archs was given.
Pablo Galindoba421752021-05-03 20:33:17 +01003532if test ${with_universal_archs+y}
3533then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003534 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003535 UNIVERSAL_ARCHS="$withval"
3536
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003537fi
3538
Ned Deily87adb6e2013-10-18 21:09:56 -07003539if test -n "${UNIVERSALSDK}"
3540then
Pablo Galindoba421752021-05-03 20:33:17 +01003541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3542printf "%s\n" "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003543else
Pablo Galindoba421752021-05-03 20:33:17 +01003544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3545printf "%s\n" "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003546fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003547
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003548
3549# Check whether --with-framework-name was given.
Pablo Galindoba421752021-05-03 20:33:17 +01003550if test ${with_framework_name+y}
3551then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003552 withval=$with_framework_name;
3553 PYTHONFRAMEWORK=${withval}
3554 PYTHONFRAMEWORKDIR=${withval}.framework
3555 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3556
Pablo Galindoba421752021-05-03 20:33:17 +01003557else $as_nop
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003558
3559 PYTHONFRAMEWORK=Python
3560 PYTHONFRAMEWORKDIR=Python.framework
3561 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3562
3563fi
3564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565# Check whether --enable-framework was given.
Pablo Galindoba421752021-05-03 20:33:17 +01003566if test ${enable_framework+y}
3567then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003569 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003571 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003572 esac
3573 case $enableval in
3574 no)
3575 PYTHONFRAMEWORK=
3576 PYTHONFRAMEWORKDIR=no-framework
3577 PYTHONFRAMEWORKPREFIX=
3578 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003579 FRAMEWORKINSTALLFIRST=
3580 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003581 FRAMEWORKALTINSTALLFIRST=
3582 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003583 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003584 if test "x${prefix}" = "xNONE"; then
3585 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3586 else
3587 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3588 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003589 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003590 ;;
3591 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003592 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003593 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003594 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003595 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003596 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3597 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003598 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003599 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003600
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003601 if test "x${prefix}" = "xNONE" ; then
3602 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003603
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003604 else
3605 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3606 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003607
3608 case "${enableval}" in
3609 /System*)
3610 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3611 if test "${prefix}" = "NONE" ; then
3612 # See below
3613 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3614 fi
3615 ;;
3616
3617 /Library*)
3618 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3619 ;;
3620
3621 */Library/Frameworks)
3622 MDIR="`dirname "${enableval}"`"
3623 MDIR="`dirname "${MDIR}"`"
3624 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3625
3626 if test "${prefix}" = "NONE"; then
3627 # User hasn't specified the
3628 # --prefix option, but wants to install
3629 # the framework in a non-default location,
3630 # ensure that the compatibility links get
3631 # installed relative to that prefix as well
3632 # instead of in /usr/local.
3633 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3634 fi
3635 ;;
3636
3637 *)
3638 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3639 ;;
3640 esac
3641
Jack Jansen127e56e2001-09-11 14:41:54 +00003642 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003643
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003644 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003645 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003649
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003650 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3651
3652 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3653
Jack Jansene578a632001-08-15 01:27:14 +00003654 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003655
Pablo Galindoba421752021-05-03 20:33:17 +01003656else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00003657
Jack Jansene578a632001-08-15 01:27:14 +00003658 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003659 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003660 PYTHONFRAMEWORKPREFIX=
3661 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003662 FRAMEWORKINSTALLFIRST=
3663 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003664 FRAMEWORKALTINSTALLFIRST=
3665 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003666 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003667 if test "x${prefix}" = "xNONE" ; then
3668 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3669 else
3670 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3671 fi
Jack Jansene578a632001-08-15 01:27:14 +00003672 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003673
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675fi
3676
Thomas Wouters477c8d52006-05-27 19:21:47 +00003677
3678
Michael W. Hudson54241132001-12-07 15:38:26 +00003679
3680
3681
3682
Jack Jansene578a632001-08-15 01:27:14 +00003683
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003684
3685
3686
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003687
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003688
Ned Deilyb8f944f2013-11-21 22:42:25 -08003689
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003690
Pablo Galindoba421752021-05-03 20:33:17 +01003691printf "%s\n" "#define _PYTHONFRAMEWORK \"${PYTHONFRAMEWORK}\"" >>confdefs.h
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003692
3693
Jack Jansene578a632001-08-15 01:27:14 +00003694##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003695## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003696## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003697##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003698# Set name for machine-dependent library files
3699
Pablo Galindoba421752021-05-03 20:33:17 +01003700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3701printf %s "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003702if test -z "$MACHDEP"
3703then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003704 # avoid using uname for cross builds
3705 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003706 # ac_sys_system and ac_sys_release are used for setting
3707 # a lot of different things including 'define_xopen_source'
3708 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003709 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003710 *-*-linux-android*)
3711 ac_sys_system=Linux-android
3712 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003713 *-*-linux*)
3714 ac_sys_system=Linux
3715 ;;
3716 *-*-cygwin*)
3717 ac_sys_system=Cygwin
3718 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003719 *-*-vxworks*)
3720 ac_sys_system=VxWorks
3721 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003722 *)
3723 # for now, limit cross builds to known configurations
3724 MACHDEP="unknown"
3725 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3726 esac
3727 ac_sys_release=
3728 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003729 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003730 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003731 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003732 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003733 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003734 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003735 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003736 fi
3737 ac_md_system=`echo $ac_sys_system |
3738 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3739 ac_md_release=`echo $ac_sys_release |
3740 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3741 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003742
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003743 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003744 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003745 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003746 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003747 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003748 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003749 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003750fi
Pablo Galindoba421752021-05-03 20:33:17 +01003751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3752printf "%s\n" "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003753
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003754
3755if test "$cross_compiling" = yes; then
3756 case "$host" in
3757 *-*-linux*)
3758 case "$host_cpu" in
3759 arm*)
3760 _host_cpu=arm
3761 ;;
3762 *)
3763 _host_cpu=$host_cpu
3764 esac
3765 ;;
3766 *-*-cygwin*)
3767 _host_cpu=
3768 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003769 *-*-vxworks*)
3770 _host_cpu=$host_cpu
3771 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003772 *)
3773 # for now, limit cross builds to known configurations
3774 MACHDEP="unknown"
3775 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3776 esac
3777 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3778fi
3779
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003780# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3781# disable features if it is defined, without any means to access these
3782# features as extensions. For these systems, we skip the definition of
3783# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3784# some feature, make sure there is no alternative way to access this
3785# feature. Also, when using wildcards, make sure you have verified the
3786# need for not defining _XOPEN_SOURCE on all systems matching the
3787# wildcard, and that the wildcard does not include future systems
3788# (which may remove their limitations).
3789case $ac_sys_system/$ac_sys_release in
3790 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3791 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003792 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003793 # In addition, Stefan Krah confirms that issue #1244610 exists through
3794 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003795 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003796 define_xopen_source=no
3797 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3798 # also defined. This can be overridden by defining _BSD_SOURCE
3799 # As this has a different meaning on Linux, only define it on OpenBSD
3800
Pablo Galindoba421752021-05-03 20:33:17 +01003801printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003802
3803 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003804 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003805 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3806 # also defined. This can be overridden by defining _BSD_SOURCE
3807 # As this has a different meaning on Linux, only define it on OpenBSD
3808
Pablo Galindoba421752021-05-03 20:33:17 +01003809printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003810
3811 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003812 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3813 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3814 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003815 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 +00003816 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003817 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3818 # request to enable features supported by the standard as a request
3819 # to disable features not supported by the standard. The best way
3820 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3821 # entirely and define __EXTENSIONS__ instead.
3822 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003823 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003824 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3825 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003826 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003827 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003828 define_xopen_source=no;;
3829 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003830 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003831 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003832 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003833 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3834 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3835 # identifies itself as Darwin/7.*
3836 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3837 # disables platform specific features beyond repair.
3838 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3839 # has no effect, don't bother defining them
3840 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003841 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003842 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003843 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003844 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3845 # defining NI_NUMERICHOST.
3846 QNX/6.3.2)
3847 define_xopen_source=no
3848 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003849 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3850 # in network headers still using system V types.
3851 VxWorks/*)
3852 define_xopen_source=no
3853 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003854
Ian Nortona9edf442020-02-14 03:09:11 +00003855 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3856 # chroot() and other functions
3857 hp*|HP*)
3858 define_xopen_source=no
3859 ;;
3860
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003861esac
3862
3863if test $define_xopen_source = yes
3864then
Victor Stinner14d098d2011-09-07 22:29:43 +02003865 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003866
Pablo Galindoba421752021-05-03 20:33:17 +01003867printf "%s\n" "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003868
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003869
3870 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3871 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3872 # several APIs are not declared. Since this is also needed in some
3873 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003874
Pablo Galindoba421752021-05-03 20:33:17 +01003875printf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003876
3877
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003878
Pablo Galindoba421752021-05-03 20:33:17 +01003879printf "%s\n" "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003881fi
3882
Christian Heimes647cd872013-12-07 23:39:33 +01003883# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3884case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003885 hp*|HP*)
3886 define_stdc_a1=yes;;
3887 *)
3888 define_stdc_a1=no;;
3889esac
3890
3891if test $define_stdc_a1 = yes
3892then
Christian Heimes647cd872013-12-07 23:39:33 +01003893
Pablo Galindoba421752021-05-03 20:33:17 +01003894printf "%s\n" "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003895
Christian Heimesb02bcae2013-12-08 15:21:08 +01003896fi
Christian Heimes647cd872013-12-07 23:39:33 +01003897
Jack Jansen6b08a402004-06-03 12:41:45 +00003898# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3899# it may influence the way we can build extensions, so distutils
3900# needs to check it
3901
Thomas Wouters477c8d52006-05-27 19:21:47 +00003902
Jack Jansen6b08a402004-06-03 12:41:45 +00003903CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003904EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003905
Guido van Rossum627b2d71993-12-24 10:39:16 +00003906# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003907
3908# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3909# for debug/optimization stuff. BASECFLAGS is for flags that are required
3910# just to get things to compile and link. Users are free to override OPT
3911# when running configure or make. The build should not break if they do.
3912# BASECFLAGS should generally not be messed with, however.
3913
Guido van Rossum8b131c51995-03-09 14:10:13 +00003914# If the user switches compilers, we can't believe the cache
3915if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3916then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003917 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003918(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003919fi
3920
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003921# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3922# when the compiler supports them, but we don't always want -O2, and
3923# we set -g later.
3924if test -z "$CFLAGS"; then
3925 CFLAGS=
3926fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003927
3928if test "$ac_sys_system" = "Darwin"
3929then
3930 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003931 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003932 # information
3933 if test -z "${CC}"
3934 then
3935 found_gcc=
3936 found_clang=
3937 as_save_IFS=$IFS; IFS=:
3938 for as_dir in $PATH
3939 do
3940 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003941 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003942 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003943 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003944 fi
3945 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003946 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003947 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003948 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003949 fi
3950 fi
3951 done
3952 IFS=$as_save_IFS
3953
3954 if test -n "$found_gcc" -a -n "$found_clang"
3955 then
3956 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3957 then
Pablo Galindoba421752021-05-03 20:33:17 +01003958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3959printf "%s\n" "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003960 CC="$found_clang"
3961 CXX="$found_clang++"
3962 fi
3963
3964
3965 elif test -z "$found_gcc" -a -n "$found_clang"
3966 then
Pablo Galindoba421752021-05-03 20:33:17 +01003967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3968printf "%s\n" "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003969 CC="$found_clang"
3970 CXX="$found_clang++"
3971
3972 elif test -z "$found_gcc" -a -z "$found_clang"
3973 then
3974 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3975 if test -n "${found_clang}"
3976 then
Pablo Galindoba421752021-05-03 20:33:17 +01003977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3978printf "%s\n" "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003979 CC="${found_clang}"
3980 CXX="`/usr/bin/xcrun -find clang++`"
3981
3982 # else: use default behaviour
3983 fi
3984 fi
3985 fi
3986fi
Pablo Galindoba421752021-05-03 20:33:17 +01003987
3988
3989
3990
3991
3992
3993
3994
3995
Martin v. Löwis11437992002-04-12 09:54:03 +00003996ac_ext=c
3997ac_cpp='$CPP $CPPFLAGS'
3998ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3999ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4000ac_compiler_gnu=$ac_cv_c_compiler_gnu
4001if test -n "$ac_tool_prefix"; then
4002 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4003set dummy ${ac_tool_prefix}gcc; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01004004{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4005printf %s "checking for $ac_word... " >&6; }
4006if test ${ac_cv_prog_CC+y}
4007then :
4008 printf %s "(cached) " >&6
4009else $as_nop
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004010 if test -n "$CC"; then
4011 ac_cv_prog_CC="$CC" # Let the user override the test.
4012else
Martin v. Löwis11437992002-04-12 09:54:03 +00004013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4014for as_dir in $PATH
4015do
4016 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01004017 case $as_dir in #(((
4018 '') as_dir=./ ;;
4019 */) ;;
4020 *) as_dir=$as_dir/ ;;
4021 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01004023 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Pablo Galindoba421752021-05-03 20:33:17 +01004025 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004026 break 2
4027 fi
4028done
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004031
Jack Jansendd19cf82001-12-06 22:36:17 +00004032fi
4033fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004034CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00004035if test -n "$CC"; then
Pablo Galindoba421752021-05-03 20:33:17 +01004036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4037printf "%s\n" "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004038else
Pablo Galindoba421752021-05-03 20:33:17 +01004039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004041fi
4042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043
Martin v. Löwis11437992002-04-12 09:54:03 +00004044fi
4045if test -z "$ac_cv_prog_CC"; then
4046 ac_ct_CC=$CC
4047 # Extract the first word of "gcc", so it can be a program name with args.
4048set dummy gcc; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01004049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4050printf %s "checking for $ac_word... " >&6; }
4051if test ${ac_cv_prog_ac_ct_CC+y}
4052then :
4053 printf %s "(cached) " >&6
4054else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004055 if test -n "$ac_ct_CC"; then
4056 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4057else
4058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4059for as_dir in $PATH
4060do
4061 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01004062 case $as_dir in #(((
4063 '') as_dir=./ ;;
4064 */) ;;
4065 *) as_dir=$as_dir/ ;;
4066 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01004068 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004069 ac_cv_prog_ac_ct_CC="gcc"
Pablo Galindoba421752021-05-03 20:33:17 +01004070 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 break 2
4072 fi
4073done
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004076
4077fi
4078fi
4079ac_ct_CC=$ac_cv_prog_ac_ct_CC
4080if test -n "$ac_ct_CC"; then
Pablo Galindoba421752021-05-03 20:33:17 +01004081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4082printf "%s\n" "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004083else
Pablo Galindoba421752021-05-03 20:33:17 +01004084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4085printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004086fi
4087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 if test "x$ac_ct_CC" = x; then
4089 CC=""
4090 else
4091 case $cross_compiling:$ac_tool_warned in
4092yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01004093{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4094printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095ac_tool_warned=yes ;;
4096esac
4097 CC=$ac_ct_CC
4098 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004099else
4100 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00004101fi
4102
Jack Jansendd19cf82001-12-06 22:36:17 +00004103if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004104 if test -n "$ac_tool_prefix"; then
4105 # 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 +00004106set dummy ${ac_tool_prefix}cc; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01004107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108printf %s "checking for $ac_word... " >&6; }
4109if test ${ac_cv_prog_CC+y}
4110then :
4111 printf %s "(cached) " >&6
4112else $as_nop
Jack Jansendd19cf82001-12-06 22:36:17 +00004113 if test -n "$CC"; then
4114 ac_cv_prog_CC="$CC" # Let the user override the test.
4115else
Martin v. Löwis11437992002-04-12 09:54:03 +00004116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117for as_dir in $PATH
4118do
4119 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01004120 case $as_dir in #(((
4121 '') as_dir=./ ;;
4122 */) ;;
4123 *) as_dir=$as_dir/ ;;
4124 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01004126 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 ac_cv_prog_CC="${ac_tool_prefix}cc"
Pablo Galindoba421752021-05-03 20:33:17 +01004128 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 break 2
4130 fi
4131done
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004134
4135fi
4136fi
4137CC=$ac_cv_prog_CC
4138if test -n "$CC"; then
Pablo Galindoba421752021-05-03 20:33:17 +01004139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4140printf "%s\n" "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141else
Pablo Galindoba421752021-05-03 20:33:17 +01004142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4143printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
4145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004148fi
4149if test -z "$CC"; then
4150 # Extract the first word of "cc", so it can be a program name with args.
4151set dummy cc; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01004152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153printf %s "checking for $ac_word... " >&6; }
4154if test ${ac_cv_prog_CC+y}
4155then :
4156 printf %s "(cached) " >&6
4157else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 if test -n "$CC"; then
4159 ac_cv_prog_CC="$CC" # Let the user override the test.
4160else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004161 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01004166 case $as_dir in #(((
4167 '') as_dir=./ ;;
4168 */) ;;
4169 *) as_dir=$as_dir/ ;;
4170 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01004172 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4173 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 ac_prog_rejected=yes
4175 continue
4176 fi
4177 ac_cv_prog_CC="cc"
Pablo Galindoba421752021-05-03 20:33:17 +01004178 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 break 2
4180 fi
4181done
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004185if test $ac_prog_rejected = yes; then
4186 # We found a bogon in the path, so make sure we never use it.
4187 set dummy $ac_cv_prog_CC
4188 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004190 # We chose a different compiler from the bogus one.
4191 # However, it has the same basename, so the bogon will be chosen
4192 # first if we set CC to just the basename; use the full file name.
4193 shift
Pablo Galindoba421752021-05-03 20:33:17 +01004194 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004195 fi
4196fi
4197fi
4198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004199CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004200if test -n "$CC"; then
Pablo Galindoba421752021-05-03 20:33:17 +01004201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4202printf "%s\n" "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004203else
Pablo Galindoba421752021-05-03 20:33:17 +01004204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4205printf "%s\n" "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004206fi
4207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208
Martin v. Löwis11437992002-04-12 09:54:03 +00004209fi
4210if test -z "$CC"; then
4211 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 do
4214 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4215set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01004216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4217printf %s "checking for $ac_word... " >&6; }
4218if test ${ac_cv_prog_CC+y}
4219then :
4220 printf %s "(cached) " >&6
4221else $as_nop
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004222 if test -n "$CC"; then
4223 ac_cv_prog_CC="$CC" # Let the user override the test.
4224else
Martin v. Löwis11437992002-04-12 09:54:03 +00004225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01004229 case $as_dir in #(((
4230 '') as_dir=./ ;;
4231 */) ;;
4232 *) as_dir=$as_dir/ ;;
4233 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01004235 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01004237 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004238 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004240done
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004243
4244fi
4245fi
4246CC=$ac_cv_prog_CC
4247if test -n "$CC"; then
Pablo Galindoba421752021-05-03 20:33:17 +01004248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4249printf "%s\n" "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004250else
Pablo Galindoba421752021-05-03 20:33:17 +01004251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252printf "%s\n" "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004253fi
4254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 test -n "$CC" && break
4257 done
4258fi
4259if test -z "$CC"; then
4260 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00004262do
4263 # Extract the first word of "$ac_prog", so it can be a program name with args.
4264set dummy $ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01004265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4266printf %s "checking for $ac_word... " >&6; }
4267if test ${ac_cv_prog_ac_ct_CC+y}
4268then :
4269 printf %s "(cached) " >&6
4270else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 if test -n "$ac_ct_CC"; then
4272 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4273else
4274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4275for as_dir in $PATH
4276do
4277 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01004278 case $as_dir in #(((
4279 '') as_dir=./ ;;
4280 */) ;;
4281 *) as_dir=$as_dir/ ;;
4282 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004283 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01004284 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 ac_cv_prog_ac_ct_CC="$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01004286 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 break 2
4288 fi
4289done
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00004292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293fi
4294fi
4295ac_ct_CC=$ac_cv_prog_ac_ct_CC
4296if test -n "$ac_ct_CC"; then
Pablo Galindoba421752021-05-03 20:33:17 +01004297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4298printf "%s\n" "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004299else
Pablo Galindoba421752021-05-03 20:33:17 +01004300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4301printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004302fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 test -n "$ac_ct_CC" && break
4306done
Michael W. Hudson54241132001-12-07 15:38:26 +00004307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 if test "x$ac_ct_CC" = x; then
4309 CC=""
4310 else
4311 case $cross_compiling:$ac_tool_warned in
4312yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01004313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4314printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315ac_tool_warned=yes ;;
4316esac
4317 CC=$ac_ct_CC
4318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004319fi
4320
4321fi
Pablo Galindoba421752021-05-03 20:33:17 +01004322if test -z "$CC"; then
4323 if test -n "$ac_tool_prefix"; then
4324 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4325set dummy ${ac_tool_prefix}clang; ac_word=$2
4326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4327printf %s "checking for $ac_word... " >&6; }
4328if test ${ac_cv_prog_CC+y}
4329then :
4330 printf %s "(cached) " >&6
4331else $as_nop
4332 if test -n "$CC"; then
4333 ac_cv_prog_CC="$CC" # Let the user override the test.
4334else
4335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4336for as_dir in $PATH
4337do
4338 IFS=$as_save_IFS
4339 case $as_dir in #(((
4340 '') as_dir=./ ;;
4341 */) ;;
4342 *) as_dir=$as_dir/ ;;
4343 esac
4344 for ac_exec_ext in '' $ac_executable_extensions; do
4345 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4346 ac_cv_prog_CC="${ac_tool_prefix}clang"
4347 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4348 break 2
4349 fi
4350done
4351 done
4352IFS=$as_save_IFS
4353
4354fi
4355fi
4356CC=$ac_cv_prog_CC
4357if test -n "$CC"; then
4358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4359printf "%s\n" "$CC" >&6; }
4360else
4361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4362printf "%s\n" "no" >&6; }
4363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004364
4365
Pablo Galindoba421752021-05-03 20:33:17 +01004366fi
4367if test -z "$ac_cv_prog_CC"; then
4368 ac_ct_CC=$CC
4369 # Extract the first word of "clang", so it can be a program name with args.
4370set dummy clang; ac_word=$2
4371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4372printf %s "checking for $ac_word... " >&6; }
4373if test ${ac_cv_prog_ac_ct_CC+y}
4374then :
4375 printf %s "(cached) " >&6
4376else $as_nop
4377 if test -n "$ac_ct_CC"; then
4378 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4379else
4380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH
4382do
4383 IFS=$as_save_IFS
4384 case $as_dir in #(((
4385 '') as_dir=./ ;;
4386 */) ;;
4387 *) as_dir=$as_dir/ ;;
4388 esac
4389 for ac_exec_ext in '' $ac_executable_extensions; do
4390 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4391 ac_cv_prog_ac_ct_CC="clang"
4392 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4393 break 2
4394 fi
4395done
4396 done
4397IFS=$as_save_IFS
4398
4399fi
4400fi
4401ac_ct_CC=$ac_cv_prog_ac_ct_CC
4402if test -n "$ac_ct_CC"; then
4403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4404printf "%s\n" "$ac_ct_CC" >&6; }
4405else
4406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4407printf "%s\n" "no" >&6; }
4408fi
4409
4410 if test "x$ac_ct_CC" = x; then
4411 CC=""
4412 else
4413 case $cross_compiling:$ac_tool_warned in
4414yes:)
4415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4416printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4417ac_tool_warned=yes ;;
4418esac
4419 CC=$ac_ct_CC
4420 fi
4421else
4422 CC="$ac_cv_prog_CC"
4423fi
4424
4425fi
4426
4427
4428test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4429printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004430as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004431See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004432
4433# Provide some information about the compiler.
Pablo Galindoba421752021-05-03 20:33:17 +01004434printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004435set X $ac_compile
4436ac_compiler=$2
Pablo Galindoba421752021-05-03 20:33:17 +01004437for ac_option in --version -v -V -qversion -version; do
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439case "(($ac_try" in
4440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4441 *) ac_try_echo=$ac_try;;
4442esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01004444printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004446 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 if test -s conftest.err; then
4448 sed '10a\
4449... rest of stderr output deleted ...
4450 10q' conftest.err >conftest.er1
4451 cat conftest.er1 >&5
4452 fi
4453 rm -f conftest.er1 conftest.err
Pablo Galindoba421752021-05-03 20:33:17 +01004454 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004455 test $ac_status = 0; }
4456done
Martin v. Löwis11437992002-04-12 09:54:03 +00004457
Matthias Kloseb9621712010-04-24 17:59:49 +00004458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004459/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004460
Martin v. Löwis11437992002-04-12 09:54:03 +00004461int
Pablo Galindoba421752021-05-03 20:33:17 +01004462main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004463{
4464
4465 ;
4466 return 0;
4467}
4468_ACEOF
4469ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004470ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004471# Try to create an executable without -o first, disregard a.out.
4472# It will help us diagnose broken compilers, and finding out an intuition
4473# of exeext.
Pablo Galindoba421752021-05-03 20:33:17 +01004474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4475printf %s "checking whether the C compiler works... " >&6; }
4476ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00004477
4478# The possible output files:
4479ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004481ac_rmfiles=
4482for ac_file in $ac_files
4483do
4484 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004486 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4487 esac
4488done
4489rm -f $ac_rmfiles
4490
Matthias Kloseb9621712010-04-24 17:59:49 +00004491if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004492case "(($ac_try" in
4493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4494 *) ac_try_echo=$ac_try;;
4495esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01004497printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004498 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004499 ac_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01004500 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4501 test $ac_status = 0; }
4502then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004503 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4504# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4505# in a Makefile. We should not override ac_cv_exeext if it was cached,
4506# so that the user can short-circuit this test for compilers unknown to
4507# Autoconf.
4508for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004509do
4510 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004511 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004512 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004513 ;;
4514 [ab].out )
4515 # We found the default executable, but exeext='' is most
4516 # certainly right.
4517 break;;
4518 *.* )
Pablo Galindoba421752021-05-03 20:33:17 +01004519 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004520 then :; else
4521 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4522 fi
4523 # We set ac_cv_exeext here because the later test for it is not
4524 # safe: cross compilers may not add the suffix if given an `-o'
4525 # argument, so we may need to know it at that point already.
4526 # Even if this section looks crufty: it has the advantage of
4527 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004528 break;;
4529 * )
4530 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004531 esac
4532done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004533test "$ac_cv_exeext" = no && ac_cv_exeext=
4534
Pablo Galindoba421752021-05-03 20:33:17 +01004535else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004536 ac_file=''
4537fi
Pablo Galindoba421752021-05-03 20:33:17 +01004538if test -z "$ac_file"
4539then :
4540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541printf "%s\n" "no" >&6; }
4542printf "%s\n" "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004543sed 's/^/| /' conftest.$ac_ext >&5
4544
Pablo Galindoba421752021-05-03 20:33:17 +01004545{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4546printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004547as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004548See \`config.log' for more details" "$LINENO" 5; }
Pablo Galindoba421752021-05-03 20:33:17 +01004549else $as_nop
4550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4551printf "%s\n" "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004552fi
Pablo Galindoba421752021-05-03 20:33:17 +01004553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4554printf %s "checking for C compiler default output file name... " >&6; }
4555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4556printf "%s\n" "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004557ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004558
Matthias Kloseb9621712010-04-24 17:59:49 +00004559rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004560ac_clean_files=$ac_clean_files_save
Pablo Galindoba421752021-05-03 20:33:17 +01004561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4562printf %s "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004563if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004564case "(($ac_try" in
4565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4566 *) ac_try_echo=$ac_try;;
4567esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01004569printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004570 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004571 ac_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01004572 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4573 test $ac_status = 0; }
4574then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004575 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4576# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4577# work properly (i.e., refer to `conftest.exe'), while it won't with
4578# `rm'.
4579for ac_file in conftest.exe conftest conftest.*; do
4580 test -f "$ac_file" || continue
4581 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004582 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004583 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4584 break;;
4585 * ) break;;
4586 esac
4587done
Pablo Galindoba421752021-05-03 20:33:17 +01004588else $as_nop
4589 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4590printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004591as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004592See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004594rm -f conftest conftest$ac_cv_exeext
Pablo Galindoba421752021-05-03 20:33:17 +01004595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4596printf "%s\n" "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004597
4598rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004599EXEEXT=$ac_cv_exeext
4600ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4602/* end confdefs.h. */
4603#include <stdio.h>
4604int
Pablo Galindoba421752021-05-03 20:33:17 +01004605main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00004606{
4607FILE *f = fopen ("conftest.out", "w");
4608 return ferror (f) || fclose (f) != 0;
4609
4610 ;
4611 return 0;
4612}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004614ac_clean_files="$ac_clean_files conftest.out"
4615# Check that the compiler produces executables we can run. If not, either
4616# the compiler is broken, or we cross compile.
Pablo Galindoba421752021-05-03 20:33:17 +01004617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4618printf %s "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004619if test "$cross_compiling" != yes; then
4620 { { ac_try="$ac_link"
4621case "(($ac_try" in
4622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4623 *) ac_try_echo=$ac_try;;
4624esac
4625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01004626printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004627 (eval "$ac_link") 2>&5
4628 ac_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01004629 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004630 test $ac_status = 0; }
4631 if { ac_try='./conftest$ac_cv_exeext'
4632 { { case "(($ac_try" in
4633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4634 *) ac_try_echo=$ac_try;;
4635esac
4636eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01004637printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004638 (eval "$ac_try") 2>&5
4639 ac_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01004640 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004641 test $ac_status = 0; }; }; then
4642 cross_compiling=no
4643 else
4644 if test "$cross_compiling" = maybe; then
4645 cross_compiling=yes
4646 else
Pablo Galindoba421752021-05-03 20:33:17 +01004647 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4648printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4649as_fn_error 77 "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004650If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004651See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 fi
4653 fi
4654fi
Pablo Galindoba421752021-05-03 20:33:17 +01004655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4656printf "%s\n" "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004657
4658rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4659ac_clean_files=$ac_clean_files_save
Pablo Galindoba421752021-05-03 20:33:17 +01004660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4661printf %s "checking for suffix of object files... " >&6; }
4662if test ${ac_cv_objext+y}
4663then :
4664 printf %s "(cached) " >&6
4665else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004667/* end confdefs.h. */
4668
4669int
Pablo Galindoba421752021-05-03 20:33:17 +01004670main (void)
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004671{
4672
4673 ;
4674 return 0;
4675}
4676_ACEOF
4677rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004678if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004679case "(($ac_try" in
4680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4681 *) ac_try_echo=$ac_try;;
4682esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindoba421752021-05-03 20:33:17 +01004684printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004685 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004686 ac_status=$?
Pablo Galindoba421752021-05-03 20:33:17 +01004687 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4688 test $ac_status = 0; }
4689then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004690 for ac_file in conftest.o conftest.obj conftest.*; do
4691 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004692 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004693 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4695 break;;
4696 esac
4697done
Pablo Galindoba421752021-05-03 20:33:17 +01004698else $as_nop
4699 printf "%s\n" "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004700sed 's/^/| /' conftest.$ac_ext >&5
4701
Pablo Galindoba421752021-05-03 20:33:17 +01004702{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4703printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004704as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004705See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004706fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004707rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004708fi
Pablo Galindoba421752021-05-03 20:33:17 +01004709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4710printf "%s\n" "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004711OBJEXT=$ac_cv_objext
4712ac_objext=$OBJEXT
Pablo Galindoba421752021-05-03 20:33:17 +01004713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4714printf %s "checking whether the compiler supports GNU C... " >&6; }
4715if test ${ac_cv_c_compiler_gnu+y}
4716then :
4717 printf %s "(cached) " >&6
4718else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004721
Martin v. Löwis11437992002-04-12 09:54:03 +00004722int
Pablo Galindoba421752021-05-03 20:33:17 +01004723main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004724{
4725#ifndef __GNUC__
4726 choke me
4727#endif
4728
4729 ;
4730 return 0;
4731}
4732_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01004733if ac_fn_c_try_compile "$LINENO"
4734then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004735 ac_compiler_gnu=yes
Pablo Galindoba421752021-05-03 20:33:17 +01004736else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004737 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004738fi
Pablo Galindoba421752021-05-03 20:33:17 +01004739rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004740ac_cv_c_compiler_gnu=$ac_compiler_gnu
4741
4742fi
Pablo Galindoba421752021-05-03 20:33:17 +01004743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4744printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4745ac_compiler_gnu=$ac_cv_c_compiler_gnu
4746
Matthias Kloseb9621712010-04-24 17:59:49 +00004747if test $ac_compiler_gnu = yes; then
4748 GCC=yes
4749else
4750 GCC=
4751fi
Pablo Galindoba421752021-05-03 20:33:17 +01004752ac_test_CFLAGS=${CFLAGS+y}
Martin v. Löwis11437992002-04-12 09:54:03 +00004753ac_save_CFLAGS=$CFLAGS
Pablo Galindoba421752021-05-03 20:33:17 +01004754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4755printf %s "checking whether $CC accepts -g... " >&6; }
4756if test ${ac_cv_prog_cc_g+y}
4757then :
4758 printf %s "(cached) " >&6
4759else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004760 ac_save_c_werror_flag=$ac_c_werror_flag
4761 ac_c_werror_flag=yes
4762 ac_cv_prog_cc_g=no
4763 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004766
Martin v. Löwis11437992002-04-12 09:54:03 +00004767int
Pablo Galindoba421752021-05-03 20:33:17 +01004768main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004769{
4770
4771 ;
4772 return 0;
4773}
4774_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01004775if ac_fn_c_try_compile "$LINENO"
4776then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004777 ac_cv_prog_cc_g=yes
Pablo Galindoba421752021-05-03 20:33:17 +01004778else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 CFLAGS=""
4780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004781/* end confdefs.h. */
4782
4783int
Pablo Galindoba421752021-05-03 20:33:17 +01004784main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004785{
4786
4787 ;
4788 return 0;
4789}
4790_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01004791if ac_fn_c_try_compile "$LINENO"
4792then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004793
Pablo Galindoba421752021-05-03 20:33:17 +01004794else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004798/* end confdefs.h. */
4799
4800int
Pablo Galindoba421752021-05-03 20:33:17 +01004801main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802{
4803
4804 ;
4805 return 0;
4806}
4807_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01004808if ac_fn_c_try_compile "$LINENO"
4809then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004810 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004811fi
Pablo Galindoba421752021-05-03 20:33:17 +01004812rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813fi
Pablo Galindoba421752021-05-03 20:33:17 +01004814rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004815fi
Pablo Galindoba421752021-05-03 20:33:17 +01004816rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817 ac_c_werror_flag=$ac_save_c_werror_flag
4818fi
Pablo Galindoba421752021-05-03 20:33:17 +01004819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4820printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4821if test $ac_test_CFLAGS; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004822 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004823elif test $ac_cv_prog_cc_g = yes; then
4824 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004825 CFLAGS="-g -O2"
4826 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004827 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004828 fi
4829else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004830 if test "$GCC" = yes; then
4831 CFLAGS="-O2"
4832 else
4833 CFLAGS=
4834 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004835fi
Pablo Galindoba421752021-05-03 20:33:17 +01004836ac_prog_cc_stdc=no
4837if test x$ac_prog_cc_stdc = xno
4838then :
4839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4840printf %s "checking for $CC option to enable C11 features... " >&6; }
4841if test ${ac_cv_prog_cc_c11+y}
4842then :
4843 printf %s "(cached) " >&6
4844else $as_nop
4845 ac_cv_prog_cc_c11=no
4846ac_save_CC=$CC
4847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848/* end confdefs.h. */
4849$ac_c_conftest_c11_program
4850_ACEOF
4851for ac_arg in '' -std=gnu11
4852do
4853 CC="$ac_save_CC $ac_arg"
4854 if ac_fn_c_try_compile "$LINENO"
4855then :
4856 ac_cv_prog_cc_c11=$ac_arg
4857fi
4858rm -f core conftest.err conftest.$ac_objext conftest.beam
4859 test "x$ac_cv_prog_cc_c11" != "xno" && break
4860done
4861rm -f conftest.$ac_ext
4862CC=$ac_save_CC
4863fi
4864
4865if test "x$ac_cv_prog_cc_c11" = xno
4866then :
4867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4868printf "%s\n" "unsupported" >&6; }
4869else $as_nop
4870 if test "x$ac_cv_prog_cc_c11" = x
4871then :
4872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4873printf "%s\n" "none needed" >&6; }
4874else $as_nop
4875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4876printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4877 CC="$CC $ac_cv_prog_cc_c11"
4878fi
4879 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4880 ac_prog_cc_stdc=c11
4881fi
4882fi
4883if test x$ac_prog_cc_stdc = xno
4884then :
4885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4886printf %s "checking for $CC option to enable C99 features... " >&6; }
4887if test ${ac_cv_prog_cc_c99+y}
4888then :
4889 printf %s "(cached) " >&6
4890else $as_nop
4891 ac_cv_prog_cc_c99=no
4892ac_save_CC=$CC
4893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894/* end confdefs.h. */
4895$ac_c_conftest_c99_program
4896_ACEOF
4897for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4898do
4899 CC="$ac_save_CC $ac_arg"
4900 if ac_fn_c_try_compile "$LINENO"
4901then :
4902 ac_cv_prog_cc_c99=$ac_arg
4903fi
4904rm -f core conftest.err conftest.$ac_objext conftest.beam
4905 test "x$ac_cv_prog_cc_c99" != "xno" && break
4906done
4907rm -f conftest.$ac_ext
4908CC=$ac_save_CC
4909fi
4910
4911if test "x$ac_cv_prog_cc_c99" = xno
4912then :
4913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4914printf "%s\n" "unsupported" >&6; }
4915else $as_nop
4916 if test "x$ac_cv_prog_cc_c99" = x
4917then :
4918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4919printf "%s\n" "none needed" >&6; }
4920else $as_nop
4921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4922printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4923 CC="$CC $ac_cv_prog_cc_c99"
4924fi
4925 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4926 ac_prog_cc_stdc=c99
4927fi
4928fi
4929if test x$ac_prog_cc_stdc = xno
4930then :
4931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4932printf %s "checking for $CC option to enable C89 features... " >&6; }
4933if test ${ac_cv_prog_cc_c89+y}
4934then :
4935 printf %s "(cached) " >&6
4936else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004937 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004938ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004940/* end confdefs.h. */
Pablo Galindoba421752021-05-03 20:33:17 +01004941$ac_c_conftest_c89_program
Skip Montanaro6dead952003-09-25 14:50:04 +00004942_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01004943for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004944do
4945 CC="$ac_save_CC $ac_arg"
Pablo Galindoba421752021-05-03 20:33:17 +01004946 if ac_fn_c_try_compile "$LINENO"
4947then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004948 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004949fi
Pablo Galindoba421752021-05-03 20:33:17 +01004950rm -f core conftest.err conftest.$ac_objext conftest.beam
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004951 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004952done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004953rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004954CC=$ac_save_CC
Pablo Galindo53e55292021-04-05 17:38:40 +01004955fi
Christian Heimes39258d32021-04-17 11:36:35 +02004956
Pablo Galindoba421752021-05-03 20:33:17 +01004957if test "x$ac_cv_prog_cc_c89" = xno
4958then :
4959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4960printf "%s\n" "unsupported" >&6; }
4961else $as_nop
4962 if test "x$ac_cv_prog_cc_c89" = x
4963then :
4964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4965printf "%s\n" "none needed" >&6; }
4966else $as_nop
4967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4968printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4969 CC="$CC $ac_cv_prog_cc_c89"
4970fi
4971 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4972 ac_prog_cc_stdc=c89
4973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004974fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004975
Martin v. Löwis11437992002-04-12 09:54:03 +00004976ac_ext=c
4977ac_cpp='$CPP $CPPFLAGS'
4978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4980ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004982ac_ext=c
4983ac_cpp='$CPP $CPPFLAGS'
4984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4986ac_compiler_gnu=$ac_cv_c_compiler_gnu
Pablo Galindoba421752021-05-03 20:33:17 +01004987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4988printf %s "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004989# On Suns, sometimes $CPP names a directory.
4990if test -n "$CPP" && test -d "$CPP"; then
4991 CPP=
4992fi
4993if test -z "$CPP"; then
Pablo Galindoba421752021-05-03 20:33:17 +01004994 if test ${ac_cv_prog_CPP+y}
4995then :
4996 printf %s "(cached) " >&6
4997else $as_nop
4998 # Double quotes because $CC needs to be expanded
4999 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005000 do
5001 ac_preproc_ok=false
5002for ac_c_preproc_warn_flag in '' yes
5003do
5004 # Use a header file that comes with gcc, so configuring glibc
5005 # with a fresh cross-compiler works.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005006 # On the NeXT, cc -E runs the code through the compiler's parser,
5007 # not just through cpp. "Syntax error" is here to catch this case.
5008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5009/* end confdefs.h. */
Pablo Galindoba421752021-05-03 20:33:17 +01005010#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005011 Syntax error
5012_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01005013if ac_fn_c_try_cpp "$LINENO"
5014then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005015
Pablo Galindoba421752021-05-03 20:33:17 +01005016else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005017 # Broken: fails on valid input.
5018continue
5019fi
5020rm -f conftest.err conftest.i conftest.$ac_ext
5021
5022 # OK, works on sane cases. Now check whether nonexistent headers
5023 # can be detected and how.
5024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5025/* end confdefs.h. */
5026#include <ac_nonexistent.h>
5027_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01005028if ac_fn_c_try_cpp "$LINENO"
5029then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005030 # Broken: success on invalid input.
5031continue
Pablo Galindoba421752021-05-03 20:33:17 +01005032else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005033 # Passes both tests.
5034ac_preproc_ok=:
5035break
5036fi
5037rm -f conftest.err conftest.i conftest.$ac_ext
5038
5039done
5040# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5041rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +01005042if $ac_preproc_ok
5043then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005044 break
5045fi
5046
5047 done
5048 ac_cv_prog_CPP=$CPP
5049
5050fi
5051 CPP=$ac_cv_prog_CPP
5052else
5053 ac_cv_prog_CPP=$CPP
5054fi
Pablo Galindoba421752021-05-03 20:33:17 +01005055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5056printf "%s\n" "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005057ac_preproc_ok=false
5058for ac_c_preproc_warn_flag in '' yes
5059do
5060 # Use a header file that comes with gcc, so configuring glibc
5061 # with a fresh cross-compiler works.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005062 # On the NeXT, cc -E runs the code through the compiler's parser,
5063 # not just through cpp. "Syntax error" is here to catch this case.
5064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5065/* end confdefs.h. */
Pablo Galindoba421752021-05-03 20:33:17 +01005066#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005067 Syntax error
5068_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01005069if ac_fn_c_try_cpp "$LINENO"
5070then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005071
Pablo Galindoba421752021-05-03 20:33:17 +01005072else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005073 # Broken: fails on valid input.
5074continue
5075fi
5076rm -f conftest.err conftest.i conftest.$ac_ext
5077
5078 # OK, works on sane cases. Now check whether nonexistent headers
5079 # can be detected and how.
5080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5081/* end confdefs.h. */
5082#include <ac_nonexistent.h>
5083_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01005084if ac_fn_c_try_cpp "$LINENO"
5085then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005086 # Broken: success on invalid input.
5087continue
Pablo Galindoba421752021-05-03 20:33:17 +01005088else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005089 # Passes both tests.
5090ac_preproc_ok=:
5091break
5092fi
5093rm -f conftest.err conftest.i conftest.$ac_ext
5094
5095done
5096# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5097rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +01005098if $ac_preproc_ok
5099then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005100
Pablo Galindoba421752021-05-03 20:33:17 +01005101else $as_nop
5102 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5103printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005104as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5105See \`config.log' for more details" "$LINENO" 5; }
5106fi
5107
5108ac_ext=c
5109ac_cpp='$CPP $CPPFLAGS'
5110ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5111ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5112ac_compiler_gnu=$ac_cv_c_compiler_gnu
5113
Pablo Galindoba421752021-05-03 20:33:17 +01005114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5115printf %s "checking for grep that handles long lines and -e... " >&6; }
5116if test ${ac_cv_path_GREP+y}
5117then :
5118 printf %s "(cached) " >&6
5119else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005120 if test -z "$GREP"; then
5121 ac_path_GREP_found=false
5122 # Loop through the user's path and test for each of PROGNAME-LIST
5123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5125do
5126 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005127 case $as_dir in #(((
5128 '') as_dir=./ ;;
5129 */) ;;
5130 *) as_dir=$as_dir/ ;;
5131 esac
5132 for ac_prog in grep ggrep
5133 do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005134 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005135 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005136 as_fn_executable_p "$ac_path_GREP" || continue
5137# Check for GNU ac_path_GREP and select it if it is found.
5138 # Check for GNU $ac_path_GREP
5139case `"$ac_path_GREP" --version 2>&1` in
5140*GNU*)
5141 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5142*)
5143 ac_count=0
Pablo Galindoba421752021-05-03 20:33:17 +01005144 printf %s 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005145 while :
5146 do
5147 cat "conftest.in" "conftest.in" >"conftest.tmp"
5148 mv "conftest.tmp" "conftest.in"
5149 cp "conftest.in" "conftest.nl"
Pablo Galindoba421752021-05-03 20:33:17 +01005150 printf "%s\n" 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005151 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5152 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5153 as_fn_arith $ac_count + 1 && ac_count=$as_val
5154 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5155 # Best one so far, save it but keep looking for a better one
5156 ac_cv_path_GREP="$ac_path_GREP"
5157 ac_path_GREP_max=$ac_count
5158 fi
5159 # 10*(2^10) chars as input seems more than enough
5160 test $ac_count -gt 10 && break
5161 done
5162 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5163esac
5164
5165 $ac_path_GREP_found && break 3
5166 done
5167 done
5168 done
5169IFS=$as_save_IFS
5170 if test -z "$ac_cv_path_GREP"; then
5171 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5172 fi
5173else
5174 ac_cv_path_GREP=$GREP
5175fi
5176
5177fi
Pablo Galindoba421752021-05-03 20:33:17 +01005178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5179printf "%s\n" "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005180 GREP="$ac_cv_path_GREP"
5181
5182
Pablo Galindoba421752021-05-03 20:33:17 +01005183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5184printf %s "checking for a sed that does not truncate output... " >&6; }
5185if test ${ac_cv_path_SED+y}
5186then :
5187 printf %s "(cached) " >&6
5188else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -07005189 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5190 for ac_i in 1 2 3 4 5 6 7; do
5191 ac_script="$ac_script$as_nl$ac_script"
5192 done
5193 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5194 { ac_script=; unset ac_script;}
5195 if test -z "$SED"; then
5196 ac_path_SED_found=false
5197 # Loop through the user's path and test for each of PROGNAME-LIST
5198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005202 case $as_dir in #(((
5203 '') as_dir=./ ;;
5204 */) ;;
5205 *) as_dir=$as_dir/ ;;
5206 esac
5207 for ac_prog in sed gsed
5208 do
Łukasz Langaa785c872016-09-09 17:37:37 -07005209 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005210 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07005211 as_fn_executable_p "$ac_path_SED" || continue
5212# Check for GNU ac_path_SED and select it if it is found.
5213 # Check for GNU $ac_path_SED
5214case `"$ac_path_SED" --version 2>&1` in
5215*GNU*)
5216 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5217*)
5218 ac_count=0
Pablo Galindoba421752021-05-03 20:33:17 +01005219 printf %s 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07005220 while :
5221 do
5222 cat "conftest.in" "conftest.in" >"conftest.tmp"
5223 mv "conftest.tmp" "conftest.in"
5224 cp "conftest.in" "conftest.nl"
Pablo Galindoba421752021-05-03 20:33:17 +01005225 printf "%s\n" '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07005226 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5227 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5228 as_fn_arith $ac_count + 1 && ac_count=$as_val
5229 if test $ac_count -gt ${ac_path_SED_max-0}; then
5230 # Best one so far, save it but keep looking for a better one
5231 ac_cv_path_SED="$ac_path_SED"
5232 ac_path_SED_max=$ac_count
5233 fi
5234 # 10*(2^10) chars as input seems more than enough
5235 test $ac_count -gt 10 && break
5236 done
5237 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5238esac
5239
5240 $ac_path_SED_found && break 3
5241 done
5242 done
5243 done
5244IFS=$as_save_IFS
5245 if test -z "$ac_cv_path_SED"; then
5246 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5247 fi
5248else
5249 ac_cv_path_SED=$SED
5250fi
5251
5252fi
Pablo Galindoba421752021-05-03 20:33:17 +01005253{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5254printf "%s\n" "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07005255 SED="$ac_cv_path_SED"
5256 rm -f conftest.sed
5257
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005258
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005259
5260
Pablo Galindoba421752021-05-03 20:33:17 +01005261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
5262printf %s "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005264# Check whether --with-cxx_main was given.
Pablo Galindoba421752021-05-03 20:33:17 +01005265if test ${with_cxx_main+y}
5266then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005267 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005268
5269 case $withval in
5270 no) with_cxx_main=no
5271 MAINCC='$(CC)';;
5272 yes) with_cxx_main=yes
5273 MAINCC='$(CXX)';;
5274 *) with_cxx_main=yes
5275 MAINCC=$withval
5276 if test -z "$CXX"
5277 then
5278 CXX=$withval
5279 fi;;
5280 esac
Pablo Galindoba421752021-05-03 20:33:17 +01005281else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005282
5283 with_cxx_main=no
5284 MAINCC='$(CC)'
5285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005286fi
5287
Pablo Galindoba421752021-05-03 20:33:17 +01005288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
5289printf "%s\n" "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005290
5291preset_cxx="$CXX"
5292if test -z "$CXX"
5293then
5294 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005295 gcc) if test -n "$ac_tool_prefix"; then
5296 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
5297set dummy ${ac_tool_prefix}g++; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005298{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5299printf %s "checking for $ac_word... " >&6; }
5300if test ${ac_cv_path_CXX+y}
5301then :
5302 printf %s "(cached) " >&6
5303else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005304 case $CXX in
5305 [\\/]* | ?:[\\/]*)
5306 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5307 ;;
5308 *)
5309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5310for as_dir in notfound
5311do
5312 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005313 case $as_dir in #(((
5314 '') as_dir=./ ;;
5315 */) ;;
5316 *) as_dir=$as_dir/ ;;
5317 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005318 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005319 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5320 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5321 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005322 break 2
5323 fi
5324done
5325 done
5326IFS=$as_save_IFS
5327
5328 ;;
5329esac
5330fi
5331CXX=$ac_cv_path_CXX
5332if test -n "$CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5334printf "%s\n" "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005335else
Pablo Galindoba421752021-05-03 20:33:17 +01005336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5337printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005338fi
5339
5340
5341fi
5342if test -z "$ac_cv_path_CXX"; then
5343 ac_pt_CXX=$CXX
5344 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005345set dummy g++; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347printf %s "checking for $ac_word... " >&6; }
5348if test ${ac_cv_path_ac_pt_CXX+y}
5349then :
5350 printf %s "(cached) " >&6
5351else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005352 case $ac_pt_CXX in
5353 [\\/]* | ?:[\\/]*)
5354 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5355 ;;
5356 *)
5357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358for as_dir in notfound
5359do
5360 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005361 case $as_dir in #(((
5362 '') as_dir=./ ;;
5363 */) ;;
5364 *) as_dir=$as_dir/ ;;
5365 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005366 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005367 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5368 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5369 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005370 break 2
5371 fi
5372done
5373 done
5374IFS=$as_save_IFS
5375
5376 ;;
5377esac
5378fi
5379ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5380if test -n "$ac_pt_CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5382printf "%s\n" "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005383else
Pablo Galindoba421752021-05-03 20:33:17 +01005384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005386fi
5387
5388 if test "x$ac_pt_CXX" = x; then
5389 CXX="g++"
5390 else
5391 case $cross_compiling:$ac_tool_warned in
5392yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01005393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5394printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005395ac_tool_warned=yes ;;
5396esac
5397 CXX=$ac_pt_CXX
5398 fi
5399else
5400 CXX="$ac_cv_path_CXX"
5401fi
5402 ;;
5403 cc) if test -n "$ac_tool_prefix"; then
5404 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
5405set dummy ${ac_tool_prefix}c++; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5407printf %s "checking for $ac_word... " >&6; }
5408if test ${ac_cv_path_CXX+y}
5409then :
5410 printf %s "(cached) " >&6
5411else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005412 case $CXX in
5413 [\\/]* | ?:[\\/]*)
5414 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5415 ;;
5416 *)
5417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418for as_dir in notfound
5419do
5420 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005421 case $as_dir in #(((
5422 '') as_dir=./ ;;
5423 */) ;;
5424 *) as_dir=$as_dir/ ;;
5425 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005427 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5428 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5429 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005430 break 2
5431 fi
5432done
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005435
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005436 ;;
5437esac
5438fi
5439CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005440if test -n "$CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5442printf "%s\n" "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005443else
Pablo Galindoba421752021-05-03 20:33:17 +01005444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5445printf "%s\n" "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005448
5449fi
5450if test -z "$ac_cv_path_CXX"; then
5451 ac_pt_CXX=$CXX
5452 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005453set dummy c++; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455printf %s "checking for $ac_word... " >&6; }
5456if test ${ac_cv_path_ac_pt_CXX+y}
5457then :
5458 printf %s "(cached) " >&6
5459else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005460 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005461 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005462 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 +00005463 ;;
5464 *)
5465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466for as_dir in notfound
5467do
5468 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005469 case $as_dir in #(((
5470 '') as_dir=./ ;;
5471 */) ;;
5472 *) as_dir=$as_dir/ ;;
5473 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005475 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5476 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5477 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005478 break 2
5479 fi
5480done
Matthias Kloseb9621712010-04-24 17:59:49 +00005481 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005482IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005483
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005484 ;;
5485esac
5486fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005487ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5488if test -n "$ac_pt_CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5490printf "%s\n" "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005491else
Pablo Galindoba421752021-05-03 20:33:17 +01005492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5493printf "%s\n" "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005495
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005496 if test "x$ac_pt_CXX" = x; then
5497 CXX="c++"
5498 else
5499 case $cross_compiling:$ac_tool_warned in
5500yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01005501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5502printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005503ac_tool_warned=yes ;;
5504esac
5505 CXX=$ac_pt_CXX
5506 fi
5507else
5508 CXX="$ac_cv_path_CXX"
5509fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005510 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005511 clang|*/clang) if test -n "$ac_tool_prefix"; then
5512 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
5513set dummy ${ac_tool_prefix}clang++; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5515printf %s "checking for $ac_word... " >&6; }
5516if test ${ac_cv_path_CXX+y}
5517then :
5518 printf %s "(cached) " >&6
5519else $as_nop
Ned Deilycbfb9a52012-06-23 16:02:19 -07005520 case $CXX in
5521 [\\/]* | ?:[\\/]*)
5522 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5523 ;;
5524 *)
5525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5526for as_dir in notfound
5527do
5528 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005529 case $as_dir in #(((
5530 '') as_dir=./ ;;
5531 */) ;;
5532 *) as_dir=$as_dir/ ;;
5533 esac
Ned Deilycbfb9a52012-06-23 16:02:19 -07005534 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005535 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5536 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5537 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07005538 break 2
5539 fi
5540done
5541 done
5542IFS=$as_save_IFS
5543
Ned Deilycbfb9a52012-06-23 16:02:19 -07005544 ;;
5545esac
5546fi
5547CXX=$ac_cv_path_CXX
5548if test -n "$CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5550printf "%s\n" "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07005551else
Pablo Galindoba421752021-05-03 20:33:17 +01005552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5553printf "%s\n" "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07005554fi
5555
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005556
5557fi
5558if test -z "$ac_cv_path_CXX"; then
5559 ac_pt_CXX=$CXX
5560 # Extract the first word of "clang++", so it can be a program name with args.
5561set dummy clang++; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5563printf %s "checking for $ac_word... " >&6; }
5564if test ${ac_cv_path_ac_pt_CXX+y}
5565then :
5566 printf %s "(cached) " >&6
5567else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005568 case $ac_pt_CXX in
5569 [\\/]* | ?:[\\/]*)
5570 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5571 ;;
5572 *)
5573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in notfound
5575do
5576 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005577 case $as_dir in #(((
5578 '') as_dir=./ ;;
5579 */) ;;
5580 *) as_dir=$as_dir/ ;;
5581 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005582 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005583 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5584 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5585 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005586 break 2
5587 fi
5588done
5589 done
5590IFS=$as_save_IFS
5591
5592 ;;
5593esac
5594fi
5595ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5596if test -n "$ac_pt_CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5598printf "%s\n" "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005599else
Pablo Galindoba421752021-05-03 20:33:17 +01005600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5601printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005602fi
5603
5604 if test "x$ac_pt_CXX" = x; then
5605 CXX="clang++"
5606 else
5607 case $cross_compiling:$ac_tool_warned in
5608yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01005609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5610printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005611ac_tool_warned=yes ;;
5612esac
5613 CXX=$ac_pt_CXX
5614 fi
5615else
5616 CXX="$ac_cv_path_CXX"
5617fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005618 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005619 icc|*/icc) if test -n "$ac_tool_prefix"; then
5620 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5621set dummy ${ac_tool_prefix}icpc; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5623printf %s "checking for $ac_word... " >&6; }
5624if test ${ac_cv_path_CXX+y}
5625then :
5626 printf %s "(cached) " >&6
5627else $as_nop
Zachary Ware5af85642015-12-21 12:09:17 -06005628 case $CXX in
5629 [\\/]* | ?:[\\/]*)
5630 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5631 ;;
5632 *)
5633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5634for as_dir in notfound
5635do
5636 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005637 case $as_dir in #(((
5638 '') as_dir=./ ;;
5639 */) ;;
5640 *) as_dir=$as_dir/ ;;
5641 esac
Zachary Ware5af85642015-12-21 12:09:17 -06005642 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005643 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5644 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5645 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005646 break 2
5647 fi
5648done
5649 done
5650IFS=$as_save_IFS
5651
5652 ;;
5653esac
5654fi
5655CXX=$ac_cv_path_CXX
5656if test -n "$CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5658printf "%s\n" "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005659else
Pablo Galindoba421752021-05-03 20:33:17 +01005660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661printf "%s\n" "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005662fi
5663
5664
5665fi
5666if test -z "$ac_cv_path_CXX"; then
5667 ac_pt_CXX=$CXX
5668 # Extract the first word of "icpc", so it can be a program name with args.
5669set dummy icpc; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671printf %s "checking for $ac_word... " >&6; }
5672if test ${ac_cv_path_ac_pt_CXX+y}
5673then :
5674 printf %s "(cached) " >&6
5675else $as_nop
Zachary Ware5af85642015-12-21 12:09:17 -06005676 case $ac_pt_CXX in
5677 [\\/]* | ?:[\\/]*)
5678 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5679 ;;
5680 *)
5681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5682for as_dir in notfound
5683do
5684 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005685 case $as_dir in #(((
5686 '') as_dir=./ ;;
5687 */) ;;
5688 *) as_dir=$as_dir/ ;;
5689 esac
Zachary Ware5af85642015-12-21 12:09:17 -06005690 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005691 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5692 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5693 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005694 break 2
5695 fi
5696done
5697 done
5698IFS=$as_save_IFS
5699
5700 ;;
5701esac
5702fi
5703ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5704if test -n "$ac_pt_CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5706printf "%s\n" "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005707else
Pablo Galindoba421752021-05-03 20:33:17 +01005708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709printf "%s\n" "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005710fi
5711
5712 if test "x$ac_pt_CXX" = x; then
5713 CXX="icpc"
5714 else
5715 case $cross_compiling:$ac_tool_warned in
5716yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01005717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5718printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005719ac_tool_warned=yes ;;
5720esac
5721 CXX=$ac_pt_CXX
5722 fi
5723else
5724 CXX="$ac_cv_path_CXX"
5725fi
5726 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005727 esac
5728 if test "$CXX" = "notfound"
5729 then
5730 CXX=""
5731 fi
5732fi
5733if test -z "$CXX"
5734then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005735 if test -n "$ac_tool_prefix"; then
5736 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5737 do
5738 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741printf %s "checking for $ac_word... " >&6; }
5742if test ${ac_cv_prog_CXX+y}
5743then :
5744 printf %s "(cached) " >&6
5745else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005746 if test -n "$CXX"; then
5747 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5748else
5749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005753 case $as_dir in #(((
5754 '') as_dir=./ ;;
5755 */) ;;
5756 *) as_dir=$as_dir/ ;;
5757 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005759 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005760 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01005761 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005762 break 2
5763 fi
5764done
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005766IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005767
5768fi
5769fi
5770CXX=$ac_cv_prog_CXX
5771if test -n "$CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5773printf "%s\n" "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005774else
Pablo Galindoba421752021-05-03 20:33:17 +01005775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776printf "%s\n" "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005777fi
5778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005780 test -n "$CXX" && break
5781 done
5782fi
5783if test -z "$CXX"; then
5784 ac_ct_CXX=$CXX
5785 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5786do
5787 # Extract the first word of "$ac_prog", so it can be a program name with args.
5788set dummy $ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01005789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790printf %s "checking for $ac_word... " >&6; }
5791if test ${ac_cv_prog_ac_ct_CXX+y}
5792then :
5793 printf %s "(cached) " >&6
5794else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005795 if test -n "$ac_ct_CXX"; then
5796 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5797else
5798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5799for as_dir in $PATH
5800do
5801 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01005802 case $as_dir in #(((
5803 '') as_dir=./ ;;
5804 */) ;;
5805 *) as_dir=$as_dir/ ;;
5806 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005807 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01005808 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005809 ac_cv_prog_ac_ct_CXX="$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01005810 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005811 break 2
5812 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005813done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005814 done
5815IFS=$as_save_IFS
5816
5817fi
5818fi
5819ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5820if test -n "$ac_ct_CXX"; then
Pablo Galindoba421752021-05-03 20:33:17 +01005821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5822printf "%s\n" "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005823else
Pablo Galindoba421752021-05-03 20:33:17 +01005824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5825printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005826fi
5827
5828
5829 test -n "$ac_ct_CXX" && break
5830done
5831
5832 if test "x$ac_ct_CXX" = x; then
5833 CXX="notfound"
5834 else
5835 case $cross_compiling:$ac_tool_warned in
5836yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01005837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5838printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005839ac_tool_warned=yes ;;
5840esac
5841 CXX=$ac_ct_CXX
5842 fi
5843fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005844
5845 if test "$CXX" = "notfound"
5846 then
5847 CXX=""
5848 fi
5849fi
5850if test "$preset_cxx" != "$CXX"
5851then
Pablo Galindoba421752021-05-03 20:33:17 +01005852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005853
5854 By default, distutils will build C++ extension modules with \"$CXX\".
5855 If this is not intended, then set CXX on the configure command line.
5856 " >&5
Pablo Galindoba421752021-05-03 20:33:17 +01005857printf "%s\n" "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005858
5859 By default, distutils will build C++ extension modules with \"$CXX\".
5860 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005861 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005862fi
5863
5864
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005865MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5866
5867
Pablo Galindoba421752021-05-03 20:33:17 +01005868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5869printf %s "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005870cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005871#undef bfin
5872#undef cris
5873#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005874#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005875#undef hppa
5876#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005877#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005878#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005879#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005880#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005881#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005882#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005883 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005884#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005885# if defined(__x86_64__) && defined(__LP64__)
5886 x86_64-linux-gnu
5887# elif defined(__x86_64__) && defined(__ILP32__)
5888 x86_64-linux-gnux32
5889# elif defined(__i386__)
5890 i386-linux-gnu
5891# elif defined(__aarch64__) && defined(__AARCH64EL__)
5892# if defined(__ILP32__)
5893 aarch64_ilp32-linux-gnu
5894# else
5895 aarch64-linux-gnu
5896# endif
5897# elif defined(__aarch64__) && defined(__AARCH64EB__)
5898# if defined(__ILP32__)
5899 aarch64_be_ilp32-linux-gnu
5900# else
5901 aarch64_be-linux-gnu
5902# endif
5903# elif defined(__alpha__)
5904 alpha-linux-gnu
5905# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5906# if defined(__ARMEL__)
5907 arm-linux-gnueabihf
5908# else
5909 armeb-linux-gnueabihf
5910# endif
5911# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5912# if defined(__ARMEL__)
5913 arm-linux-gnueabi
5914# else
5915 armeb-linux-gnueabi
5916# endif
5917# elif defined(__hppa__)
5918 hppa-linux-gnu
5919# elif defined(__ia64__)
5920 ia64-linux-gnu
5921# elif defined(__m68k__) && !defined(__mcoldfire__)
5922 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005923# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5924# if _MIPS_SIM == _ABIO32
5925 mipsisa32r6el-linux-gnu
5926# elif _MIPS_SIM == _ABIN32
5927 mipsisa64r6el-linux-gnuabin32
5928# elif _MIPS_SIM == _ABI64
5929 mipsisa64r6el-linux-gnuabi64
5930# else
5931# error unknown platform triplet
5932# endif
5933# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5934# if _MIPS_SIM == _ABIO32
5935 mipsisa32r6-linux-gnu
5936# elif _MIPS_SIM == _ABIN32
5937 mipsisa64r6-linux-gnuabin32
5938# elif _MIPS_SIM == _ABI64
5939 mipsisa64r6-linux-gnuabi64
5940# else
5941# error unknown platform triplet
5942# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005943# elif defined(__mips_hard_float) && defined(_MIPSEL)
5944# if _MIPS_SIM == _ABIO32
5945 mipsel-linux-gnu
5946# elif _MIPS_SIM == _ABIN32
5947 mips64el-linux-gnuabin32
5948# elif _MIPS_SIM == _ABI64
5949 mips64el-linux-gnuabi64
5950# else
5951# error unknown platform triplet
5952# endif
5953# elif defined(__mips_hard_float)
5954# if _MIPS_SIM == _ABIO32
5955 mips-linux-gnu
5956# elif _MIPS_SIM == _ABIN32
5957 mips64-linux-gnuabin32
5958# elif _MIPS_SIM == _ABI64
5959 mips64-linux-gnuabi64
5960# else
5961# error unknown platform triplet
5962# endif
5963# elif defined(__or1k__)
5964 or1k-linux-gnu
5965# elif defined(__powerpc__) && defined(__SPE__)
5966 powerpc-linux-gnuspe
5967# elif defined(__powerpc64__)
5968# if defined(__LITTLE_ENDIAN__)
5969 powerpc64le-linux-gnu
5970# else
5971 powerpc64-linux-gnu
5972# endif
5973# elif defined(__powerpc__)
5974 powerpc-linux-gnu
5975# elif defined(__s390x__)
5976 s390x-linux-gnu
5977# elif defined(__s390__)
5978 s390-linux-gnu
5979# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5980 sh4-linux-gnu
5981# elif defined(__sparc__) && defined(__arch64__)
5982 sparc64-linux-gnu
5983# elif defined(__sparc__)
5984 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005985# elif defined(__riscv)
5986# if __riscv_xlen == 32
5987 riscv32-linux-gnu
5988# elif __riscv_xlen == 64
5989 riscv64-linux-gnu
5990# else
5991# error unknown platform triplet
5992# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005993# else
5994# error unknown platform triplet
5995# endif
5996#elif defined(__FreeBSD_kernel__)
5997# if defined(__LP64__)
5998 x86_64-kfreebsd-gnu
5999# elif defined(__i386__)
6000 i386-kfreebsd-gnu
6001# else
6002# error unknown platform triplet
6003# endif
6004#elif defined(__gnu_hurd__)
6005 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07006006#elif defined(__APPLE__)
6007 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08006008#elif defined(__VXWORKS__)
6009 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006010#else
6011# error unknown platform triplet
6012#endif
6013
6014EOF
6015
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02006016if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006017 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Pablo Galindoba421752021-05-03 20:33:17 +01006018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
6019printf "%s\n" "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006020else
Pablo Galindoba421752021-05-03 20:33:17 +01006021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
6022printf "%s\n" "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006023fi
6024rm -f conftest.c conftest.out
6025
6026if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
6027 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
6028 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
6029 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02006030elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
6031 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006032fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006033
doko@ubuntu.com55532312016-06-14 08:55:19 +02006034if test x$MULTIARCH != x; then
6035 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
6036fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006037
6038
Pablo Galindoba421752021-05-03 20:33:17 +01006039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
6040printf %s "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006041save_LDFLAGS="$LDFLAGS"
6042LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00006043
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6045/* end confdefs.h. */
6046
6047int
Pablo Galindoba421752021-05-03 20:33:17 +01006048main (void)
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006049{
6050
6051 ;
6052 return 0;
6053}
6054_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01006055if ac_fn_c_try_link "$LINENO"
6056then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006057 NO_AS_NEEDED="-Wl,--no-as-needed"
Pablo Galindoba421752021-05-03 20:33:17 +01006058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6059printf "%s\n" "yes" >&6; }
6060else $as_nop
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006061 NO_AS_NEEDED=""
Pablo Galindoba421752021-05-03 20:33:17 +01006062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063printf "%s\n" "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006064fi
Pablo Galindoba421752021-05-03 20:33:17 +01006065rm -f core conftest.err conftest.$ac_objext conftest.beam \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006066 conftest$ac_exeext conftest.$ac_ext
6067LDFLAGS="$save_LDFLAGS"
6068
6069
6070
6071# checks for UNIX variants that set C preprocessor variables
Pablo Galindoba421752021-05-03 20:33:17 +01006072ac_header= ac_cache=
6073for ac_item in $ac_header_c_list
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006074do
Pablo Galindoba421752021-05-03 20:33:17 +01006075 if test $ac_cache; then
6076 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6077 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6078 printf "%s\n" "#define $ac_item 1" >> confdefs.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006079 fi
Pablo Galindoba421752021-05-03 20:33:17 +01006080 ac_header= ac_cache=
6081 elif test $ac_header; then
6082 ac_cache=$ac_item
6083 else
6084 ac_header=$ac_item
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006086done
6087
6088
6089
Pablo Galindoba421752021-05-03 20:33:17 +01006090
6091
6092
6093
6094
6095if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6096then :
6097
6098printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6099
Matthias Kloseb9621712010-04-24 17:59:49 +00006100fi
6101
6102
Matthias Kloseb9621712010-04-24 17:59:49 +00006103
6104
Matthias Kloseb9621712010-04-24 17:59:49 +00006105
6106
Pablo Galindoba421752021-05-03 20:33:17 +01006107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6108printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6109if test ${ac_cv_safe_to_define___extensions__+y}
6110then :
6111 printf %s "(cached) " >&6
6112else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00006113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6114/* end confdefs.h. */
6115
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006116# define __EXTENSIONS__ 1
6117 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00006118int
Pablo Galindoba421752021-05-03 20:33:17 +01006119main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00006120{
6121
6122 ;
6123 return 0;
6124}
6125_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01006126if ac_fn_c_try_compile "$LINENO"
6127then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 ac_cv_safe_to_define___extensions__=yes
Pablo Galindoba421752021-05-03 20:33:17 +01006129else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00006130 ac_cv_safe_to_define___extensions__=no
6131fi
Pablo Galindoba421752021-05-03 20:33:17 +01006132rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006133fi
Pablo Galindoba421752021-05-03 20:33:17 +01006134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6135printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00006136
Pablo Galindoba421752021-05-03 20:33:17 +01006137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6138printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6139if test ${ac_cv_should_define__xopen_source+y}
6140then :
6141 printf %s "(cached) " >&6
6142else $as_nop
6143 ac_cv_should_define__xopen_source=no
6144 if test $ac_cv_header_wchar_h = yes
6145then :
6146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6147/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00006148
Pablo Galindoba421752021-05-03 20:33:17 +01006149 #include <wchar.h>
6150 mbstate_t x;
6151int
6152main (void)
6153{
Matthias Kloseb9621712010-04-24 17:59:49 +00006154
Pablo Galindoba421752021-05-03 20:33:17 +01006155 ;
6156 return 0;
6157}
6158_ACEOF
6159if ac_fn_c_try_compile "$LINENO"
6160then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006161
Pablo Galindoba421752021-05-03 20:33:17 +01006162else $as_nop
6163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6164/* end confdefs.h. */
6165
6166 #define _XOPEN_SOURCE 500
6167 #include <wchar.h>
6168 mbstate_t x;
6169int
6170main (void)
6171{
6172
6173 ;
6174 return 0;
6175}
6176_ACEOF
6177if ac_fn_c_try_compile "$LINENO"
6178then :
6179 ac_cv_should_define__xopen_source=yes
6180fi
6181rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6182fi
6183rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6184fi
6185fi
6186{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6187printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6188
6189 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6190
6191 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6192
6193 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6194
6195 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6196
6197 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6198
6199 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6200
6201 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6202
6203 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6204
6205 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6206
6207 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6208
6209 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6210
6211 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6212
6213 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6214
6215 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6216
6217 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6218
6219 if test $ac_cv_header_minix_config_h = yes
6220then :
6221 MINIX=yes
6222 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6223
6224 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6225
6226 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6227
6228else $as_nop
6229 MINIX=
6230fi
6231 if test $ac_cv_safe_to_define___extensions__ = yes
6232then :
6233 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6234
6235fi
6236 if test $ac_cv_should_define__xopen_source = yes
6237then :
6238 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6239
6240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006241
6242
Pablo Galindoba421752021-05-03 20:33:17 +01006243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
6244printf %s "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02006245cat >> conftest.c <<EOF
6246#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006247android_api = __ANDROID_API__
6248arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02006249#else
6250#error not Android
6251#endif
6252EOF
6253
6254if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006255 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
6256 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Pablo Galindoba421752021-05-03 20:33:17 +01006257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
6258printf "%s\n" "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01006259 if test -z "$ANDROID_API_LEVEL"; then
6260 echo 'Fatal: you must define __ANDROID_API__'
6261 exit 1
6262 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02006263
Pablo Galindoba421752021-05-03 20:33:17 +01006264printf "%s\n" "#define ANDROID_API_LEVEL $ANDROID_API_LEVEL" >>confdefs.h
Xavier de Gaye95750b12016-07-09 11:05:42 +02006265
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006266
Pablo Galindoba421752021-05-03 20:33:17 +01006267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
6268printf %s "checking for the Android arm ABI... " >&6; }
6269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
6270printf "%s\n" "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006271 if test "$_arm_arch" = 7; then
6272 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
6273 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
6274 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02006275else
Pablo Galindoba421752021-05-03 20:33:17 +01006276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
6277printf "%s\n" "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02006278fi
6279rm -f conftest.c conftest.out
6280
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281# Check for unsupported systems
6282case $ac_sys_system/$ac_sys_release in
6283atheos*|Linux*/1*)
6284 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
6285 echo See README for details.
6286 exit 1;;
6287esac
6288
6289
Pablo Galindoba421752021-05-03 20:33:17 +01006290{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
6291printf %s "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292
6293# Check whether --with-suffix was given.
Pablo Galindoba421752021-05-03 20:33:17 +01006294if test ${with_suffix+y}
6295then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296 withval=$with_suffix;
6297 case $withval in
6298 no) EXEEXT=;;
6299 yes) EXEEXT=.exe;;
6300 *) EXEEXT=$withval;;
6301 esac
6302fi
6303
Pablo Galindoba421752021-05-03 20:33:17 +01006304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
6305printf "%s\n" "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306
6307# Test whether we're running on a non-case-sensitive system, in which
6308# case we give a warning if no ext is given
6309
Pablo Galindoba421752021-05-03 20:33:17 +01006310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
6311printf %s "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312if test ! -d CaseSensitiveTestDir; then
6313mkdir CaseSensitiveTestDir
6314fi
6315
6316if test -d casesensitivetestdir
6317then
Pablo Galindoba421752021-05-03 20:33:17 +01006318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6319printf "%s\n" "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 BUILDEXEEXT=.exe
6321else
Pablo Galindoba421752021-05-03 20:33:17 +01006322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324 BUILDEXEEXT=$EXEEXT
6325fi
6326rmdir CaseSensitiveTestDir
6327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328case $ac_sys_system in
6329hp*|HP*)
6330 case $CC in
6331 cc|*/cc) CC="$CC -Ae";;
6332 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333esac
6334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335
Pablo Galindoba421752021-05-03 20:33:17 +01006336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
6337printf %s "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338if test -z "$LIBRARY"
6339then
Barry Warsawf040d7d2010-10-18 17:09:07 +00006340 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341fi
Pablo Galindoba421752021-05-03 20:33:17 +01006342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
6343printf "%s\n" "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344
6345# LDLIBRARY is the name of the library to link against (as opposed to the
6346# name of the library into which to insert object files). BLDLIBRARY is also
6347# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
6348# is blank as the main program is not linked directly against LDLIBRARY.
6349# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
6350# systems without shared libraries, LDLIBRARY is the same as LIBRARY
6351# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
6352# DLLLIBRARY is the shared (i.e., DLL) library.
6353#
6354# RUNSHARED is used to run shared python without installed libraries
6355#
6356# INSTSONAME is the name of the shared library that will be use to install
6357# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006358#
6359# LDVERSION is the shared library version number, normally the Python version
6360# with the ABI build flags appended.
6361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362
6363
6364
6365
6366
6367
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369LDLIBRARY="$LIBRARY"
6370BLDLIBRARY='$(LDLIBRARY)'
6371INSTSONAME='$(LDLIBRARY)'
6372DLLLIBRARY=''
6373LDLIBRARYDIR=''
6374RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006375LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377# LINKCC is the command that links the python executable -- default is $(CC).
6378# If CXX is set, and if it is needed to link a main function that was
6379# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
6380# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381
Pablo Galindoba421752021-05-03 20:33:17 +01006382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
6383printf %s "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384if test -z "$LINKCC"
6385then
6386 LINKCC='$(PURIFY) $(MAINCC)'
6387 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388 QNX*)
6389 # qcc must be used because the other compilers do not
6390 # support -N.
6391 LINKCC=qcc;;
6392 esac
6393fi
Pablo Galindoba421752021-05-03 20:33:17 +01006394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
6395printf "%s\n" "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396
Stefan Krahe6dcd372020-08-29 17:00:08 +02006397# EXPORTSYMS holds the list of exported symbols for AIX.
6398# EXPORTSFROM holds the module name exporting symbols on AIX.
6399EXPORTSYMS=
6400EXPORTSFROM=
6401
6402
Pablo Galindoba421752021-05-03 20:33:17 +01006403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
6404printf %s "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02006405case $ac_sys_system in
6406AIX*)
6407 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06006408 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02006409 ;;
6410esac
Pablo Galindoba421752021-05-03 20:33:17 +01006411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
6412printf "%s\n" "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02006413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
6415# make sure we default having it set to "no": this is used by
6416# distutils.unixccompiler to know if it should add --enable-new-dtags
6417# to linker command lines, and failing to detect GNU ld simply results
6418# in the same bahaviour as before.
6419
Pablo Galindoba421752021-05-03 20:33:17 +01006420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6421printf %s "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422ac_prog=ld
6423if test "$GCC" = yes; then
6424 ac_prog=`$CC -print-prog-name=ld`
6425fi
6426case `"$ac_prog" -V 2>&1 < /dev/null` in
6427 *GNU*)
6428 GNULD=yes;;
6429 *)
6430 GNULD=no;;
6431esac
Pablo Galindoba421752021-05-03 20:33:17 +01006432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
6433printf "%s\n" "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434
Pablo Galindoba421752021-05-03 20:33:17 +01006435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
6436printf %s "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437# Check whether --enable-shared was given.
Pablo Galindoba421752021-05-03 20:33:17 +01006438if test ${enable_shared+y}
6439then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440 enableval=$enable_shared;
6441fi
6442
6443
6444if test -z "$enable_shared"
6445then
6446 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006447 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006448 enable_shared="yes";;
6449 *)
6450 enable_shared="no";;
6451 esac
6452fi
Pablo Galindoba421752021-05-03 20:33:17 +01006453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
6454printf "%s\n" "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455
Pablo Galindoba421752021-05-03 20:33:17 +01006456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
6457printf %s "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458# Check whether --enable-profiling was given.
Pablo Galindoba421752021-05-03 20:33:17 +01006459if test ${enable_profiling+y}
6460then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02006461 enableval=$enable_profiling;
6462fi
6463
6464if test "x$enable_profiling" = xyes; then
6465 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04006466 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00006467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006468/* end confdefs.h. */
6469int main() { return 0; }
6470_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01006471if ac_fn_c_try_link "$LINENO"
6472then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02006473
Pablo Galindoba421752021-05-03 20:33:17 +01006474else $as_nop
doko@ubuntu.comba015832012-06-30 16:52:05 +02006475 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476fi
Pablo Galindoba421752021-05-03 20:33:17 +01006477rm -f core conftest.err conftest.$ac_objext conftest.beam \
doko@ubuntu.comba015832012-06-30 16:52:05 +02006478 conftest$ac_exeext conftest.$ac_ext
6479 CC="$ac_save_cc"
6480else
6481 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482fi
Pablo Galindoba421752021-05-03 20:33:17 +01006483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
6484printf "%s\n" "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485
doko@ubuntu.comba015832012-06-30 16:52:05 +02006486if test "x$enable_profiling" = xyes; then
6487 BASECFLAGS="-pg $BASECFLAGS"
6488 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006489fi
6490
Pablo Galindoba421752021-05-03 20:33:17 +01006491{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
6492printf %s "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006493
6494# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
6495# library that we build, but we do not want to link against it (we
6496# will find it with a -framework option). For this reason there is an
6497# extra variable BLDLIBRARY against which Python and the extension
6498# modules are linked, BLDLIBRARY. This is normally the same as
6499# LDLIBRARY, but empty for MacOSX framework builds.
6500if test "$enable_framework"
6501then
6502 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006503 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 BLDLIBRARY=''
6505else
6506 BLDLIBRARY='$(LDLIBRARY)'
6507fi
6508
6509# Other platforms follow
6510if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006511 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512
Pablo Galindoba421752021-05-03 20:33:17 +01006513printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514
6515 case $ac_sys_system in
6516 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006517 LDLIBRARY='libpython$(LDVERSION).dll.a'
6518 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006519 ;;
6520 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006521 LDLIBRARY='libpython$(LDVERSION).so'
6522 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006523 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006525 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006526 then
6527 PY3LIBRARY=libpython3.so
6528 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006529 ;;
pxinwrc1174262020-12-15 06:14:43 +08006530 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006531 LDLIBRARY='libpython$(LDVERSION).so'
6532 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006533 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006535 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006536 then
6537 PY3LIBRARY=libpython3.so
6538 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006539 ;;
6540 hp*|HP*)
6541 case `uname -m` in
6542 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006543 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544 ;;
6545 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006546 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547 ;;
6548 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006549 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006550 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006552 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006553 LDLIBRARY='libpython$(LDVERSION).dylib'
6554 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006555 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006557 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006558 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006559 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006560 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006561
6562 esac
6563else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006564 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565 case $ac_sys_system in
6566 CYGWIN*)
6567 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006568 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569 ;;
6570 esac
6571fi
6572
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006573if test "$cross_compiling" = yes; then
6574 RUNSHARED=
6575fi
6576
Pablo Galindoba421752021-05-03 20:33:17 +01006577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6578printf "%s\n" "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006580
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006581if test -n "$ac_tool_prefix"; then
6582 for ac_prog in ar aal
6583 do
6584 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01006586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6587printf %s "checking for $ac_word... " >&6; }
6588if test ${ac_cv_prog_AR+y}
6589then :
6590 printf %s "(cached) " >&6
6591else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006592 if test -n "$AR"; then
6593 ac_cv_prog_AR="$AR" # Let the user override the test.
6594else
6595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596for as_dir in $PATH
6597do
6598 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01006599 case $as_dir in #(((
6600 '') as_dir=./ ;;
6601 */) ;;
6602 *) as_dir=$as_dir/ ;;
6603 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006604 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01006605 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006606 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01006607 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608 break 2
6609 fi
6610done
Matthias Kloseb9621712010-04-24 17:59:49 +00006611 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612IFS=$as_save_IFS
6613
6614fi
6615fi
6616AR=$ac_cv_prog_AR
6617if test -n "$AR"; then
Pablo Galindoba421752021-05-03 20:33:17 +01006618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6619printf "%s\n" "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620else
Pablo Galindoba421752021-05-03 20:33:17 +01006621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6622printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623fi
6624
6625
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006626 test -n "$AR" && break
6627 done
6628fi
6629if test -z "$AR"; then
6630 ac_ct_AR=$AR
6631 for ac_prog in ar aal
6632do
6633 # Extract the first word of "$ac_prog", so it can be a program name with args.
6634set dummy $ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01006635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636printf %s "checking for $ac_word... " >&6; }
6637if test ${ac_cv_prog_ac_ct_AR+y}
6638then :
6639 printf %s "(cached) " >&6
6640else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006641 if test -n "$ac_ct_AR"; then
6642 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6643else
6644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6645for as_dir in $PATH
6646do
6647 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01006648 case $as_dir in #(((
6649 '') as_dir=./ ;;
6650 */) ;;
6651 *) as_dir=$as_dir/ ;;
6652 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006653 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01006654 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006655 ac_cv_prog_ac_ct_AR="$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01006656 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006657 break 2
6658 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006660 done
6661IFS=$as_save_IFS
6662
6663fi
6664fi
6665ac_ct_AR=$ac_cv_prog_ac_ct_AR
6666if test -n "$ac_ct_AR"; then
Pablo Galindoba421752021-05-03 20:33:17 +01006667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6668printf "%s\n" "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006669else
Pablo Galindoba421752021-05-03 20:33:17 +01006670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006672fi
6673
6674
6675 test -n "$ac_ct_AR" && break
6676done
6677
6678 if test "x$ac_ct_AR" = x; then
6679 AR="ar"
6680 else
6681 case $cross_compiling:$ac_tool_warned in
6682yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01006683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6684printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006685ac_tool_warned=yes ;;
6686esac
6687 AR=$ac_ct_AR
6688 fi
6689fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006690
6691
6692# tweak ARFLAGS only if the user didn't set it on the command line
6693
6694if test -z "$ARFLAGS"
6695then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006696 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006697fi
6698
doko@ubuntu.com58844492012-06-30 18:25:32 +02006699if test -n "$ac_tool_prefix"; then
6700 for ac_prog in readelf
6701 do
6702 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01006704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6705printf %s "checking for $ac_word... " >&6; }
6706if test ${ac_cv_prog_READELF+y}
6707then :
6708 printf %s "(cached) " >&6
6709else $as_nop
doko@ubuntu.com58844492012-06-30 18:25:32 +02006710 if test -n "$READELF"; then
6711 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6712else
6713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6714for as_dir in $PATH
6715do
6716 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01006717 case $as_dir in #(((
6718 '') as_dir=./ ;;
6719 */) ;;
6720 *) as_dir=$as_dir/ ;;
6721 esac
doko@ubuntu.com58844492012-06-30 18:25:32 +02006722 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01006723 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006724 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01006725 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006726 break 2
6727 fi
6728done
6729 done
6730IFS=$as_save_IFS
6731
6732fi
6733fi
6734READELF=$ac_cv_prog_READELF
6735if test -n "$READELF"; then
Pablo Galindoba421752021-05-03 20:33:17 +01006736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6737printf "%s\n" "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006738else
Pablo Galindoba421752021-05-03 20:33:17 +01006739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740printf "%s\n" "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006741fi
6742
6743
6744 test -n "$READELF" && break
6745 done
6746fi
6747if test -z "$READELF"; then
6748 ac_ct_READELF=$READELF
6749 for ac_prog in readelf
6750do
6751 # Extract the first word of "$ac_prog", so it can be a program name with args.
6752set dummy $ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01006753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6754printf %s "checking for $ac_word... " >&6; }
6755if test ${ac_cv_prog_ac_ct_READELF+y}
6756then :
6757 printf %s "(cached) " >&6
6758else $as_nop
doko@ubuntu.com58844492012-06-30 18:25:32 +02006759 if test -n "$ac_ct_READELF"; then
6760 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6761else
6762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6763for as_dir in $PATH
6764do
6765 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01006766 case $as_dir in #(((
6767 '') as_dir=./ ;;
6768 */) ;;
6769 *) as_dir=$as_dir/ ;;
6770 esac
doko@ubuntu.com58844492012-06-30 18:25:32 +02006771 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01006772 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006773 ac_cv_prog_ac_ct_READELF="$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +01006774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
doko@ubuntu.com58844492012-06-30 18:25:32 +02006775 break 2
6776 fi
6777done
6778 done
6779IFS=$as_save_IFS
6780
6781fi
6782fi
6783ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6784if test -n "$ac_ct_READELF"; then
Pablo Galindoba421752021-05-03 20:33:17 +01006785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6786printf "%s\n" "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006787else
Pablo Galindoba421752021-05-03 20:33:17 +01006788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6789printf "%s\n" "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006790fi
6791
6792
6793 test -n "$ac_ct_READELF" && break
6794done
6795
6796 if test "x$ac_ct_READELF" = x; then
6797 READELF=":"
6798 else
6799 case $cross_compiling:$ac_tool_warned in
6800yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01006801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6802printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006803ac_tool_warned=yes ;;
6804esac
6805 READELF=$ac_ct_READELF
6806 fi
6807fi
6808
6809if test "$cross_compiling" = yes; then
6810 case "$READELF" in
6811 readelf|:)
6812 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6813 ;;
6814 esac
6815fi
6816
6817
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006820hp*|HP*)
6821 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822 if test -z "$INSTALL"
6823 then
6824 INSTALL="${srcdir}/install-sh -c"
6825 fi
6826esac
Pablo Galindoba421752021-05-03 20:33:17 +01006827
6828 # Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829# so one script is as good as another. But avoid the broken or
6830# incompatible versions:
6831# SysV /etc/install, /usr/sbin/install
6832# SunOS /usr/etc/install
6833# IRIX /sbin/install
6834# AIX /bin/install
6835# AmigaOS /C/install, which installs bootblocks on floppy discs
6836# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6837# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6838# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6839# OS/2's system install, which has a completely different semantic
6840# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006841# Reject install programs that cannot install multiple files.
Pablo Galindoba421752021-05-03 20:33:17 +01006842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6843printf %s "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006844if test -z "$INSTALL"; then
Pablo Galindoba421752021-05-03 20:33:17 +01006845if test ${ac_cv_path_install+y}
6846then :
6847 printf %s "(cached) " >&6
6848else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6850for as_dir in $PATH
6851do
6852 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01006853 case $as_dir in #(((
6854 '') as_dir=./ ;;
6855 */) ;;
6856 *) as_dir=$as_dir/ ;;
6857 esac
6858 # Account for fact that we put trailing slashes in our PATH walk.
6859case $as_dir in #((
6860 ./ | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 /usr/ucb/* ) ;;
6864 *)
6865 # OSF1 and SCO ODT 3.0 have their own names for install.
6866 # Don't use installbsd from OSF since it installs stuff as root
6867 # by default.
6868 for ac_prog in ginstall scoinst install; do
6869 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01006870 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871 if test $ac_prog = install &&
Pablo Galindoba421752021-05-03 20:33:17 +01006872 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873 # AIX install. It has an incompatible calling convention.
6874 :
6875 elif test $ac_prog = install &&
Pablo Galindoba421752021-05-03 20:33:17 +01006876 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 # program-specific install script used by HP pwplus--don't use.
6878 :
6879 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 rm -rf conftest.one conftest.two conftest.dir
6881 echo one > conftest.one
6882 echo two > conftest.two
6883 mkdir conftest.dir
Pablo Galindoba421752021-05-03 20:33:17 +01006884 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 test -s conftest.one && test -s conftest.two &&
6886 test -s conftest.dir/conftest.one &&
6887 test -s conftest.dir/conftest.two
6888 then
Pablo Galindoba421752021-05-03 20:33:17 +01006889 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 break 3
6891 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892 fi
6893 fi
6894 done
6895 done
6896 ;;
6897esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006898
6899 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900IFS=$as_save_IFS
6901
Matthias Kloseb9621712010-04-24 17:59:49 +00006902rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903
6904fi
Pablo Galindoba421752021-05-03 20:33:17 +01006905 if test ${ac_cv_path_install+y}; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906 INSTALL=$ac_cv_path_install
6907 else
6908 # As a last resort, use the slow shell script. Don't cache a
6909 # value for INSTALL within a source directory, because that will
6910 # break other packages using the cache if that directory is
6911 # removed, or if the value is a relative name.
6912 INSTALL=$ac_install_sh
6913 fi
6914fi
Pablo Galindoba421752021-05-03 20:33:17 +01006915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6916printf "%s\n" "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917
6918# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6919# It thinks the first close brace ends the variable substitution.
6920test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6921
6922test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6923
6924test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6925
Pablo Galindoba421752021-05-03 20:33:17 +01006926
6927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
6928printf %s "checking for a race-free mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006929if test -z "$MKDIR_P"; then
Pablo Galindoba421752021-05-03 20:33:17 +01006930 if test ${ac_cv_path_mkdir+y}
6931then :
6932 printf %s "(cached) " >&6
6933else $as_nop
Matthias Klose93a0ef12012-03-15 18:08:34 +01006934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6936do
6937 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01006938 case $as_dir in #(((
6939 '') as_dir=./ ;;
6940 */) ;;
6941 *) as_dir=$as_dir/ ;;
6942 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +01006943 for ac_prog in mkdir gmkdir; do
6944 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01006945 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
6946 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
6947 'mkdir ('*'coreutils) '* | \
6948 'BusyBox '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006949 'mkdir (fileutils) '4.1*)
Pablo Galindoba421752021-05-03 20:33:17 +01006950 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006951 break 3;;
6952 esac
6953 done
6954 done
6955 done
6956IFS=$as_save_IFS
6957
6958fi
6959
6960 test -d ./--version && rmdir ./--version
Pablo Galindoba421752021-05-03 20:33:17 +01006961 if test ${ac_cv_path_mkdir+y}; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006962 MKDIR_P="$ac_cv_path_mkdir -p"
6963 else
6964 # As a last resort, use the slow shell script. Don't cache a
6965 # value for MKDIR_P within a source directory, because that will
6966 # break other packages using the cache if that directory is
6967 # removed, or if the value is a relative name.
6968 MKDIR_P="$ac_install_sh -d"
6969 fi
6970fi
Pablo Galindoba421752021-05-03 20:33:17 +01006971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6972printf "%s\n" "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006973
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006974
6975# Not every filesystem supports hard links
6976
6977if test -z "$LN" ; then
6978 case $ac_sys_system in
6979 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980 *) LN=ln;;
6981 esac
6982fi
6983
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006984# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006985
6986ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006987
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988# Check for --with-pydebug
Pablo Galindoba421752021-05-03 20:33:17 +01006989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6990printf %s "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991
6992# Check whether --with-pydebug was given.
Pablo Galindoba421752021-05-03 20:33:17 +01006993if test ${with_pydebug+y}
6994then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995 withval=$with_pydebug;
6996if test "$withval" != no
6997then
6998
Pablo Galindoba421752021-05-03 20:33:17 +01006999printf "%s\n" "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000
Pablo Galindoba421752021-05-03 20:33:17 +01007001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7002printf "%s\n" "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007004 ABIFLAGS="${ABIFLAGS}d"
Pablo Galindoba421752021-05-03 20:33:17 +01007005else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7006printf "%s\n" "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007007fi
Pablo Galindoba421752021-05-03 20:33:17 +01007008else $as_nop
7009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7010printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007011fi
7012
7013
Victor Stinnerf4e47032019-04-25 00:56:28 +02007014# Check for --with-trace-refs
7015# --with-trace-refs
Pablo Galindoba421752021-05-03 20:33:17 +01007016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
7017printf %s "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02007018
7019# Check whether --with-trace-refs was given.
Pablo Galindoba421752021-05-03 20:33:17 +01007020if test ${with_trace_refs+y}
7021then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02007022 withval=$with_trace_refs;
Pablo Galindoba421752021-05-03 20:33:17 +01007023else $as_nop
Victor Stinnerf4e47032019-04-25 00:56:28 +02007024 with_trace_refs=no
7025fi
7026
Pablo Galindoba421752021-05-03 20:33:17 +01007027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
7028printf "%s\n" "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02007029
7030if test "$with_trace_refs" = "yes"
7031then
7032
Pablo Galindoba421752021-05-03 20:33:17 +01007033printf "%s\n" "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02007034
7035fi
7036
7037# Check for --with-assertions.
7038# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02007039assertions='false'
Pablo Galindoba421752021-05-03 20:33:17 +01007040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
7041printf %s "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007042
7043# Check whether --with-assertions was given.
Pablo Galindoba421752021-05-03 20:33:17 +01007044if test ${with_assertions+y}
7045then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02007046 withval=$with_assertions;
7047if test "$withval" != no
7048then
7049 assertions='true'
7050fi
7051fi
7052
7053if test "$assertions" = 'true'; then
Pablo Galindoba421752021-05-03 20:33:17 +01007054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7055printf "%s\n" "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007056elif test "$Py_DEBUG" = 'true'; then
7057 assertions='true'
Pablo Galindoba421752021-05-03 20:33:17 +01007058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
7059printf "%s\n" "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007060else
Pablo Galindoba421752021-05-03 20:33:17 +01007061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7062printf "%s\n" "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007063fi
7064
Brett Cannon63d98bc2016-09-06 17:12:40 -07007065# Enable optimization flags
7066
7067
7068Py_OPT='false'
Pablo Galindoba421752021-05-03 20:33:17 +01007069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
7070printf %s "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007071# Check whether --enable-optimizations was given.
Pablo Galindoba421752021-05-03 20:33:17 +01007072if test ${enable_optimizations+y}
7073then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007074 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04007075if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07007076then
7077 Py_OPT='true'
Pablo Galindoba421752021-05-03 20:33:17 +01007078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7079printf "%s\n" "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07007080else
7081 Py_OPT='false'
Pablo Galindoba421752021-05-03 20:33:17 +01007082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083printf "%s\n" "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07007084fi
Pablo Galindoba421752021-05-03 20:33:17 +01007085else $as_nop
7086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7087printf "%s\n" "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07007088fi
7089
7090if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00007091 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
7092 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07007093 # 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 +00007094 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07007095 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007096 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07007097 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01007098 case $CC in
7099 *gcc*)
Pablo Galindoba421752021-05-03 20:33:17 +01007100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
7101printf %s "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
7102if test ${ax_cv_check_cflags___fno_semantic_interposition+y}
7103then :
7104 printf %s "(cached) " >&6
7105else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007106
7107 ax_check_save_flags=$CFLAGS
7108 CFLAGS="$CFLAGS -fno-semantic-interposition"
7109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7110/* end confdefs.h. */
7111
7112int
Pablo Galindoba421752021-05-03 20:33:17 +01007113main (void)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007114{
7115
7116 ;
7117 return 0;
7118}
7119_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007120if ac_fn_c_try_compile "$LINENO"
7121then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007122 ax_cv_check_cflags___fno_semantic_interposition=yes
Pablo Galindoba421752021-05-03 20:33:17 +01007123else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007124 ax_cv_check_cflags___fno_semantic_interposition=no
7125fi
Pablo Galindoba421752021-05-03 20:33:17 +01007126rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007127 CFLAGS=$ax_check_save_flags
7128fi
Pablo Galindoba421752021-05-03 20:33:17 +01007129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
7130printf "%s\n" "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
7131if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes
7132then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007133
Pablo Galindob451b0e2020-10-21 22:46:52 +01007134 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
7135 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007136
Pablo Galindoba421752021-05-03 20:33:17 +01007137else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007138 :
7139fi
7140
Pablo Galindob451b0e2020-10-21 22:46:52 +01007141 ;;
7142 esac
7143
7144
Brett Cannon63d98bc2016-09-06 17:12:40 -07007145else
7146 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007147 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07007148 DEF_MAKE_RULE="all"
7149fi
7150
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007151
Pablo Galindoba421752021-05-03 20:33:17 +01007152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
7153printf %s "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007154if test -z "$PROFILE_TASK"
7155then
Victor Stinner67900052021-01-27 11:16:15 +01007156 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007157fi
Pablo Galindoba421752021-05-03 20:33:17 +01007158{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
7159printf "%s\n" "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007160
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007161# Make llvm-relatec checks work on systems where llvm tools are not installed with their
7162# normal names in the default $PATH (ie: Ubuntu). They exist under the
7163# non-suffixed name in their versioned llvm directory.
7164
7165llvm_bin_dir=''
7166llvm_path="${PATH}"
7167if test "${CC}" = "clang"
7168then
7169 clang_bin=`which clang`
7170 # Some systems install clang elsewhere as a symlink to the real path
7171 # which is where the related llvm tools are located.
7172 if test -L "${clang_bin}"
7173 then
7174 clang_dir=`dirname "${clang_bin}"`
7175 clang_bin=`readlink "${clang_bin}"`
7176 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
7177 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
7178 fi
7179fi
7180
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007181# Enable LTO flags
Pablo Galindoba421752021-05-03 20:33:17 +01007182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
7183printf %s "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007184
7185# Check whether --with-lto was given.
Pablo Galindoba421752021-05-03 20:33:17 +01007186if test ${with_lto+y}
7187then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007188 withval=$with_lto;
7189if test "$withval" != no
7190then
7191 Py_LTO='true'
Pablo Galindoba421752021-05-03 20:33:17 +01007192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7193printf "%s\n" "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007194else
7195 Py_LTO='false'
Pablo Galindoba421752021-05-03 20:33:17 +01007196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7197printf "%s\n" "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007198fi
Pablo Galindoba421752021-05-03 20:33:17 +01007199else $as_nop
7200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201printf "%s\n" "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007202fi
7203
7204if test "$Py_LTO" = 'true' ; then
7205 case $CC in
7206 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02007207
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007208 if test -n "$ac_tool_prefix"; then
7209 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
7210set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01007211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7212printf %s "checking for $ac_word... " >&6; }
7213if test ${ac_cv_path_LLVM_AR+y}
7214then :
7215 printf %s "(cached) " >&6
7216else $as_nop
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007217 case $LLVM_AR in
7218 [\\/]* | ?:[\\/]*)
7219 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
7220 ;;
7221 *)
7222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7223for as_dir in ${llvm_path}
7224do
7225 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01007226 case $as_dir in #(((
7227 '') as_dir=./ ;;
7228 */) ;;
7229 *) as_dir=$as_dir/ ;;
7230 esac
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007231 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01007232 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7233 ac_cv_path_LLVM_AR="$as_dir$ac_word$ac_exec_ext"
7234 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007235 break 2
7236 fi
7237done
7238 done
7239IFS=$as_save_IFS
7240
7241 ;;
7242esac
7243fi
7244LLVM_AR=$ac_cv_path_LLVM_AR
7245if test -n "$LLVM_AR"; then
Pablo Galindoba421752021-05-03 20:33:17 +01007246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
7247printf "%s\n" "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007248else
Pablo Galindoba421752021-05-03 20:33:17 +01007249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7250printf "%s\n" "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007251fi
7252
7253
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007254fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007255if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007256 ac_pt_LLVM_AR=$LLVM_AR
7257 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007258set dummy llvm-ar; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01007259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7260printf %s "checking for $ac_word... " >&6; }
7261if test ${ac_cv_path_ac_pt_LLVM_AR+y}
7262then :
7263 printf %s "(cached) " >&6
7264else $as_nop
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007265 case $ac_pt_LLVM_AR in
7266 [\\/]* | ?:[\\/]*)
7267 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
7268 ;;
7269 *)
7270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7271for as_dir in ${llvm_path}
7272do
7273 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01007274 case $as_dir in #(((
7275 '') as_dir=./ ;;
7276 */) ;;
7277 *) as_dir=$as_dir/ ;;
7278 esac
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007279 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01007280 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7281 ac_cv_path_ac_pt_LLVM_AR="$as_dir$ac_word$ac_exec_ext"
7282 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007283 break 2
7284 fi
7285done
7286 done
7287IFS=$as_save_IFS
7288
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007289 ;;
7290esac
7291fi
7292ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
7293if test -n "$ac_pt_LLVM_AR"; then
Pablo Galindoba421752021-05-03 20:33:17 +01007294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
7295printf "%s\n" "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007296else
Pablo Galindoba421752021-05-03 20:33:17 +01007297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298printf "%s\n" "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007299fi
7300
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007301 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007302 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007303 else
7304 case $cross_compiling:$ac_tool_warned in
7305yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01007306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7307printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007308ac_tool_warned=yes ;;
7309esac
7310 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007311 fi
7312else
7313 LLVM_AR="$ac_cv_path_LLVM_AR"
7314fi
7315
7316
7317 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
7318 then
7319 LLVM_AR_FOUND="found"
7320 else
7321 LLVM_AR_FOUND="not-found"
7322 fi
7323 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
7324 then
7325 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
7326 if test -n "${found_llvm_ar}"
7327 then
7328 LLVM_AR='/usr/bin/xcrun llvm-ar'
7329 LLVM_AR_FOUND=found
Pablo Galindoba421752021-05-03 20:33:17 +01007330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
7331printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007332 fi
7333 fi
7334 if test $LLVM_AR_FOUND = not-found
7335 then
7336 LLVM_PROFR_ERR=yes
7337 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
7338 else
7339 LLVM_AR_ERR=no
7340 fi
7341 AR="${LLVM_AR}"
7342 case $ac_sys_system in
7343 Darwin*)
7344 # Any changes made here should be reflected in the GCC+Darwin case below
7345 LTOFLAGS="-flto -Wl,-export_dynamic"
7346 ;;
7347 *)
7348 LTOFLAGS="-flto"
7349 ;;
7350 esac
7351 ;;
7352 *gcc*)
7353 case $ac_sys_system in
7354 Darwin*)
7355 LTOFLAGS="-flto -Wl,-export_dynamic"
7356 ;;
7357 *)
7358 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
7359 ;;
7360 esac
7361 ;;
7362 esac
7363
7364 if test "$ac_cv_prog_cc_g" = "yes"
7365 then
7366 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
7367 # to get debug symbols.
7368 LTOFLAGS="$LTOFLAGS -g"
7369 fi
7370
stratakisf92c7aa2018-12-04 15:54:01 +01007371 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01007372 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007373fi
7374
7375# Enable PGO flags.
7376
7377
7378
7379
7380
7381
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007382if test -n "$ac_tool_prefix"; then
7383 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
7384set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01007385{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7386printf %s "checking for $ac_word... " >&6; }
7387if test ${ac_cv_path_LLVM_PROFDATA+y}
7388then :
7389 printf %s "(cached) " >&6
7390else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007391 case $LLVM_PROFDATA in
7392 [\\/]* | ?:[\\/]*)
7393 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
7394 ;;
7395 *)
7396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07007398do
7399 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01007400 case $as_dir in #(((
7401 '') as_dir=./ ;;
7402 */) ;;
7403 *) as_dir=$as_dir/ ;;
7404 esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007405 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01007406 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7407 ac_cv_path_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7408 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07007409 break 2
7410 fi
7411done
7412 done
7413IFS=$as_save_IFS
7414
Gregory P. Smith799520c2016-09-07 16:10:00 -07007415 ;;
7416esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007417fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007418LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
7419if test -n "$LLVM_PROFDATA"; then
Pablo Galindoba421752021-05-03 20:33:17 +01007420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
7421printf "%s\n" "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007422else
Pablo Galindoba421752021-05-03 20:33:17 +01007423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7424printf "%s\n" "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007425fi
7426
7427
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007428fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007429if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007430 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
7431 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07007432set dummy llvm-profdata; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +01007433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7434printf %s "checking for $ac_word... " >&6; }
7435if test ${ac_cv_path_ac_pt_LLVM_PROFDATA+y}
7436then :
7437 printf %s "(cached) " >&6
7438else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007439 case $ac_pt_LLVM_PROFDATA in
7440 [\\/]* | ?:[\\/]*)
7441 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
7442 ;;
7443 *)
7444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7445for as_dir in ${llvm_path}
7446do
7447 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +01007448 case $as_dir in #(((
7449 '') as_dir=./ ;;
7450 */) ;;
7451 *) as_dir=$as_dir/ ;;
7452 esac
Gregory P. Smith799520c2016-09-07 16:10:00 -07007453 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +01007454 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7455 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7456 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07007457 break 2
7458 fi
7459done
7460 done
7461IFS=$as_save_IFS
7462
Gregory P. Smith799520c2016-09-07 16:10:00 -07007463 ;;
7464esac
7465fi
7466ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
7467if test -n "$ac_pt_LLVM_PROFDATA"; then
Pablo Galindoba421752021-05-03 20:33:17 +01007468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
7469printf "%s\n" "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007470else
Pablo Galindoba421752021-05-03 20:33:17 +01007471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7472printf "%s\n" "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007473fi
7474
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007475 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07007476 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007477 else
7478 case $cross_compiling:$ac_tool_warned in
7479yes:)
Pablo Galindoba421752021-05-03 20:33:17 +01007480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7481printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007482ac_tool_warned=yes ;;
7483esac
7484 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07007485 fi
7486else
7487 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
7488fi
7489
7490
7491if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
7492then
7493 LLVM_PROF_FOUND="found"
7494else
7495 LLVM_PROF_FOUND="not-found"
7496fi
7497if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
7498then
7499 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
7500 if test -n "${found_llvm_profdata}"
7501 then
7502 # llvm-profdata isn't directly in $PATH in some cases.
7503 # https://apple.stackexchange.com/questions/197053/
7504 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
7505 LLVM_PROF_FOUND=found
Pablo Galindoba421752021-05-03 20:33:17 +01007506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
7507printf "%s\n" "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07007508 fi
7509fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007510LLVM_PROF_ERR=no
7511case $CC in
7512 *clang*)
7513 # Any changes made here should be reflected in the GCC+Darwin case below
7514 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7515 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007516 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007517 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
7518 if test $LLVM_PROF_FOUND = not-found
7519 then
7520 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007521 if test "${REQUIRE_PGO}" = "yes"
7522 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007523 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 -07007524 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007525 fi
7526 ;;
7527 *gcc*)
7528 case $ac_sys_system in
7529 Darwin*)
7530 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7531 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007532 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007533 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07007534 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007535 then
7536 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007537 if test "${REQUIRE_PGO}" = "yes"
7538 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007539 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 -07007540 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007541 fi
7542 ;;
7543 *)
7544 PGO_PROF_GEN_FLAG="-fprofile-generate"
7545 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
7546 LLVM_PROF_MERGER="true"
7547 LLVM_PROF_FILE=""
7548 ;;
7549 esac
7550 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007551 *icc*)
7552 PGO_PROF_GEN_FLAG="-prof-gen"
7553 PGO_PROF_USE_FLAG="-prof-use"
7554 LLVM_PROF_MERGER="true"
7555 LLVM_PROF_FILE=""
7556 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07007557esac
7558
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
7560# merged with this chunk of code?
7561
7562# Optimizer/debugger flags
7563# ------------------------
7564# (The following bit of code is complicated enough - please keep things
7565# indented properly. Just pretend you're editing Python code. ;-)
7566
7567# There are two parallel sets of case statements below, one that checks to
7568# see if OPT was set and one that does BASECFLAGS setting based upon
7569# compiler and platform. BASECFLAGS tweaks need to be made even if the
7570# user set OPT.
7571
Victor Stinner23a683a2019-04-12 21:27:37 +02007572case $CC in
7573 *clang*)
7574 cc_is_clang=1
7575 ;;
7576 *)
7577 if $CC --version 2>&1 | grep -q clang
7578 then
7579 cc_is_clang=1
7580 else
7581 cc_is_clang=
7582 fi
7583esac
7584
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585# tweak OPT based on compiler and platform, only if the user didn't set
7586# it on the command line
7587
Victor Stinner9ed34a82017-05-02 22:35:58 +02007588
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00007589if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590then
7591 case $GCC in
7592 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593 # For gcc 4.x we need to use -fwrapv so lets check if its supported
7594 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
7595 WRAP="-fwrapv"
7596 fi
Stefan Krah962055d2011-09-14 15:14:08 +02007597
Victor Stinner35f3d242017-04-21 12:35:24 +02007598 if test -n "${cc_is_clang}"
7599 then
7600 # Clang also needs -fwrapv
7601 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02007602 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
7603 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02007604 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02007605 fi
7606
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607 case $ac_cv_prog_cc_g in
7608 yes)
7609 if test "$Py_DEBUG" = 'true' ; then
7610 # Optimization messes up debuggers, so turn it off for
7611 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007612 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02007613 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007614 else
Victor Stinner28205b22017-04-21 11:24:34 +02007615 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007616 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617 else
Victor Stinner28205b22017-04-21 11:24:34 +02007618 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619 fi
7620 ;;
7621 *)
Victor Stinner28205b22017-04-21 11:24:34 +02007622 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623 ;;
7624 esac
Victor Stinner28205b22017-04-21 11:24:34 +02007625
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626 case $ac_sys_system in
7627 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7628 ;;
7629 esac
7630 ;;
7631
7632 *)
7633 OPT="-O"
7634 ;;
7635 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
7637
7638
7639
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007640
stratakiscf10a752018-12-19 18:19:01 +01007641
Ronald Oussoren41761932020-11-08 10:05:27 +01007642# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643UNIVERSAL_ARCH_FLAGS=
7644
7645
7646# tweak BASECFLAGS based on compiler and platform
7647case $GCC in
7648yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007649 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007650
Pablo Galindoba421752021-05-03 20:33:17 +01007651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7652printf %s "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007653 ac_save_cc="$CC"
7654 CC="$CC -Wextra -Werror"
Pablo Galindoba421752021-05-03 20:33:17 +01007655 if test ${ac_cv_extra_warnings+y}
7656then :
7657 printf %s "(cached) " >&6
7658else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7660/* end confdefs.h. */
7661
7662
7663int
Pablo Galindoba421752021-05-03 20:33:17 +01007664main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007665{
7666
7667 ;
7668 return 0;
7669}
7670
7671_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007672if ac_fn_c_try_compile "$LINENO"
7673then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007674
7675 ac_cv_extra_warnings=yes
7676
Pablo Galindoba421752021-05-03 20:33:17 +01007677else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007678
7679 ac_cv_extra_warnings=no
7680
7681fi
Pablo Galindoba421752021-05-03 20:33:17 +01007682rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007683fi
7684
7685 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01007686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7687printf "%s\n" "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007688
7689 if test $ac_cv_extra_warnings = yes
7690 then
7691 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7692 fi
7693
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007694 # Python doesn't violate C99 aliasing rules, but older versions of
7695 # GCC produce warnings for legal Python code. Enable
7696 # -fno-strict-aliasing on versions of GCC that support but produce
7697 # warnings. See Issue3326
Pablo Galindoba421752021-05-03 20:33:17 +01007698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7699printf %s "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700 ac_save_cc="$CC"
7701 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007702 save_CFLAGS="$CFLAGS"
Pablo Galindoba421752021-05-03 20:33:17 +01007703 if test ${ac_cv_no_strict_aliasing+y}
7704then :
7705 printf %s "(cached) " >&6
7706else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007709
Matthias Kloseb159a552010-04-25 21:00:44 +00007710
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007711int
Pablo Galindoba421752021-05-03 20:33:17 +01007712main (void)
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007713{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007714
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007715 ;
7716 return 0;
7717}
Matthias Kloseb159a552010-04-25 21:00:44 +00007718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007720if ac_fn_c_try_compile "$LINENO"
7721then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007722
7723 CC="$ac_save_cc -fstrict-aliasing"
7724 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007726/* end confdefs.h. */
7727
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007728 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007729int
Pablo Galindoba421752021-05-03 20:33:17 +01007730main (void)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007731{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007732double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007733 ;
7734 return 0;
7735}
Matthias Kloseb159a552010-04-25 21:00:44 +00007736
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007737_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007738if ac_fn_c_try_compile "$LINENO"
7739then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007740
7741 ac_cv_no_strict_aliasing=no
7742
Pablo Galindoba421752021-05-03 20:33:17 +01007743else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007744
7745 ac_cv_no_strict_aliasing=yes
7746
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007747fi
Pablo Galindoba421752021-05-03 20:33:17 +01007748rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007749
Pablo Galindoba421752021-05-03 20:33:17 +01007750else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007751
7752 ac_cv_no_strict_aliasing=no
7753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754fi
Pablo Galindoba421752021-05-03 20:33:17 +01007755rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007756fi
7757
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007758 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01007760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7761printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007762 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763 then
7764 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7765 fi
7766
Zachary Ware5af85642015-12-21 12:09:17 -06007767 # ICC doesn't recognize the option, but only emits a warning
7768 ## XXX does it emit an unused result warning and can it be disabled?
7769 case "$CC" in
7770 *icc*)
7771 ac_cv_disable_unused_result_warning=no
7772 ;;
7773 *)
Pablo Galindoba421752021-05-03 20:33:17 +01007774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7775printf %s "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007776 ac_save_cc="$CC"
7777 CC="$CC -Wunused-result -Werror"
7778 save_CFLAGS="$CFLAGS"
Pablo Galindoba421752021-05-03 20:33:17 +01007779 if test ${ac_cv_disable_unused_result_warning+y}
7780then :
7781 printf %s "(cached) " >&6
7782else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7784/* end confdefs.h. */
7785
7786
7787int
Pablo Galindoba421752021-05-03 20:33:17 +01007788main (void)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007789{
7790
7791 ;
7792 return 0;
7793}
7794
7795_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007796if ac_fn_c_try_compile "$LINENO"
7797then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007798
7799 ac_cv_disable_unused_result_warning=yes
7800
Pablo Galindoba421752021-05-03 20:33:17 +01007801else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007802
7803 ac_cv_disable_unused_result_warning=no
7804
7805fi
Pablo Galindoba421752021-05-03 20:33:17 +01007806rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007807fi
7808
7809 CFLAGS="$save_CFLAGS"
7810 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01007811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7812printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007813 ;;
7814 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007815
7816 if test $ac_cv_disable_unused_result_warning = yes
7817 then
7818 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007819 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7820 fi
7821
Pablo Galindoba421752021-05-03 20:33:17 +01007822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7823printf %s "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007824 ac_save_cc="$CC"
7825 CC="$CC -Wunused-parameter -Werror"
Pablo Galindoba421752021-05-03 20:33:17 +01007826 if test ${ac_cv_disable_unused_parameter_warning+y}
7827then :
7828 printf %s "(cached) " >&6
7829else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831/* end confdefs.h. */
7832
7833
7834int
Pablo Galindoba421752021-05-03 20:33:17 +01007835main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007836{
7837
7838 ;
7839 return 0;
7840}
7841
7842_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007843if ac_fn_c_try_compile "$LINENO"
7844then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007845
7846 ac_cv_disable_unused_parameter_warning=yes
7847
Pablo Galindoba421752021-05-03 20:33:17 +01007848else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007849
7850 ac_cv_disable_unused_parameter_warning=no
7851
7852fi
Pablo Galindoba421752021-05-03 20:33:17 +01007853rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007854fi
7855
7856 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01007857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7858printf "%s\n" "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007859
7860 if test $ac_cv_disable_unused_parameter_warning = yes
7861 then
7862 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7863 fi
7864
Pablo Galindoba421752021-05-03 20:33:17 +01007865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7866printf %s "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007867 ac_save_cc="$CC"
7868 CC="$CC -Wmissing-field-initializers -Werror"
Pablo Galindoba421752021-05-03 20:33:17 +01007869 if test ${ac_cv_disable_missing_field_initializers+y}
7870then :
7871 printf %s "(cached) " >&6
7872else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7874/* end confdefs.h. */
7875
7876
7877int
Pablo Galindoba421752021-05-03 20:33:17 +01007878main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007879{
7880
7881 ;
7882 return 0;
7883}
7884
7885_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007886if ac_fn_c_try_compile "$LINENO"
7887then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007888
7889 ac_cv_disable_missing_field_initializers=yes
7890
Pablo Galindoba421752021-05-03 20:33:17 +01007891else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007892
7893 ac_cv_disable_missing_field_initializers=no
7894
7895fi
Pablo Galindoba421752021-05-03 20:33:17 +01007896rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007897fi
7898
7899 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01007900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7901printf "%s\n" "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007902
7903 if test $ac_cv_disable_missing_field_initializers = yes
7904 then
7905 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007906 fi
7907
Pablo Galindoba421752021-05-03 20:33:17 +01007908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7909printf %s "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007910 ac_save_cc="$CC"
7911 CC="$CC -Wsign-compare"
7912 save_CFLAGS="$CFLAGS"
Pablo Galindoba421752021-05-03 20:33:17 +01007913 if test ${ac_cv_enable_sign_compare_warning+y}
7914then :
7915 printf %s "(cached) " >&6
7916else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7918/* end confdefs.h. */
7919
7920
7921int
Pablo Galindoba421752021-05-03 20:33:17 +01007922main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007923{
7924
7925 ;
7926 return 0;
7927}
7928
7929_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007930if ac_fn_c_try_compile "$LINENO"
7931then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007932
7933 ac_cv_enable_sign_compare_warning=yes
7934
Pablo Galindoba421752021-05-03 20:33:17 +01007935else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007936
7937 ac_cv_enable_sign_compare_warning=no
7938
7939fi
Pablo Galindoba421752021-05-03 20:33:17 +01007940rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007941fi
7942
7943 CFLAGS="$save_CFLAGS"
7944 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01007945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7946printf "%s\n" "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007947
7948 if test $ac_cv_enable_sign_compare_warning = yes
7949 then
7950 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7951 fi
7952
Pablo Galindoba421752021-05-03 20:33:17 +01007953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7954printf %s "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007955 ac_save_cc="$CC"
7956 CC="$CC -Wunreachable-code"
7957 save_CFLAGS="$CFLAGS"
Pablo Galindoba421752021-05-03 20:33:17 +01007958 if test ${ac_cv_enable_unreachable_code_warning+y}
7959then :
7960 printf %s "(cached) " >&6
7961else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7963/* end confdefs.h. */
7964
7965
7966int
Pablo Galindoba421752021-05-03 20:33:17 +01007967main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007968{
7969
7970 ;
7971 return 0;
7972}
7973
7974_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01007975if ac_fn_c_try_compile "$LINENO"
7976then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007977
7978 ac_cv_enable_unreachable_code_warning=yes
7979
Pablo Galindoba421752021-05-03 20:33:17 +01007980else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007981
7982 ac_cv_enable_unreachable_code_warning=no
7983
7984fi
Pablo Galindoba421752021-05-03 20:33:17 +01007985rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007986fi
7987
7988 CFLAGS="$save_CFLAGS"
7989 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007990
7991 # Don't enable unreachable code warning in debug mode, since it usually
7992 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007993 # Issue #24324: Unfortunately, the unreachable code warning does not work
7994 # correctly on gcc and has been silently removed from the compiler.
7995 # It is supported on clang but on OS X systems gcc may be an alias
7996 # for clang. Try to determine if the compiler is not really gcc and,
7997 # if so, only then enable the warning.
7998 if test $ac_cv_enable_unreachable_code_warning = yes && \
7999 test "$Py_DEBUG" != "true" && \
8000 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01008001 then
8002 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05008003 else
8004 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01008005 fi
Pablo Galindoba421752021-05-03 20:33:17 +01008006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
8007printf "%s\n" "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01008008
Pablo Galindoba421752021-05-03 20:33:17 +01008009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
8010printf %s "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008011 ac_save_cc="$CC"
8012 CC="$CC -Werror -Wstrict-prototypes"
Pablo Galindoba421752021-05-03 20:33:17 +01008013 if test ${ac_cv_enable_enable_strict_prototypes_warning+y}
8014then :
8015 printf %s "(cached) " >&6
8016else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8018/* end confdefs.h. */
8019
8020
8021int
Pablo Galindoba421752021-05-03 20:33:17 +01008022main (void)
INADA Naokie3364842018-06-05 20:40:53 +09008023{
8024
8025 ;
8026 return 0;
8027}
8028
8029_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008030if ac_fn_c_try_compile "$LINENO"
8031then :
INADA Naokie3364842018-06-05 20:40:53 +09008032
8033 ac_cv_enable_strict_prototypes_warning=yes
8034
Pablo Galindoba421752021-05-03 20:33:17 +01008035else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008036
8037 ac_cv_enable_strict_prototypes_warning=no
8038
8039fi
Pablo Galindoba421752021-05-03 20:33:17 +01008040rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09008041fi
8042
8043 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01008044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
8045printf "%s\n" "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008046
8047 if test $ac_cv_enable_strict_prototypes_warning = yes
8048 then
8049 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
8050 fi
8051
Pablo Galindoba421752021-05-03 20:33:17 +01008052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
8053printf %s "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008054 ac_save_cc="$CC"
8055 CC="$CC -Werror=implicit-function-declaration"
Pablo Galindoba421752021-05-03 20:33:17 +01008056 if test ${ac_cv_enable_implicit_function_declaration_error+y}
8057then :
8058 printf %s "(cached) " >&6
8059else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8061/* end confdefs.h. */
8062
8063
8064int
Pablo Galindoba421752021-05-03 20:33:17 +01008065main (void)
Victor Stinner193ee0a2017-02-06 14:24:00 +01008066{
8067
8068 ;
8069 return 0;
8070}
8071
8072_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008073if ac_fn_c_try_compile "$LINENO"
8074then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01008075
8076 ac_cv_enable_implicit_function_declaration_error=yes
8077
Pablo Galindoba421752021-05-03 20:33:17 +01008078else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008079
8080 ac_cv_enable_implicit_function_declaration_error=no
8081
8082fi
Pablo Galindoba421752021-05-03 20:33:17 +01008083rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01008084fi
8085
8086 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01008087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
8088printf "%s\n" "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008089
8090 if test $ac_cv_enable_implicit_function_declaration_error = yes
8091 then
8092 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
8093 fi
8094
Pablo Galindoba421752021-05-03 20:33:17 +01008095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
8096printf %s "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008097 ac_save_cc="$CC"
8098 CC="$CC -fvisibility=hidden"
Pablo Galindoba421752021-05-03 20:33:17 +01008099 if test ${ac_cv_enable_visibility+y}
8100then :
8101 printf %s "(cached) " >&6
8102else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8104/* end confdefs.h. */
8105
8106
8107int
Pablo Galindoba421752021-05-03 20:33:17 +01008108main (void)
Vinay Sajip0b60f642019-10-15 08:26:12 +01008109{
8110
8111 ;
8112 return 0;
8113}
8114
8115_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008116if ac_fn_c_try_compile "$LINENO"
8117then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01008118
8119 ac_cv_enable_visibility=yes
8120
Pablo Galindoba421752021-05-03 20:33:17 +01008121else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008122
8123 ac_cv_enable_visibility=no
8124
8125fi
Pablo Galindoba421752021-05-03 20:33:17 +01008126rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01008127fi
8128
8129 CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +01008130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
8131printf "%s\n" "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008132
8133 if test $ac_cv_enable_visibility = yes
8134 then
8135 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
8136 fi
8137
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008138 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
8139 # support. Without this, treatment of subnormals doesn't follow
8140 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01008141 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008142 alpha*)
8143 BASECFLAGS="$BASECFLAGS -mieee"
8144 ;;
8145 esac
8146
8147 case $ac_sys_system in
8148 SCO_SV*)
8149 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
8150 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008151
Ned Deily87adb6e2013-10-18 21:09:56 -07008152 Darwin*)
8153 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
8154 # used to be here, but non-Apple gcc doesn't accept them.
8155 if test "${CC}" = gcc
8156 then
Pablo Galindoba421752021-05-03 20:33:17 +01008157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
8158printf %s "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008159 case "${UNIVERSALSDK}" in
8160 */MacOSX10.4u.sdk)
8161 # Build using 10.4 SDK, force usage of gcc when the
8162 # compiler is gcc, otherwise the user will get very
8163 # confusing error messages when building on OSX 10.6
8164 CC=gcc-4.0
8165 CPP=cpp-4.0
8166 ;;
8167 esac
Pablo Galindoba421752021-05-03 20:33:17 +01008168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8169printf "%s\n" "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008170 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008171
Ned Deily0cb33da2021-05-02 04:48:29 -04008172 LIPO_INTEL64_FLAGS=""
Ned Deily87adb6e2013-10-18 21:09:56 -07008173 if test "${enable_universalsdk}"
8174 then
8175 case "$UNIVERSAL_ARCHS" in
8176 32-bit)
8177 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
8178 LIPO_32BIT_FLAGS=""
8179 ARCH_RUN_32BIT=""
8180 ;;
8181 64-bit)
8182 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
8183 LIPO_32BIT_FLAGS=""
8184 ARCH_RUN_32BIT="true"
8185 ;;
8186 all)
8187 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
8188 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8189 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8190 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01008191 universal2)
8192 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
8193 LIPO_32BIT_FLAGS=""
Ned Deily0cb33da2021-05-02 04:48:29 -04008194 LIPO_INTEL64_FLAGS="-extract x86_64"
Ronald Oussoren41761932020-11-08 10:05:27 +01008195 ARCH_RUN_32BIT="true"
Ned Deily0cb33da2021-05-02 04:48:29 -04008196 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008197 intel)
8198 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
8199 LIPO_32BIT_FLAGS="-extract i386"
8200 ARCH_RUN_32BIT="/usr/bin/arch -i386"
8201 ;;
8202 intel-32)
8203 UNIVERSAL_ARCH_FLAGS="-arch i386"
8204 LIPO_32BIT_FLAGS=""
8205 ARCH_RUN_32BIT=""
8206 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05008207 intel-64)
8208 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
8209 LIPO_32BIT_FLAGS=""
8210 ARCH_RUN_32BIT="true"
8211 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008212 3-way)
8213 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
8214 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8215 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8216 ;;
8217 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01008218 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 -07008219 ;;
8220 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008221
Ned Deily87adb6e2013-10-18 21:09:56 -07008222 if test "${UNIVERSALSDK}" != "/"
8223 then
Ned Deily8c9bb722018-01-30 07:42:14 -05008224 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
8225 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008226 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05008227 else
8228 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
8229 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008230 fi
8231 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008232
Ned Deily87adb6e2013-10-18 21:09:56 -07008233 # Calculate an appropriate deployment target for this build:
8234 # The deployment target value is used explicitly to enable certain
8235 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07008236 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07008237 # component of the string returned by distutils.get_platform().
8238 #
8239 # Use the value from:
8240 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
8241 # 2. the operating system version of the build machine if >= 10.6
8242 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
8243 # below to pick either 10.3, 10.4, or 10.5 as the target.
8244 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008245
Pablo Galindoba421752021-05-03 20:33:17 +01008246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
8247printf %s "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07008248 cur_target_major=`sw_vers -productVersion | \
8249 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8250 cur_target_minor=`sw_vers -productVersion | \
8251 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8252 cur_target="${cur_target_major}.${cur_target_minor}"
8253 if test ${cur_target_major} -eq 10 && \
8254 test ${cur_target_minor} -ge 3 && \
8255 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07008256 then
Ned Deily36820b62014-06-25 13:44:22 -07008257 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07008258 cur_target=10.3
8259 if test ${enable_universalsdk}
8260 then
8261 case "$UNIVERSAL_ARCHS" in
8262 all|3-way|intel|64-bit)
8263 # These configurations were first supported in 10.5
8264 cur_target='10.5'
8265 ;;
8266 esac
8267 else
8268 if test `/usr/bin/arch` = "i386"
8269 then
8270 # 10.4 was the first release to support Intel archs
8271 cur_target="10.4"
8272 fi
8273 fi
8274 fi
8275 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008276
Ned Deily87adb6e2013-10-18 21:09:56 -07008277 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
8278 # environment with a value that is the same as what we'll use
8279 # in the Makefile to ensure that we'll get the same compiler
8280 # environment during configure and build time.
8281 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
8282 export MACOSX_DEPLOYMENT_TARGET
8283 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Pablo Galindoba421752021-05-03 20:33:17 +01008284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
8285printf "%s\n" "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008286
Pablo Galindoba421752021-05-03 20:33:17 +01008287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
8288printf %s "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8290/* end confdefs.h. */
8291#include <stdio.h>
8292int
Pablo Galindoba421752021-05-03 20:33:17 +01008293main (void)
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008294{
8295printf("%d", 42);
8296 ;
8297 return 0;
8298}
8299_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008300if ac_fn_c_try_link "$LINENO"
8301then :
8302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8303printf "%s\n" "yes" >&6; }
8304else $as_nop
8305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8306printf "%s\n" "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008307 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
8308
8309fi
Pablo Galindoba421752021-05-03 20:33:17 +01008310rm -f core conftest.err conftest.$ac_objext conftest.beam \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008311 conftest$ac_exeext conftest.$ac_ext
8312
Ned Deily87adb6e2013-10-18 21:09:56 -07008313 # end of Darwin* tests
8314 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008315 esac
8316 ;;
8317
8318*)
8319 case $ac_sys_system in
8320 OpenUNIX*|UnixWare*)
8321 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
8322 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008323 SCO_SV*)
8324 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
8325 ;;
8326 esac
8327 ;;
8328esac
8329
Zachary Ware5af85642015-12-21 12:09:17 -06008330case "$CC" in
8331*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02008332 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06008333 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
8334 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02008335*xlc*)
8336 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
8337 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06008338esac
8339
T. Woutersddbfa2c2017-05-23 01:30:49 +02008340if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008341 :
8342else
8343 OPT="-DNDEBUG $OPT"
8344fi
8345
8346if test "$ac_arch_flags"
8347then
8348 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
8349fi
8350
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008351# On some compilers, pthreads are available without further options
8352# (e.g. MacOS X). On some of these systems, the compiler will not
8353# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
8354# So we have to see first whether pthreads are available without
8355# options before we can check whether -Kpthread improves anything.
Pablo Galindoba421752021-05-03 20:33:17 +01008356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
8357printf %s "checking whether pthreads are available without options... " >&6; }
8358if test ${ac_cv_pthread_is_default+y}
8359then :
8360 printf %s "(cached) " >&6
8361else $as_nop
8362 if test "$cross_compiling" = yes
8363then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008364 ac_cv_pthread_is_default=no
Pablo Galindoba421752021-05-03 20:33:17 +01008365else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008367/* end confdefs.h. */
8368
Stefan Krah7dba5942012-11-22 22:49:11 +01008369#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008370#include <pthread.h>
8371
8372void* routine(void* p){return NULL;}
8373
8374int main(){
8375 pthread_t p;
8376 if(pthread_create(&p,NULL,routine,NULL)!=0)
8377 return 1;
8378 (void)pthread_detach(p);
8379 return 0;
8380}
8381
8382_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008383if ac_fn_c_try_run "$LINENO"
8384then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008385
8386 ac_cv_pthread_is_default=yes
8387 ac_cv_kthread=no
8388 ac_cv_pthread=no
8389
Pablo Galindoba421752021-05-03 20:33:17 +01008390else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8394 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008395fi
8396
8397
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008398fi
8399
Pablo Galindoba421752021-05-03 20:33:17 +01008400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
8401printf "%s\n" "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008402
8403
8404if test $ac_cv_pthread_is_default = yes
8405then
8406 ac_cv_kpthread=no
8407else
8408# -Kpthread, if available, provides the right #defines
8409# and linker options to make pthread_create available
8410# Some compilers won't report that they do not support -Kpthread,
8411# so we need to run a program to see whether it really made the
8412# function available.
Pablo Galindoba421752021-05-03 20:33:17 +01008413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
8414printf %s "checking whether $CC accepts -Kpthread... " >&6; }
8415if test ${ac_cv_kpthread+y}
8416then :
8417 printf %s "(cached) " >&6
8418else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008419 ac_save_cc="$CC"
8420CC="$CC -Kpthread"
Pablo Galindoba421752021-05-03 20:33:17 +01008421if test "$cross_compiling" = yes
8422then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008423 ac_cv_kpthread=no
Pablo Galindoba421752021-05-03 20:33:17 +01008424else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008426/* end confdefs.h. */
8427
Stefan Krah7dba5942012-11-22 22:49:11 +01008428#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008429#include <pthread.h>
8430
8431void* routine(void* p){return NULL;}
8432
8433int main(){
8434 pthread_t p;
8435 if(pthread_create(&p,NULL,routine,NULL)!=0)
8436 return 1;
8437 (void)pthread_detach(p);
8438 return 0;
8439}
8440
8441_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008442if ac_fn_c_try_run "$LINENO"
8443then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008444 ac_cv_kpthread=yes
Pablo Galindoba421752021-05-03 20:33:17 +01008445else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008450fi
8451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008452CC="$ac_save_cc"
8453fi
8454
Pablo Galindoba421752021-05-03 20:33:17 +01008455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
8456printf "%s\n" "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008457fi
8458
8459if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
8460then
8461# -Kthread, if available, provides the right #defines
8462# and linker options to make pthread_create available
8463# Some compilers won't report that they do not support -Kthread,
8464# so we need to run a program to see whether it really made the
8465# function available.
Pablo Galindoba421752021-05-03 20:33:17 +01008466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
8467printf %s "checking whether $CC accepts -Kthread... " >&6; }
8468if test ${ac_cv_kthread+y}
8469then :
8470 printf %s "(cached) " >&6
8471else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008472 ac_save_cc="$CC"
8473CC="$CC -Kthread"
Pablo Galindoba421752021-05-03 20:33:17 +01008474if test "$cross_compiling" = yes
8475then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008476 ac_cv_kthread=no
Pablo Galindoba421752021-05-03 20:33:17 +01008477else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008479/* end confdefs.h. */
8480
Stefan Krah7dba5942012-11-22 22:49:11 +01008481#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008482#include <pthread.h>
8483
8484void* routine(void* p){return NULL;}
8485
8486int main(){
8487 pthread_t p;
8488 if(pthread_create(&p,NULL,routine,NULL)!=0)
8489 return 1;
8490 (void)pthread_detach(p);
8491 return 0;
8492}
8493
8494_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008495if ac_fn_c_try_run "$LINENO"
8496then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008497 ac_cv_kthread=yes
Pablo Galindoba421752021-05-03 20:33:17 +01008498else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8502 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008503fi
8504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008505CC="$ac_save_cc"
8506fi
8507
Pablo Galindoba421752021-05-03 20:33:17 +01008508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
8509printf "%s\n" "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008510fi
8511
8512if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
8513then
8514# -pthread, if available, provides the right #defines
8515# and linker options to make pthread_create available
8516# Some compilers won't report that they do not support -pthread,
8517# so we need to run a program to see whether it really made the
8518# function available.
Pablo Galindoba421752021-05-03 20:33:17 +01008519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
8520printf %s "checking whether $CC accepts -pthread... " >&6; }
8521if test ${ac_cv_pthread+y}
8522then :
8523 printf %s "(cached) " >&6
8524else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008525 ac_save_cc="$CC"
8526CC="$CC -pthread"
Pablo Galindoba421752021-05-03 20:33:17 +01008527if test "$cross_compiling" = yes
8528then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008529 ac_cv_pthread=no
Pablo Galindoba421752021-05-03 20:33:17 +01008530else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008532/* end confdefs.h. */
8533
Stefan Krah7dba5942012-11-22 22:49:11 +01008534#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008535#include <pthread.h>
8536
8537void* routine(void* p){return NULL;}
8538
8539int main(){
8540 pthread_t p;
8541 if(pthread_create(&p,NULL,routine,NULL)!=0)
8542 return 1;
8543 (void)pthread_detach(p);
8544 return 0;
8545}
8546
8547_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01008548if ac_fn_c_try_run "$LINENO"
8549then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008550 ac_cv_pthread=yes
Pablo Galindoba421752021-05-03 20:33:17 +01008551else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008556fi
8557
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008558CC="$ac_save_cc"
8559fi
8560
Pablo Galindoba421752021-05-03 20:33:17 +01008561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
8562printf "%s\n" "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008563fi
8564
8565# If we have set a CC compiler flag for thread support then
8566# check if it works for CXX, too.
8567ac_cv_cxx_thread=no
8568if test ! -z "$CXX"
8569then
Pablo Galindoba421752021-05-03 20:33:17 +01008570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
8571printf %s "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008572ac_save_cxx="$CXX"
8573
8574if test "$ac_cv_kpthread" = "yes"
8575then
8576 CXX="$CXX -Kpthread"
8577 ac_cv_cxx_thread=yes
8578elif test "$ac_cv_kthread" = "yes"
8579then
8580 CXX="$CXX -Kthread"
8581 ac_cv_cxx_thread=yes
8582elif test "$ac_cv_pthread" = "yes"
8583then
8584 CXX="$CXX -pthread"
8585 ac_cv_cxx_thread=yes
8586fi
8587
8588if test $ac_cv_cxx_thread = yes
8589then
8590 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
8591 $CXX -c conftest.$ac_ext 2>&5
8592 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
8593 && test -s conftest$ac_exeext && ./conftest$ac_exeext
8594 then
8595 ac_cv_cxx_thread=yes
8596 else
8597 ac_cv_cxx_thread=no
8598 fi
8599 rm -fr conftest*
8600fi
Pablo Galindoba421752021-05-03 20:33:17 +01008601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
8602printf "%s\n" "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008603fi
8604CXX="$ac_save_cxx"
8605
8606
8607# checks for header files
Pablo Galindoba421752021-05-03 20:33:17 +01008608# Autoupdate added the next two lines to ensure that your configure
8609# script's behavior did not change. They are probably safe to remove.
8610
8611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8612printf %s "checking for egrep... " >&6; }
8613if test ${ac_cv_path_EGREP+y}
8614then :
8615 printf %s "(cached) " >&6
8616else $as_nop
8617 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8618 then ac_cv_path_EGREP="$GREP -E"
8619 else
8620 if test -z "$EGREP"; then
8621 ac_path_EGREP_found=false
8622 # Loop through the user's path and test for each of PROGNAME-LIST
8623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8624for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8625do
8626 IFS=$as_save_IFS
8627 case $as_dir in #(((
8628 '') as_dir=./ ;;
8629 */) ;;
8630 *) as_dir=$as_dir/ ;;
8631 esac
8632 for ac_prog in egrep
8633 do
8634 for ac_exec_ext in '' $ac_executable_extensions; do
8635 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8636 as_fn_executable_p "$ac_path_EGREP" || continue
8637# Check for GNU ac_path_EGREP and select it if it is found.
8638 # Check for GNU $ac_path_EGREP
8639case `"$ac_path_EGREP" --version 2>&1` in
8640*GNU*)
8641 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8642*)
8643 ac_count=0
8644 printf %s 0123456789 >"conftest.in"
8645 while :
8646 do
8647 cat "conftest.in" "conftest.in" >"conftest.tmp"
8648 mv "conftest.tmp" "conftest.in"
8649 cp "conftest.in" "conftest.nl"
8650 printf "%s\n" 'EGREP' >> "conftest.nl"
8651 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8652 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8653 as_fn_arith $ac_count + 1 && ac_count=$as_val
8654 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8655 # Best one so far, save it but keep looking for a better one
8656 ac_cv_path_EGREP="$ac_path_EGREP"
8657 ac_path_EGREP_max=$ac_count
8658 fi
8659 # 10*(2^10) chars as input seems more than enough
8660 test $ac_count -gt 10 && break
8661 done
8662 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8663esac
8664
8665 $ac_path_EGREP_found && break 3
8666 done
8667 done
8668 done
8669IFS=$as_save_IFS
8670 if test -z "$ac_cv_path_EGREP"; then
8671 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8672 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008673else
Pablo Galindoba421752021-05-03 20:33:17 +01008674 ac_cv_path_EGREP=$EGREP
Pablo Galindo53e55292021-04-05 17:38:40 +01008675fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008676
Pablo Galindoba421752021-05-03 20:33:17 +01008677 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008678fi
Pablo Galindoba421752021-05-03 20:33:17 +01008679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8680printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8681 EGREP="$ac_cv_path_EGREP"
8682
8683
8684
8685ac_fn_c_check_header_compile "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default"
8686if test "x$ac_cv_header_asm_types_h" = xyes
8687then :
8688 printf "%s\n" "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008689
8690fi
Pablo Galindoba421752021-05-03 20:33:17 +01008691ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
8692if test "x$ac_cv_header_crypt_h" = xyes
8693then :
8694 printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008695
8696fi
Pablo Galindoba421752021-05-03 20:33:17 +01008697ac_fn_c_check_header_compile "$LINENO" "conio.h" "ac_cv_header_conio_h" "$ac_includes_default"
8698if test "x$ac_cv_header_conio_h" = xyes
8699then :
8700 printf "%s\n" "#define HAVE_CONIO_H 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008701
8702fi
Pablo Galindoba421752021-05-03 20:33:17 +01008703ac_fn_c_check_header_compile "$LINENO" "direct.h" "ac_cv_header_direct_h" "$ac_includes_default"
8704if test "x$ac_cv_header_direct_h" = xyes
8705then :
8706 printf "%s\n" "#define HAVE_DIRECT_H 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008707
8708fi
Pablo Galindoba421752021-05-03 20:33:17 +01008709ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
8710if test "x$ac_cv_header_dlfcn_h" = xyes
8711then :
8712 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01008713
Pablo Galindoba421752021-05-03 20:33:17 +01008714fi
8715ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
8716if test "x$ac_cv_header_errno_h" = xyes
8717then :
8718 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
8719
8720fi
8721ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
8722if test "x$ac_cv_header_fcntl_h" = xyes
8723then :
8724 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
8725
8726fi
8727ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default"
8728if test "x$ac_cv_header_grp_h" = xyes
8729then :
8730 printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
8731
8732fi
8733ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
8734if test "x$ac_cv_header_ieeefp_h" = xyes
8735then :
8736 printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h
8737
8738fi
8739ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default"
8740if test "x$ac_cv_header_io_h" = xyes
8741then :
8742 printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h
8743
8744fi
8745ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
8746if test "x$ac_cv_header_langinfo_h" = xyes
8747then :
8748 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
8749
8750fi
8751ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
8752if test "x$ac_cv_header_libintl_h" = xyes
8753then :
8754 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
8755
8756fi
8757ac_fn_c_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default"
8758if test "x$ac_cv_header_process_h" = xyes
8759then :
8760 printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h
8761
8762fi
8763ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8764if test "x$ac_cv_header_pthread_h" = xyes
8765then :
8766 printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
8767
8768fi
8769ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
8770if test "x$ac_cv_header_sched_h" = xyes
8771then :
8772 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
8773
8774fi
8775ac_fn_c_check_header_compile "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
8776if test "x$ac_cv_header_shadow_h" = xyes
8777then :
8778 printf "%s\n" "#define HAVE_SHADOW_H 1" >>confdefs.h
8779
8780fi
8781ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
8782if test "x$ac_cv_header_signal_h" = xyes
8783then :
8784 printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
8785
8786fi
8787ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
8788if test "x$ac_cv_header_stropts_h" = xyes
8789then :
8790 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
8791
8792fi
8793ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
8794if test "x$ac_cv_header_termios_h" = xyes
8795then :
8796 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
8797
8798fi
8799ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
8800if test "x$ac_cv_header_utime_h" = xyes
8801then :
8802 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
8803
8804fi
8805ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
8806if test "x$ac_cv_header_poll_h" = xyes
8807then :
8808 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
8809
8810fi
8811ac_fn_c_check_header_compile "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default"
8812if test "x$ac_cv_header_sys_devpoll_h" = xyes
8813then :
8814 printf "%s\n" "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h
8815
8816fi
8817ac_fn_c_check_header_compile "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
8818if test "x$ac_cv_header_sys_epoll_h" = xyes
8819then :
8820 printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h
8821
8822fi
8823ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
8824if test "x$ac_cv_header_sys_poll_h" = xyes
8825then :
8826 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
8827
8828fi
8829ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
8830if test "x$ac_cv_header_sys_audioio_h" = xyes
8831then :
8832 printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h
8833
8834fi
8835ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
8836if test "x$ac_cv_header_sys_xattr_h" = xyes
8837then :
8838 printf "%s\n" "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
8839
8840fi
8841ac_fn_c_check_header_compile "$LINENO" "sys/bsdtty.h" "ac_cv_header_sys_bsdtty_h" "$ac_includes_default"
8842if test "x$ac_cv_header_sys_bsdtty_h" = xyes
8843then :
8844 printf "%s\n" "#define HAVE_SYS_BSDTTY_H 1" >>confdefs.h
8845
8846fi
8847ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
8848if test "x$ac_cv_header_sys_event_h" = xyes
8849then :
8850 printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h
8851
8852fi
8853ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
8854if test "x$ac_cv_header_sys_file_h" = xyes
8855then :
8856 printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
8857
8858fi
8859ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
8860if test "x$ac_cv_header_sys_ioctl_h" = xyes
8861then :
8862 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
8863
8864fi
8865ac_fn_c_check_header_compile "$LINENO" "sys/kern_control.h" "ac_cv_header_sys_kern_control_h" "$ac_includes_default"
8866if test "x$ac_cv_header_sys_kern_control_h" = xyes
8867then :
8868 printf "%s\n" "#define HAVE_SYS_KERN_CONTROL_H 1" >>confdefs.h
8869
8870fi
8871ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
8872if test "x$ac_cv_header_sys_loadavg_h" = xyes
8873then :
8874 printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h
8875
8876fi
8877ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default"
8878if test "x$ac_cv_header_sys_lock_h" = xyes
8879then :
8880 printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h
8881
8882fi
8883ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8884if test "x$ac_cv_header_sys_mkdev_h" = xyes
8885then :
8886 printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h
8887
8888fi
8889ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
8890if test "x$ac_cv_header_sys_modem_h" = xyes
8891then :
8892 printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h
8893
8894fi
8895ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
8896if test "x$ac_cv_header_sys_param_h" = xyes
8897then :
8898 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
8899
8900fi
8901ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
8902if test "x$ac_cv_header_sys_random_h" = xyes
8903then :
8904 printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
8905
8906fi
8907ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
8908if test "x$ac_cv_header_sys_select_h" = xyes
8909then :
8910 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
8911
8912fi
8913ac_fn_c_check_header_compile "$LINENO" "sys/sendfile.h" "ac_cv_header_sys_sendfile_h" "$ac_includes_default"
8914if test "x$ac_cv_header_sys_sendfile_h" = xyes
8915then :
8916 printf "%s\n" "#define HAVE_SYS_SENDFILE_H 1" >>confdefs.h
8917
8918fi
8919ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
8920if test "x$ac_cv_header_sys_socket_h" = xyes
8921then :
8922 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
8923
8924fi
8925ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
8926if test "x$ac_cv_header_sys_statvfs_h" = xyes
8927then :
8928 printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h
8929
8930fi
8931ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
8932if test "x$ac_cv_header_sys_stat_h" = xyes
8933then :
8934 printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
8935
8936fi
8937ac_fn_c_check_header_compile "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default"
8938if test "x$ac_cv_header_sys_syscall_h" = xyes
8939then :
8940 printf "%s\n" "#define HAVE_SYS_SYSCALL_H 1" >>confdefs.h
8941
8942fi
8943ac_fn_c_check_header_compile "$LINENO" "sys/sys_domain.h" "ac_cv_header_sys_sys_domain_h" "$ac_includes_default"
8944if test "x$ac_cv_header_sys_sys_domain_h" = xyes
8945then :
8946 printf "%s\n" "#define HAVE_SYS_SYS_DOMAIN_H 1" >>confdefs.h
8947
8948fi
8949ac_fn_c_check_header_compile "$LINENO" "sys/termio.h" "ac_cv_header_sys_termio_h" "$ac_includes_default"
8950if test "x$ac_cv_header_sys_termio_h" = xyes
8951then :
8952 printf "%s\n" "#define HAVE_SYS_TERMIO_H 1" >>confdefs.h
8953
8954fi
8955ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
8956if test "x$ac_cv_header_sys_time_h" = xyes
8957then :
8958 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
8959
8960fi
8961ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default"
8962if test "x$ac_cv_header_sys_times_h" = xyes
8963then :
8964 printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h
8965
8966fi
8967ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
8968if test "x$ac_cv_header_sys_types_h" = xyes
8969then :
8970 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
8971
8972fi
8973ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
8974if test "x$ac_cv_header_sys_uio_h" = xyes
8975then :
8976 printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
8977
8978fi
8979ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
8980if test "x$ac_cv_header_sys_un_h" = xyes
8981then :
8982 printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
8983
8984fi
8985ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
8986if test "x$ac_cv_header_sys_utsname_h" = xyes
8987then :
8988 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
8989
8990fi
8991ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
8992if test "x$ac_cv_header_sys_wait_h" = xyes
8993then :
8994 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8995
8996fi
8997ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default"
8998if test "x$ac_cv_header_pty_h" = xyes
8999then :
9000 printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h
9001
9002fi
9003ac_fn_c_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default"
9004if test "x$ac_cv_header_libutil_h" = xyes
9005then :
9006 printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h
9007
9008fi
9009ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
9010if test "x$ac_cv_header_sys_resource_h" = xyes
9011then :
9012 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
9013
9014fi
9015ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
9016if test "x$ac_cv_header_netpacket_packet_h" = xyes
9017then :
9018 printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h
9019
9020fi
9021ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
9022if test "x$ac_cv_header_sysexits_h" = xyes
9023then :
9024 printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
9025
9026fi
9027ac_fn_c_check_header_compile "$LINENO" "bluetooth.h" "ac_cv_header_bluetooth_h" "$ac_includes_default"
9028if test "x$ac_cv_header_bluetooth_h" = xyes
9029then :
9030 printf "%s\n" "#define HAVE_BLUETOOTH_H 1" >>confdefs.h
9031
9032fi
9033ac_fn_c_check_header_compile "$LINENO" "linux/tipc.h" "ac_cv_header_linux_tipc_h" "$ac_includes_default"
9034if test "x$ac_cv_header_linux_tipc_h" = xyes
9035then :
9036 printf "%s\n" "#define HAVE_LINUX_TIPC_H 1" >>confdefs.h
9037
9038fi
9039ac_fn_c_check_header_compile "$LINENO" "linux/random.h" "ac_cv_header_linux_random_h" "$ac_includes_default"
9040if test "x$ac_cv_header_linux_random_h" = xyes
9041then :
9042 printf "%s\n" "#define HAVE_LINUX_RANDOM_H 1" >>confdefs.h
9043
9044fi
9045ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default"
9046if test "x$ac_cv_header_spawn_h" = xyes
9047then :
9048 printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h
9049
9050fi
9051ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
9052if test "x$ac_cv_header_util_h" = xyes
9053then :
9054 printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h
9055
9056fi
9057ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default"
9058if test "x$ac_cv_header_alloca_h" = xyes
9059then :
9060 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
9061
9062fi
9063ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default"
9064if test "x$ac_cv_header_endian_h" = xyes
9065then :
9066 printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
9067
9068fi
9069ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default"
9070if test "x$ac_cv_header_sys_endian_h" = xyes
9071then :
9072 printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
9073
9074fi
9075ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9076if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9077then :
9078 printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h
9079
9080fi
9081ac_fn_c_check_header_compile "$LINENO" "linux/memfd.h" "ac_cv_header_linux_memfd_h" "$ac_includes_default"
9082if test "x$ac_cv_header_linux_memfd_h" = xyes
9083then :
9084 printf "%s\n" "#define HAVE_LINUX_MEMFD_H 1" >>confdefs.h
9085
9086fi
9087ac_fn_c_check_header_compile "$LINENO" "linux/wait.h" "ac_cv_header_linux_wait_h" "$ac_includes_default"
9088if test "x$ac_cv_header_linux_wait_h" = xyes
9089then :
9090 printf "%s\n" "#define HAVE_LINUX_WAIT_H 1" >>confdefs.h
9091
9092fi
9093ac_fn_c_check_header_compile "$LINENO" "sys/memfd.h" "ac_cv_header_sys_memfd_h" "$ac_includes_default"
9094if test "x$ac_cv_header_sys_memfd_h" = xyes
9095then :
9096 printf "%s\n" "#define HAVE_SYS_MEMFD_H 1" >>confdefs.h
9097
9098fi
9099ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
9100if test "x$ac_cv_header_sys_mman_h" = xyes
9101then :
9102 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
9103
9104fi
9105ac_fn_c_check_header_compile "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default"
9106if test "x$ac_cv_header_sys_eventfd_h" = xyes
9107then :
9108 printf "%s\n" "#define HAVE_SYS_EVENTFD_H 1" >>confdefs.h
9109
9110fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009111
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009112ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009113for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Pablo Galindoba421752021-05-03 20:33:17 +01009114 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9116printf %s "checking for $ac_hdr that defines DIR... " >&6; }
9117if eval test \${$as_ac_Header+y}
9118then :
9119 printf %s "(cached) " >&6
9120else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009123#include <sys/types.h>
9124#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00009125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126int
Pablo Galindoba421752021-05-03 20:33:17 +01009127main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009128{
9129if ((DIR *) 0)
9130return 0;
9131 ;
9132 return 0;
9133}
9134_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01009135if ac_fn_c_try_compile "$LINENO"
9136then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 eval "$as_ac_Header=yes"
Pablo Galindoba421752021-05-03 20:33:17 +01009138else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009140fi
Pablo Galindoba421752021-05-03 20:33:17 +01009141rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009143eval ac_res=\$$as_ac_Header
Pablo Galindoba421752021-05-03 20:33:17 +01009144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9145printf "%s\n" "$ac_res" >&6; }
9146if eval test \"x\$"$as_ac_Header"\" = x"yes"
9147then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 cat >>confdefs.h <<_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01009149#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009150_ACEOF
9151
9152ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00009153fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009155done
9156# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9157if test $ac_header_dirent = dirent.h; then
Pablo Galindoba421752021-05-03 20:33:17 +01009158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9159printf %s "checking for library containing opendir... " >&6; }
9160if test ${ac_cv_search_opendir+y}
9161then :
9162 printf %s "(cached) " >&6
9163else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168/* Override any GCC internal prototype to avoid an error.
9169 Use char because int might match the return type of a GCC
9170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009171char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009172int
Pablo Galindoba421752021-05-03 20:33:17 +01009173main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 ;
9177 return 0;
9178}
9179_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01009180for ac_lib in '' dir
9181do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182 if test -z "$ac_lib"; then
9183 ac_res="none required"
9184 else
9185 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009186 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187 fi
Pablo Galindoba421752021-05-03 20:33:17 +01009188 if ac_fn_c_try_link "$LINENO"
9189then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009190 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009191fi
Pablo Galindoba421752021-05-03 20:33:17 +01009192rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009193 conftest$ac_exeext
Pablo Galindoba421752021-05-03 20:33:17 +01009194 if test ${ac_cv_search_opendir+y}
9195then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198done
Pablo Galindoba421752021-05-03 20:33:17 +01009199if test ${ac_cv_search_opendir+y}
9200then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009201
Pablo Galindoba421752021-05-03 20:33:17 +01009202else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203 ac_cv_search_opendir=no
9204fi
9205rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009206LIBS=$ac_func_search_save_LIBS
9207fi
Pablo Galindoba421752021-05-03 20:33:17 +01009208{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9209printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210ac_res=$ac_cv_search_opendir
Pablo Galindoba421752021-05-03 20:33:17 +01009211if test "$ac_res" != no
9212then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00009214
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009216
Michael W. Hudson54241132001-12-07 15:38:26 +00009217else
Pablo Galindoba421752021-05-03 20:33:17 +01009218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9219printf %s "checking for library containing opendir... " >&6; }
9220if test ${ac_cv_search_opendir+y}
9221then :
9222 printf %s "(cached) " >&6
9223else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228/* Override any GCC internal prototype to avoid an error.
9229 Use char because int might match the return type of a GCC
9230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009231char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009232int
Pablo Galindoba421752021-05-03 20:33:17 +01009233main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009235return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 ;
9237 return 0;
9238}
9239_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01009240for ac_lib in '' x
9241do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242 if test -z "$ac_lib"; then
9243 ac_res="none required"
9244 else
9245 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009246 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009247 fi
Pablo Galindoba421752021-05-03 20:33:17 +01009248 if ac_fn_c_try_link "$LINENO"
9249then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009251fi
Pablo Galindoba421752021-05-03 20:33:17 +01009252rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 conftest$ac_exeext
Pablo Galindoba421752021-05-03 20:33:17 +01009254 if test ${ac_cv_search_opendir+y}
9255then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258done
Pablo Galindoba421752021-05-03 20:33:17 +01009259if test ${ac_cv_search_opendir+y}
9260then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009261
Pablo Galindoba421752021-05-03 20:33:17 +01009262else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263 ac_cv_search_opendir=no
9264fi
9265rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009266LIBS=$ac_func_search_save_LIBS
9267fi
Pablo Galindoba421752021-05-03 20:33:17 +01009268{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9269printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270ac_res=$ac_cv_search_opendir
Pablo Galindoba421752021-05-03 20:33:17 +01009271if test "$ac_res" != no
9272then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009275fi
9276
9277fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009278
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009279
Pablo Galindoba421752021-05-03 20:33:17 +01009280ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
9281if test "x$ac_cv_header_sys_mkdev_h" = xyes
9282then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009283
Pablo Galindoba421752021-05-03 20:33:17 +01009284printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009285
9286fi
9287
Pablo Galindoba421752021-05-03 20:33:17 +01009288if test $ac_cv_header_sys_mkdev_h = no; then
9289 ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9290if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9291then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009292
Pablo Galindoba421752021-05-03 20:33:17 +01009293printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009294
9295fi
9296
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009297fi
9298
Michael W. Hudson54241132001-12-07 15:38:26 +00009299
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009300# bluetooth/bluetooth.h has been known to not compile with -std=c99.
9301# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
9302SAVE_CFLAGS=$CFLAGS
9303CFLAGS="-std=c99 $CFLAGS"
Pablo Galindoba421752021-05-03 20:33:17 +01009304ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
9305if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes
9306then :
9307 printf "%s\n" "#define HAVE_BLUETOOTH_BLUETOOTH_H 1" >>confdefs.h
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009308
9309fi
9310
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009311CFLAGS=$SAVE_CFLAGS
9312
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009313# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Pablo Galindoba421752021-05-03 20:33:17 +01009314ac_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 -07009315#ifdef STDC_HEADERS
9316# include <stdlib.h>
9317# include <stddef.h>
9318#else
9319# ifdef HAVE_STDLIB_H
9320# include <stdlib.h>
9321# endif
9322#endif
9323#ifdef HAVE_SYS_SOCKET_H
9324# include <sys/socket.h>
9325#endif
9326
9327"
Pablo Galindoba421752021-05-03 20:33:17 +01009328if test "x$ac_cv_header_net_if_h" = xyes
9329then :
9330 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009331
9332fi
9333
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009334
Martin v. Löwis11017b12006-01-14 18:12:57 +00009335# On Linux, netlink.h requires asm/types.h
Pablo Galindoba421752021-05-03 20:33:17 +01009336ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00009337#ifdef HAVE_ASM_TYPES_H
9338#include <asm/types.h>
9339#endif
9340#ifdef HAVE_SYS_SOCKET_H
9341#include <sys/socket.h>
9342#endif
9343
Matthias Kloseb9621712010-04-24 17:59:49 +00009344"
Pablo Galindoba421752021-05-03 20:33:17 +01009345if test "x$ac_cv_header_linux_netlink_h" = xyes
9346then :
9347 printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00009348
9349fi
9350
Martin v. Löwis11017b12006-01-14 18:12:57 +00009351
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009352# On Linux, qrtr.h requires asm/types.h
Pablo Galindoba421752021-05-03 20:33:17 +01009353ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009354#ifdef HAVE_ASM_TYPES_H
9355#include <asm/types.h>
9356#endif
9357#ifdef HAVE_SYS_SOCKET_H
9358#include <sys/socket.h>
9359#endif
9360
9361"
Pablo Galindoba421752021-05-03 20:33:17 +01009362if test "x$ac_cv_header_linux_qrtr_h" = xyes
9363then :
9364 printf "%s\n" "#define HAVE_LINUX_QRTR_H 1" >>confdefs.h
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009365
9366fi
9367
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009368
Pablo Galindoba421752021-05-03 20:33:17 +01009369ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04009370#ifdef HAVE_SYS_SOCKET_H
9371#include <sys/socket.h>
9372#endif
9373
9374"
Pablo Galindoba421752021-05-03 20:33:17 +01009375if test "x$ac_cv_header_linux_vm_sockets_h" = xyes
9376then :
9377 printf "%s\n" "#define HAVE_LINUX_VM_SOCKETS_H 1" >>confdefs.h
caaveryeffc12f2017-09-06 18:18:10 -04009378
9379fi
9380
caaveryeffc12f2017-09-06 18:18:10 -04009381
karl ding360371f2020-04-29 15:31:19 -07009382# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Pablo Galindoba421752021-05-03 20:33:17 +01009383ac_fn_c_check_header_compile "$LINENO" "linux/can.h" "ac_cv_header_linux_can_h" "
Charles-François Natali47413c12011-10-06 19:47:44 +02009384#ifdef HAVE_SYS_SOCKET_H
9385#include <sys/socket.h>
9386#endif
9387
9388"
Pablo Galindoba421752021-05-03 20:33:17 +01009389if test "x$ac_cv_header_linux_can_h" = xyes
9390then :
9391 printf "%s\n" "#define HAVE_LINUX_CAN_H 1" >>confdefs.h
Charles-François Natali47413c12011-10-06 19:47:44 +02009392
9393fi
Pablo Galindoba421752021-05-03 20:33:17 +01009394ac_fn_c_check_header_compile "$LINENO" "linux/can/bcm.h" "ac_cv_header_linux_can_bcm_h" "
9395#ifdef HAVE_SYS_SOCKET_H
9396#include <sys/socket.h>
9397#endif
Charles-François Natali47413c12011-10-06 19:47:44 +02009398
Pablo Galindoba421752021-05-03 20:33:17 +01009399"
9400if test "x$ac_cv_header_linux_can_bcm_h" = xyes
9401then :
9402 printf "%s\n" "#define HAVE_LINUX_CAN_BCM_H 1" >>confdefs.h
9403
9404fi
9405ac_fn_c_check_header_compile "$LINENO" "linux/can/j1939.h" "ac_cv_header_linux_can_j1939_h" "
9406#ifdef HAVE_SYS_SOCKET_H
9407#include <sys/socket.h>
9408#endif
9409
9410"
9411if test "x$ac_cv_header_linux_can_j1939_h" = xyes
9412then :
9413 printf "%s\n" "#define HAVE_LINUX_CAN_J1939_H 1" >>confdefs.h
9414
9415fi
9416ac_fn_c_check_header_compile "$LINENO" "linux/can/raw.h" "ac_cv_header_linux_can_raw_h" "
9417#ifdef HAVE_SYS_SOCKET_H
9418#include <sys/socket.h>
9419#endif
9420
9421"
9422if test "x$ac_cv_header_linux_can_raw_h" = xyes
9423then :
9424 printf "%s\n" "#define HAVE_LINUX_CAN_RAW_H 1" >>confdefs.h
9425
9426fi
Charles-François Natali47413c12011-10-06 19:47:44 +02009427
9428
Guido van Rossum627b2d71993-12-24 10:39:16 +00009429# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00009430was_it_defined=no
Pablo Galindoba421752021-05-03 20:33:17 +01009431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
9432printf %s "checking for clock_t in time.h... " >&6; }
9433
Matthias Kloseb9621712010-04-24 17:59:49 +00009434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009436#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
9438_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +01009440 $EGREP "clock_t" >/dev/null 2>&1
9441then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00009442 was_it_defined=yes
Pablo Galindoba421752021-05-03 20:33:17 +01009443else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009444
9445
Pablo Galindoba421752021-05-03 20:33:17 +01009446printf "%s\n" "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009447
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009448
Guido van Rossum627b2d71993-12-24 10:39:16 +00009449fi
Pablo Galindoba421752021-05-03 20:33:17 +01009450rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009451
Pablo Galindoba421752021-05-03 20:33:17 +01009452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
9453printf "%s\n" "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00009454
Pablo Galindoba421752021-05-03 20:33:17 +01009455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
9456printf %s "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00009457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009459
Jesus Cea740f53a2010-04-28 11:35:30 +00009460#if defined(MAJOR_IN_MKDEV)
9461#include <sys/mkdev.h>
9462#elif defined(MAJOR_IN_SYSMACROS)
9463#include <sys/sysmacros.h>
9464#else
9465#include <sys/types.h>
9466#endif
9467
Neal Norwitz11690112002-07-30 01:08:28 +00009468int
Pablo Galindoba421752021-05-03 20:33:17 +01009469main (void)
Neal Norwitz11690112002-07-30 01:08:28 +00009470{
Jesus Cea740f53a2010-04-28 11:35:30 +00009471
9472 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00009473 ;
9474 return 0;
9475}
Matthias Kloseb159a552010-04-25 21:00:44 +00009476
Neal Norwitz11690112002-07-30 01:08:28 +00009477_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01009478if ac_fn_c_try_link "$LINENO"
9479then :
Neal Norwitz11690112002-07-30 01:08:28 +00009480 ac_cv_has_makedev=yes
Pablo Galindoba421752021-05-03 20:33:17 +01009481else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00009483fi
Pablo Galindoba421752021-05-03 20:33:17 +01009484rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +01009486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
9487printf "%s\n" "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00009488if test "$ac_cv_has_makedev" = "yes"; then
9489
Pablo Galindoba421752021-05-03 20:33:17 +01009490printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00009491
9492fi
9493
Christian Heimes985ecdc2013-11-20 11:46:18 +01009494# byte swapping
Pablo Galindoba421752021-05-03 20:33:17 +01009495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
9496printf %s "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9498/* end confdefs.h. */
9499
9500#ifdef HAVE_ENDIAN_H
9501#include <endian.h>
9502#elif defined(HAVE_SYS_ENDIAN_H)
9503#include <sys/endian.h>
9504#endif
9505
9506int
Pablo Galindoba421752021-05-03 20:33:17 +01009507main (void)
Christian Heimes985ecdc2013-11-20 11:46:18 +01009508{
9509
9510 le64toh(1)
9511 ;
9512 return 0;
9513}
9514
9515_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01009516if ac_fn_c_try_link "$LINENO"
9517then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01009518 ac_cv_has_le64toh=yes
Pablo Galindoba421752021-05-03 20:33:17 +01009519else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +01009520 ac_cv_has_le64toh=no
9521fi
Pablo Galindoba421752021-05-03 20:33:17 +01009522rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimes985ecdc2013-11-20 11:46:18 +01009523 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +01009524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
9525printf "%s\n" "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009526if test "$ac_cv_has_le64toh" = "yes"; then
9527
Pablo Galindoba421752021-05-03 20:33:17 +01009528printf "%s\n" "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01009529
9530fi
9531
Martin v. Löwis399a6892002-10-04 10:22:02 +00009532use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02009533# Don't use largefile support for GNU/Hurd
9534case $ac_sys_system in GNU*)
9535 use_lfs=no
9536esac
9537
Martin v. Löwis399a6892002-10-04 10:22:02 +00009538if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00009539# Two defines needed to enable largefile support on various platforms
9540# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00009541case $ac_sys_system/$ac_sys_release in
9542AIX*)
9543
Pablo Galindoba421752021-05-03 20:33:17 +01009544printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00009545
9546 ;;
9547esac
Guido van Rossum810cc512001-09-09 23:51:39 +00009548
Pablo Galindoba421752021-05-03 20:33:17 +01009549printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009550
9551
Pablo Galindoba421752021-05-03 20:33:17 +01009552printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00009553
Martin v. Löwis399a6892002-10-04 10:22:02 +00009554fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009555
Guido van Rossum84e7b241996-08-19 21:59:00 +00009556# Add some code to confdefs.h so that the test for off_t works on SCO
9557cat >> confdefs.h <<\EOF
9558#if defined(SCO_DS)
9559#undef _OFF_T
9560#endif
9561EOF
9562
Guido van Rossumef2255b2000-03-10 22:30:29 +00009563# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00009564ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +01009565if test "x$ac_cv_type_mode_t" = xyes
9566then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009567
Pablo Galindoba421752021-05-03 20:33:17 +01009568else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009569
Pablo Galindoba421752021-05-03 20:33:17 +01009570printf "%s\n" "#define mode_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009571
9572fi
9573
Matthias Kloseb9621712010-04-24 17:59:49 +00009574ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +01009575if test "x$ac_cv_type_off_t" = xyes
9576then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009577
Pablo Galindoba421752021-05-03 20:33:17 +01009578else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009579
Pablo Galindoba421752021-05-03 20:33:17 +01009580printf "%s\n" "#define off_t long int" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +01009581
9582fi
9583
9584
Pablo Galindoba421752021-05-03 20:33:17 +01009585 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9586"
9587if test "x$ac_cv_type_pid_t" = xyes
9588then :
9589
9590else $as_nop
9591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9592/* end confdefs.h. */
9593
9594 #if defined _WIN64 && !defined __CYGWIN__
9595 LLP64
9596 #endif
9597
9598int
9599main (void)
9600{
9601
9602 ;
9603 return 0;
9604}
9605
Christian Heimes39258d32021-04-17 11:36:35 +02009606_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +01009607if ac_fn_c_try_compile "$LINENO"
9608then :
9609 ac_pid_type='int'
9610else $as_nop
9611 ac_pid_type='__int64'
9612fi
9613rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9614
9615printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
9616
9617
9618fi
9619
9620
9621
9622printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009623
Matthias Kloseb9621712010-04-24 17:59:49 +00009624ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +01009625if test "x$ac_cv_type_size_t" = xyes
9626then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009627
Pablo Galindoba421752021-05-03 20:33:17 +01009628else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009629
Pablo Galindoba421752021-05-03 20:33:17 +01009630printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009631
9632fi
9633
Pablo Galindoba421752021-05-03 20:33:17 +01009634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9635printf %s "checking for uid_t in sys/types.h... " >&6; }
9636if test ${ac_cv_type_uid_t+y}
9637then :
9638 printf %s "(cached) " >&6
9639else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009642#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009643
9644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +01009646 $EGREP "uid_t" >/dev/null 2>&1
9647then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009648 ac_cv_type_uid_t=yes
Pablo Galindoba421752021-05-03 20:33:17 +01009649else $as_nop
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009650 ac_cv_type_uid_t=no
9651fi
Pablo Galindoba421752021-05-03 20:33:17 +01009652rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009653
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009654fi
Pablo Galindoba421752021-05-03 20:33:17 +01009655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9656printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00009657if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009658
Pablo Galindoba421752021-05-03 20:33:17 +01009659printf "%s\n" "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009660
9661
Pablo Galindoba421752021-05-03 20:33:17 +01009662printf "%s\n" "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009663
9664fi
9665
Mark Dickinson983bc162012-12-02 12:11:38 +00009666
Matthias Kloseb9621712010-04-24 17:59:49 +00009667ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +01009668if test "x$ac_cv_type_ssize_t" = xyes
9669then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670
Pablo Galindoba421752021-05-03 20:33:17 +01009671printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00009672
9673fi
9674
Stefan Krah1919b7e2012-03-21 18:25:23 +01009675ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +01009676if test "x$ac_cv_type___uint128_t" = xyes
9677then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01009678
Pablo Galindoba421752021-05-03 20:33:17 +01009679printf "%s\n" "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01009680
9681fi
9682
Jack Jansendd19cf82001-12-06 22:36:17 +00009683
Jessica Clarkedec07572021-03-31 11:12:39 +01009684# Sizes and alignments of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00009685# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686# The cast to long int works around a bug in the HP C Compiler
9687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9689# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9691printf %s "checking size of int... " >&6; }
9692if test ${ac_cv_sizeof_int+y}
9693then :
9694 printf %s "(cached) " >&6
9695else $as_nop
9696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
9697then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009698
Pablo Galindoba421752021-05-03 20:33:17 +01009699else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 if test "$ac_cv_type_int" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009701 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9702printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009703as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02009704See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705 else
9706 ac_cv_sizeof_int=0
9707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009709
Martin v. Löwis11437992002-04-12 09:54:03 +00009710fi
Pablo Galindoba421752021-05-03 20:33:17 +01009711{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9712printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713
9714
9715
Pablo Galindoba421752021-05-03 20:33:17 +01009716printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009717
9718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719# The cast to long int works around a bug in the HP C Compiler
9720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9722# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9724printf %s "checking size of long... " >&6; }
9725if test ${ac_cv_sizeof_long+y}
9726then :
9727 printf %s "(cached) " >&6
9728else $as_nop
9729 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
9730then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009731
Pablo Galindoba421752021-05-03 20:33:17 +01009732else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 if test "$ac_cv_type_long" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009734 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9735printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009736as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02009737See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738 else
9739 ac_cv_sizeof_long=0
9740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742
Martin v. Löwis11437992002-04-12 09:54:03 +00009743fi
Pablo Galindoba421752021-05-03 20:33:17 +01009744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9745printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746
9747
9748
Pablo Galindoba421752021-05-03 20:33:17 +01009749printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009750
9751
Jessica Clarkedec07572021-03-31 11:12:39 +01009752# The cast to long int works around a bug in the HP C Compiler,
9753# see AC_CHECK_SIZEOF for more information.
Pablo Galindoba421752021-05-03 20:33:17 +01009754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
9755printf %s "checking alignment of long... " >&6; }
9756if test ${ac_cv_alignof_long+y}
9757then :
9758 printf %s "(cached) " >&6
9759else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +01009760 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
Pablo Galindoba421752021-05-03 20:33:17 +01009761typedef struct { char x; long y; } ac__type_alignof_;"
9762then :
Jessica Clarkedec07572021-03-31 11:12:39 +01009763
Pablo Galindoba421752021-05-03 20:33:17 +01009764else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +01009765 if test "$ac_cv_type_long" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009766 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9767printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01009768as_fn_error 77 "cannot compute alignment of long
9769See \`config.log' for more details" "$LINENO" 5; }
9770 else
9771 ac_cv_alignof_long=0
9772 fi
9773fi
9774
9775fi
Pablo Galindoba421752021-05-03 20:33:17 +01009776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
9777printf "%s\n" "$ac_cv_alignof_long" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01009778
9779
9780
Pablo Galindoba421752021-05-03 20:33:17 +01009781printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h
Jessica Clarkedec07572021-03-31 11:12:39 +01009782
9783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784# The cast to long int works around a bug in the HP C Compiler
9785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9787# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9789printf %s "checking size of long long... " >&6; }
9790if test ${ac_cv_sizeof_long_long+y}
9791then :
9792 printf %s "(cached) " >&6
9793else $as_nop
9794 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
9795then :
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009796
Pablo Galindoba421752021-05-03 20:33:17 +01009797else $as_nop
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009798 if test "$ac_cv_type_long_long" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009799 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9800printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009801as_fn_error 77 "cannot compute sizeof (long long)
9802See \`config.log' for more details" "$LINENO" 5; }
9803 else
9804 ac_cv_sizeof_long_long=0
9805 fi
9806fi
9807
9808fi
Pablo Galindoba421752021-05-03 20:33:17 +01009809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9810printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009811
9812
9813
Pablo Galindoba421752021-05-03 20:33:17 +01009814printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009815
9816
9817# The cast to long int works around a bug in the HP C Compiler
9818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9820# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
9822printf %s "checking size of void *... " >&6; }
9823if test ${ac_cv_sizeof_void_p+y}
9824then :
9825 printf %s "(cached) " >&6
9826else $as_nop
9827 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
9828then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
Pablo Galindoba421752021-05-03 20:33:17 +01009830else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 if test "$ac_cv_type_void_p" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009832 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9833printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009834as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02009835See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836 else
9837 ac_cv_sizeof_void_p=0
9838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009840
Martin v. Löwis11437992002-04-12 09:54:03 +00009841fi
Pablo Galindoba421752021-05-03 20:33:17 +01009842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
9843printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844
9845
9846
Pablo Galindoba421752021-05-03 20:33:17 +01009847printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009848
9849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850# The cast to long int works around a bug in the HP C Compiler
9851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9853# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9855printf %s "checking size of short... " >&6; }
9856if test ${ac_cv_sizeof_short+y}
9857then :
9858 printf %s "(cached) " >&6
9859else $as_nop
9860 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
9861then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009862
Pablo Galindoba421752021-05-03 20:33:17 +01009863else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 if test "$ac_cv_type_short" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009865 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9866printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009867as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02009868See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 else
9870 ac_cv_sizeof_short=0
9871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009873
Martin v. Löwis11437992002-04-12 09:54:03 +00009874fi
Pablo Galindoba421752021-05-03 20:33:17 +01009875{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9876printf "%s\n" "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877
9878
9879
Pablo Galindoba421752021-05-03 20:33:17 +01009880printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881
9882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883# The cast to long int works around a bug in the HP C Compiler
9884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9886# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
9888printf %s "checking size of float... " >&6; }
9889if test ${ac_cv_sizeof_float+y}
9890then :
9891 printf %s "(cached) " >&6
9892else $as_nop
9893 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"
9894then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009895
Pablo Galindoba421752021-05-03 20:33:17 +01009896else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 if test "$ac_cv_type_float" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009898 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9899printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009900as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02009901See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902 else
9903 ac_cv_sizeof_float=0
9904 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906
Martin v. Löwis11437992002-04-12 09:54:03 +00009907fi
Pablo Galindoba421752021-05-03 20:33:17 +01009908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
9909printf "%s\n" "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910
9911
9912
Pablo Galindoba421752021-05-03 20:33:17 +01009913printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009914
9915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916# The cast to long int works around a bug in the HP C Compiler
9917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9919# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
9921printf %s "checking size of double... " >&6; }
9922if test ${ac_cv_sizeof_double+y}
9923then :
9924 printf %s "(cached) " >&6
9925else $as_nop
9926 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
9927then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009928
Pablo Galindoba421752021-05-03 20:33:17 +01009929else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 if test "$ac_cv_type_double" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009931 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9932printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009933as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009934See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935 else
9936 ac_cv_sizeof_double=0
9937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009939
Martin v. Löwis11437992002-04-12 09:54:03 +00009940fi
Pablo Galindoba421752021-05-03 20:33:17 +01009941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
9942printf "%s\n" "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009943
9944
9945
Pablo Galindoba421752021-05-03 20:33:17 +01009946printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009947
9948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949# The cast to long int works around a bug in the HP C Compiler
9950# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9951# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9952# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
9954printf %s "checking size of fpos_t... " >&6; }
9955if test ${ac_cv_sizeof_fpos_t+y}
9956then :
9957 printf %s "(cached) " >&6
9958else $as_nop
9959 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"
9960then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009961
Pablo Galindoba421752021-05-03 20:33:17 +01009962else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 if test "$ac_cv_type_fpos_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009964 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9965printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009966as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009967See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968 else
9969 ac_cv_sizeof_fpos_t=0
9970 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009972
Martin v. Löwis11437992002-04-12 09:54:03 +00009973fi
Pablo Galindoba421752021-05-03 20:33:17 +01009974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
9975printf "%s\n" "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009976
9977
9978
Pablo Galindoba421752021-05-03 20:33:17 +01009979printf "%s\n" "#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009980
Michael W. Hudson54241132001-12-07 15:38:26 +00009981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009982# The cast to long int works around a bug in the HP C Compiler
9983# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9984# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9985# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +01009986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
9987printf %s "checking size of size_t... " >&6; }
9988if test ${ac_cv_sizeof_size_t+y}
9989then :
9990 printf %s "(cached) " >&6
9991else $as_nop
9992 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
9993then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00009994
Pablo Galindoba421752021-05-03 20:33:17 +01009995else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +01009997 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9998printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009999as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010000See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001 else
10002 ac_cv_sizeof_size_t=0
10003 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010005
Martin v. Löwis18e16552006-02-15 17:27:45 +000010006fi
Pablo Galindoba421752021-05-03 20:33:17 +010010007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
10008printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009
10010
10011
Pablo Galindoba421752021-05-03 20:33:17 +010010012printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +000010013
10014
Jessica Clarkedec07572021-03-31 11:12:39 +010010015# The cast to long int works around a bug in the HP C Compiler,
10016# see AC_CHECK_SIZEOF for more information.
Pablo Galindoba421752021-05-03 20:33:17 +010010017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5
10018printf %s "checking alignment of size_t... " >&6; }
10019if test ${ac_cv_alignof_size_t+y}
10020then :
10021 printf %s "(cached) " >&6
10022else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +010010023 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
Pablo Galindoba421752021-05-03 20:33:17 +010010024typedef struct { char x; size_t y; } ac__type_alignof_;"
10025then :
Jessica Clarkedec07572021-03-31 11:12:39 +010010026
Pablo Galindoba421752021-05-03 20:33:17 +010010027else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +010010028 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010029 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10030printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +010010031as_fn_error 77 "cannot compute alignment of size_t
10032See \`config.log' for more details" "$LINENO" 5; }
10033 else
10034 ac_cv_alignof_size_t=0
10035 fi
10036fi
10037
10038fi
Pablo Galindoba421752021-05-03 20:33:17 +010010039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
10040printf "%s\n" "$ac_cv_alignof_size_t" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +010010041
10042
10043
Pablo Galindoba421752021-05-03 20:33:17 +010010044printf "%s\n" "#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t" >>confdefs.h
Jessica Clarkedec07572021-03-31 11:12:39 +010010045
10046
Christian Heimes400adb02008-02-01 08:12:03 +000010047# The cast to long int works around a bug in the HP C Compiler
10048# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10049# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10050# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
10052printf %s "checking size of pid_t... " >&6; }
10053if test ${ac_cv_sizeof_pid_t+y}
10054then :
10055 printf %s "(cached) " >&6
10056else $as_nop
10057 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"
10058then :
Christian Heimes400adb02008-02-01 08:12:03 +000010059
Pablo Galindoba421752021-05-03 20:33:17 +010010060else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 if test "$ac_cv_type_pid_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010062 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10063printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010064as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010065See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +000010066 else
10067 ac_cv_sizeof_pid_t=0
10068 fi
10069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010070
Christian Heimes400adb02008-02-01 08:12:03 +000010071fi
Pablo Galindoba421752021-05-03 20:33:17 +010010072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
10073printf "%s\n" "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010074
10075
10076
Pablo Galindoba421752021-05-03 20:33:17 +010010077printf "%s\n" "#define SIZEOF_PID_T $ac_cv_sizeof_pid_t" >>confdefs.h
Christian Heimes400adb02008-02-01 08:12:03 +000010078
10079
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010080# The cast to long int works around a bug in the HP C Compiler
10081# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10082# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10083# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010084{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
10085printf %s "checking size of uintptr_t... " >&6; }
10086if test ${ac_cv_sizeof_uintptr_t+y}
10087then :
10088 printf %s "(cached) " >&6
10089else $as_nop
10090 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"
10091then :
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010092
Pablo Galindoba421752021-05-03 20:33:17 +010010093else $as_nop
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010094 if test "$ac_cv_type_uintptr_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010095 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10096printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010097as_fn_error 77 "cannot compute sizeof (uintptr_t)
10098See \`config.log' for more details" "$LINENO" 5; }
10099 else
10100 ac_cv_sizeof_uintptr_t=0
10101 fi
10102fi
10103
10104fi
Pablo Galindoba421752021-05-03 20:33:17 +010010105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
10106printf "%s\n" "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010107
10108
10109
Pablo Galindoba421752021-05-03 20:33:17 +010010110printf "%s\n" "#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t" >>confdefs.h
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010111
10112
Michael W. Hudson54241132001-12-07 15:38:26 +000010113
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010114
Pablo Galindoba421752021-05-03 20:33:17 +010010115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
10116printf %s "checking for long double... " >&6; }
10117if test ${ac_cv_type_long_double+y}
10118then :
10119 printf %s "(cached) " >&6
10120else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010121 if test "$GCC" = yes; then
10122 ac_cv_type_long_double=yes
10123 else
10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125/* end confdefs.h. */
10126/* The Stardent Vistra knows sizeof (long double), but does
10127 not support it. */
10128 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010129int
Pablo Galindoba421752021-05-03 20:33:17 +010010130main (void)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010131{
Eitan Adler3055c942018-05-15 22:58:09 -070010132static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
10133 sizeof (double) <= sizeof (long double))];
10134test_array [0] = 0;
10135return test_array [0];
10136
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010137 ;
10138 return 0;
10139}
10140_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010010141if ac_fn_c_try_compile "$LINENO"
10142then :
Eitan Adler3055c942018-05-15 22:58:09 -070010143 ac_cv_type_long_double=yes
Pablo Galindoba421752021-05-03 20:33:17 +010010144else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010145 ac_cv_type_long_double=no
10146fi
Pablo Galindoba421752021-05-03 20:33:17 +010010147rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -070010148 fi
10149fi
Pablo Galindoba421752021-05-03 20:33:17 +010010150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
10151printf "%s\n" "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -070010152 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010153
Pablo Galindoba421752021-05-03 20:33:17 +010010154printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010155
Eitan Adler3055c942018-05-15 22:58:09 -070010156 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010157
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010158# The cast to long int works around a bug in the HP C Compiler
10159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10161# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
10163printf %s "checking size of long double... " >&6; }
10164if test ${ac_cv_sizeof_long_double+y}
10165then :
10166 printf %s "(cached) " >&6
10167else $as_nop
10168 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
10169then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010170
Pablo Galindoba421752021-05-03 20:33:17 +010010171else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 if test "$ac_cv_type_long_double" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010173 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10174printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010175as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +020010176See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010177 else
10178 ac_cv_sizeof_long_double=0
10179 fi
10180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010182fi
Pablo Galindoba421752021-05-03 20:33:17 +010010183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
10184printf "%s\n" "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010185
10186
10187
Pablo Galindoba421752021-05-03 20:33:17 +010010188printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010189
10190
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192# The cast to long int works around a bug in the HP C Compiler
10193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10195# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
10197printf %s "checking size of _Bool... " >&6; }
10198if test ${ac_cv_sizeof__Bool+y}
10199then :
10200 printf %s "(cached) " >&6
10201else $as_nop
10202 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"
10203then :
Thomas Woutersb2137042007-02-01 18:02:27 +000010204
Pablo Galindoba421752021-05-03 20:33:17 +010010205else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 if test "$ac_cv_type__Bool" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010207 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10208printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010209as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +020010210See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211 else
10212 ac_cv_sizeof__Bool=0
10213 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000010214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010215
Thomas Woutersb2137042007-02-01 18:02:27 +000010216fi
Pablo Galindoba421752021-05-03 20:33:17 +010010217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
10218printf "%s\n" "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219
10220
10221
Pablo Galindoba421752021-05-03 20:33:17 +010010222printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +000010223
10224
Thomas Woutersb2137042007-02-01 18:02:27 +000010225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010226# The cast to long int works around a bug in the HP C Compiler
10227# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10228# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10229# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
10231printf %s "checking size of off_t... " >&6; }
10232if test ${ac_cv_sizeof_off_t+y}
10233then :
10234 printf %s "(cached) " >&6
10235else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010237#ifdef HAVE_SYS_TYPES_H
10238#include <sys/types.h>
10239#endif
10240
Pablo Galindoba421752021-05-03 20:33:17 +010010241"
10242then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010243
Pablo Galindoba421752021-05-03 20:33:17 +010010244else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 if test "$ac_cv_type_off_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010246 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10247printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010248as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010249See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010250 else
10251 ac_cv_sizeof_off_t=0
10252 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010254
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010255fi
Pablo Galindoba421752021-05-03 20:33:17 +010010256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
10257printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010259
10260
Pablo Galindoba421752021-05-03 20:33:17 +010010261printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010262
Michael W. Hudson54241132001-12-07 15:38:26 +000010263
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010264
Pablo Galindoba421752021-05-03 20:33:17 +010010265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
10266printf %s "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000010267if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010268 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010269
Pablo Galindoba421752021-05-03 20:33:17 +010010270printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010271
Pablo Galindoba421752021-05-03 20:33:17 +010010272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10273printf "%s\n" "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010274else
Pablo Galindoba421752021-05-03 20:33:17 +010010275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276printf "%s\n" "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010277fi
10278
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010279# The cast to long int works around a bug in the HP C Compiler
10280# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10281# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10282# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10284printf %s "checking size of time_t... " >&6; }
10285if test ${ac_cv_sizeof_time_t+y}
10286then :
10287 printf %s "(cached) " >&6
10288else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010290#ifdef HAVE_SYS_TYPES_H
10291#include <sys/types.h>
10292#endif
10293#ifdef HAVE_TIME_H
10294#include <time.h>
10295#endif
10296
Pablo Galindoba421752021-05-03 20:33:17 +010010297"
10298then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010299
Pablo Galindoba421752021-05-03 20:33:17 +010010300else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 if test "$ac_cv_type_time_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010302 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10303printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010304as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010305See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010306 else
10307 ac_cv_sizeof_time_t=0
10308 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010310
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010311fi
Pablo Galindoba421752021-05-03 20:33:17 +010010312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10313printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010315
10316
Pablo Galindoba421752021-05-03 20:33:17 +010010317printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010318
Michael W. Hudson54241132001-12-07 15:38:26 +000010319
10320
Trent Mick635f6fb2000-08-23 21:33:05 +000010321# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010322ac_save_cc="$CC"
10323if test "$ac_cv_kpthread" = "yes"
10324then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010325elif test "$ac_cv_kthread" = "yes"
10326then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010327elif test "$ac_cv_pthread" = "yes"
10328then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010329fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010330
Pablo Galindoba421752021-05-03 20:33:17 +010010331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
10332printf %s "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010333have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010335/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010336
10337 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010338int
Pablo Galindoba421752021-05-03 20:33:17 +010010339main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010340{
Guido van Rossum12580492000-09-24 16:47:19 +000010341pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ;
10343 return 0;
10344}
Matthias Kloseb159a552010-04-25 21:00:44 +000010345
Martin v. Löwis11437992002-04-12 09:54:03 +000010346_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010010347if ac_fn_c_try_compile "$LINENO"
10348then :
Trent Mick635f6fb2000-08-23 21:33:05 +000010349 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +000010350fi
Pablo Galindoba421752021-05-03 20:33:17 +010010351rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
10353printf "%s\n" "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010354if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010356# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10357# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10358# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
10360printf %s "checking size of pthread_t... " >&6; }
10361if test ${ac_cv_sizeof_pthread_t+y}
10362then :
10363 printf %s "(cached) " >&6
10364else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010366#ifdef HAVE_PTHREAD_H
10367#include <pthread.h>
10368#endif
10369
Pablo Galindoba421752021-05-03 20:33:17 +010010370"
10371then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010372
Pablo Galindoba421752021-05-03 20:33:17 +010010373else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 if test "$ac_cv_type_pthread_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010375 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10376printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010377as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010378See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010379 else
10380 ac_cv_sizeof_pthread_t=0
10381 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383
Trent Mick635f6fb2000-08-23 21:33:05 +000010384fi
Pablo Galindoba421752021-05-03 20:33:17 +010010385{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
10386printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010388
10389
Pablo Galindoba421752021-05-03 20:33:17 +010010390printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
Trent Mick635f6fb2000-08-23 21:33:05 +000010391
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010392
Trent Mick635f6fb2000-08-23 21:33:05 +000010393fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010394
10395# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
10396# This checking will be unnecessary after removing deprecated TLS API.
10397# The cast to long int works around a bug in the HP C Compiler
10398# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10399# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10400# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010010401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
10402printf %s "checking size of pthread_key_t... " >&6; }
10403if test ${ac_cv_sizeof_pthread_key_t+y}
10404then :
10405 printf %s "(cached) " >&6
10406else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010407 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Pablo Galindoba421752021-05-03 20:33:17 +010010408"
10409then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010410
Pablo Galindoba421752021-05-03 20:33:17 +010010411else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010412 if test "$ac_cv_type_pthread_key_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010010413 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10414printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010415as_fn_error 77 "cannot compute sizeof (pthread_key_t)
10416See \`config.log' for more details" "$LINENO" 5; }
10417 else
10418 ac_cv_sizeof_pthread_key_t=0
10419 fi
10420fi
10421
10422fi
Pablo Galindoba421752021-05-03 20:33:17 +010010423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
10424printf "%s\n" "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010425
10426
10427
Pablo Galindoba421752021-05-03 20:33:17 +010010428printf "%s\n" "#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010429
10430
Pablo Galindoba421752021-05-03 20:33:17 +010010431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
10432printf %s "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010433if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
10434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10435/* end confdefs.h. */
10436#include <pthread.h>
10437int
Pablo Galindoba421752021-05-03 20:33:17 +010010438main (void)
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010439{
10440pthread_key_t k; k * 1;
10441 ;
10442 return 0;
10443}
10444_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010010445if ac_fn_c_try_compile "$LINENO"
10446then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010447 ac_pthread_key_t_is_arithmetic_type=yes
Pablo Galindoba421752021-05-03 20:33:17 +010010448else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010449 ac_pthread_key_t_is_arithmetic_type=no
10450
10451fi
Pablo Galindoba421752021-05-03 20:33:17 +010010452rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
10454printf "%s\n" "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010455 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
10456
Pablo Galindoba421752021-05-03 20:33:17 +010010457printf "%s\n" "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010458
10459 fi
10460else
Pablo Galindoba421752021-05-03 20:33:17 +010010461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462printf "%s\n" "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010463fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010464CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010465
Michael W. Hudson54241132001-12-07 15:38:26 +000010466
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010467case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010468 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010469 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10470 ;;
10471 Darwin/*)
10472 OTHER_LIBTOOL_OPT=""
10473 ;;
10474esac
10475
10476
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010477
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010478case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010479 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010480 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
10481 if test "${enable_universalsdk}"; then
10482 :
10483 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010484 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000010485 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000010486 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010487 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010488 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000010489 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010490 if test ${gcc_version} '<' 4.0
10491 then
10492 LIBTOOL_CRUFT="-lcc_dynamic"
10493 else
10494 LIBTOOL_CRUFT=""
10495 fi
Pablo Galindoba421752021-05-03 20:33:17 +010010496 if test "$cross_compiling" = yes
10497then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010498 ac_osx_32bit=yes
Pablo Galindoba421752021-05-03 20:33:17 +010010499else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010501/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010502
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010503 #include <unistd.h>
10504 int main(int argc, char*argv[])
10505 {
10506 if (sizeof(long) == 4) {
10507 return 0;
10508 } else {
10509 return 1;
10510 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010511 }
10512
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010513_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010010514if ac_fn_c_try_run "$LINENO"
10515then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010516 ac_osx_32bit=yes
Pablo Galindoba421752021-05-03 20:33:17 +010010517else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010522fi
10523
10524
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010525 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010526 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010527 i386)
10528 MACOSX_DEFAULT_ARCH="i386"
10529 ;;
10530 ppc)
10531 MACOSX_DEFAULT_ARCH="ppc"
10532 ;;
10533 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010534 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010535 ;;
10536 esac
10537 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010538 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010539 i386)
10540 MACOSX_DEFAULT_ARCH="x86_64"
10541 ;;
10542 ppc)
10543 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +010010544 ;;
10545 arm64)
10546 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010547 ;;
10548 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010549 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010550 ;;
10551 esac
10552
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010553 fi
10554
10555 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000010556 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010557 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010558esac
Pablo Galindoba421752021-05-03 20:33:17 +010010559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
10560printf %s "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010561if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010562then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010563 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010565 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010566
Pablo Galindoba421752021-05-03 20:33:17 +010010567printf "%s\n" "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010568
Pablo Galindoba421752021-05-03 20:33:17 +010010569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10570printf "%s\n" "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000010571 if test $enable_shared = "yes"
10572 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010573 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 +000010574 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010575else
Pablo Galindoba421752021-05-03 20:33:17 +010010576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577printf "%s\n" "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010578fi
10579
Pablo Galindoba421752021-05-03 20:33:17 +010010580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
10581printf %s "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010582case $ac_sys_system/$ac_sys_release in
10583 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010584
Pablo Galindoba421752021-05-03 20:33:17 +010010585printf "%s\n" "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010586
Pablo Galindoba421752021-05-03 20:33:17 +010010587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
10588printf "%s\n" "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010589 ;;
10590 *)
Pablo Galindoba421752021-05-03 20:33:17 +010010591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592printf "%s\n" "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010593 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010594esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010595
Guido van Rossum0a516c91994-09-12 10:58:40 +000010596# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010597
Michael W. Hudson54241132001-12-07 15:38:26 +000010598
10599
10600
10601
Benjamin Peterson99f03762010-04-11 22:15:28 +000010602
Thomas Wouters477c8d52006-05-27 19:21:47 +000010603
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010604# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
10605# -- usually .so, .sl on HP-UX, .dll on Cygwin
Pablo Galindoba421752021-05-03 20:33:17 +010010606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
10607printf %s "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010608if test -z "$SHLIB_SUFFIX"; then
10609 case $ac_sys_system in
10610 hp*|HP*)
10611 case `uname -m` in
10612 ia64) SHLIB_SUFFIX=.so;;
10613 *) SHLIB_SUFFIX=.sl;;
10614 esac
10615 ;;
10616 CYGWIN*) SHLIB_SUFFIX=.dll;;
10617 *) SHLIB_SUFFIX=.so;;
10618 esac
10619fi
Pablo Galindoba421752021-05-03 20:33:17 +010010620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
10621printf "%s\n" "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010622
Guido van Rossum0a516c91994-09-12 10:58:40 +000010623# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -070010624# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010625# (Shared libraries in this instance are shared modules to be loaded into
10626# Python, as opposed to building Python itself as a shared library.)
Pablo Galindoba421752021-05-03 20:33:17 +010010627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
10628printf %s "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010629if test -z "$LDSHARED"
10630then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010631 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010632 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +000010633 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +000010634 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010635 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010637 if test "$GCC" = "yes" ; then
10638 LDSHARED='$(CC) -shared'
10639 LDCXXSHARED='$(CXX) -shared'
10640 else
10641 LDSHARED='$(CC) -G'
10642 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +000010643 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010644 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010645 if test "$GCC" = "yes" ; then
10646 LDSHARED='$(CC) -shared'
10647 LDCXXSHARED='$(CXX) -shared'
10648 else
Rob Boehne9d25bd12017-12-06 11:58:17 -060010649 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010650 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010651 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +000010652 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010653 LDSHARED='$(CC) -bundle'
10654 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000010655 if test "$enable_framework" ; then
10656 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010657 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10658 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010659 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010660 else
10661 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010662 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +000010663 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010664 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010665 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010666 LDSHARED='$(CC) -bundle'
10667 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000010668 if test "$enable_framework" ; then
10669 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010670 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10671 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010672 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010673 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010674 # No framework, use the Python app as bundle-loader
10675 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010676 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010677 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010678 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010679 Darwin/*)
10680 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10681 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000010682
Ned Deily36820b62014-06-25 13:44:22 -070010683 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10684 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
10685 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10686 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
10687 if test ${dep_target_major} -eq 10 && \
10688 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +000010689 then
Ned Deily36820b62014-06-25 13:44:22 -070010690 # building for OS X 10.0 through 10.2
Ned Deily87031782021-05-02 20:28:43 -040010691 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 -070010692 else
10693 # building for OS X 10.3 and later
10694 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
10695 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
10696 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010697 fi
10698 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010699 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010700 LDSHARED='$(CC) -shared'
10701 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010702 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010703 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010704 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010705 LDSHARED='$(CC) -shared'
10706 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +000010707 else
Antoine Pitroud4958c22010-10-13 17:01:10 +000010708 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010709 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010710 OpenBSD*)
10711 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10712 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010713 LDSHARED='$(CC) -shared $(CCSHARED)'
10714 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010715 else
10716 case `uname -r` in
10717 [01].* | 2.[0-7] | 2.[0-7].*)
10718 LDSHARED="ld -Bshareable ${LDFLAGS}"
10719 ;;
10720 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010721 LDSHARED='$(CC) -shared $(CCSHARED)'
10722 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010723 ;;
10724 esac
10725 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010726 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +000010727 LDSHARED='$(CC) -shared'
10728 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010729 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010730 if test "$GCC" = "yes" ; then
10731 LDSHARED='$(CC) -shared'
10732 LDCXXSHARED='$(CXX) -shared'
10733 else
10734 LDSHARED='$(CC) -G'
10735 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010736 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010737 SCO_SV*)
10738 LDSHARED='$(CC) -Wl,-G,-Bexport'
10739 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
10740 CYGWIN*)
10741 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
10742 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010743 *) LDSHARED="ld";;
10744 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010745fi
Pablo Galindoba421752021-05-03 20:33:17 +010010746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
10747printf "%s\n" "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +000010748LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010749BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010750# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010751# library (module) -- this is only needed for a few systems
Pablo Galindoba421752021-05-03 20:33:17 +010010752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
10753printf %s "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010754if test -z "$CCSHARED"
10755then
Guido van Rossum07397971997-04-29 21:49:50 +000010756 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010757 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010758 then CCSHARED="-fPIC";
10759 elif test `uname -p` = sparc;
10760 then CCSHARED="-xcode=pic32";
10761 else CCSHARED="-Kpic";
10762 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010763 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010764 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010765 else CCSHARED="+z";
10766 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010767 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010768 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010769 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010770 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010771 if test "$GCC" = "yes"
10772 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010773 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010774 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010775 SCO_SV*)
10776 if test "$GCC" = "yes"
10777 then CCSHARED="-fPIC"
10778 else CCSHARED="-Kpic -belf"
10779 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010780 VxWorks*)
10781 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +000010782 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010783fi
Pablo Galindoba421752021-05-03 20:33:17 +010010784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
10785printf "%s\n" "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010786# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010787# the python executable -- this is only needed for a few systems
Pablo Galindoba421752021-05-03 20:33:17 +010010788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
10789printf %s "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010790if test -z "$LINKFORSHARED"
10791then
Guido van Rossum07397971997-04-29 21:49:50 +000010792 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010793 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010794 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010795 LINKFORSHARED="-Wl,-E -Wl,+s";;
10796# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010797 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010798 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010799 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000010801 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -040010802
10803 # Issue #18075: the default maximum stack size (8MBytes) is too
10804 # small for the default recursion limit. Increase the stack size
10805 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +020010806 # Note: This matches the value of THREAD_STACK_SIZE in
10807 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -040010808 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
10809
Jack Jansene578a632001-08-15 01:27:14 +000010810 if test "$enable_framework"
10811 then
Jack Jansenda49e192005-01-07 13:08:22 +000010812 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010813 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010814 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010815 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010816 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010817 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010818 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010819 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10820 then
10821 LINKFORSHARED="-Wl,--export-dynamic"
10822 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010823 SunOS/5*) case $CC in
10824 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010825 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010826 then
10827 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010828 fi;;
10829 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010830 CYGWIN*)
10831 if test $enable_shared = "no"
10832 then
10833 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10834 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000010835 QNX*)
10836 # -Wl,-E causes the symbols to be added to the dynamic
10837 # symbol table so that they can be found when a module
10838 # is loaded. -N 2048K causes the stack size to be set
10839 # to 2048 kilobytes so that the stack doesn't overflow
10840 # when running test_compile.py.
10841 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +080010842 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +080010843 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010844 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010845fi
Pablo Galindoba421752021-05-03 20:33:17 +010010846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
10847printf "%s\n" "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010848
Michael W. Hudson54241132001-12-07 15:38:26 +000010849
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010850
Pablo Galindoba421752021-05-03 20:33:17 +010010851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
10852printf %s "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010853if test ! "$LIBRARY" = "$LDLIBRARY"
10854then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010855 case $ac_sys_system in
10856 CYGWIN*)
10857 # Cygwin needs CCSHARED when building extension DLLs
10858 # but not when building the interpreter DLL.
10859 CFLAGSFORSHARED='';;
10860 *)
10861 CFLAGSFORSHARED='$(CCSHARED)'
10862 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010863fi
Pablo Galindoba421752021-05-03 20:33:17 +010010864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
10865printf "%s\n" "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010866
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010867# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10868# library (with --enable-shared).
10869# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010870# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10871# if it is not required, since it creates a dependency of the shared library
10872# to LIBS. This, in turn, means that applications linking the shared libpython
10873# don't need to link LIBS explicitly. The default should be only changed
10874# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010875
Pablo Galindoba421752021-05-03 20:33:17 +010010876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
10877printf %s "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010878case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010879 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010880 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010881esac
Pablo Galindoba421752021-05-03 20:33:17 +010010882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
10883printf "%s\n" "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010884
10885
Guido van Rossum627b2d71993-12-24 10:39:16 +000010886# checks for libraries
Pablo Galindoba421752021-05-03 20:33:17 +010010887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
10888printf %s "checking for sendfile in -lsendfile... " >&6; }
10889if test ${ac_cv_lib_sendfile_sendfile+y}
10890then :
10891 printf %s "(cached) " >&6
10892else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010893 ac_check_lib_save_LIBS=$LIBS
10894LIBS="-lsendfile $LIBS"
10895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10896/* end confdefs.h. */
10897
10898/* Override any GCC internal prototype to avoid an error.
10899 Use char because int might match the return type of a GCC
10900 builtin and then its argument prototype would still apply. */
Georg Brandl941f9562011-02-25 15:21:47 +000010901char sendfile ();
10902int
Pablo Galindoba421752021-05-03 20:33:17 +010010903main (void)
Georg Brandl941f9562011-02-25 15:21:47 +000010904{
10905return sendfile ();
10906 ;
10907 return 0;
10908}
10909_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010010910if ac_fn_c_try_link "$LINENO"
10911then :
Georg Brandl941f9562011-02-25 15:21:47 +000010912 ac_cv_lib_sendfile_sendfile=yes
Pablo Galindoba421752021-05-03 20:33:17 +010010913else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010914 ac_cv_lib_sendfile_sendfile=no
10915fi
Pablo Galindoba421752021-05-03 20:33:17 +010010916rm -f core conftest.err conftest.$ac_objext conftest.beam \
Georg Brandl941f9562011-02-25 15:21:47 +000010917 conftest$ac_exeext conftest.$ac_ext
10918LIBS=$ac_check_lib_save_LIBS
10919fi
Pablo Galindoba421752021-05-03 20:33:17 +010010920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
10921printf "%s\n" "$ac_cv_lib_sendfile_sendfile" >&6; }
10922if test "x$ac_cv_lib_sendfile_sendfile" = xyes
10923then :
10924 printf "%s\n" "#define HAVE_LIBSENDFILE 1" >>confdefs.h
Georg Brandl941f9562011-02-25 15:21:47 +000010925
10926 LIBS="-lsendfile $LIBS"
10927
10928fi
10929
Pablo Galindoba421752021-05-03 20:33:17 +010010930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10931printf %s "checking for dlopen in -ldl... " >&6; }
10932if test ${ac_cv_lib_dl_dlopen+y}
10933then :
10934 printf %s "(cached) " >&6
10935else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010937LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941/* Override any GCC internal prototype to avoid an error.
10942 Use char because int might match the return type of a GCC
10943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010944char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010945int
Pablo Galindoba421752021-05-03 20:33:17 +010010946main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 ;
10950 return 0;
10951}
10952_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010010953if ac_fn_c_try_link "$LINENO"
10954then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ac_cv_lib_dl_dlopen=yes
Pablo Galindoba421752021-05-03 20:33:17 +010010956else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010958fi
Pablo Galindoba421752021-05-03 20:33:17 +010010959rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010961LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010962fi
Pablo Galindoba421752021-05-03 20:33:17 +010010963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10964printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
10965if test "x$ac_cv_lib_dl_dlopen" = xyes
10966then :
10967 printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010969 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010970
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010971fi
10972 # Dynamic linking for SunOS/Solaris and SYSV
Pablo Galindoba421752021-05-03 20:33:17 +010010973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10974printf %s "checking for shl_load in -ldld... " >&6; }
10975if test ${ac_cv_lib_dld_shl_load+y}
10976then :
10977 printf %s "(cached) " >&6
10978else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010980LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984/* Override any GCC internal prototype to avoid an error.
10985 Use char because int might match the return type of a GCC
10986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010987char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010988int
Pablo Galindoba421752021-05-03 20:33:17 +010010989main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 ;
10993 return 0;
10994}
10995_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010010996if ac_fn_c_try_link "$LINENO"
10997then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ac_cv_lib_dld_shl_load=yes
Pablo Galindoba421752021-05-03 20:33:17 +010010999else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011001fi
Pablo Galindoba421752021-05-03 20:33:17 +010011002rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011005fi
Pablo Galindoba421752021-05-03 20:33:17 +010011006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
11007printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
11008if test "x$ac_cv_lib_dld_shl_load" = xyes
11009then :
11010 printf "%s\n" "#define HAVE_LIBDLD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011011
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011012 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011013
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011014fi
11015 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011016
Michael Felt0d3ccb42017-12-30 22:39:20 +010011017# checks for uuid.h location
Pablo Galindoba421752021-05-03 20:33:17 +010011018ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11019if test "x$ac_cv_header_uuid_uuid_h" = xyes
11020then :
11021 printf "%s\n" "#define HAVE_UUID_UUID_H 1" >>confdefs.h
11022
11023fi
11024ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11025if test "x$ac_cv_header_uuid_h" = xyes
11026then :
11027 printf "%s\n" "#define HAVE_UUID_H 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010011028
11029fi
11030
Michael Felt0d3ccb42017-12-30 22:39:20 +010011031
Pablo Galindoba421752021-05-03 20:33:17 +010011032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
11033printf %s "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030011034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11035/* end confdefs.h. */
11036#include <uuid/uuid.h>
11037int
Pablo Galindoba421752021-05-03 20:33:17 +010011038main (void)
Berker Peksag9a10ff42017-11-08 23:09:16 +030011039{
11040
11041#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030011042void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030011043#endif
11044
11045 ;
11046 return 0;
11047}
11048_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011049if ac_fn_c_try_compile "$LINENO"
11050then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030011051
Pablo Galindoba421752021-05-03 20:33:17 +010011052printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030011053
Pablo Galindoba421752021-05-03 20:33:17 +010011054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11055printf "%s\n" "yes" >&6; }
11056else $as_nop
11057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11058printf "%s\n" "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030011059
11060fi
Pablo Galindoba421752021-05-03 20:33:17 +010011061rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030011062
Michael Felt0d3ccb42017-12-30 22:39:20 +010011063# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000011064# FreeBSD and OpenBSD provides support as well
Pablo Galindoba421752021-05-03 20:33:17 +010011065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
11066printf %s "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11068/* end confdefs.h. */
11069#include <uuid.h>
11070int
Pablo Galindoba421752021-05-03 20:33:17 +010011071main (void)
Michael Felt0d3ccb42017-12-30 22:39:20 +010011072{
11073
11074#ifndef uuid_create
11075void *x = uuid_create
11076#endif
11077
11078 ;
11079 return 0;
11080}
11081_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011082if ac_fn_c_try_compile "$LINENO"
11083then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010011084
Pablo Galindoba421752021-05-03 20:33:17 +010011085printf "%s\n" "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010011086
Pablo Galindoba421752021-05-03 20:33:17 +010011087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11088printf "%s\n" "yes" >&6; }
11089else $as_nop
11090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091printf "%s\n" "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011092
11093fi
Pablo Galindoba421752021-05-03 20:33:17 +010011094rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010011095
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011096# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
11097# stream in big-endian byte-order
Pablo Galindoba421752021-05-03 20:33:17 +010011098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
11099printf %s "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11101/* end confdefs.h. */
11102#include <uuid.h>
11103int
Pablo Galindoba421752021-05-03 20:33:17 +010011104main (void)
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011105{
11106
11107#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040011108void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011109#endif
11110
11111 ;
11112 return 0;
11113}
11114_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011115if ac_fn_c_try_compile "$LINENO"
11116then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011117
Pablo Galindoba421752021-05-03 20:33:17 +010011118printf "%s\n" "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011119
Pablo Galindoba421752021-05-03 20:33:17 +010011120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11121printf "%s\n" "yes" >&6; }
11122else $as_nop
11123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124printf "%s\n" "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011125
11126fi
Pablo Galindoba421752021-05-03 20:33:17 +010011127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011128
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011129# 'Real Time' functions on Solaris
11130# posix4 on Solaris 2.6
11131# pthread (first!) on Linux
Pablo Galindoba421752021-05-03 20:33:17 +010011132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
11133printf %s "checking for library containing sem_init... " >&6; }
11134if test ${ac_cv_search_sem_init+y}
11135then :
11136 printf %s "(cached) " >&6
11137else $as_nop
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011138 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000011139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142/* Override any GCC internal prototype to avoid an error.
11143 Use char because int might match the return type of a GCC
11144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011145char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011146int
Pablo Galindoba421752021-05-03 20:33:17 +010011147main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011148{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 ;
11151 return 0;
11152}
11153_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011154for ac_lib in '' pthread rt posix4
11155do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156 if test -z "$ac_lib"; then
11157 ac_res="none required"
11158 else
11159 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011161 fi
Pablo Galindoba421752021-05-03 20:33:17 +010011162 if ac_fn_c_try_link "$LINENO"
11163then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000011165fi
Pablo Galindoba421752021-05-03 20:33:17 +010011166rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 conftest$ac_exeext
Pablo Galindoba421752021-05-03 20:33:17 +010011168 if test ${ac_cv_search_sem_init+y}
11169then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172done
Pablo Galindoba421752021-05-03 20:33:17 +010011173if test ${ac_cv_search_sem_init+y}
11174then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011175
Pablo Galindoba421752021-05-03 20:33:17 +010011176else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011177 ac_cv_search_sem_init=no
11178fi
11179rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011180LIBS=$ac_func_search_save_LIBS
11181fi
Pablo Galindoba421752021-05-03 20:33:17 +010011182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
11183printf "%s\n" "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184ac_res=$ac_cv_search_sem_init
Pablo Galindoba421752021-05-03 20:33:17 +010011185if test "$ac_res" != no
11186then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011188
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011189fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011190
Martin v. Löwis519adae2003-09-20 10:47:47 +000011191
Martin v. Löwis19d17342003-06-14 21:03:05 +000011192# check if we need libintl for locale functions
Pablo Galindoba421752021-05-03 20:33:17 +010011193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
11194printf %s "checking for textdomain in -lintl... " >&6; }
11195if test ${ac_cv_lib_intl_textdomain+y}
11196then :
11197 printf %s "(cached) " >&6
11198else $as_nop
Martin v. Löwis19d17342003-06-14 21:03:05 +000011199 ac_check_lib_save_LIBS=$LIBS
11200LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011202/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204/* Override any GCC internal prototype to avoid an error.
11205 Use char because int might match the return type of a GCC
11206 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011207char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011208int
Pablo Galindoba421752021-05-03 20:33:17 +010011209main (void)
Martin v. Löwis19d17342003-06-14 21:03:05 +000011210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011211return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011212 ;
11213 return 0;
11214}
11215_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011216if ac_fn_c_try_link "$LINENO"
11217then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011218 ac_cv_lib_intl_textdomain=yes
Pablo Galindoba421752021-05-03 20:33:17 +010011219else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000011221fi
Pablo Galindoba421752021-05-03 20:33:17 +010011222rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011224LIBS=$ac_check_lib_save_LIBS
11225fi
Pablo Galindoba421752021-05-03 20:33:17 +010011226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
11227printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; }
11228if test "x$ac_cv_lib_intl_textdomain" = xyes
11229then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011230
Pablo Galindoba421752021-05-03 20:33:17 +010011231printf "%s\n" "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000011232
Brett Cannonc6d936e2009-06-07 20:09:53 +000011233 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000011234fi
11235
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011236
11237# checks for system dependent C++ extensions support
11238case "$ac_sys_system" in
Pablo Galindoba421752021-05-03 20:33:17 +010011239 AIX*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
11240printf %s "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011243
Georg Brandl59e87bd2011-02-15 19:48:59 +000011244 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011245int
Pablo Galindoba421752021-05-03 20:33:17 +010011246main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011247{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011248loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011249 ;
11250 return 0;
11251}
Matthias Kloseb159a552010-04-25 21:00:44 +000011252
Martin v. Löwis11437992002-04-12 09:54:03 +000011253_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011254if ac_fn_c_try_link "$LINENO"
11255then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011256
Matthias Kloseb159a552010-04-25 21:00:44 +000011257
Pablo Galindoba421752021-05-03 20:33:17 +010011258printf "%s\n" "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
Pablo Galindoba421752021-05-03 20:33:17 +010011260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11261printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011262
Pablo Galindoba421752021-05-03 20:33:17 +010011263else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000011264
Pablo Galindoba421752021-05-03 20:33:17 +010011265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011267
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011268fi
Pablo Galindoba421752021-05-03 20:33:17 +010011269rm -f core conftest.err conftest.$ac_objext conftest.beam \
Michael Felt39afa2d2019-12-15 15:17:53 +010011270 conftest$ac_exeext conftest.$ac_ext
11271# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
11272# of the AIX system used to build/package Python executable. This tag serves
11273# as a baseline for bdist module packages
Pablo Galindoba421752021-05-03 20:33:17 +010011274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
11275printf %s "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011276 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
11277
Pablo Galindoba421752021-05-03 20:33:17 +010011278printf "%s\n" "#define AIX_BUILDDATE $AIX_BUILDDATE" >>confdefs.h
Michael Felt39afa2d2019-12-15 15:17:53 +010011279
Pablo Galindoba421752021-05-03 20:33:17 +010011280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
11281printf "%s\n" "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011282 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011283 *) ;;
11284esac
11285
Christian Heimes985ecdc2013-11-20 11:46:18 +010011286# check for systems that require aligned memory access
Pablo Galindoba421752021-05-03 20:33:17 +010011287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
11288printf %s "checking aligned memory access is required... " >&6; }
11289if test ${ac_cv_aligned_required+y}
11290then :
11291 printf %s "(cached) " >&6
11292else $as_nop
11293 if test "$cross_compiling" = yes
11294then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011295 ac_cv_aligned_required=yes
Pablo Galindoba421752021-05-03 20:33:17 +010011296else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +010011297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11298/* end confdefs.h. */
11299
11300int main()
11301{
11302 char s[16];
11303 int i, *p1, *p2;
11304 for (i=0; i < 16; i++)
11305 s[i] = i;
11306 p1 = (int*)(s+1);
11307 p2 = (int*)(s+2);
11308 if (*p1 == *p2)
11309 return 1;
11310 return 0;
11311}
Christian Heimes985ecdc2013-11-20 11:46:18 +010011312_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011313if ac_fn_c_try_run "$LINENO"
11314then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011315 ac_cv_aligned_required=no
Pablo Galindoba421752021-05-03 20:33:17 +010011316else $as_nop
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011317 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010011318fi
11319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11320 conftest.$ac_objext conftest.beam conftest.$ac_ext
11321fi
11322
11323
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011324fi
11325
Pablo Galindoba421752021-05-03 20:33:17 +010011326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
11327printf "%s\n" "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011328if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010011329
Pablo Galindoba421752021-05-03 20:33:17 +010011330printf "%s\n" "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011331
11332fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010011333
11334# str, bytes and memoryview hash algorithm
11335
11336
Pablo Galindoba421752021-05-03 20:33:17 +010011337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
11338printf %s "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011339
11340# Check whether --with-hash_algorithm was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011341if test ${with_hash_algorithm+y}
11342then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010011343 withval=$with_hash_algorithm;
Pablo Galindoba421752021-05-03 20:33:17 +010011344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11345printf "%s\n" "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011346case "$withval" in
11347 siphash24)
Pablo Galindoba421752021-05-03 20:33:17 +010011348 printf "%s\n" "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011349
11350 ;;
11351 fnv)
Pablo Galindoba421752021-05-03 20:33:17 +010011352 printf "%s\n" "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011353
11354 ;;
11355 *)
11356 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
11357 ;;
11358esac
11359
Pablo Galindoba421752021-05-03 20:33:17 +010011360else $as_nop
11361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5
11362printf "%s\n" "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011363fi
11364
11365
Paul Ganssle62972d92020-05-16 04:20:06 -040011366validate_tzpath() {
11367 # Checks that each element of hte path is an absolute path
11368 if test -z "$1"; then
11369 # Empty string is allowed: it indicates no system TZPATH
11370 return 0
11371 fi
11372
11373 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050011374 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040011375 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
11376 return 1;
11377 fi
11378}
11379
11380TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Pablo Galindoba421752021-05-03 20:33:17 +010011381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
11382printf %s "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011383
11384# Check whether --with-tzpath was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011385if test ${with_tzpath+y}
11386then :
Paul Ganssle62972d92020-05-16 04:20:06 -040011387 withval=$with_tzpath;
11388case "$withval" in
11389 yes)
11390 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
11391 ;;
11392 *)
11393 validate_tzpath "$withval"
11394 TZPATH="$withval"
Pablo Galindoba421752021-05-03 20:33:17 +010011395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
11396printf "%s\n" "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011397 ;;
11398esac
11399
Pablo Galindoba421752021-05-03 20:33:17 +010011400else $as_nop
Paul Ganssle62972d92020-05-16 04:20:06 -040011401 validate_tzpath "$TZPATH"
Pablo Galindoba421752021-05-03 20:33:17 +010011402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
11403printf "%s\n" "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011404fi
11405
11406
11407
Pablo Galindoba421752021-05-03 20:33:17 +010011408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
11409printf %s "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011410
11411# Check whether --with-address_sanitizer was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011412if test ${with_address_sanitizer+y}
11413then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010011414 withval=$with_address_sanitizer;
Pablo Galindoba421752021-05-03 20:33:17 +010011415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11416printf "%s\n" "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011417BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
11418LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080011419# ASan works by controlling memory allocation, our own malloc interferes.
11420with_pymalloc="no"
11421
Pablo Galindoba421752021-05-03 20:33:17 +010011422else $as_nop
11423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11424printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011425fi
11426
11427
Pablo Galindoba421752021-05-03 20:33:17 +010011428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
11429printf %s "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011430
11431# Check whether --with-memory_sanitizer was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011432if test ${with_memory_sanitizer+y}
11433then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011434 withval=$with_memory_sanitizer;
Pablo Galindoba421752021-05-03 20:33:17 +010011435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11436printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011437BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
11438LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
11439# MSan works by controlling memory allocation, our own malloc interferes.
11440with_pymalloc="no"
11441
Pablo Galindoba421752021-05-03 20:33:17 +010011442else $as_nop
11443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011445fi
11446
11447
Pablo Galindoba421752021-05-03 20:33:17 +010011448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
11449printf %s "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011450
11451# Check whether --with-undefined_behavior_sanitizer was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011452if test ${with_undefined_behavior_sanitizer+y}
11453then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011454 withval=$with_undefined_behavior_sanitizer;
Pablo Galindoba421752021-05-03 20:33:17 +010011455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11456printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011457BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
11458LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010011459
Pablo Galindoba421752021-05-03 20:33:17 +010011460else $as_nop
11461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11462printf "%s\n" "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011463fi
11464
11465
Guido van Rossum70c7f481998-03-26 18:44:10 +000011466# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Pablo Galindoba421752021-05-03 20:33:17 +010011467{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
11468printf %s "checking for t_open in -lnsl... " >&6; }
11469if test ${ac_cv_lib_nsl_t_open+y}
11470then :
11471 printf %s "(cached) " >&6
11472else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011474LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478/* Override any GCC internal prototype to avoid an error.
11479 Use char because int might match the return type of a GCC
11480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011481char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011482int
Pablo Galindoba421752021-05-03 20:33:17 +010011483main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 ;
11487 return 0;
11488}
11489_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011490if ac_fn_c_try_link "$LINENO"
11491then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 ac_cv_lib_nsl_t_open=yes
Pablo Galindoba421752021-05-03 20:33:17 +010011493else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011494 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011495fi
Pablo Galindoba421752021-05-03 20:33:17 +010011496rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011498LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011499fi
Pablo Galindoba421752021-05-03 20:33:17 +010011500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
11501printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; }
11502if test "x$ac_cv_lib_nsl_t_open" = xyes
11503then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011504 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011505fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011506 # SVR4
Pablo Galindoba421752021-05-03 20:33:17 +010011507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
11508printf %s "checking for socket in -lsocket... " >&6; }
11509if test ${ac_cv_lib_socket_socket+y}
11510then :
11511 printf %s "(cached) " >&6
11512else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011514LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518/* Override any GCC internal prototype to avoid an error.
11519 Use char because int might match the return type of a GCC
11520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011521char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011522int
Pablo Galindoba421752021-05-03 20:33:17 +010011523main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ;
11527 return 0;
11528}
11529_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011530if ac_fn_c_try_link "$LINENO"
11531then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 ac_cv_lib_socket_socket=yes
Pablo Galindoba421752021-05-03 20:33:17 +010011533else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011535fi
Pablo Galindoba421752021-05-03 20:33:17 +010011536rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011538LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011539fi
Pablo Galindoba421752021-05-03 20:33:17 +010011540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
11541printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
11542if test "x$ac_cv_lib_socket_socket" = xyes
11543then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011544 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011545fi
11546 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011547
Pablo Galindoba421752021-05-03 20:33:17 +010011548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
11549printf %s "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551# Check whether --with-libs was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011552if test ${with_libs+y}
11553then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554 withval=$with_libs;
Pablo Galindoba421752021-05-03 20:33:17 +010011555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11556printf "%s\n" "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000011557LIBS="$withval $LIBS"
11558
Pablo Galindoba421752021-05-03 20:33:17 +010011559else $as_nop
11560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561printf "%s\n" "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562fi
11563
Guido van Rossum7f43da71994-08-01 12:15:30 +000011564
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011565
11566
11567
11568
11569
11570
Victor Stinnerb477d192020-01-22 22:48:16 +010011571
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011572if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11573 if test -n "$ac_tool_prefix"; then
11574 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11575set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +010011576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11577printf %s "checking for $ac_word... " >&6; }
11578if test ${ac_cv_path_PKG_CONFIG+y}
11579then :
11580 printf %s "(cached) " >&6
11581else $as_nop
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011582 case $PKG_CONFIG in
11583 [\\/]* | ?:[\\/]*)
11584 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11585 ;;
11586 *)
11587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11588for as_dir in $PATH
11589do
11590 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010011591 case $as_dir in #(((
11592 '') as_dir=./ ;;
11593 */) ;;
11594 *) as_dir=$as_dir/ ;;
11595 esac
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011596 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +010011597 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11598 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
11599 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011600 break 2
11601 fi
11602done
11603 done
11604IFS=$as_save_IFS
11605
11606 ;;
11607esac
11608fi
11609PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11610if test -n "$PKG_CONFIG"; then
Pablo Galindoba421752021-05-03 20:33:17 +010011611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11612printf "%s\n" "$PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011613else
Pablo Galindoba421752021-05-03 20:33:17 +010011614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011616fi
11617
11618
11619fi
11620if test -z "$ac_cv_path_PKG_CONFIG"; then
11621 ac_pt_PKG_CONFIG=$PKG_CONFIG
11622 # Extract the first word of "pkg-config", so it can be a program name with args.
11623set dummy pkg-config; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +010011624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11625printf %s "checking for $ac_word... " >&6; }
11626if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
11627then :
11628 printf %s "(cached) " >&6
11629else $as_nop
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011630 case $ac_pt_PKG_CONFIG in
11631 [\\/]* | ?:[\\/]*)
11632 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11633 ;;
11634 *)
11635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010011639 case $as_dir in #(((
11640 '') as_dir=./ ;;
11641 */) ;;
11642 *) as_dir=$as_dir/ ;;
11643 esac
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011644 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +010011645 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11646 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
11647 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011648 break 2
11649 fi
11650done
11651 done
11652IFS=$as_save_IFS
11653
11654 ;;
11655esac
11656fi
11657ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11658if test -n "$ac_pt_PKG_CONFIG"; then
Pablo Galindoba421752021-05-03 20:33:17 +010011659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11660printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011661else
Pablo Galindoba421752021-05-03 20:33:17 +010011662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11663printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011664fi
11665
11666 if test "x$ac_pt_PKG_CONFIG" = x; then
11667 PKG_CONFIG=""
11668 else
11669 case $cross_compiling:$ac_tool_warned in
11670yes:)
Pablo Galindoba421752021-05-03 20:33:17 +010011671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11672printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011673ac_tool_warned=yes ;;
11674esac
11675 PKG_CONFIG=$ac_pt_PKG_CONFIG
11676 fi
11677else
11678 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11679fi
11680
11681fi
11682if test -n "$PKG_CONFIG"; then
11683 _pkg_min_version=0.9.0
Pablo Galindoba421752021-05-03 20:33:17 +010011684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11685printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011686 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Pablo Galindoba421752021-05-03 20:33:17 +010011687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11688printf "%s\n" "yes" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011689 else
Pablo Galindoba421752021-05-03 20:33:17 +010011690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011692 PKG_CONFIG=""
11693 fi
11694fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011695
11696# Check for use of the system expat library
Pablo Galindoba421752021-05-03 20:33:17 +010011697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
11698printf %s "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011699
11700# Check whether --with-system_expat was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011701if test ${with_system_expat+y}
11702then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011703 withval=$with_system_expat;
Pablo Galindoba421752021-05-03 20:33:17 +010011704else $as_nop
Benjamin Peterson79263252010-10-31 16:50:44 +000011705 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011706fi
11707
11708
Pablo Galindoba421752021-05-03 20:33:17 +010011709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
11710printf "%s\n" "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011711
11712# Check for use of the system libffi library
Pablo Galindoba421752021-05-03 20:33:17 +010011713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
11714printf %s "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011715
11716# Check whether --with-system_ffi was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011717if test ${with_system_ffi+y}
11718then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011719 withval=$with_system_ffi;
11720fi
11721
11722
Zachary Waref40d4dd2016-09-17 01:25:24 -050011723if test "$ac_sys_system" = "Darwin"
11724then
11725 case "$with_system_ffi" in
11726 "")
11727 with_system_ffi="no"
11728 ;;
11729 yes|no)
11730 ;;
11731 *)
11732 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
11733 ;;
11734 esac
Pablo Galindoba421752021-05-03 20:33:17 +010011735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
11736printf "%s\n" "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011737else
Pablo Galindoba421752021-05-03 20:33:17 +010011738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11739printf "%s\n" "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011740 if test "$with_system_ffi" != ""
11741 then
Pablo Galindoba421752021-05-03 20:33:17 +010011742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
11743printf "%s\n" "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050011744 fi
11745 with_system_ffi="yes"
11746fi
Zachary Ware935043d2016-09-09 17:01:21 -070011747
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011748if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000011749 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
11750else
11751 LIBFFI_INCLUDEDIR=""
11752fi
11753
11754
Stefan Krah60187b52012-03-23 19:06:27 +010011755# Check for use of the system libmpdec library
Pablo Galindoba421752021-05-03 20:33:17 +010011756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
11757printf %s "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011758
11759# Check whether --with-system_libmpdec was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011760if test ${with_system_libmpdec+y}
11761then :
Stefan Krah60187b52012-03-23 19:06:27 +010011762 withval=$with_system_libmpdec;
Pablo Galindoba421752021-05-03 20:33:17 +010011763else $as_nop
Stefan Krah60187b52012-03-23 19:06:27 +010011764 with_system_libmpdec="no"
11765fi
11766
11767
Pablo Galindoba421752021-05-03 20:33:17 +010011768{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
11769printf "%s\n" "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011770
Stefan Krah815280e2020-02-29 19:43:42 +010011771# Check whether _decimal should use a coroutine-local or thread-local context
Pablo Galindoba421752021-05-03 20:33:17 +010011772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
11773printf %s "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011774
11775# Check whether --with-decimal_contextvar was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011776if test ${with_decimal_contextvar+y}
11777then :
Stefan Krah815280e2020-02-29 19:43:42 +010011778 withval=$with_decimal_contextvar;
Pablo Galindoba421752021-05-03 20:33:17 +010011779else $as_nop
Stefan Krah815280e2020-02-29 19:43:42 +010011780 with_decimal_contextvar="yes"
11781fi
11782
11783
11784if test "$with_decimal_contextvar" != "no"
11785then
11786
Pablo Galindoba421752021-05-03 20:33:17 +010011787printf "%s\n" "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010011788
11789fi
11790
Pablo Galindoba421752021-05-03 20:33:17 +010011791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
11792printf "%s\n" "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011793
Benjamin Peterson076ed002010-10-31 17:11:02 +000011794# Check for support for loadable sqlite extensions
Pablo Galindoba421752021-05-03 20:33:17 +010011795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
11796printf %s "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011797# Check whether --enable-loadable-sqlite-extensions was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011798if test ${enable_loadable_sqlite_extensions+y}
11799then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000011800 enableval=$enable_loadable_sqlite_extensions;
Pablo Galindoba421752021-05-03 20:33:17 +010011801else $as_nop
Benjamin Peterson076ed002010-10-31 17:11:02 +000011802 enable_loadable_sqlite_extensions="no"
11803fi
11804
11805
Pablo Galindoba421752021-05-03 20:33:17 +010011806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
11807printf "%s\n" "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011808
Ned Deilyd819b932013-09-06 01:07:05 -070011809# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
11810
11811
Pablo Galindoba421752021-05-03 20:33:17 +010011812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
11813printf %s "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011814
11815# Check whether --with-tcltk-includes was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011816if test ${with_tcltk_includes+y}
11817then :
Ned Deilyd819b932013-09-06 01:07:05 -070011818 withval=$with_tcltk_includes;
Pablo Galindoba421752021-05-03 20:33:17 +010011819else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011820 with_tcltk_includes="default"
11821fi
11822
Pablo Galindoba421752021-05-03 20:33:17 +010011823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
11824printf "%s\n" "$with_tcltk_includes" >&6; }
11825{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
11826printf %s "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011827
11828# Check whether --with-tcltk-libs was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011829if test ${with_tcltk_libs+y}
11830then :
Ned Deilyd819b932013-09-06 01:07:05 -070011831 withval=$with_tcltk_libs;
Pablo Galindoba421752021-05-03 20:33:17 +010011832else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011833 with_tcltk_libs="default"
11834fi
11835
Pablo Galindoba421752021-05-03 20:33:17 +010011836{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
11837printf "%s\n" "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011838if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
11839then
11840 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
11841 then
11842 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
11843 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010011844 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
11845 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
11846 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
11847 else
11848 TCLTK_INCLUDES=""
11849 TCLTK_LIBS=""
11850 fi
Ned Deilyd819b932013-09-06 01:07:05 -070011851else
11852 TCLTK_INCLUDES="$with_tcltk_includes"
11853 TCLTK_LIBS="$with_tcltk_libs"
11854fi
11855
Matthias Klose55708cc2009-04-30 08:06:49 +000011856# Check for --with-dbmliborder
Pablo Galindoba421752021-05-03 20:33:17 +010011857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
11858printf %s "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011859
11860# Check whether --with-dbmliborder was given.
Pablo Galindoba421752021-05-03 20:33:17 +010011861if test ${with_dbmliborder+y}
11862then :
Matthias Klose55708cc2009-04-30 08:06:49 +000011863 withval=$with_dbmliborder;
11864if test x$with_dbmliborder = xyes
11865then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011866as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011867else
11868 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
11869 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
11870 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011871 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011872 fi
11873 done
11874fi
11875fi
11876
Pablo Galindoba421752021-05-03 20:33:17 +010011877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
11878printf "%s\n" "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011879
Martin v. Löwis11437992002-04-12 09:54:03 +000011880# Templates for things AC_DEFINEd more than once.
11881# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011882
11883
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011884if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011885then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011886 # Defining _REENTRANT on system with POSIX threads should not hurt.
Pablo Galindoba421752021-05-03 20:33:17 +010011887 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011888
11889 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020011890 if test "$ac_sys_system" = "SunOS"; then
11891 CFLAGS="$CFLAGS -D_REENTRANT"
11892 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000011893elif test "$ac_cv_kpthread" = "yes"
11894then
11895 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011896 if test "$ac_cv_cxx_thread" = "yes"; then
11897 CXX="$CXX -Kpthread"
11898 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011899 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011900elif test "$ac_cv_kthread" = "yes"
11901then
11902 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011903 if test "$ac_cv_cxx_thread" = "yes"; then
11904 CXX="$CXX -Kthread"
11905 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011906 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011907elif test "$ac_cv_pthread" = "yes"
11908then
11909 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011910 if test "$ac_cv_cxx_thread" = "yes"; then
11911 CXX="$CXX -pthread"
11912 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011913 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011914else
Martin v. Löwis130fb172001-07-19 11:00:41 +000011915 if test ! -z "$withval" -a -d "$withval"
11916 then LDFLAGS="$LDFLAGS -L$withval"
11917 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011918
11919 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011920 # define _POSIX_THREADS in unistd.h. Some apparently don't
11921 # (e.g. gnu pth with pthread emulation)
Pablo Galindoba421752021-05-03 20:33:17 +010011922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
11923printf %s "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011925/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011926
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011927#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011928#ifdef _POSIX_THREADS
11929yes
11930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011931
11932_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +010011934 $EGREP "yes" >/dev/null 2>&1
11935then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011936 unistd_defines_pthreads=yes
Pablo Galindoba421752021-05-03 20:33:17 +010011937else $as_nop
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011938 unistd_defines_pthreads=no
11939fi
Pablo Galindoba421752021-05-03 20:33:17 +010011940rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011941
Pablo Galindoba421752021-05-03 20:33:17 +010011942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
11943printf "%s\n" "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011944
Pablo Galindoba421752021-05-03 20:33:17 +010011945 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011946
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011947 # Just looking for pthread_create in libpthread is not enough:
11948 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11949 # So we really have to include pthread.h, and then link.
11950 _libs=$LIBS
11951 LIBS="$LIBS -lpthread"
Pablo Galindoba421752021-05-03 20:33:17 +010011952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
11953printf %s "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011955/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011956
11957#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011958#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011959
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011960void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011961int
Pablo Galindoba421752021-05-03 20:33:17 +010011962main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011963{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011964
11965pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 ;
11967 return 0;
11968}
11969_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010011970if ac_fn_c_try_link "$LINENO"
11971then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011972
Pablo Galindoba421752021-05-03 20:33:17 +010011973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11974printf "%s\n" "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011975 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011976
Pablo Galindoba421752021-05-03 20:33:17 +010011977else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011978
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011979 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Pablo Galindoba421752021-05-03 20:33:17 +010011981if test "x$ac_cv_func_pthread_detach" = xyes
11982then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011983
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011984 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011985
Pablo Galindoba421752021-05-03 20:33:17 +010011986else $as_nop
Guido van Rossumad678af1998-10-02 14:42:15 +000011987
Pablo Galindoba421752021-05-03 20:33:17 +010011988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
11989printf %s "checking for pthread_create in -lpthreads... " >&6; }
11990if test ${ac_cv_lib_pthreads_pthread_create+y}
11991then :
11992 printf %s "(cached) " >&6
11993else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011995LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999/* Override any GCC internal prototype to avoid an error.
12000 Use char because int might match the return type of a GCC
12001 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012002char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012003int
Pablo Galindoba421752021-05-03 20:33:17 +010012004main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 ;
12008 return 0;
12009}
12010_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012011if ac_fn_c_try_link "$LINENO"
12012then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 ac_cv_lib_pthreads_pthread_create=yes
Pablo Galindoba421752021-05-03 20:33:17 +010012014else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012016fi
Pablo Galindoba421752021-05-03 20:33:17 +010012017rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012019LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012020fi
Pablo Galindoba421752021-05-03 20:33:17 +010012021{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
12022printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; }
12023if test "x$ac_cv_lib_pthreads_pthread_create" = xyes
12024then :
Greg Steinadf63d62000-07-05 10:38:09 +000012025
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012026 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012027 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012028
Pablo Galindoba421752021-05-03 20:33:17 +010012029else $as_nop
Greg Steinadf63d62000-07-05 10:38:09 +000012030
Pablo Galindoba421752021-05-03 20:33:17 +010012031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
12032printf %s "checking for pthread_create in -lc_r... " >&6; }
12033if test ${ac_cv_lib_c_r_pthread_create+y}
12034then :
12035 printf %s "(cached) " >&6
12036else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012038LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042/* Override any GCC internal prototype to avoid an error.
12043 Use char because int might match the return type of a GCC
12044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012045char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012046int
Pablo Galindoba421752021-05-03 20:33:17 +010012047main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 ;
12051 return 0;
12052}
12053_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012054if ac_fn_c_try_link "$LINENO"
12055then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 ac_cv_lib_c_r_pthread_create=yes
Pablo Galindoba421752021-05-03 20:33:17 +010012057else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012059fi
Pablo Galindoba421752021-05-03 20:33:17 +010012060rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012062LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012063fi
Pablo Galindoba421752021-05-03 20:33:17 +010012064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
12065printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; }
12066if test "x$ac_cv_lib_c_r_pthread_create" = xyes
12067then :
Guido van Rossum49545951997-12-02 19:28:29 +000012068
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012069 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012070 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012071
Pablo Galindoba421752021-05-03 20:33:17 +010012072else $as_nop
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012073
Pablo Galindoba421752021-05-03 20:33:17 +010012074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
12075printf %s "checking for __pthread_create_system in -lpthread... " >&6; }
12076if test ${ac_cv_lib_pthread___pthread_create_system+y}
12077then :
12078 printf %s "(cached) " >&6
12079else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012081LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085/* Override any GCC internal prototype to avoid an error.
12086 Use char because int might match the return type of a GCC
12087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012088char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012089int
Pablo Galindoba421752021-05-03 20:33:17 +010012090main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 ;
12094 return 0;
12095}
12096_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012097if ac_fn_c_try_link "$LINENO"
12098then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 ac_cv_lib_pthread___pthread_create_system=yes
Pablo Galindoba421752021-05-03 20:33:17 +010012100else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012102fi
Pablo Galindoba421752021-05-03 20:33:17 +010012103rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012105LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012106fi
Pablo Galindoba421752021-05-03 20:33:17 +010012107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12108printf "%s\n" "$ac_cv_lib_pthread___pthread_create_system" >&6; }
12109if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes
12110then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012112 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012113 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012114
Pablo Galindoba421752021-05-03 20:33:17 +010012115else $as_nop
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012116
Pablo Galindoba421752021-05-03 20:33:17 +010012117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
12118printf %s "checking for pthread_create in -lcma... " >&6; }
12119if test ${ac_cv_lib_cma_pthread_create+y}
12120then :
12121 printf %s "(cached) " >&6
12122else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012124LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128/* Override any GCC internal prototype to avoid an error.
12129 Use char because int might match the return type of a GCC
12130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012131char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012132int
Pablo Galindoba421752021-05-03 20:33:17 +010012133main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012136 ;
12137 return 0;
12138}
12139_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012140if ac_fn_c_try_link "$LINENO"
12141then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 ac_cv_lib_cma_pthread_create=yes
Pablo Galindoba421752021-05-03 20:33:17 +010012143else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012145fi
Pablo Galindoba421752021-05-03 20:33:17 +010012146rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012148LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012149fi
Pablo Galindoba421752021-05-03 20:33:17 +010012150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
12151printf "%s\n" "$ac_cv_lib_cma_pthread_create" >&6; }
12152if test "x$ac_cv_lib_cma_pthread_create" = xyes
12153then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000012154
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012155 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012156 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012157
Pablo Galindoba421752021-05-03 20:33:17 +010012158else $as_nop
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012159
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012160 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
12161
Guido van Rossum2d38f911996-06-26 19:47:01 +000012162fi
12163
Guido van Rossum627b2d71993-12-24 10:39:16 +000012164
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012165fi
12166
Guido van Rossum0be3e491997-05-22 20:33:33 +000012167fi
12168
Guido van Rossum49545951997-12-02 19:28:29 +000012169fi
12170
Guido van Rossumb93a8621998-05-07 13:27:32 +000012171fi
12172
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012173fi
Pablo Galindoba421752021-05-03 20:33:17 +010012174rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012176
Pablo Galindoba421752021-05-03 20:33:17 +010012177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
12178printf %s "checking for usconfig in -lmpc... " >&6; }
12179if test ${ac_cv_lib_mpc_usconfig+y}
12180then :
12181 printf %s "(cached) " >&6
12182else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012184LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188/* Override any GCC internal prototype to avoid an error.
12189 Use char because int might match the return type of a GCC
12190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012191char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012192int
Pablo Galindoba421752021-05-03 20:33:17 +010012193main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 ;
12197 return 0;
12198}
12199_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012200if ac_fn_c_try_link "$LINENO"
12201then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 ac_cv_lib_mpc_usconfig=yes
Pablo Galindoba421752021-05-03 20:33:17 +010012203else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012205fi
Pablo Galindoba421752021-05-03 20:33:17 +010012206rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012208LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012209fi
Pablo Galindoba421752021-05-03 20:33:17 +010012210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
12211printf "%s\n" "$ac_cv_lib_mpc_usconfig" >&6; }
12212if test "x$ac_cv_lib_mpc_usconfig" = xyes
12213then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000012214
Martin v. Löwis130fb172001-07-19 11:00:41 +000012215 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012216
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217fi
12218
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012219
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012220fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012221
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012222if test "$posix_threads" = "yes"; then
12223 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012224
Pablo Galindoba421752021-05-03 20:33:17 +010012225printf "%s\n" "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012226
12227 fi
12228
12229 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12230 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020012231 SunOS/5.6)
Pablo Galindoba421752021-05-03 20:33:17 +010012232printf "%s\n" "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012233
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012234 ;;
12235 SunOS/5.8)
Pablo Galindoba421752021-05-03 20:33:17 +010012236printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012237
12238 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020012239 AIX/*)
Pablo Galindoba421752021-05-03 20:33:17 +010012240printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000012241
12242 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012243 esac
12244
Pablo Galindoba421752021-05-03 20:33:17 +010012245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12246printf %s "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
12247 if test ${ac_cv_pthread_system_supported+y}
12248then :
12249 printf %s "(cached) " >&6
12250else $as_nop
12251 if test "$cross_compiling" = yes
12252then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012253 ac_cv_pthread_system_supported=no
Pablo Galindoba421752021-05-03 20:33:17 +010012254else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012256/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010012257
12258 #include <stdio.h>
12259 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012260 void *foo(void *parm) {
12261 return NULL;
12262 }
12263 main() {
12264 pthread_attr_t attr;
12265 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110012266 if (pthread_attr_init(&attr)) return (-1);
12267 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
12268 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
12269 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012270 }
12271_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012272if ac_fn_c_try_run "$LINENO"
12273then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012274 ac_cv_pthread_system_supported=yes
Pablo Galindoba421752021-05-03 20:33:17 +010012275else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12279 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012280fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012282
Guido van Rossum627b2d71993-12-24 10:39:16 +000012283fi
12284
Pablo Galindoba421752021-05-03 20:33:17 +010012285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
12286printf "%s\n" "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012287 if test "$ac_cv_pthread_system_supported" = "yes"; then
12288
Pablo Galindoba421752021-05-03 20:33:17 +010012289printf "%s\n" "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012290
12291 fi
Pablo Galindoba421752021-05-03 20:33:17 +010012292
12293 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000012294do :
12295 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Pablo Galindoba421752021-05-03 20:33:17 +010012296if test "x$ac_cv_func_pthread_sigmask" = xyes
12297then :
12298 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012299 case $ac_sys_system in
12300 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012301
Pablo Galindoba421752021-05-03 20:33:17 +010012302printf "%s\n" "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012303
12304 ;;
12305 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012306fi
Christian Heimes39258d32021-04-17 11:36:35 +020012307
Pablo Galindoba421752021-05-03 20:33:17 +010012308done
12309 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
12310if test "x$ac_cv_func_pthread_getcpuclockid" = xyes
12311then :
12312 printf "%s\n" "#define HAVE_PTHREAD_GETCPUCLOCKID 1" >>confdefs.h
pdoxe14679c2017-10-05 00:01:56 -070012313
12314fi
pdoxe14679c2017-10-05 00:01:56 -070012315
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012316fi
12317
12318
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012319# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012320
Pablo Galindoba421752021-05-03 20:33:17 +010012321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
12322printf %s "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323# Check whether --enable-ipv6 was given.
Pablo Galindoba421752021-05-03 20:33:17 +010012324if test ${enable_ipv6+y}
12325then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012327 no)
Pablo Galindoba421752021-05-03 20:33:17 +010012328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012330 ipv6=no
12331 ;;
Pablo Galindoba421752021-05-03 20:33:17 +010012332 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12333printf "%s\n" "yes" >&6; }
12334 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012335
12336 ipv6=yes
12337 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 esac
Pablo Galindoba421752021-05-03 20:33:17 +010012339else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012342/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012343 /* AF_INET6 available check */
12344#include <sys/types.h>
12345#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012346int
Pablo Galindoba421752021-05-03 20:33:17 +010012347main (void)
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012348{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012349int domain = AF_INET6;
12350 ;
12351 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012352}
Martin v. Löwis11437992002-04-12 09:54:03 +000012353_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012354if ac_fn_c_try_compile "$LINENO"
12355then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012356
Pablo Galindoba421752021-05-03 20:33:17 +010012357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12358printf "%s\n" "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012359 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000012360
Pablo Galindoba421752021-05-03 20:33:17 +010012361else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012362
Pablo Galindoba421752021-05-03 20:33:17 +010012363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12364printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012365 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012366
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012367fi
Pablo Galindoba421752021-05-03 20:33:17 +010012368rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012370if test "$ipv6" = "yes"; then
Pablo Galindoba421752021-05-03 20:33:17 +010012371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
12372printf %s "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012374/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012375
12376 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012377#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012378int
Pablo Galindoba421752021-05-03 20:33:17 +010012379main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012380{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012381struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000012382 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 ;
12384 return 0;
12385}
Matthias Kloseb159a552010-04-25 21:00:44 +000012386
Martin v. Löwis11437992002-04-12 09:54:03 +000012387_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012388if ac_fn_c_try_compile "$LINENO"
12389then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012390
Pablo Galindoba421752021-05-03 20:33:17 +010012391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12392printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012393 ipv6=yes
12394
Pablo Galindoba421752021-05-03 20:33:17 +010012395else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012396
Pablo Galindoba421752021-05-03 20:33:17 +010012397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012399 ipv6=no
12400
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012401fi
Pablo Galindoba421752021-05-03 20:33:17 +010012402rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012403fi
12404
12405if test "$ipv6" = "yes"; then
Pablo Galindoba421752021-05-03 20:33:17 +010012406 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012407
12408fi
12409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410fi
12411
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012412
12413ipv6type=unknown
12414ipv6lib=none
12415ipv6trylibc=no
12416
12417if test "$ipv6" = "yes"; then
Pablo Galindoba421752021-05-03 20:33:17 +010012418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
12419printf %s "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000012420 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12421 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012422 case $i in
12423 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012426
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012427#include <netinet/in.h>
12428#ifdef IPV6_INRIA_VERSION
12429yes
12430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012431_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +010012433 $EGREP "yes" >/dev/null 2>&1
12434then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012435 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012436fi
Pablo Galindoba421752021-05-03 20:33:17 +010012437rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012438
12439 ;;
12440 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012443
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012444#include <netinet/in.h>
12445#ifdef __KAME__
12446yes
12447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012448_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +010012450 $EGREP "yes" >/dev/null 2>&1
12451then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012452 ipv6type=$i;
12453 ipv6lib=inet6
12454 ipv6libdir=/usr/local/v6/lib
12455 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012456fi
Pablo Galindoba421752021-05-03 20:33:17 +010012457rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012458
12459 ;;
12460 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012462/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012463
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012464#include <features.h>
12465#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12466yes
12467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012468_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +010012470 $EGREP "yes" >/dev/null 2>&1
12471then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012472 ipv6type=$i;
12473 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012474fi
Pablo Galindoba421752021-05-03 20:33:17 +010012475rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012476
12477 ;;
12478 linux-inet6)
12479 if test -d /usr/inet6; then
12480 ipv6type=$i
12481 ipv6lib=inet6
12482 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012483 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012484 fi
12485 ;;
12486 solaris)
12487 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000012488 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012489 ipv6type=$i
12490 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012491 fi
12492 fi
12493 ;;
12494 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012497
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012498#include <sys/param.h>
12499#ifdef _TOSHIBA_INET6
12500yes
12501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012502_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +010012504 $EGREP "yes" >/dev/null 2>&1
12505then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012506 ipv6type=$i;
12507 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012508 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012509fi
Pablo Galindoba421752021-05-03 20:33:17 +010012510rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012511
12512 ;;
12513 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012515/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012516
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012517#include </usr/local/v6/include/sys/v6config.h>
12518#ifdef __V6D__
12519yes
12520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012521_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +010012523 $EGREP "yes" >/dev/null 2>&1
12524then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012525 ipv6type=$i;
12526 ipv6lib=v6;
12527 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012528 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012529fi
Pablo Galindoba421752021-05-03 20:33:17 +010012530rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012531
12532 ;;
12533 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012535/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012536
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012537#include <sys/param.h>
12538#ifdef _ZETA_MINAMI_INET6
12539yes
12540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012541_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindoba421752021-05-03 20:33:17 +010012543 $EGREP "yes" >/dev/null 2>&1
12544then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012545 ipv6type=$i;
12546 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012547 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012548fi
Pablo Galindoba421752021-05-03 20:33:17 +010012549rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012550
12551 ;;
12552 esac
12553 if test "$ipv6type" != "unknown"; then
12554 break
12555 fi
12556 done
Pablo Galindoba421752021-05-03 20:33:17 +010012557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
12558printf "%s\n" "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012559fi
12560
12561if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12562 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12563 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12564 echo "using lib$ipv6lib"
12565 else
12566 if test $ipv6trylibc = "yes"; then
12567 echo "using libc"
12568 else
12569 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12570 echo "You need to fetch lib$ipv6lib.a from appropriate"
12571 echo 'ipv6 kit and compile beforehand.'
12572 exit 1
12573 fi
12574 fi
12575fi
12576
Pablo Galindoba421752021-05-03 20:33:17 +010012577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
12578printf %s "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580/* end confdefs.h. */
12581 /* CAN_RAW_FD_FRAMES available check */
12582#include <linux/can/raw.h>
12583int
Pablo Galindoba421752021-05-03 20:33:17 +010012584main (void)
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012585{
12586int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
12587 ;
12588 return 0;
12589}
12590_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012591if ac_fn_c_try_compile "$LINENO"
12592then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012593
12594
Pablo Galindoba421752021-05-03 20:33:17 +010012595printf "%s\n" "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012596
Pablo Galindoba421752021-05-03 20:33:17 +010012597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12598printf "%s\n" "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012599
Pablo Galindoba421752021-05-03 20:33:17 +010012600else $as_nop
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012601
Pablo Galindoba421752021-05-03 20:33:17 +010012602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603printf "%s\n" "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012604
12605fi
Pablo Galindoba421752021-05-03 20:33:17 +010012606rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012607
Pablo Galindoba421752021-05-03 20:33:17 +010012608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
12609printf %s "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12611/* end confdefs.h. */
12612
12613#include <linux/can/raw.h>
12614int
Pablo Galindoba421752021-05-03 20:33:17 +010012615main (void)
Zackery Spytz97e0de02020-04-09 06:03:49 -060012616{
12617int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
12618 ;
12619 return 0;
12620}
12621_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010012622if ac_fn_c_try_compile "$LINENO"
12623then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060012624
12625
Pablo Galindoba421752021-05-03 20:33:17 +010012626printf "%s\n" "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060012627
Pablo Galindoba421752021-05-03 20:33:17 +010012628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12629printf "%s\n" "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012630
Pablo Galindoba421752021-05-03 20:33:17 +010012631else $as_nop
Zackery Spytz97e0de02020-04-09 06:03:49 -060012632
Pablo Galindoba421752021-05-03 20:33:17 +010012633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12634printf "%s\n" "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012635
12636fi
Pablo Galindoba421752021-05-03 20:33:17 +010012637rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060012638
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012639# Check for --with-doc-strings
Pablo Galindoba421752021-05-03 20:33:17 +010012640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
12641printf %s "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643# Check whether --with-doc-strings was given.
Pablo Galindoba421752021-05-03 20:33:17 +010012644if test ${with_doc_strings+y}
12645then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646 withval=$with_doc_strings;
12647fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012648
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012649
12650if test -z "$with_doc_strings"
12651then with_doc_strings="yes"
12652fi
12653if test "$with_doc_strings" != "no"
12654then
12655
Pablo Galindoba421752021-05-03 20:33:17 +010012656printf "%s\n" "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012657
12658fi
Pablo Galindoba421752021-05-03 20:33:17 +010012659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
12660printf "%s\n" "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012661
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000012662# Check for Python-specific malloc support
Pablo Galindoba421752021-05-03 20:33:17 +010012663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
12664printf %s "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666# Check whether --with-pymalloc was given.
Pablo Galindoba421752021-05-03 20:33:17 +010012667if test ${with_pymalloc+y}
12668then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669 withval=$with_pymalloc;
12670fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012671
Neil Schemenauera35c6882001-02-27 04:45:05 +000012672
Neil Schemenauer16c22972002-03-22 15:34:49 +000012673if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012674then
12675 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000012676fi
12677if test "$with_pymalloc" != "no"
12678then
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
Pablo Galindoba421752021-05-03 20:33:17 +010012680printf "%s\n" "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000012681
12682fi
Pablo Galindoba421752021-05-03 20:33:17 +010012683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
12684printf "%s\n" "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000012685
Nick Coghlan6ea41862017-06-11 13:16:15 +100012686# Check for --with-c-locale-coercion
Pablo Galindoba421752021-05-03 20:33:17 +010012687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
12688printf %s "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012689
12690# Check whether --with-c-locale-coercion was given.
Pablo Galindoba421752021-05-03 20:33:17 +010012691if test ${with_c_locale_coercion+y}
12692then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100012693 withval=$with_c_locale_coercion;
12694fi
12695
12696
12697if test -z "$with_c_locale_coercion"
12698then
12699 with_c_locale_coercion="yes"
12700fi
12701if test "$with_c_locale_coercion" != "no"
12702then
12703
Pablo Galindoba421752021-05-03 20:33:17 +010012704printf "%s\n" "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100012705
12706fi
Pablo Galindoba421752021-05-03 20:33:17 +010012707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
12708printf "%s\n" "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012709
Benjamin Peterson05159c42009-12-03 03:01:27 +000012710# Check for Valgrind support
Pablo Galindoba421752021-05-03 20:33:17 +010012711{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
12712printf %s "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012713
12714# Check whether --with-valgrind was given.
Pablo Galindoba421752021-05-03 20:33:17 +010012715if test ${with_valgrind+y}
12716then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012717 withval=$with_valgrind;
Pablo Galindoba421752021-05-03 20:33:17 +010012718else $as_nop
Benjamin Peterson05159c42009-12-03 03:01:27 +000012719 with_valgrind=no
12720fi
12721
Pablo Galindoba421752021-05-03 20:33:17 +010012722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
12723printf "%s\n" "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012724if test "$with_valgrind" != no; then
Pablo Galindoba421752021-05-03 20:33:17 +010012725 ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
12726if test "x$ac_cv_header_valgrind_valgrind_h" = xyes
12727then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012728
Pablo Galindoba421752021-05-03 20:33:17 +010012729printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000012730
Pablo Galindoba421752021-05-03 20:33:17 +010012731else $as_nop
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012732 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000012733
12734fi
12735
Jeffrey Yasskin39370832010-05-03 19:29:34 +000012736 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000012737fi
12738
Łukasz Langaa785c872016-09-09 17:37:37 -070012739# Check for DTrace support
Pablo Galindoba421752021-05-03 20:33:17 +010012740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
12741printf %s "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012742
12743# Check whether --with-dtrace was given.
Pablo Galindoba421752021-05-03 20:33:17 +010012744if test ${with_dtrace+y}
12745then :
Łukasz Langaa785c872016-09-09 17:37:37 -070012746 withval=$with_dtrace;
Pablo Galindoba421752021-05-03 20:33:17 +010012747else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012748 with_dtrace=no
12749fi
12750
Pablo Galindoba421752021-05-03 20:33:17 +010012751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
12752printf "%s\n" "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012753
12754
12755
12756
12757
12758DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070012759DTRACE_HEADERS=
12760DTRACE_OBJS=
12761
12762if test "$with_dtrace" = "yes"
12763then
12764 # Extract the first word of "dtrace", so it can be a program name with args.
12765set dummy dtrace; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +010012766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12767printf %s "checking for $ac_word... " >&6; }
12768if test ${ac_cv_path_DTRACE+y}
12769then :
12770 printf %s "(cached) " >&6
12771else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012772 case $DTRACE in
12773 [\\/]* | ?:[\\/]*)
12774 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
12775 ;;
12776 *)
12777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12778for as_dir in $PATH
12779do
12780 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010012781 case $as_dir in #(((
12782 '') as_dir=./ ;;
12783 */) ;;
12784 *) as_dir=$as_dir/ ;;
12785 esac
Łukasz Langaa785c872016-09-09 17:37:37 -070012786 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +010012787 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
12788 ac_cv_path_DTRACE="$as_dir$ac_word$ac_exec_ext"
12789 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070012790 break 2
12791 fi
12792done
12793 done
12794IFS=$as_save_IFS
12795
12796 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
12797 ;;
12798esac
12799fi
12800DTRACE=$ac_cv_path_DTRACE
12801if test -n "$DTRACE"; then
Pablo Galindoba421752021-05-03 20:33:17 +010012802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
12803printf "%s\n" "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012804else
Pablo Galindoba421752021-05-03 20:33:17 +010012805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806printf "%s\n" "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012807fi
12808
12809
12810 if test "$DTRACE" = "not found"; then
12811 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
12812 fi
12813
Pablo Galindoba421752021-05-03 20:33:17 +010012814printf "%s\n" "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070012815
12816 DTRACE_HEADERS="Include/pydtrace_probes.h"
12817
12818 # On OS X, DTrace providers do not need to be explicitly compiled and
12819 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
12820 # generation flag '-G'. We check for presence of this flag, rather than
12821 # hardcoding support by OS, in the interest of robustness.
Pablo Galindoba421752021-05-03 20:33:17 +010012822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
12823printf %s "checking whether DTrace probes require linking... " >&6; }
12824if test ${ac_cv_dtrace_link+y}
12825then :
12826 printf %s "(cached) " >&6
12827else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012828 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010012829 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010012830 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070012831 ac_cv_dtrace_link=yes
12832
12833fi
Pablo Galindoba421752021-05-03 20:33:17 +010012834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
12835printf "%s\n" "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012836 if test "$ac_cv_dtrace_link" = "yes"; then
12837 DTRACE_OBJS="Python/pydtrace.o"
12838 fi
12839fi
12840
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012841# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012842
Guido van Rossum98935bf2001-09-05 19:13:16 +000012843DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012844
Guido van Rossume97ee181999-12-20 21:27:22 +000012845# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060012846# platforms have dlopen(), but don't want to use it.
Pablo Galindoba421752021-05-03 20:33:17 +010012847ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12848if test "x$ac_cv_func_dlopen" = xyes
12849then :
12850 printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012851
Guido van Rossume97ee181999-12-20 21:27:22 +000012852fi
12853
Michael W. Hudson54241132001-12-07 15:38:26 +000012854
Guido van Rossume97ee181999-12-20 21:27:22 +000012855# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12856# loading of modules.
12857
Pablo Galindoba421752021-05-03 20:33:17 +010012858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
12859printf %s "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012860if test -z "$DYNLOADFILE"
12861then
12862 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000012863 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012864 *)
12865 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12866 # out any dynamic loading
12867 if test "$ac_cv_func_dlopen" = yes
12868 then DYNLOADFILE="dynload_shlib.o"
12869 else DYNLOADFILE="dynload_stub.o"
12870 fi
12871 ;;
12872 esac
12873fi
Pablo Galindoba421752021-05-03 20:33:17 +010012874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
12875printf "%s\n" "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012876if test "$DYNLOADFILE" != "dynload_stub.o"
12877then
Martin v. Löwis11437992002-04-12 09:54:03 +000012878
Pablo Galindoba421752021-05-03 20:33:17 +010012879printf "%s\n" "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012880
12881fi
12882
Neil Schemenauer4e425612001-06-19 15:44:15 +000012883# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12884
Michael W. Hudson54241132001-12-07 15:38:26 +000012885
Pablo Galindoba421752021-05-03 20:33:17 +010012886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
12887printf %s "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000012888if test -z "$MACHDEP_OBJS"
12889then
Jack Jansene578a632001-08-15 01:27:14 +000012890 MACHDEP_OBJS=$extra_machdep_objs
12891else
12892 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012893fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012894if test -z "$MACHDEP_OBJS"; then
Pablo Galindoba421752021-05-03 20:33:17 +010012895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
12896printf "%s\n" "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012897else
Pablo Galindoba421752021-05-03 20:33:17 +010012898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
12899printf "%s\n" "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012900fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000012901
Guido van Rossum627b2d71993-12-24 10:39:16 +000012902# checks for library functions
Pablo Galindoba421752021-05-03 20:33:17 +010012903ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm"
12904if test "x$ac_cv_func_alarm" = xyes
12905then :
12906 printf "%s\n" "#define HAVE_ALARM 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012907
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012908fi
Pablo Galindoba421752021-05-03 20:33:17 +010012909ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
12910if test "x$ac_cv_func_accept4" = xyes
12911then :
12912 printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
12913
12914fi
12915ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
12916if test "x$ac_cv_func_setitimer" = xyes
12917then :
12918 printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
12919
12920fi
12921ac_fn_c_check_func "$LINENO" "getitimer" "ac_cv_func_getitimer"
12922if test "x$ac_cv_func_getitimer" = xyes
12923then :
12924 printf "%s\n" "#define HAVE_GETITIMER 1" >>confdefs.h
12925
12926fi
12927ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12928if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
12929then :
12930 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
12931
12932fi
12933ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
12934if test "x$ac_cv_func_chown" = xyes
12935then :
12936 printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
12937
12938fi
12939ac_fn_c_check_func "$LINENO" "clock" "ac_cv_func_clock"
12940if test "x$ac_cv_func_clock" = xyes
12941then :
12942 printf "%s\n" "#define HAVE_CLOCK 1" >>confdefs.h
12943
12944fi
12945ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
12946if test "x$ac_cv_func_confstr" = xyes
12947then :
12948 printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
12949
12950fi
12951ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range"
12952if test "x$ac_cv_func_close_range" = xyes
12953then :
12954 printf "%s\n" "#define HAVE_CLOSE_RANGE 1" >>confdefs.h
12955
12956fi
12957ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range"
12958if test "x$ac_cv_func_copy_file_range" = xyes
12959then :
12960 printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h
12961
12962fi
12963ac_fn_c_check_func "$LINENO" "ctermid" "ac_cv_func_ctermid"
12964if test "x$ac_cv_func_ctermid" = xyes
12965then :
12966 printf "%s\n" "#define HAVE_CTERMID 1" >>confdefs.h
12967
12968fi
12969ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
12970if test "x$ac_cv_func_dup3" = xyes
12971then :
12972 printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
12973
12974fi
12975ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
12976if test "x$ac_cv_func_execv" = xyes
12977then :
12978 printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h
12979
12980fi
12981ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
12982if test "x$ac_cv_func_explicit_bzero" = xyes
12983then :
12984 printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
12985
12986fi
12987ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
12988if test "x$ac_cv_func_explicit_memset" = xyes
12989then :
12990 printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h
12991
12992fi
12993ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
12994if test "x$ac_cv_func_faccessat" = xyes
12995then :
12996 printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h
12997
12998fi
12999ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13000if test "x$ac_cv_func_fchmod" = xyes
13001then :
13002 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13003
13004fi
13005ac_fn_c_check_func "$LINENO" "fchmodat" "ac_cv_func_fchmodat"
13006if test "x$ac_cv_func_fchmodat" = xyes
13007then :
13008 printf "%s\n" "#define HAVE_FCHMODAT 1" >>confdefs.h
13009
13010fi
13011ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13012if test "x$ac_cv_func_fchown" = xyes
13013then :
13014 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
13015
13016fi
13017ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
13018if test "x$ac_cv_func_fchownat" = xyes
13019then :
13020 printf "%s\n" "#define HAVE_FCHOWNAT 1" >>confdefs.h
13021
13022fi
13023ac_fn_c_check_func "$LINENO" "fdwalk" "ac_cv_func_fdwalk"
13024if test "x$ac_cv_func_fdwalk" = xyes
13025then :
13026 printf "%s\n" "#define HAVE_FDWALK 1" >>confdefs.h
13027
13028fi
13029ac_fn_c_check_func "$LINENO" "fexecve" "ac_cv_func_fexecve"
13030if test "x$ac_cv_func_fexecve" = xyes
13031then :
13032 printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h
13033
13034fi
13035ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir"
13036if test "x$ac_cv_func_fdopendir" = xyes
13037then :
13038 printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h
13039
13040fi
13041ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
13042if test "x$ac_cv_func_fork" = xyes
13043then :
13044 printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h
13045
13046fi
13047ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf"
13048if test "x$ac_cv_func_fpathconf" = xyes
13049then :
13050 printf "%s\n" "#define HAVE_FPATHCONF 1" >>confdefs.h
13051
13052fi
13053ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
13054if test "x$ac_cv_func_fstatat" = xyes
13055then :
13056 printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
13057
13058fi
13059ac_fn_c_check_func "$LINENO" "ftime" "ac_cv_func_ftime"
13060if test "x$ac_cv_func_ftime" = xyes
13061then :
13062 printf "%s\n" "#define HAVE_FTIME 1" >>confdefs.h
13063
13064fi
13065ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13066if test "x$ac_cv_func_ftruncate" = xyes
13067then :
13068 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13069
13070fi
13071ac_fn_c_check_func "$LINENO" "futimesat" "ac_cv_func_futimesat"
13072if test "x$ac_cv_func_futimesat" = xyes
13073then :
13074 printf "%s\n" "#define HAVE_FUTIMESAT 1" >>confdefs.h
13075
13076fi
13077ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
13078if test "x$ac_cv_func_futimens" = xyes
13079then :
13080 printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h
13081
13082fi
13083ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes"
13084if test "x$ac_cv_func_futimes" = xyes
13085then :
13086 printf "%s\n" "#define HAVE_FUTIMES 1" >>confdefs.h
13087
13088fi
13089ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
13090if test "x$ac_cv_func_gai_strerror" = xyes
13091then :
13092 printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h
13093
13094fi
13095ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
13096if test "x$ac_cv_func_getentropy" = xyes
13097then :
13098 printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
13099
13100fi
13101ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r"
13102if test "x$ac_cv_func_getgrgid_r" = xyes
13103then :
13104 printf "%s\n" "#define HAVE_GETGRGID_R 1" >>confdefs.h
13105
13106fi
13107ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r"
13108if test "x$ac_cv_func_getgrnam_r" = xyes
13109then :
13110 printf "%s\n" "#define HAVE_GETGRNAM_R 1" >>confdefs.h
13111
13112fi
13113ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
13114if test "x$ac_cv_func_getgrouplist" = xyes
13115then :
13116 printf "%s\n" "#define HAVE_GETGROUPLIST 1" >>confdefs.h
13117
13118fi
13119ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
13120if test "x$ac_cv_func_getgroups" = xyes
13121then :
13122 printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h
13123
13124fi
13125ac_fn_c_check_func "$LINENO" "getlogin" "ac_cv_func_getlogin"
13126if test "x$ac_cv_func_getlogin" = xyes
13127then :
13128 printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h
13129
13130fi
13131ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
13132if test "x$ac_cv_func_getloadavg" = xyes
13133then :
13134 printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h
13135
13136fi
13137ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername"
13138if test "x$ac_cv_func_getpeername" = xyes
13139then :
13140 printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h
13141
13142fi
13143ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13144if test "x$ac_cv_func_getpgid" = xyes
13145then :
13146 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13147
13148fi
13149ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
13150if test "x$ac_cv_func_getpid" = xyes
13151then :
13152 printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h
13153
13154fi
13155ac_fn_c_check_func "$LINENO" "getpriority" "ac_cv_func_getpriority"
13156if test "x$ac_cv_func_getpriority" = xyes
13157then :
13158 printf "%s\n" "#define HAVE_GETPRIORITY 1" >>confdefs.h
13159
13160fi
13161ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid"
13162if test "x$ac_cv_func_getresuid" = xyes
13163then :
13164 printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h
13165
13166fi
13167ac_fn_c_check_func "$LINENO" "getresgid" "ac_cv_func_getresgid"
13168if test "x$ac_cv_func_getresgid" = xyes
13169then :
13170 printf "%s\n" "#define HAVE_GETRESGID 1" >>confdefs.h
13171
13172fi
13173ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13174if test "x$ac_cv_func_getpwent" = xyes
13175then :
13176 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13177
13178fi
13179ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r"
13180if test "x$ac_cv_func_getpwnam_r" = xyes
13181then :
13182 printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h
13183
13184fi
13185ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r"
13186if test "x$ac_cv_func_getpwuid_r" = xyes
13187then :
13188 printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h
13189
13190fi
13191ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
13192if test "x$ac_cv_func_getspnam" = xyes
13193then :
13194 printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h
13195
13196fi
13197ac_fn_c_check_func "$LINENO" "getspent" "ac_cv_func_getspent"
13198if test "x$ac_cv_func_getspent" = xyes
13199then :
13200 printf "%s\n" "#define HAVE_GETSPENT 1" >>confdefs.h
13201
13202fi
13203ac_fn_c_check_func "$LINENO" "getsid" "ac_cv_func_getsid"
13204if test "x$ac_cv_func_getsid" = xyes
13205then :
13206 printf "%s\n" "#define HAVE_GETSID 1" >>confdefs.h
13207
13208fi
13209ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13210if test "x$ac_cv_func_getwd" = xyes
13211then :
13212 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
13213
13214fi
13215ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex"
13216if test "x$ac_cv_func_if_nameindex" = xyes
13217then :
13218 printf "%s\n" "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
13219
13220fi
13221ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
13222if test "x$ac_cv_func_initgroups" = xyes
13223then :
13224 printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
13225
13226fi
13227ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
13228if test "x$ac_cv_func_kill" = xyes
13229then :
13230 printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
13231
13232fi
13233ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg"
13234if test "x$ac_cv_func_killpg" = xyes
13235then :
13236 printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h
13237
13238fi
13239ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
13240if test "x$ac_cv_func_lchown" = xyes
13241then :
13242 printf "%s\n" "#define HAVE_LCHOWN 1" >>confdefs.h
13243
13244fi
13245ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf"
13246if test "x$ac_cv_func_lockf" = xyes
13247then :
13248 printf "%s\n" "#define HAVE_LOCKF 1" >>confdefs.h
13249
13250fi
13251ac_fn_c_check_func "$LINENO" "linkat" "ac_cv_func_linkat"
13252if test "x$ac_cv_func_linkat" = xyes
13253then :
13254 printf "%s\n" "#define HAVE_LINKAT 1" >>confdefs.h
13255
13256fi
13257ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13258if test "x$ac_cv_func_lstat" = xyes
13259then :
13260 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13261
13262fi
13263ac_fn_c_check_func "$LINENO" "lutimes" "ac_cv_func_lutimes"
13264if test "x$ac_cv_func_lutimes" = xyes
13265then :
13266 printf "%s\n" "#define HAVE_LUTIMES 1" >>confdefs.h
13267
13268fi
13269ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
13270if test "x$ac_cv_func_mmap" = xyes
13271then :
13272 printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
13273
13274fi
13275ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
13276if test "x$ac_cv_func_memrchr" = xyes
13277then :
13278 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
13279
13280fi
13281ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
13282if test "x$ac_cv_func_mbrtowc" = xyes
13283then :
13284 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
13285
13286fi
13287ac_fn_c_check_func "$LINENO" "mkdirat" "ac_cv_func_mkdirat"
13288if test "x$ac_cv_func_mkdirat" = xyes
13289then :
13290 printf "%s\n" "#define HAVE_MKDIRAT 1" >>confdefs.h
13291
13292fi
13293ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
13294if test "x$ac_cv_func_mkfifo" = xyes
13295then :
13296 printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h
13297
13298fi
13299ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise"
13300if test "x$ac_cv_func_madvise" = xyes
13301then :
13302 printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h
13303
13304fi
13305ac_fn_c_check_func "$LINENO" "mkfifoat" "ac_cv_func_mkfifoat"
13306if test "x$ac_cv_func_mkfifoat" = xyes
13307then :
13308 printf "%s\n" "#define HAVE_MKFIFOAT 1" >>confdefs.h
13309
13310fi
13311ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod"
13312if test "x$ac_cv_func_mknod" = xyes
13313then :
13314 printf "%s\n" "#define HAVE_MKNOD 1" >>confdefs.h
13315
13316fi
13317ac_fn_c_check_func "$LINENO" "mknodat" "ac_cv_func_mknodat"
13318if test "x$ac_cv_func_mknodat" = xyes
13319then :
13320 printf "%s\n" "#define HAVE_MKNODAT 1" >>confdefs.h
13321
13322fi
13323ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
13324if test "x$ac_cv_func_mktime" = xyes
13325then :
13326 printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h
13327
13328fi
13329ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap"
13330if test "x$ac_cv_func_mremap" = xyes
13331then :
13332 printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h
13333
13334fi
13335ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
13336if test "x$ac_cv_func_nice" = xyes
13337then :
13338 printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
13339
13340fi
13341ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
13342if test "x$ac_cv_func_openat" = xyes
13343then :
13344 printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h
13345
13346fi
13347ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
13348if test "x$ac_cv_func_pathconf" = xyes
13349then :
13350 printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h
13351
13352fi
13353ac_fn_c_check_func "$LINENO" "pause" "ac_cv_func_pause"
13354if test "x$ac_cv_func_pause" = xyes
13355then :
13356 printf "%s\n" "#define HAVE_PAUSE 1" >>confdefs.h
13357
13358fi
13359ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
13360if test "x$ac_cv_func_pipe2" = xyes
13361then :
13362 printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
13363
13364fi
13365ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
13366if test "x$ac_cv_func_plock" = xyes
13367then :
13368 printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h
13369
13370fi
13371ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
13372if test "x$ac_cv_func_poll" = xyes
13373then :
13374 printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
13375
13376fi
13377ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate"
13378if test "x$ac_cv_func_posix_fallocate" = xyes
13379then :
13380 printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h
13381
13382fi
13383ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13384if test "x$ac_cv_func_posix_fadvise" = xyes
13385then :
13386 printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
13387
13388fi
13389ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
13390if test "x$ac_cv_func_posix_spawn" = xyes
13391then :
13392 printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
13393
13394fi
13395ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
13396if test "x$ac_cv_func_posix_spawnp" = xyes
13397then :
13398 printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
13399
13400fi
13401ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
13402if test "x$ac_cv_func_pread" = xyes
13403then :
13404 printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h
13405
13406fi
13407ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv"
13408if test "x$ac_cv_func_preadv" = xyes
13409then :
13410 printf "%s\n" "#define HAVE_PREADV 1" >>confdefs.h
13411
13412fi
13413ac_fn_c_check_func "$LINENO" "preadv2" "ac_cv_func_preadv2"
13414if test "x$ac_cv_func_preadv2" = xyes
13415then :
13416 printf "%s\n" "#define HAVE_PREADV2 1" >>confdefs.h
13417
13418fi
13419ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock"
13420if test "x$ac_cv_func_pthread_condattr_setclock" = xyes
13421then :
13422 printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
13423
13424fi
13425ac_fn_c_check_func "$LINENO" "pthread_init" "ac_cv_func_pthread_init"
13426if test "x$ac_cv_func_pthread_init" = xyes
13427then :
13428 printf "%s\n" "#define HAVE_PTHREAD_INIT 1" >>confdefs.h
13429
13430fi
13431ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13432if test "x$ac_cv_func_pthread_kill" = xyes
13433then :
13434 printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
13435
13436fi
13437ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
13438if test "x$ac_cv_func_pwrite" = xyes
13439then :
13440 printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h
13441
13442fi
13443ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev"
13444if test "x$ac_cv_func_pwritev" = xyes
13445then :
13446 printf "%s\n" "#define HAVE_PWRITEV 1" >>confdefs.h
13447
13448fi
13449ac_fn_c_check_func "$LINENO" "pwritev2" "ac_cv_func_pwritev2"
13450if test "x$ac_cv_func_pwritev2" = xyes
13451then :
13452 printf "%s\n" "#define HAVE_PWRITEV2 1" >>confdefs.h
13453
13454fi
13455ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13456if test "x$ac_cv_func_readlink" = xyes
13457then :
13458 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13459
13460fi
13461ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
13462if test "x$ac_cv_func_readlinkat" = xyes
13463then :
13464 printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h
13465
13466fi
13467ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv"
13468if test "x$ac_cv_func_readv" = xyes
13469then :
13470 printf "%s\n" "#define HAVE_READV 1" >>confdefs.h
13471
13472fi
13473ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
13474if test "x$ac_cv_func_realpath" = xyes
13475then :
13476 printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
13477
13478fi
13479ac_fn_c_check_func "$LINENO" "renameat" "ac_cv_func_renameat"
13480if test "x$ac_cv_func_renameat" = xyes
13481then :
13482 printf "%s\n" "#define HAVE_RENAMEAT 1" >>confdefs.h
13483
13484fi
13485ac_fn_c_check_func "$LINENO" "sem_open" "ac_cv_func_sem_open"
13486if test "x$ac_cv_func_sem_open" = xyes
13487then :
13488 printf "%s\n" "#define HAVE_SEM_OPEN 1" >>confdefs.h
13489
13490fi
13491ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
13492if test "x$ac_cv_func_sem_timedwait" = xyes
13493then :
13494 printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
13495
13496fi
13497ac_fn_c_check_func "$LINENO" "sem_getvalue" "ac_cv_func_sem_getvalue"
13498if test "x$ac_cv_func_sem_getvalue" = xyes
13499then :
13500 printf "%s\n" "#define HAVE_SEM_GETVALUE 1" >>confdefs.h
13501
13502fi
13503ac_fn_c_check_func "$LINENO" "sem_unlink" "ac_cv_func_sem_unlink"
13504if test "x$ac_cv_func_sem_unlink" = xyes
13505then :
13506 printf "%s\n" "#define HAVE_SEM_UNLINK 1" >>confdefs.h
13507
13508fi
13509ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile"
13510if test "x$ac_cv_func_sendfile" = xyes
13511then :
13512 printf "%s\n" "#define HAVE_SENDFILE 1" >>confdefs.h
13513
13514fi
13515ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
13516if test "x$ac_cv_func_setegid" = xyes
13517then :
13518 printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
13519
13520fi
13521ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
13522if test "x$ac_cv_func_seteuid" = xyes
13523then :
13524 printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
13525
13526fi
13527ac_fn_c_check_func "$LINENO" "setgid" "ac_cv_func_setgid"
13528if test "x$ac_cv_func_setgid" = xyes
13529then :
13530 printf "%s\n" "#define HAVE_SETGID 1" >>confdefs.h
13531
13532fi
13533ac_fn_c_check_func "$LINENO" "sethostname" "ac_cv_func_sethostname"
13534if test "x$ac_cv_func_sethostname" = xyes
13535then :
13536 printf "%s\n" "#define HAVE_SETHOSTNAME 1" >>confdefs.h
13537
13538fi
13539ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
13540if test "x$ac_cv_func_setlocale" = xyes
13541then :
13542 printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
13543
13544fi
13545ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
13546if test "x$ac_cv_func_setregid" = xyes
13547then :
13548 printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
13549
13550fi
13551ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
13552if test "x$ac_cv_func_setreuid" = xyes
13553then :
13554 printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
13555
13556fi
13557ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
13558if test "x$ac_cv_func_setresuid" = xyes
13559then :
13560 printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
13561
13562fi
13563ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
13564if test "x$ac_cv_func_setresgid" = xyes
13565then :
13566 printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
13567
13568fi
13569ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13570if test "x$ac_cv_func_setsid" = xyes
13571then :
13572 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13573
13574fi
13575ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13576if test "x$ac_cv_func_setpgid" = xyes
13577then :
13578 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13579
13580fi
13581ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
13582if test "x$ac_cv_func_setpgrp" = xyes
13583then :
13584 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
13585
13586fi
13587ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
13588if test "x$ac_cv_func_setpriority" = xyes
13589then :
13590 printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
13591
13592fi
13593ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid"
13594if test "x$ac_cv_func_setuid" = xyes
13595then :
13596 printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h
13597
13598fi
13599ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
13600if test "x$ac_cv_func_setvbuf" = xyes
13601then :
13602 printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
13603
13604fi
13605ac_fn_c_check_func "$LINENO" "sched_get_priority_max" "ac_cv_func_sched_get_priority_max"
13606if test "x$ac_cv_func_sched_get_priority_max" = xyes
13607then :
13608 printf "%s\n" "#define HAVE_SCHED_GET_PRIORITY_MAX 1" >>confdefs.h
13609
13610fi
13611ac_fn_c_check_func "$LINENO" "sched_setaffinity" "ac_cv_func_sched_setaffinity"
13612if test "x$ac_cv_func_sched_setaffinity" = xyes
13613then :
13614 printf "%s\n" "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
13615
13616fi
13617ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
13618if test "x$ac_cv_func_sched_setscheduler" = xyes
13619then :
13620 printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
13621
13622fi
13623ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
13624if test "x$ac_cv_func_sched_setparam" = xyes
13625then :
13626 printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
13627
13628fi
13629ac_fn_c_check_func "$LINENO" "sched_rr_get_interval" "ac_cv_func_sched_rr_get_interval"
13630if test "x$ac_cv_func_sched_rr_get_interval" = xyes
13631then :
13632 printf "%s\n" "#define HAVE_SCHED_RR_GET_INTERVAL 1" >>confdefs.h
13633
13634fi
13635ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13636if test "x$ac_cv_func_sigaction" = xyes
13637then :
13638 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13639
13640fi
13641ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13642if test "x$ac_cv_func_sigaltstack" = xyes
13643then :
13644 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13645
13646fi
13647ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset"
13648if test "x$ac_cv_func_sigfillset" = xyes
13649then :
13650 printf "%s\n" "#define HAVE_SIGFILLSET 1" >>confdefs.h
13651
13652fi
13653ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt"
13654if test "x$ac_cv_func_siginterrupt" = xyes
13655then :
13656 printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h
13657
13658fi
13659ac_fn_c_check_func "$LINENO" "sigpending" "ac_cv_func_sigpending"
13660if test "x$ac_cv_func_sigpending" = xyes
13661then :
13662 printf "%s\n" "#define HAVE_SIGPENDING 1" >>confdefs.h
13663
13664fi
13665ac_fn_c_check_func "$LINENO" "sigrelse" "ac_cv_func_sigrelse"
13666if test "x$ac_cv_func_sigrelse" = xyes
13667then :
13668 printf "%s\n" "#define HAVE_SIGRELSE 1" >>confdefs.h
13669
13670fi
13671ac_fn_c_check_func "$LINENO" "sigtimedwait" "ac_cv_func_sigtimedwait"
13672if test "x$ac_cv_func_sigtimedwait" = xyes
13673then :
13674 printf "%s\n" "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
13675
13676fi
13677ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
13678if test "x$ac_cv_func_sigwait" = xyes
13679then :
13680 printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
13681
13682fi
13683ac_fn_c_check_func "$LINENO" "sigwaitinfo" "ac_cv_func_sigwaitinfo"
13684if test "x$ac_cv_func_sigwaitinfo" = xyes
13685then :
13686 printf "%s\n" "#define HAVE_SIGWAITINFO 1" >>confdefs.h
13687
13688fi
13689ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13690if test "x$ac_cv_func_snprintf" = xyes
13691then :
13692 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
13693
13694fi
13695ac_fn_c_check_func "$LINENO" "splice" "ac_cv_func_splice"
13696if test "x$ac_cv_func_splice" = xyes
13697then :
13698 printf "%s\n" "#define HAVE_SPLICE 1" >>confdefs.h
13699
13700fi
13701ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13702if test "x$ac_cv_func_strftime" = xyes
13703then :
13704 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13705
13706fi
13707ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13708if test "x$ac_cv_func_strlcpy" = xyes
13709then :
13710 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
13711
13712fi
13713ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
13714if test "x$ac_cv_func_strsignal" = xyes
13715then :
13716 printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
13717
13718fi
13719ac_fn_c_check_func "$LINENO" "symlinkat" "ac_cv_func_symlinkat"
13720if test "x$ac_cv_func_symlinkat" = xyes
13721then :
13722 printf "%s\n" "#define HAVE_SYMLINKAT 1" >>confdefs.h
13723
13724fi
13725ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
13726if test "x$ac_cv_func_sync" = xyes
13727then :
13728 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
13729
13730fi
13731ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
13732if test "x$ac_cv_func_sysconf" = xyes
13733then :
13734 printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
13735
13736fi
13737ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp"
13738if test "x$ac_cv_func_tcgetpgrp" = xyes
13739then :
13740 printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h
13741
13742fi
13743ac_fn_c_check_func "$LINENO" "tcsetpgrp" "ac_cv_func_tcsetpgrp"
13744if test "x$ac_cv_func_tcsetpgrp" = xyes
13745then :
13746 printf "%s\n" "#define HAVE_TCSETPGRP 1" >>confdefs.h
13747
13748fi
13749ac_fn_c_check_func "$LINENO" "tempnam" "ac_cv_func_tempnam"
13750if test "x$ac_cv_func_tempnam" = xyes
13751then :
13752 printf "%s\n" "#define HAVE_TEMPNAM 1" >>confdefs.h
13753
13754fi
13755ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
13756if test "x$ac_cv_func_timegm" = xyes
13757then :
13758 printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
13759
13760fi
13761ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
13762if test "x$ac_cv_func_times" = xyes
13763then :
13764 printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h
13765
13766fi
13767ac_fn_c_check_func "$LINENO" "tmpfile" "ac_cv_func_tmpfile"
13768if test "x$ac_cv_func_tmpfile" = xyes
13769then :
13770 printf "%s\n" "#define HAVE_TMPFILE 1" >>confdefs.h
13771
13772fi
13773ac_fn_c_check_func "$LINENO" "tmpnam" "ac_cv_func_tmpnam"
13774if test "x$ac_cv_func_tmpnam" = xyes
13775then :
13776 printf "%s\n" "#define HAVE_TMPNAM 1" >>confdefs.h
13777
13778fi
13779ac_fn_c_check_func "$LINENO" "tmpnam_r" "ac_cv_func_tmpnam_r"
13780if test "x$ac_cv_func_tmpnam_r" = xyes
13781then :
13782 printf "%s\n" "#define HAVE_TMPNAM_R 1" >>confdefs.h
13783
13784fi
13785ac_fn_c_check_func "$LINENO" "truncate" "ac_cv_func_truncate"
13786if test "x$ac_cv_func_truncate" = xyes
13787then :
13788 printf "%s\n" "#define HAVE_TRUNCATE 1" >>confdefs.h
13789
13790fi
13791ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
13792if test "x$ac_cv_func_uname" = xyes
13793then :
13794 printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
13795
13796fi
13797ac_fn_c_check_func "$LINENO" "unlinkat" "ac_cv_func_unlinkat"
13798if test "x$ac_cv_func_unlinkat" = xyes
13799then :
13800 printf "%s\n" "#define HAVE_UNLINKAT 1" >>confdefs.h
13801
13802fi
13803ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
13804if test "x$ac_cv_func_utimensat" = xyes
13805then :
13806 printf "%s\n" "#define HAVE_UTIMENSAT 1" >>confdefs.h
13807
13808fi
13809ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13810if test "x$ac_cv_func_utimes" = xyes
13811then :
13812 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13813
13814fi
13815ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
13816if test "x$ac_cv_func_vfork" = xyes
13817then :
13818 printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
13819
13820fi
13821ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
13822if test "x$ac_cv_func_waitid" = xyes
13823then :
13824 printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
13825
13826fi
13827ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
13828if test "x$ac_cv_func_waitpid" = xyes
13829then :
13830 printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
13831
13832fi
13833ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
13834if test "x$ac_cv_func_wait3" = xyes
13835then :
13836 printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h
13837
13838fi
13839ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4"
13840if test "x$ac_cv_func_wait4" = xyes
13841then :
13842 printf "%s\n" "#define HAVE_WAIT4 1" >>confdefs.h
13843
13844fi
13845ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
13846if test "x$ac_cv_func_wcscoll" = xyes
13847then :
13848 printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h
13849
13850fi
13851ac_fn_c_check_func "$LINENO" "wcsftime" "ac_cv_func_wcsftime"
13852if test "x$ac_cv_func_wcsftime" = xyes
13853then :
13854 printf "%s\n" "#define HAVE_WCSFTIME 1" >>confdefs.h
13855
13856fi
13857ac_fn_c_check_func "$LINENO" "wcsxfrm" "ac_cv_func_wcsxfrm"
13858if test "x$ac_cv_func_wcsxfrm" = xyes
13859then :
13860 printf "%s\n" "#define HAVE_WCSXFRM 1" >>confdefs.h
13861
13862fi
13863ac_fn_c_check_func "$LINENO" "wmemcmp" "ac_cv_func_wmemcmp"
13864if test "x$ac_cv_func_wmemcmp" = xyes
13865then :
13866 printf "%s\n" "#define HAVE_WMEMCMP 1" >>confdefs.h
13867
13868fi
13869ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
13870if test "x$ac_cv_func_writev" = xyes
13871then :
13872 printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
13873
13874fi
13875ac_fn_c_check_func "$LINENO" "_getpty" "ac_cv_func__getpty"
13876if test "x$ac_cv_func__getpty" = xyes
13877then :
13878 printf "%s\n" "#define HAVE__GETPTY 1" >>confdefs.h
13879
13880fi
13881ac_fn_c_check_func "$LINENO" "rtpSpawn" "ac_cv_func_rtpSpawn"
13882if test "x$ac_cv_func_rtpSpawn" = xyes
13883then :
13884 printf "%s\n" "#define HAVE_RTPSPAWN 1" >>confdefs.h
13885
13886fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013887
Michael W. Hudson54241132001-12-07 15:38:26 +000013888
Benjamin Peterson40caa052018-09-12 15:52:40 -070013889# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
13890# links. Some libc implementations have a stub lchmod implementation that always
13891# returns an error.
13892if test "$MACHDEP" != linux; then
13893 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Pablo Galindoba421752021-05-03 20:33:17 +010013894if test "x$ac_cv_func_lchmod" = xyes
13895then :
13896 printf "%s\n" "#define HAVE_LCHMOD 1" >>confdefs.h
13897
13898fi
13899
13900fi
13901
13902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
13903printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
13904if test ${ac_cv_c_undeclared_builtin_options+y}
13905then :
13906 printf %s "(cached) " >&6
13907else $as_nop
13908 ac_save_CFLAGS=$CFLAGS
13909 ac_cv_c_undeclared_builtin_options='cannot detect'
13910 for ac_arg in '' -fno-builtin; do
13911 CFLAGS="$ac_save_CFLAGS $ac_arg"
13912 # This test program should *not* compile successfully.
13913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13914/* end confdefs.h. */
13915
13916int
13917main (void)
13918{
13919(void) strchr;
13920 ;
13921 return 0;
13922}
Benjamin Petersoned709d52018-09-12 17:22:11 -070013923_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010013924if ac_fn_c_try_compile "$LINENO"
13925then :
13926
13927else $as_nop
13928 # This test program should compile successfully.
13929 # No library function is consistently available on
13930 # freestanding implementations, so test against a dummy
13931 # declaration. Include always-available headers on the
13932 # off chance that they somehow elicit warnings.
13933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13934/* end confdefs.h. */
13935#include <float.h>
13936#include <limits.h>
13937#include <stdarg.h>
13938#include <stddef.h>
13939extern void ac_decl (int, char *);
13940
13941int
13942main (void)
13943{
13944(void) ac_decl (0, (char *) 0);
13945 (void) ac_decl;
13946
13947 ;
13948 return 0;
13949}
13950_ACEOF
13951if ac_fn_c_try_compile "$LINENO"
13952then :
13953 if test x"$ac_arg" = x
13954then :
13955 ac_cv_c_undeclared_builtin_options='none needed'
13956else $as_nop
13957 ac_cv_c_undeclared_builtin_options=$ac_arg
13958fi
13959 break
13960fi
13961rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13962fi
13963rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13964 done
13965 CFLAGS=$ac_save_CFLAGS
Benjamin Peterson40caa052018-09-12 15:52:40 -070013966
13967fi
Pablo Galindoba421752021-05-03 20:33:17 +010013968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
13969printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
13970 case $ac_cv_c_undeclared_builtin_options in #(
13971 'cannot detect') :
13972 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13973printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13974as_fn_error $? "cannot make $CC report undeclared builtins
13975See \`config.log' for more details" "$LINENO" 5; } ;; #(
13976 'none needed') :
13977 ac_c_undeclared_builtin_options='' ;; #(
13978 *) :
13979 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
13980esac
Benjamin Peterson40caa052018-09-12 15:52:40 -070013981
Pablo Galindoba421752021-05-03 20:33:17 +010013982ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013983 #include <dirent.h>
Pablo Galindoba421752021-05-03 20:33:17 +010013984" "$ac_c_undeclared_builtin_options" "CFLAGS"
13985if test "x$ac_cv_have_decl_dirfd" = xyes
13986then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013987
Pablo Galindoba421752021-05-03 20:33:17 +010013988printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013989
13990fi
13991
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013992# For some functions, having a definition is not sufficient, since
13993# we want to take their address.
Pablo Galindoba421752021-05-03 20:33:17 +010013994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
13995printf %s "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013997/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013998#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013999int
Pablo Galindoba421752021-05-03 20:33:17 +010014000main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014001{
14002void *x=chroot
14003 ;
14004 return 0;
14005}
14006_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014007if ac_fn_c_try_compile "$LINENO"
14008then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014009
Pablo Galindoba421752021-05-03 20:33:17 +010014010printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014011
Pablo Galindoba421752021-05-03 20:33:17 +010014012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14013printf "%s\n" "yes" >&6; }
14014else $as_nop
14015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14016printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014017
14018fi
Pablo Galindoba421752021-05-03 20:33:17 +010014019rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14020{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for link" >&5
14021printf %s "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014023/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014024#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014025int
Pablo Galindoba421752021-05-03 20:33:17 +010014026main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014027{
14028void *x=link
14029 ;
14030 return 0;
14031}
14032_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014033if ac_fn_c_try_compile "$LINENO"
14034then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014035
Pablo Galindoba421752021-05-03 20:33:17 +010014036printf "%s\n" "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014037
Pablo Galindoba421752021-05-03 20:33:17 +010014038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14039printf "%s\n" "yes" >&6; }
14040else $as_nop
14041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14042printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014043
14044fi
Pablo Galindoba421752021-05-03 20:33:17 +010014045rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
14047printf %s "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014049/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014050#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014051int
Pablo Galindoba421752021-05-03 20:33:17 +010014052main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014053{
14054void *x=symlink
14055 ;
14056 return 0;
14057}
14058_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014059if ac_fn_c_try_compile "$LINENO"
14060then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014061
Pablo Galindoba421752021-05-03 20:33:17 +010014062printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014063
Pablo Galindoba421752021-05-03 20:33:17 +010014064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14065printf "%s\n" "yes" >&6; }
14066else $as_nop
14067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14068printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014069
14070fi
Pablo Galindoba421752021-05-03 20:33:17 +010014071rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
14073printf %s "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014075/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014076#include <unistd.h>
14077int
Pablo Galindoba421752021-05-03 20:33:17 +010014078main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014079{
14080void *x=fchdir
14081 ;
14082 return 0;
14083}
14084_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014085if ac_fn_c_try_compile "$LINENO"
14086then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014087
Pablo Galindoba421752021-05-03 20:33:17 +010014088printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014089
Pablo Galindoba421752021-05-03 20:33:17 +010014090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14091printf "%s\n" "yes" >&6; }
14092else $as_nop
14093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14094printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014095
14096fi
Pablo Galindoba421752021-05-03 20:33:17 +010014097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
14099printf %s "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014101/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014102#include <unistd.h>
14103int
Pablo Galindoba421752021-05-03 20:33:17 +010014104main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014105{
14106void *x=fsync
14107 ;
14108 return 0;
14109}
14110_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014111if ac_fn_c_try_compile "$LINENO"
14112then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014113
Pablo Galindoba421752021-05-03 20:33:17 +010014114printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014115
Pablo Galindoba421752021-05-03 20:33:17 +010014116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14117printf "%s\n" "yes" >&6; }
14118else $as_nop
14119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14120printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014121
14122fi
Pablo Galindoba421752021-05-03 20:33:17 +010014123rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
14125printf %s "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014127/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014128#include <unistd.h>
14129int
Pablo Galindoba421752021-05-03 20:33:17 +010014130main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014131{
14132void *x=fdatasync
14133 ;
14134 return 0;
14135}
14136_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014137if ac_fn_c_try_compile "$LINENO"
14138then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014139
Pablo Galindoba421752021-05-03 20:33:17 +010014140printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014141
Pablo Galindoba421752021-05-03 20:33:17 +010014142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14143printf "%s\n" "yes" >&6; }
14144else $as_nop
14145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14146printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014147
14148fi
Pablo Galindoba421752021-05-03 20:33:17 +010014149rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
14151printf %s "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014153/* end confdefs.h. */
14154#include <sys/epoll.h>
14155int
Pablo Galindoba421752021-05-03 20:33:17 +010014156main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014157{
14158void *x=epoll_create
14159 ;
14160 return 0;
14161}
14162_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014163if ac_fn_c_try_compile "$LINENO"
14164then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014165
Pablo Galindoba421752021-05-03 20:33:17 +010014166printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014167
Pablo Galindoba421752021-05-03 20:33:17 +010014168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14169printf "%s\n" "yes" >&6; }
14170else $as_nop
14171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14172printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014173
14174fi
Pablo Galindoba421752021-05-03 20:33:17 +010014175rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
14177printf %s "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14179/* end confdefs.h. */
14180#include <sys/epoll.h>
14181int
Pablo Galindoba421752021-05-03 20:33:17 +010014182main (void)
Benjamin Peterson95c16622011-12-27 15:36:32 -060014183{
14184void *x=epoll_create1
14185 ;
14186 return 0;
14187}
14188_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014189if ac_fn_c_try_compile "$LINENO"
14190then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060014191
Pablo Galindoba421752021-05-03 20:33:17 +010014192printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060014193
Pablo Galindoba421752021-05-03 20:33:17 +010014194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14195printf "%s\n" "yes" >&6; }
14196else $as_nop
14197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14198printf "%s\n" "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014199
14200fi
Pablo Galindoba421752021-05-03 20:33:17 +010014201rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
14203printf %s "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014205/* end confdefs.h. */
14206
14207#include <sys/types.h>
14208#include <sys/event.h>
14209
14210int
Pablo Galindoba421752021-05-03 20:33:17 +010014211main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014212{
14213int x=kqueue()
14214 ;
14215 return 0;
14216}
14217_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014218if ac_fn_c_try_compile "$LINENO"
14219then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014220
Pablo Galindoba421752021-05-03 20:33:17 +010014221printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014222
Pablo Galindoba421752021-05-03 20:33:17 +010014223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14224printf "%s\n" "yes" >&6; }
14225else $as_nop
14226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14227printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014228
14229fi
Pablo Galindoba421752021-05-03 20:33:17 +010014230rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14231{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
14232printf %s "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14234/* end confdefs.h. */
14235
14236#include <sys/time.h>
14237#include <sys/resource.h>
14238
14239int
Pablo Galindoba421752021-05-03 20:33:17 +010014240main (void)
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014241{
14242void *x=prlimit
14243 ;
14244 return 0;
14245}
14246_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014247if ac_fn_c_try_compile "$LINENO"
14248then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014249
Pablo Galindoba421752021-05-03 20:33:17 +010014250printf "%s\n" "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014251
Pablo Galindoba421752021-05-03 20:33:17 +010014252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14253printf "%s\n" "yes" >&6; }
14254else $as_nop
14255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14256printf "%s\n" "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014257
14258fi
Pablo Galindoba421752021-05-03 20:33:17 +010014259rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
14261printf %s "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14263/* end confdefs.h. */
14264#include <mach-o/dyld.h>
14265int
Pablo Galindoba421752021-05-03 20:33:17 +010014266main (void)
Ronald Oussoren41761932020-11-08 10:05:27 +010014267{
14268void *x=_dyld_shared_cache_contains_path
14269 ;
14270 return 0;
14271}
14272_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014273if ac_fn_c_try_compile "$LINENO"
14274then :
Ronald Oussoren41761932020-11-08 10:05:27 +010014275
Pablo Galindoba421752021-05-03 20:33:17 +010014276printf "%s\n" "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010014277
Pablo Galindoba421752021-05-03 20:33:17 +010014278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14279printf "%s\n" "yes" >&6; }
14280else $as_nop
14281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14282printf "%s\n" "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014283
14284fi
Pablo Galindoba421752021-05-03 20:33:17 +010014285rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014286
Pablo Galindoba421752021-05-03 20:33:17 +010014287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
14288printf %s "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14290/* end confdefs.h. */
14291
14292#ifdef HAVE_SYS_MMAN_H
14293#include <sys/mman.h>
14294#endif
14295#ifdef HAVE_SYS_MEMFD_H
14296#include <sys/memfd.h>
14297#endif
14298
14299int
Pablo Galindoba421752021-05-03 20:33:17 +010014300main (void)
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014301{
14302void *x=memfd_create
14303 ;
14304 return 0;
14305}
14306_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014307if ac_fn_c_try_compile "$LINENO"
14308then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014309
Pablo Galindoba421752021-05-03 20:33:17 +010014310printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014311
Pablo Galindoba421752021-05-03 20:33:17 +010014312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14313printf "%s\n" "yes" >&6; }
14314else $as_nop
14315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14316printf "%s\n" "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014317
14318fi
Pablo Galindoba421752021-05-03 20:33:17 +010014319rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014320
Pablo Galindoba421752021-05-03 20:33:17 +010014321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
14322printf %s "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14324/* end confdefs.h. */
14325
14326#ifdef HAVE_SYS_EVENTFD_H
14327#include <sys/eventfd.h>
14328#endif
14329
14330int
Pablo Galindoba421752021-05-03 20:33:17 +010014331main (void)
Christian Heimescd9fed62020-11-13 19:48:52 +010014332{
14333int x = eventfd(0, EFD_CLOEXEC)
14334 ;
14335 return 0;
14336}
14337_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014338if ac_fn_c_try_compile "$LINENO"
14339then :
Christian Heimescd9fed62020-11-13 19:48:52 +010014340
Pablo Galindoba421752021-05-03 20:33:17 +010014341printf "%s\n" "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010014342
Pablo Galindoba421752021-05-03 20:33:17 +010014343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14344printf "%s\n" "yes" >&6; }
14345else $as_nop
14346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14347printf "%s\n" "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014348
14349fi
Pablo Galindoba421752021-05-03 20:33:17 +010014350rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010014351
Martin v. Löwisd5843682002-11-21 20:41:28 +000014352# On some systems (eg. FreeBSD 5), we would find a definition of the
14353# functions ctermid_r, setgroups in the library, but no prototype
14354# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14355# address to avoid compiler warnings and potential miscompilations
14356# because of the missing prototypes.
14357
Pablo Galindoba421752021-05-03 20:33:17 +010014358{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
14359printf %s "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014361/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014362
Martin v. Löwisd5843682002-11-21 20:41:28 +000014363#include <stdio.h>
14364
Martin v. Löwisd5843682002-11-21 20:41:28 +000014365int
Pablo Galindoba421752021-05-03 20:33:17 +010014366main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014367{
14368void* p = ctermid_r
14369 ;
14370 return 0;
14371}
14372_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014373if ac_fn_c_try_compile "$LINENO"
14374then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014375
Pablo Galindoba421752021-05-03 20:33:17 +010014376printf "%s\n" "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014377
Pablo Galindoba421752021-05-03 20:33:17 +010014378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14379printf "%s\n" "yes" >&6; }
14380else $as_nop
14381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14382printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014383
14384fi
Pablo Galindoba421752021-05-03 20:33:17 +010014385rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386
Pablo Galindoba421752021-05-03 20:33:17 +010014387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
14388printf %s "checking for flock declaration... " >&6; }
14389if test ${ac_cv_flock_decl+y}
14390then :
14391 printf %s "(cached) " >&6
14392else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014394/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014395#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014396int
Pablo Galindoba421752021-05-03 20:33:17 +010014397main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014398{
14399void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014400
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014401 ;
14402 return 0;
14403}
14404_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014405if ac_fn_c_try_compile "$LINENO"
14406then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014407 ac_cv_flock_decl=yes
Pablo Galindoba421752021-05-03 20:33:17 +010014408else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014409 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014410
14411fi
Pablo Galindoba421752021-05-03 20:33:17 +010014412rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000014413
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014414fi
Pablo Galindoba421752021-05-03 20:33:17 +010014415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
14416printf "%s\n" "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014417if test "x${ac_cv_flock_decl}" = xyes; then
Pablo Galindoba421752021-05-03 20:33:17 +010014418
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014419 for ac_func in flock
14420do :
14421 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Pablo Galindoba421752021-05-03 20:33:17 +010014422if test "x$ac_cv_func_flock" = xyes
14423then :
14424 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014425
Pablo Galindoba421752021-05-03 20:33:17 +010014426else $as_nop
14427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
14428printf %s "checking for flock in -lbsd... " >&6; }
14429if test ${ac_cv_lib_bsd_flock+y}
14430then :
14431 printf %s "(cached) " >&6
14432else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014433 ac_check_lib_save_LIBS=$LIBS
14434LIBS="-lbsd $LIBS"
14435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14436/* end confdefs.h. */
14437
14438/* Override any GCC internal prototype to avoid an error.
14439 Use char because int might match the return type of a GCC
14440 builtin and then its argument prototype would still apply. */
Antoine Pitroua3000072010-09-07 14:52:42 +000014441char flock ();
14442int
Pablo Galindoba421752021-05-03 20:33:17 +010014443main (void)
Antoine Pitroua3000072010-09-07 14:52:42 +000014444{
14445return flock ();
14446 ;
14447 return 0;
14448}
14449_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014450if ac_fn_c_try_link "$LINENO"
14451then :
Antoine Pitroua3000072010-09-07 14:52:42 +000014452 ac_cv_lib_bsd_flock=yes
Pablo Galindoba421752021-05-03 20:33:17 +010014453else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014454 ac_cv_lib_bsd_flock=no
14455fi
Pablo Galindoba421752021-05-03 20:33:17 +010014456rm -f core conftest.err conftest.$ac_objext conftest.beam \
Antoine Pitroua3000072010-09-07 14:52:42 +000014457 conftest$ac_exeext conftest.$ac_ext
14458LIBS=$ac_check_lib_save_LIBS
14459fi
Pablo Galindoba421752021-05-03 20:33:17 +010014460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
14461printf "%s\n" "$ac_cv_lib_bsd_flock" >&6; }
14462if test "x$ac_cv_lib_bsd_flock" = xyes
14463then :
14464 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014465
14466
Pablo Galindoba421752021-05-03 20:33:17 +010014467printf "%s\n" "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014468
14469
14470fi
14471
14472
14473fi
Pablo Galindoba421752021-05-03 20:33:17 +010014474
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014475done
Antoine Pitroua3000072010-09-07 14:52:42 +000014476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477
Pablo Galindoba421752021-05-03 20:33:17 +010014478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
14479printf %s "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014481/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014482
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014483#include <unistd.h>
14484
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014485int
Pablo Galindoba421752021-05-03 20:33:17 +010014486main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014487{
14488void* p = getpagesize
14489 ;
14490 return 0;
14491}
14492_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014493if ac_fn_c_try_compile "$LINENO"
14494then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014495
Pablo Galindoba421752021-05-03 20:33:17 +010014496printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014497
Pablo Galindoba421752021-05-03 20:33:17 +010014498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14499printf "%s\n" "yes" >&6; }
14500else $as_nop
14501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14502printf "%s\n" "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014503
14504fi
Pablo Galindoba421752021-05-03 20:33:17 +010014505rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014506
Pablo Galindoba421752021-05-03 20:33:17 +010014507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
14508printf %s "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14510/* end confdefs.h. */
14511
14512#include <stdlib.h>
14513
14514int
Pablo Galindoba421752021-05-03 20:33:17 +010014515main (void)
Victor Stinner984890f2011-11-24 13:53:38 +010014516{
14517int res = unsetenv("DUMMY")
14518 ;
14519 return 0;
14520}
14521_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014522if ac_fn_c_try_compile "$LINENO"
14523then :
14524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14525printf "%s\n" "no" >&6; }
14526else $as_nop
Victor Stinner984890f2011-11-24 13:53:38 +010014527
Pablo Galindoba421752021-05-03 20:33:17 +010014528printf "%s\n" "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010014529
Pablo Galindoba421752021-05-03 20:33:17 +010014530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14531printf "%s\n" "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014532
14533fi
Pablo Galindoba421752021-05-03 20:33:17 +010014534rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010014535
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014536for ac_prog in true
14537do
14538 # Extract the first word of "$ac_prog", so it can be a program name with args.
14539set dummy $ac_prog; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +010014540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14541printf %s "checking for $ac_word... " >&6; }
14542if test ${ac_cv_prog_TRUE+y}
14543then :
14544 printf %s "(cached) " >&6
14545else $as_nop
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014546 if test -n "$TRUE"; then
14547 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14548else
14549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14550for as_dir in $PATH
14551do
14552 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010014553 case $as_dir in #(((
14554 '') as_dir=./ ;;
14555 */) ;;
14556 *) as_dir=$as_dir/ ;;
14557 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +010014559 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014560 ac_cv_prog_TRUE="$ac_prog"
Pablo Galindoba421752021-05-03 20:33:17 +010014561 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014562 break 2
14563 fi
14564done
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014567
14568fi
14569fi
14570TRUE=$ac_cv_prog_TRUE
14571if test -n "$TRUE"; then
Pablo Galindoba421752021-05-03 20:33:17 +010014572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
14573printf "%s\n" "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014574else
Pablo Galindoba421752021-05-03 20:33:17 +010014575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14576printf "%s\n" "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014577fi
14578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014580 test -n "$TRUE" && break
14581done
14582test -n "$TRUE" || TRUE="/bin/true"
14583
14584
Pablo Galindoba421752021-05-03 20:33:17 +010014585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
14586printf %s "checking for inet_aton in -lc... " >&6; }
14587if test ${ac_cv_lib_c_inet_aton+y}
14588then :
14589 printf %s "(cached) " >&6
14590else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014591 ac_check_lib_save_LIBS=$LIBS
14592LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014594/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596/* Override any GCC internal prototype to avoid an error.
14597 Use char because int might match the return type of a GCC
14598 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014599char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014600int
Pablo Galindoba421752021-05-03 20:33:17 +010014601main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014602{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014604 ;
14605 return 0;
14606}
14607_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014608if ac_fn_c_try_link "$LINENO"
14609then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014610 ac_cv_lib_c_inet_aton=yes
Pablo Galindoba421752021-05-03 20:33:17 +010014611else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014613fi
Pablo Galindoba421752021-05-03 20:33:17 +010014614rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014616LIBS=$ac_check_lib_save_LIBS
14617fi
Pablo Galindoba421752021-05-03 20:33:17 +010014618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
14619printf "%s\n" "$ac_cv_lib_c_inet_aton" >&6; }
14620if test "x$ac_cv_lib_c_inet_aton" = xyes
14621then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014622 $ac_cv_prog_TRUE
Pablo Galindoba421752021-05-03 20:33:17 +010014623else $as_nop
14624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
14625printf %s "checking for inet_aton in -lresolv... " >&6; }
14626if test ${ac_cv_lib_resolv_inet_aton+y}
14627then :
14628 printf %s "(cached) " >&6
14629else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014630 ac_check_lib_save_LIBS=$LIBS
14631LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014633/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635/* Override any GCC internal prototype to avoid an error.
14636 Use char because int might match the return type of a GCC
14637 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014638char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014639int
Pablo Galindoba421752021-05-03 20:33:17 +010014640main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014641{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014643 ;
14644 return 0;
14645}
14646_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014647if ac_fn_c_try_link "$LINENO"
14648then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014649 ac_cv_lib_resolv_inet_aton=yes
Pablo Galindoba421752021-05-03 20:33:17 +010014650else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014652fi
Pablo Galindoba421752021-05-03 20:33:17 +010014653rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014655LIBS=$ac_check_lib_save_LIBS
14656fi
Pablo Galindoba421752021-05-03 20:33:17 +010014657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
14658printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; }
14659if test "x$ac_cv_lib_resolv_inet_aton" = xyes
14660then :
14661 printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014662
14663 LIBS="-lresolv $LIBS"
14664
14665fi
14666
14667
14668fi
14669
14670
Christian Heimesd0764e22007-12-04 15:00:33 +000014671# On Tru64, chflags seems to be present, but calling it will
14672# exit Python
Pablo Galindoba421752021-05-03 20:33:17 +010014673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
14674printf %s "checking for chflags... " >&6; }
14675if test ${ac_cv_have_chflags+y}
14676then :
14677 printf %s "(cached) " >&6
14678else $as_nop
14679 if test "$cross_compiling" = yes
14680then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014681 ac_cv_have_chflags=cross
Pablo Galindoba421752021-05-03 20:33:17 +010014682else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014684/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014685
Christian Heimesd0764e22007-12-04 15:00:33 +000014686#include <sys/stat.h>
14687#include <unistd.h>
14688int main(int argc, char*argv[])
14689{
14690 if(chflags(argv[0], 0) != 0)
14691 return 1;
14692 return 0;
14693}
Ned Deily3eb67d52011-06-28 00:00:28 -070014694
Christian Heimesd0764e22007-12-04 15:00:33 +000014695_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014696if ac_fn_c_try_run "$LINENO"
14697then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014698 ac_cv_have_chflags=yes
Pablo Galindoba421752021-05-03 20:33:17 +010014699else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014704fi
14705
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014706
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014707fi
Pablo Galindoba421752021-05-03 20:33:17 +010014708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
14709printf "%s\n" "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014710if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Pablo Galindoba421752021-05-03 20:33:17 +010014712if test "x$ac_cv_func_chflags" = xyes
14713then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014714 ac_cv_have_chflags="yes"
Pablo Galindoba421752021-05-03 20:33:17 +010014715else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014716 ac_cv_have_chflags="no"
14717fi
14718
14719fi
14720if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014721
Pablo Galindoba421752021-05-03 20:33:17 +010014722printf "%s\n" "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014723
14724fi
14725
Pablo Galindoba421752021-05-03 20:33:17 +010014726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
14727printf %s "checking for lchflags... " >&6; }
14728if test ${ac_cv_have_lchflags+y}
14729then :
14730 printf %s "(cached) " >&6
14731else $as_nop
14732 if test "$cross_compiling" = yes
14733then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014734 ac_cv_have_lchflags=cross
Pablo Galindoba421752021-05-03 20:33:17 +010014735else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014737/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014738
Christian Heimesd0764e22007-12-04 15:00:33 +000014739#include <sys/stat.h>
14740#include <unistd.h>
14741int main(int argc, char*argv[])
14742{
14743 if(lchflags(argv[0], 0) != 0)
14744 return 1;
14745 return 0;
14746}
Ned Deily3eb67d52011-06-28 00:00:28 -070014747
Christian Heimesd0764e22007-12-04 15:00:33 +000014748_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014749if ac_fn_c_try_run "$LINENO"
14750then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014751 ac_cv_have_lchflags=yes
Pablo Galindoba421752021-05-03 20:33:17 +010014752else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000014754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014757fi
14758
14759
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014760fi
Pablo Galindoba421752021-05-03 20:33:17 +010014761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
14762printf "%s\n" "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014763if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Pablo Galindoba421752021-05-03 20:33:17 +010014765if test "x$ac_cv_func_lchflags" = xyes
14766then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014767 ac_cv_have_lchflags="yes"
Pablo Galindoba421752021-05-03 20:33:17 +010014768else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014769 ac_cv_have_lchflags="no"
14770fi
14771
14772fi
14773if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014774
Pablo Galindoba421752021-05-03 20:33:17 +010014775printf "%s\n" "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014776
14777fi
14778
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014779case $ac_sys_system/$ac_sys_release in
14780Darwin/*)
14781 _CUR_CFLAGS="${CFLAGS}"
14782 _CUR_LDFLAGS="${LDFLAGS}"
14783 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
14784 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
14785 ;;
14786esac
14787
Pablo Galindoba421752021-05-03 20:33:17 +010014788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
14789printf %s "checking for inflateCopy in -lz... " >&6; }
14790if test ${ac_cv_lib_z_inflateCopy+y}
14791then :
14792 printf %s "(cached) " >&6
14793else $as_nop
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014794 ac_check_lib_save_LIBS=$LIBS
14795LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014797/* end confdefs.h. */
14798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799/* Override any GCC internal prototype to avoid an error.
14800 Use char because int might match the return type of a GCC
14801 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014802char inflateCopy ();
14803int
Pablo Galindoba421752021-05-03 20:33:17 +010014804main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014807 ;
14808 return 0;
14809}
14810_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014811if ac_fn_c_try_link "$LINENO"
14812then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014813 ac_cv_lib_z_inflateCopy=yes
Pablo Galindoba421752021-05-03 20:33:17 +010014814else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014816fi
Pablo Galindoba421752021-05-03 20:33:17 +010014817rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014819LIBS=$ac_check_lib_save_LIBS
14820fi
Pablo Galindoba421752021-05-03 20:33:17 +010014821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
14822printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; }
14823if test "x$ac_cv_lib_z_inflateCopy" = xyes
14824then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014825
Pablo Galindoba421752021-05-03 20:33:17 +010014826printf "%s\n" "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014827
14828fi
14829
14830
14831case $ac_sys_system/$ac_sys_release in
14832Darwin/*)
14833 CFLAGS="${_CUR_CFLAGS}"
14834 LDFLAGS="${_CUR_LDFLAGS}"
14835 ;;
14836esac
14837
Pablo Galindoba421752021-05-03 20:33:17 +010014838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
14839printf %s "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014841/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014842
Martin v. Löwise9416172003-05-03 10:12:45 +000014843#include <netdb.h>
14844
Martin v. Löwise9416172003-05-03 10:12:45 +000014845int
Pablo Galindoba421752021-05-03 20:33:17 +010014846main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014847{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014848void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014853if ac_fn_c_try_link "$LINENO"
14854then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014855
Pablo Galindoba421752021-05-03 20:33:17 +010014856printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014857
Pablo Galindoba421752021-05-03 20:33:17 +010014858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14859printf "%s\n" "yes" >&6; }
14860else $as_nop
14861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014863
14864fi
Pablo Galindoba421752021-05-03 20:33:17 +010014865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867
Pablo Galindoba421752021-05-03 20:33:17 +010014868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
14869printf %s "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014871/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014872
Martin v. Löwis86d66262006-02-17 08:40:11 +000014873#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014874#include <sys/socket.h>
14875#include <netinet/in.h>
14876#include <arpa/inet.h>
14877
Martin v. Löwise9416172003-05-03 10:12:45 +000014878int
Pablo Galindoba421752021-05-03 20:33:17 +010014879main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014880{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014881void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014882 ;
14883 return 0;
14884}
14885_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014886if ac_fn_c_try_link "$LINENO"
14887then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014888
Pablo Galindoba421752021-05-03 20:33:17 +010014889printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014890
Pablo Galindoba421752021-05-03 20:33:17 +010014891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14892printf "%s\n" "yes" >&6; }
14893else $as_nop
14894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14895printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014896
14897fi
Pablo Galindoba421752021-05-03 20:33:17 +010014898rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900
Pablo Galindoba421752021-05-03 20:33:17 +010014901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
14902printf %s "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014904/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014905
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014906#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014907#include <sys/socket.h>
14908#include <netinet/in.h>
14909#include <arpa/inet.h>
14910
Martin v. Löwise9416172003-05-03 10:12:45 +000014911int
Pablo Galindoba421752021-05-03 20:33:17 +010014912main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014913{
14914void* p = inet_pton
14915 ;
14916 return 0;
14917}
14918_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014919if ac_fn_c_try_compile "$LINENO"
14920then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014921
Pablo Galindoba421752021-05-03 20:33:17 +010014922printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014923
Pablo Galindoba421752021-05-03 20:33:17 +010014924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14925printf "%s\n" "yes" >&6; }
14926else $as_nop
14927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14928printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014929
14930fi
Pablo Galindoba421752021-05-03 20:33:17 +010014931rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014932
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014933# On some systems, setgroups is in unistd.h, on others, in grp.h
Pablo Galindoba421752021-05-03 20:33:17 +010014934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
14935printf %s "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014938
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014939#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014940#ifdef HAVE_GRP_H
14941#include <grp.h>
14942#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014943
Martin v. Löwisd5843682002-11-21 20:41:28 +000014944int
Pablo Galindoba421752021-05-03 20:33:17 +010014945main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014946{
14947void* p = setgroups
14948 ;
14949 return 0;
14950}
14951_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010014952if ac_fn_c_try_compile "$LINENO"
14953then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014954
Pablo Galindoba421752021-05-03 20:33:17 +010014955printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014956
Pablo Galindoba421752021-05-03 20:33:17 +010014957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14958printf "%s\n" "yes" >&6; }
14959else $as_nop
14960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14961printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014962
14963fi
Pablo Galindoba421752021-05-03 20:33:17 +010014964rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014965
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014966# check for openpty and forkpty
14967
Pablo Galindoba421752021-05-03 20:33:17 +010014968
14969 for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000014970do :
14971 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Pablo Galindoba421752021-05-03 20:33:17 +010014972if test "x$ac_cv_func_openpty" = xyes
14973then :
14974 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014975
Pablo Galindoba421752021-05-03 20:33:17 +010014976else $as_nop
14977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
14978printf %s "checking for openpty in -lutil... " >&6; }
14979if test ${ac_cv_lib_util_openpty+y}
14980then :
14981 printf %s "(cached) " >&6
14982else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014984LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988/* Override any GCC internal prototype to avoid an error.
14989 Use char because int might match the return type of a GCC
14990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014991char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014992int
Pablo Galindoba421752021-05-03 20:33:17 +010014993main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000014994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ;
14997 return 0;
14998}
14999_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015000if ac_fn_c_try_link "$LINENO"
15001then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ac_cv_lib_util_openpty=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015003else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015005fi
Pablo Galindoba421752021-05-03 20:33:17 +010015006rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015008LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015009fi
Pablo Galindoba421752021-05-03 20:33:17 +010015010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
15011printf "%s\n" "$ac_cv_lib_util_openpty" >&6; }
15012if test "x$ac_cv_lib_util_openpty" = xyes
15013then :
15014 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015015 LIBS="$LIBS -lutil"
Pablo Galindoba421752021-05-03 20:33:17 +010015016else $as_nop
15017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
15018printf %s "checking for openpty in -lbsd... " >&6; }
15019if test ${ac_cv_lib_bsd_openpty+y}
15020then :
15021 printf %s "(cached) " >&6
15022else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015023 ac_check_lib_save_LIBS=$LIBS
15024LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015026/* end confdefs.h. */
15027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028/* Override any GCC internal prototype to avoid an error.
15029 Use char because int might match the return type of a GCC
15030 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015031char openpty ();
15032int
Pablo Galindoba421752021-05-03 20:33:17 +010015033main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015036 ;
15037 return 0;
15038}
15039_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015040if ac_fn_c_try_link "$LINENO"
15041then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015042 ac_cv_lib_bsd_openpty=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015043else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015044 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015045fi
Pablo Galindoba421752021-05-03 20:33:17 +010015046rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015048LIBS=$ac_check_lib_save_LIBS
15049fi
Pablo Galindoba421752021-05-03 20:33:17 +010015050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
15051printf "%s\n" "$ac_cv_lib_bsd_openpty" >&6; }
15052if test "x$ac_cv_lib_bsd_openpty" = xyes
15053then :
15054 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015055 LIBS="$LIBS -lbsd"
15056fi
15057
15058
15059fi
15060
Fred Drake8cef4cf2000-06-28 16:40:38 +000015061
15062fi
Pablo Galindoba421752021-05-03 20:33:17 +010015063
Fred Drake8cef4cf2000-06-28 16:40:38 +000015064done
15065
Pablo Galindoba421752021-05-03 20:33:17 +010015066 for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000015067do :
15068 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Pablo Galindoba421752021-05-03 20:33:17 +010015069if test "x$ac_cv_func_forkpty" = xyes
15070then :
15071 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015072
Pablo Galindoba421752021-05-03 20:33:17 +010015073else $as_nop
15074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
15075printf %s "checking for forkpty in -lutil... " >&6; }
15076if test ${ac_cv_lib_util_forkpty+y}
15077then :
15078 printf %s "(cached) " >&6
15079else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015081LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085/* Override any GCC internal prototype to avoid an error.
15086 Use char because int might match the return type of a GCC
15087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015088char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015089int
Pablo Galindoba421752021-05-03 20:33:17 +010015090main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 ;
15094 return 0;
15095}
15096_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015097if ac_fn_c_try_link "$LINENO"
15098then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 ac_cv_lib_util_forkpty=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015100else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015102fi
Pablo Galindoba421752021-05-03 20:33:17 +010015103rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015105LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015106fi
Pablo Galindoba421752021-05-03 20:33:17 +010015107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
15108printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; }
15109if test "x$ac_cv_lib_util_forkpty" = xyes
15110then :
15111 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015112 LIBS="$LIBS -lutil"
Pablo Galindoba421752021-05-03 20:33:17 +010015113else $as_nop
15114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
15115printf %s "checking for forkpty in -lbsd... " >&6; }
15116if test ${ac_cv_lib_bsd_forkpty+y}
15117then :
15118 printf %s "(cached) " >&6
15119else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015120 ac_check_lib_save_LIBS=$LIBS
15121LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015123/* end confdefs.h. */
15124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125/* Override any GCC internal prototype to avoid an error.
15126 Use char because int might match the return type of a GCC
15127 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015128char forkpty ();
15129int
Pablo Galindoba421752021-05-03 20:33:17 +010015130main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015133 ;
15134 return 0;
15135}
15136_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015137if ac_fn_c_try_link "$LINENO"
15138then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015139 ac_cv_lib_bsd_forkpty=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015140else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015142fi
Pablo Galindoba421752021-05-03 20:33:17 +010015143rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015145LIBS=$ac_check_lib_save_LIBS
15146fi
Pablo Galindoba421752021-05-03 20:33:17 +010015147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
15148printf "%s\n" "$ac_cv_lib_bsd_forkpty" >&6; }
15149if test "x$ac_cv_lib_bsd_forkpty" = xyes
15150then :
15151 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015152 LIBS="$LIBS -lbsd"
15153fi
15154
15155
15156fi
15157
Fred Drake8cef4cf2000-06-28 16:40:38 +000015158
15159fi
Christian Heimes32eba612021-03-19 10:29:25 +010015160
Pablo Galindoba421752021-05-03 20:33:17 +010015161done
Christian Heimes39258d32021-04-17 11:36:35 +020015162
Michael W. Hudson54241132001-12-07 15:38:26 +000015163# check for long file support functions
Pablo Galindoba421752021-05-03 20:33:17 +010015164ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64"
15165if test "x$ac_cv_func_fseek64" = xyes
15166then :
15167 printf "%s\n" "#define HAVE_FSEEK64 1" >>confdefs.h
Michael W. Hudson54241132001-12-07 15:38:26 +000015168
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015169fi
Pablo Galindoba421752021-05-03 20:33:17 +010015170ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15171if test "x$ac_cv_func_fseeko" = xyes
15172then :
15173 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
15174
15175fi
15176ac_fn_c_check_func "$LINENO" "fstatvfs" "ac_cv_func_fstatvfs"
15177if test "x$ac_cv_func_fstatvfs" = xyes
15178then :
15179 printf "%s\n" "#define HAVE_FSTATVFS 1" >>confdefs.h
15180
15181fi
15182ac_fn_c_check_func "$LINENO" "ftell64" "ac_cv_func_ftell64"
15183if test "x$ac_cv_func_ftell64" = xyes
15184then :
15185 printf "%s\n" "#define HAVE_FTELL64 1" >>confdefs.h
15186
15187fi
15188ac_fn_c_check_func "$LINENO" "ftello" "ac_cv_func_ftello"
15189if test "x$ac_cv_func_ftello" = xyes
15190then :
15191 printf "%s\n" "#define HAVE_FTELLO 1" >>confdefs.h
15192
15193fi
15194ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
15195if test "x$ac_cv_func_statvfs" = xyes
15196then :
15197 printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h
15198
15199fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015200
Michael W. Hudson54241132001-12-07 15:38:26 +000015201
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015202ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Pablo Galindoba421752021-05-03 20:33:17 +010015203if test "x$ac_cv_func_dup2" = xyes
15204then :
15205 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000015206
Pablo Galindoba421752021-05-03 20:33:17 +010015207else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015209 *" dup2.$ac_objext "* ) ;;
15210 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015212esac
15213
Martin v. Löwis1142de32002-03-29 16:28:31 +000015214fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015215
Martin v. Löwis1142de32002-03-29 16:28:31 +000015216
Pablo Galindoba421752021-05-03 20:33:17 +010015217 for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015218do :
15219 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Pablo Galindoba421752021-05-03 20:33:17 +010015220if test "x$ac_cv_func_getpgrp" = xyes
15221then :
15222 printf "%s\n" "#define HAVE_GETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015225#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015226int
Pablo Galindoba421752021-05-03 20:33:17 +010015227main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015228{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015229getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 ;
15231 return 0;
15232}
15233_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015234if ac_fn_c_try_compile "$LINENO"
15235then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
Pablo Galindoba421752021-05-03 20:33:17 +010015237printf "%s\n" "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015238
Guido van Rossum627b2d71993-12-24 10:39:16 +000015239fi
Pablo Galindoba421752021-05-03 20:33:17 +010015240rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015241
Guido van Rossum627b2d71993-12-24 10:39:16 +000015242fi
Pablo Galindoba421752021-05-03 20:33:17 +010015243
Thomas Wouters3a584202000-08-05 23:28:51 +000015244done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015245
Pablo Galindoba421752021-05-03 20:33:17 +010015246 for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015247do :
15248 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Pablo Galindoba421752021-05-03 20:33:17 +010015249if test "x$ac_cv_func_setpgrp" = xyes
15250then :
15251 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015253/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015254#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015255int
Pablo Galindoba421752021-05-03 20:33:17 +010015256main (void)
Jack Jansen150753c2003-03-29 22:07:47 +000015257{
15258setpgrp(0,0);
15259 ;
15260 return 0;
15261}
15262_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015263if ac_fn_c_try_compile "$LINENO"
15264then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
Pablo Galindoba421752021-05-03 20:33:17 +010015266printf "%s\n" "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015267
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015268fi
Pablo Galindoba421752021-05-03 20:33:17 +010015269rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015270
15271fi
Pablo Galindoba421752021-05-03 20:33:17 +010015272
Jack Jansen150753c2003-03-29 22:07:47 +000015273done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015274
Gregory P. Smith387512c2018-12-30 15:42:32 -080015275# We search for both crypt and crypt_r as one or the other may be defined
15276# This gets us our -lcrypt in LIBS when required on the target platform.
Pablo Galindoba421752021-05-03 20:33:17 +010015277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
15278printf %s "checking for library containing crypt... " >&6; }
15279if test ${ac_cv_search_crypt+y}
15280then :
15281 printf %s "(cached) " >&6
15282else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015283 ac_func_search_save_LIBS=$LIBS
15284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15285/* end confdefs.h. */
15286
15287/* Override any GCC internal prototype to avoid an error.
15288 Use char because int might match the return type of a GCC
15289 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015290char crypt ();
15291int
Pablo Galindoba421752021-05-03 20:33:17 +010015292main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015293{
15294return crypt ();
15295 ;
15296 return 0;
15297}
15298_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015299for ac_lib in '' crypt
15300do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015301 if test -z "$ac_lib"; then
15302 ac_res="none required"
15303 else
15304 ac_res=-l$ac_lib
15305 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15306 fi
Pablo Galindoba421752021-05-03 20:33:17 +010015307 if ac_fn_c_try_link "$LINENO"
15308then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015309 ac_cv_search_crypt=$ac_res
15310fi
Pablo Galindoba421752021-05-03 20:33:17 +010015311rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015312 conftest$ac_exeext
Pablo Galindoba421752021-05-03 20:33:17 +010015313 if test ${ac_cv_search_crypt+y}
15314then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015315 break
15316fi
15317done
Pablo Galindoba421752021-05-03 20:33:17 +010015318if test ${ac_cv_search_crypt+y}
15319then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015320
Pablo Galindoba421752021-05-03 20:33:17 +010015321else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015322 ac_cv_search_crypt=no
15323fi
15324rm conftest.$ac_ext
15325LIBS=$ac_func_search_save_LIBS
15326fi
Pablo Galindoba421752021-05-03 20:33:17 +010015327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
15328printf "%s\n" "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015329ac_res=$ac_cv_search_crypt
Pablo Galindoba421752021-05-03 20:33:17 +010015330if test "$ac_res" != no
15331then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015332 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15333
15334fi
15335
Pablo Galindoba421752021-05-03 20:33:17 +010015336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15337printf %s "checking for library containing crypt_r... " >&6; }
15338if test ${ac_cv_search_crypt_r+y}
15339then :
15340 printf %s "(cached) " >&6
15341else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015342 ac_func_search_save_LIBS=$LIBS
15343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344/* end confdefs.h. */
15345
15346/* Override any GCC internal prototype to avoid an error.
15347 Use char because int might match the return type of a GCC
15348 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015349char crypt_r ();
15350int
Pablo Galindoba421752021-05-03 20:33:17 +010015351main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015352{
15353return crypt_r ();
15354 ;
15355 return 0;
15356}
15357_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015358for ac_lib in '' crypt
15359do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015360 if test -z "$ac_lib"; then
15361 ac_res="none required"
15362 else
15363 ac_res=-l$ac_lib
15364 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15365 fi
Pablo Galindoba421752021-05-03 20:33:17 +010015366 if ac_fn_c_try_link "$LINENO"
15367then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015368 ac_cv_search_crypt_r=$ac_res
15369fi
Pablo Galindoba421752021-05-03 20:33:17 +010015370rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015371 conftest$ac_exeext
Pablo Galindoba421752021-05-03 20:33:17 +010015372 if test ${ac_cv_search_crypt_r+y}
15373then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015374 break
15375fi
15376done
Pablo Galindoba421752021-05-03 20:33:17 +010015377if test ${ac_cv_search_crypt_r+y}
15378then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015379
Pablo Galindoba421752021-05-03 20:33:17 +010015380else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015381 ac_cv_search_crypt_r=no
15382fi
15383rm conftest.$ac_ext
15384LIBS=$ac_func_search_save_LIBS
15385fi
Pablo Galindoba421752021-05-03 20:33:17 +010015386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
15387printf "%s\n" "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015388ac_res=$ac_cv_search_crypt_r
Pablo Galindoba421752021-05-03 20:33:17 +010015389if test "$ac_res" != no
15390then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015391 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15392
15393fi
15394
15395
15396ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Pablo Galindoba421752021-05-03 20:33:17 +010015397if test "x$ac_cv_func_crypt_r" = xyes
15398then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15400/* end confdefs.h. */
15401
15402#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
15403#include <crypt.h>
15404
15405int
Pablo Galindoba421752021-05-03 20:33:17 +010015406main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015407{
15408
15409struct crypt_data d;
15410char *r = crypt_r("", "", &d);
15411
15412 ;
15413 return 0;
15414}
15415_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015416if ac_fn_c_try_compile "$LINENO"
15417then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015418
Pablo Galindoba421752021-05-03 20:33:17 +010015419printf "%s\n" "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080015420
15421fi
Pablo Galindoba421752021-05-03 20:33:17 +010015422rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080015423
15424fi
15425
15426
Pablo Galindoba421752021-05-03 20:33:17 +010015427
15428 for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020015429do :
15430 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Pablo Galindoba421752021-05-03 20:33:17 +010015431if test "x$ac_cv_func_clock_gettime" = xyes
15432then :
15433 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015434
Pablo Galindoba421752021-05-03 20:33:17 +010015435else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015436
Pablo Galindoba421752021-05-03 20:33:17 +010015437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
15438printf %s "checking for clock_gettime in -lrt... " >&6; }
15439if test ${ac_cv_lib_rt_clock_gettime+y}
15440then :
15441 printf %s "(cached) " >&6
15442else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015443 ac_check_lib_save_LIBS=$LIBS
15444LIBS="-lrt $LIBS"
15445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15446/* end confdefs.h. */
15447
15448/* Override any GCC internal prototype to avoid an error.
15449 Use char because int might match the return type of a GCC
15450 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015451char clock_gettime ();
15452int
Pablo Galindoba421752021-05-03 20:33:17 +010015453main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015454{
15455return clock_gettime ();
15456 ;
15457 return 0;
15458}
15459_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015460if ac_fn_c_try_link "$LINENO"
15461then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015462 ac_cv_lib_rt_clock_gettime=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015463else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015464 ac_cv_lib_rt_clock_gettime=no
15465fi
Pablo Galindoba421752021-05-03 20:33:17 +010015466rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015467 conftest$ac_exeext conftest.$ac_ext
15468LIBS=$ac_check_lib_save_LIBS
15469fi
Pablo Galindoba421752021-05-03 20:33:17 +010015470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
15471printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
15472if test "x$ac_cv_lib_rt_clock_gettime" = xyes
15473then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015474
Victor Stinner7efb8332014-08-29 15:41:08 +020015475 LIBS="$LIBS -lrt"
Pablo Galindoba421752021-05-03 20:33:17 +010015476 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015477
15478
Pablo Galindoba421752021-05-03 20:33:17 +010015479printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015480
15481
15482fi
15483
15484
15485fi
Pablo Galindoba421752021-05-03 20:33:17 +010015486
Victor Stinnere0be4232011-10-25 13:06:09 +020015487done
15488
15489
Pablo Galindoba421752021-05-03 20:33:17 +010015490 for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020015491do :
15492 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Pablo Galindoba421752021-05-03 20:33:17 +010015493if test "x$ac_cv_func_clock_getres" = xyes
15494then :
15495 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015496
Pablo Galindoba421752021-05-03 20:33:17 +010015497else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015498
Pablo Galindoba421752021-05-03 20:33:17 +010015499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
15500printf %s "checking for clock_getres in -lrt... " >&6; }
15501if test ${ac_cv_lib_rt_clock_getres+y}
15502then :
15503 printf %s "(cached) " >&6
15504else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015505 ac_check_lib_save_LIBS=$LIBS
15506LIBS="-lrt $LIBS"
15507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15508/* end confdefs.h. */
15509
15510/* Override any GCC internal prototype to avoid an error.
15511 Use char because int might match the return type of a GCC
15512 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015513char clock_getres ();
15514int
Pablo Galindoba421752021-05-03 20:33:17 +010015515main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015516{
15517return clock_getres ();
15518 ;
15519 return 0;
15520}
15521_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015522if ac_fn_c_try_link "$LINENO"
15523then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015524 ac_cv_lib_rt_clock_getres=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015525else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015526 ac_cv_lib_rt_clock_getres=no
15527fi
Pablo Galindoba421752021-05-03 20:33:17 +010015528rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015529 conftest$ac_exeext conftest.$ac_ext
15530LIBS=$ac_check_lib_save_LIBS
15531fi
Pablo Galindoba421752021-05-03 20:33:17 +010015532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
15533printf "%s\n" "$ac_cv_lib_rt_clock_getres" >&6; }
15534if test "x$ac_cv_lib_rt_clock_getres" = xyes
15535then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015536
Pablo Galindoba421752021-05-03 20:33:17 +010015537 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015538
15539
15540fi
15541
15542
15543fi
Pablo Galindoba421752021-05-03 20:33:17 +010015544
Victor Stinnere0be4232011-10-25 13:06:09 +020015545done
15546
15547
Pablo Galindoba421752021-05-03 20:33:17 +010015548 for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015549do :
15550 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Pablo Galindoba421752021-05-03 20:33:17 +010015551if test "x$ac_cv_func_clock_settime" = xyes
15552then :
15553 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015554
Pablo Galindoba421752021-05-03 20:33:17 +010015555else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015556
Pablo Galindoba421752021-05-03 20:33:17 +010015557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
15558printf %s "checking for clock_settime in -lrt... " >&6; }
15559if test ${ac_cv_lib_rt_clock_settime+y}
15560then :
15561 printf %s "(cached) " >&6
15562else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015563 ac_check_lib_save_LIBS=$LIBS
15564LIBS="-lrt $LIBS"
15565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15566/* end confdefs.h. */
15567
15568/* Override any GCC internal prototype to avoid an error.
15569 Use char because int might match the return type of a GCC
15570 builtin and then its argument prototype would still apply. */
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015571char clock_settime ();
15572int
Pablo Galindoba421752021-05-03 20:33:17 +010015573main (void)
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015574{
15575return clock_settime ();
15576 ;
15577 return 0;
15578}
15579_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015580if ac_fn_c_try_link "$LINENO"
15581then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015582 ac_cv_lib_rt_clock_settime=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015583else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015584 ac_cv_lib_rt_clock_settime=no
15585fi
Pablo Galindoba421752021-05-03 20:33:17 +010015586rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015587 conftest$ac_exeext conftest.$ac_ext
15588LIBS=$ac_check_lib_save_LIBS
15589fi
Pablo Galindoba421752021-05-03 20:33:17 +010015590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
15591printf "%s\n" "$ac_cv_lib_rt_clock_settime" >&6; }
15592if test "x$ac_cv_lib_rt_clock_settime" = xyes
15593then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015594
Pablo Galindoba421752021-05-03 20:33:17 +010015595 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015596
15597
15598fi
15599
15600
15601fi
Pablo Galindoba421752021-05-03 20:33:17 +010015602
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015603done
15604
Pablo Galindoba421752021-05-03 20:33:17 +010015605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for major" >&5
15606printf %s "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015608/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015609
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015610#if defined(MAJOR_IN_MKDEV)
15611#include <sys/mkdev.h>
15612#elif defined(MAJOR_IN_SYSMACROS)
15613#include <sys/sysmacros.h>
15614#else
15615#include <sys/types.h>
15616#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015617
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015618int
Pablo Galindoba421752021-05-03 20:33:17 +010015619main (void)
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015620{
15621
15622 makedev(major(0),minor(0));
15623
15624 ;
15625 return 0;
15626}
15627_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015628if ac_fn_c_try_link "$LINENO"
15629then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015630
15631
Pablo Galindoba421752021-05-03 20:33:17 +010015632printf "%s\n" "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015633
Pablo Galindoba421752021-05-03 20:33:17 +010015634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15635printf "%s\n" "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015636
Pablo Galindoba421752021-05-03 20:33:17 +010015637else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000015638
Pablo Galindoba421752021-05-03 20:33:17 +010015639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15640printf "%s\n" "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015641
15642fi
Pablo Galindoba421752021-05-03 20:33:17 +010015643rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015645
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015646# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015647# for [no]getaddrinfo in netdb.h.
Pablo Galindoba421752021-05-03 20:33:17 +010015648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
15649printf %s "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015651/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015652
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015653#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015654#include <sys/socket.h>
15655#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015656#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015657
Martin v. Löwis11437992002-04-12 09:54:03 +000015658int
Pablo Galindoba421752021-05-03 20:33:17 +010015659main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015660{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015661getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 ;
15663 return 0;
15664}
15665_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015666if ac_fn_c_try_link "$LINENO"
15667then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015668 have_getaddrinfo=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015669else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015671fi
Pablo Galindoba421752021-05-03 20:33:17 +010015672rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +010015674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
15675printf "%s\n" "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015676if test $have_getaddrinfo = yes
15677then
Pablo Galindoba421752021-05-03 20:33:17 +010015678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
15679printf %s "checking getaddrinfo bug... " >&6; }
15680 if test ${ac_cv_buggy_getaddrinfo+y}
15681then :
15682 printf %s "(cached) " >&6
15683else $as_nop
15684 if test "$cross_compiling" = yes
15685then :
Matthias Klose96350132012-03-15 20:42:23 +010015686
15687if test "${enable_ipv6+set}" = set; then
15688 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
15689else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015690 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010015691fi
Pablo Galindoba421752021-05-03 20:33:17 +010015692else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015694/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015695
Stefan Krah19c21392012-11-22 23:47:32 +010015696#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015697#include <sys/types.h>
15698#include <netdb.h>
15699#include <string.h>
15700#include <sys/socket.h>
15701#include <netinet/in.h>
15702
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015703int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015704{
15705 int passive, gaierr, inet4 = 0, inet6 = 0;
15706 struct addrinfo hints, *ai, *aitop;
15707 char straddr[INET6_ADDRSTRLEN], strport[16];
15708
15709 for (passive = 0; passive <= 1; passive++) {
15710 memset(&hints, 0, sizeof(hints));
15711 hints.ai_family = AF_UNSPEC;
15712 hints.ai_flags = passive ? AI_PASSIVE : 0;
15713 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015714 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015715 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15716 (void)gai_strerror(gaierr);
15717 goto bad;
15718 }
15719 for (ai = aitop; ai; ai = ai->ai_next) {
15720 if (ai->ai_addr == NULL ||
15721 ai->ai_addrlen == 0 ||
15722 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15723 straddr, sizeof(straddr), strport, sizeof(strport),
15724 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15725 goto bad;
15726 }
15727 switch (ai->ai_family) {
15728 case AF_INET:
15729 if (strcmp(strport, "54321") != 0) {
15730 goto bad;
15731 }
15732 if (passive) {
15733 if (strcmp(straddr, "0.0.0.0") != 0) {
15734 goto bad;
15735 }
15736 } else {
15737 if (strcmp(straddr, "127.0.0.1") != 0) {
15738 goto bad;
15739 }
15740 }
15741 inet4++;
15742 break;
15743 case AF_INET6:
15744 if (strcmp(strport, "54321") != 0) {
15745 goto bad;
15746 }
15747 if (passive) {
15748 if (strcmp(straddr, "::") != 0) {
15749 goto bad;
15750 }
15751 } else {
15752 if (strcmp(straddr, "::1") != 0) {
15753 goto bad;
15754 }
15755 }
15756 inet6++;
15757 break;
15758 case AF_UNSPEC:
15759 goto bad;
15760 break;
15761 default:
15762 /* another family support? */
15763 break;
15764 }
15765 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070015766 freeaddrinfo(aitop);
15767 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015768 }
15769
15770 if (!(inet4 == 0 || inet4 == 2))
15771 goto bad;
15772 if (!(inet6 == 0 || inet6 == 2))
15773 goto bad;
15774
15775 if (aitop)
15776 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015777 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015778
15779 bad:
15780 if (aitop)
15781 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015782 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015783}
15784
Martin v. Löwis11437992002-04-12 09:54:03 +000015785_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015786if ac_fn_c_try_run "$LINENO"
15787then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015788 ac_cv_buggy_getaddrinfo=no
Pablo Galindoba421752021-05-03 20:33:17 +010015789else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015796fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015797
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799
Pablo Galindoba421752021-05-03 20:33:17 +010015800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
15801printf "%s\n" "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015802
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020015803if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015804then
15805 if test $ipv6 = yes
15806 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015807 echo 'Fatal: You must get working getaddrinfo() function.'
15808 echo ' or you can specify "--disable-ipv6"'.
15809 exit 1
15810 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015811else
Martin v. Löwis11437992002-04-12 09:54:03 +000015812
Pablo Galindoba421752021-05-03 20:33:17 +010015813printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015814
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015815fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015816
Pablo Galindoba421752021-05-03 20:33:17 +010015817ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
15818if test "x$ac_cv_func_getnameinfo" = xyes
15819then :
15820 printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015821
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015822fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015823
Michael W. Hudson54241132001-12-07 15:38:26 +000015824
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015825# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
Pablo Galindoba421752021-05-03 20:33:17 +010015828# Obsolete code to be removed.
15829if test $ac_cv_header_sys_time_h = yes; then
15830
15831printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015832
15833fi
Pablo Galindoba421752021-05-03 20:33:17 +010015834# End of obsolete code.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015835
Pablo Galindoba421752021-05-03 20:33:17 +010015836{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
15837printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15838if test ${ac_cv_struct_tm+y}
15839then :
15840 printf %s "(cached) " >&6
15841else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015843/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015844#include <sys/types.h>
15845#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847int
Pablo Galindoba421752021-05-03 20:33:17 +010015848main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850struct tm tm;
15851 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000015853 ;
15854 return 0;
15855}
15856_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015857if ac_fn_c_try_compile "$LINENO"
15858then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015859 ac_cv_struct_tm=time.h
Pablo Galindoba421752021-05-03 20:33:17 +010015860else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015862fi
Pablo Galindoba421752021-05-03 20:33:17 +010015863rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015864fi
Pablo Galindoba421752021-05-03 20:33:17 +010015865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
15866printf "%s\n" "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015867if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015868
Pablo Galindoba421752021-05-03 20:33:17 +010015869printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015870
15871fi
15872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873ac_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 +000015874#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015875
Matthias Kloseb9621712010-04-24 17:59:49 +000015876"
Pablo Galindoba421752021-05-03 20:33:17 +010015877if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
15878then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Pablo Galindoba421752021-05-03 20:33:17 +010015880printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
15882
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015883fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15886
Pablo Galindoba421752021-05-03 20:33:17 +010015887printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015888
15889else
Pablo Galindoba421752021-05-03 20:33:17 +010015890 ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15891" "$ac_c_undeclared_builtin_options" "CFLAGS"
15892if test "x$ac_cv_have_decl_tzname" = xyes
15893then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010015895else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015896 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897fi
Pablo Galindoba421752021-05-03 20:33:17 +010015898printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015899
Pablo Galindoba421752021-05-03 20:33:17 +010015900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15901printf %s "checking for tzname... " >&6; }
15902if test ${ac_cv_var_tzname+y}
15903then :
15904 printf %s "(cached) " >&6
15905else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015907/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015908#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909#if !HAVE_DECL_TZNAME
15910extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000015911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913int
Pablo Galindoba421752021-05-03 20:33:17 +010015914main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 ;
15918 return 0;
15919}
15920_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010015921if ac_fn_c_try_link "$LINENO"
15922then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015923 ac_cv_var_tzname=yes
Pablo Galindoba421752021-05-03 20:33:17 +010015924else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015925 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015926fi
Pablo Galindoba421752021-05-03 20:33:17 +010015927rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015929fi
Pablo Galindoba421752021-05-03 20:33:17 +010015930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15931printf "%s\n" "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015932 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
Pablo Galindoba421752021-05-03 20:33:17 +010015934printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000015935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015936 fi
15937fi
15938
Matthias Kloseb9621712010-04-24 17:59:49 +000015939ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +010015940if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
15941then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015942
Pablo Galindoba421752021-05-03 20:33:17 +010015943printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015944
15945
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015946fi
15947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +010015949if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
15950then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015951
Pablo Galindoba421752021-05-03 20:33:17 +010015952printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015953
15954
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015955fi
15956
Matthias Kloseb9621712010-04-24 17:59:49 +000015957ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +010015958if test "x$ac_cv_member_struct_stat_st_flags" = xyes
15959then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015960
Pablo Galindoba421752021-05-03 20:33:17 +010015961printf "%s\n" "#define HAVE_STRUCT_STAT_ST_FLAGS 1" >>confdefs.h
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015962
15963
15964fi
15965
Matthias Kloseb9621712010-04-24 17:59:49 +000015966ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +010015967if test "x$ac_cv_member_struct_stat_st_gen" = xyes
15968then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015969
Pablo Galindoba421752021-05-03 20:33:17 +010015970printf "%s\n" "#define HAVE_STRUCT_STAT_ST_GEN 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015971
15972
15973fi
15974
Matthias Kloseb9621712010-04-24 17:59:49 +000015975ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +010015976if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes
15977then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015978
Pablo Galindoba421752021-05-03 20:33:17 +010015979printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015980
15981
15982fi
15983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +010015985if test "x$ac_cv_member_struct_stat_st_blocks" = xyes
15986then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015987
Pablo Galindoba421752021-05-03 20:33:17 +010015988printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015989
15990
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015991fi
15992
Stefan Krah267b6392016-04-26 01:09:18 +020015993ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
15994 #include <sys/types.h>
15995 #include <pwd.h>
15996
15997"
Pablo Galindoba421752021-05-03 20:33:17 +010015998if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes
15999then :
Stefan Krah267b6392016-04-26 01:09:18 +020016000
Pablo Galindoba421752021-05-03 20:33:17 +010016001printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_GECOS 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020016002
16003
16004fi
16005ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
16006 #include <sys/types.h>
16007 #include <pwd.h>
16008
16009"
Pablo Galindoba421752021-05-03 20:33:17 +010016010if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes
16011then :
Stefan Krah267b6392016-04-26 01:09:18 +020016012
Pablo Galindoba421752021-05-03 20:33:17 +010016013printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_PASSWD 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020016014
16015
16016fi
16017
Zachary Ware6a6967e2016-10-01 00:47:27 -050016018# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
16019ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
16020"
Pablo Galindoba421752021-05-03 20:33:17 +010016021if test "x$ac_cv_member_siginfo_t_si_band" = xyes
16022then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050016023
Pablo Galindoba421752021-05-03 20:33:17 +010016024printf "%s\n" "#define HAVE_SIGINFO_T_SI_BAND 1" >>confdefs.h
Zachary Ware6a6967e2016-10-01 00:47:27 -050016025
16026
16027fi
16028
Michael W. Hudson54241132001-12-07 15:38:26 +000016029
Pablo Galindoba421752021-05-03 20:33:17 +010016030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
16031printf %s "checking for time.h that defines altzone... " >&6; }
16032if test ${ac_cv_header_time_altzone+y}
16033then :
16034 printf %s "(cached) " >&6
16035else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000016036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016038/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016039#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016040int
Pablo Galindoba421752021-05-03 20:33:17 +010016041main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016042{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016043return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016044 ;
16045 return 0;
16046}
16047_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016048if ac_fn_c_try_compile "$LINENO"
16049then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016050 ac_cv_header_time_altzone=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016051else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016052 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016053fi
Pablo Galindoba421752021-05-03 20:33:17 +010016054rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000016055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016056fi
16057
Pablo Galindoba421752021-05-03 20:33:17 +010016058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
16059printf "%s\n" "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016060if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016061
Pablo Galindoba421752021-05-03 20:33:17 +010016062printf "%s\n" "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016063
16064fi
16065
Guido van Rossumda88dad1995-01-26 00:46:29 +000016066was_it_defined=no
Pablo Galindoba421752021-05-03 20:33:17 +010016067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
16068printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016070/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016071
16072#include <sys/types.h>
16073#include <sys/select.h>
16074#include <sys/time.h>
16075
Martin v. Löwis11437992002-04-12 09:54:03 +000016076int
Pablo Galindoba421752021-05-03 20:33:17 +010016077main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016078{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016079;
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 ;
16081 return 0;
16082}
16083_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016084if ac_fn_c_try_compile "$LINENO"
16085then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016086
16087
Pablo Galindoba421752021-05-03 20:33:17 +010016088printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016090 was_it_defined=yes
16091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016092fi
Pablo Galindoba421752021-05-03 20:33:17 +010016093rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
16095printf "%s\n" "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096
Pablo Galindoba421752021-05-03 20:33:17 +010016097{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
16098printf %s "checking for addrinfo... " >&6; }
16099if test ${ac_cv_struct_addrinfo+y}
16100then :
16101 printf %s "(cached) " >&6
16102else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016104/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000016105#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016106int
Pablo Galindoba421752021-05-03 20:33:17 +010016107main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016108{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016109struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 ;
16111 return 0;
16112}
16113_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016114if ac_fn_c_try_compile "$LINENO"
16115then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016116 ac_cv_struct_addrinfo=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016117else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016118 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016119fi
Pablo Galindoba421752021-05-03 20:33:17 +010016120rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016121fi
16122
Pablo Galindoba421752021-05-03 20:33:17 +010016123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
16124printf "%s\n" "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016125if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016126
Pablo Galindoba421752021-05-03 20:33:17 +010016127printf "%s\n" "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016128
16129fi
16130
Pablo Galindoba421752021-05-03 20:33:17 +010016131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
16132printf %s "checking for sockaddr_storage... " >&6; }
16133if test ${ac_cv_struct_sockaddr_storage+y}
16134then :
16135 printf %s "(cached) " >&6
16136else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016138/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016139
16140# include <sys/types.h>
16141# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016142int
Pablo Galindoba421752021-05-03 20:33:17 +010016143main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016144{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016145struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016146 ;
16147 return 0;
16148}
16149_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016150if ac_fn_c_try_compile "$LINENO"
16151then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016152 ac_cv_struct_sockaddr_storage=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016153else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016155fi
Pablo Galindoba421752021-05-03 20:33:17 +010016156rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157fi
16158
Pablo Galindoba421752021-05-03 20:33:17 +010016159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
16160printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016161if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016162
Pablo Galindoba421752021-05-03 20:33:17 +010016163printf "%s\n" "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016164
16165fi
16166
Pablo Galindoba421752021-05-03 20:33:17 +010016167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
16168printf %s "checking for sockaddr_alg... " >&6; }
16169if test ${ac_cv_struct_sockaddr_alg+y}
16170then :
16171 printf %s "(cached) " >&6
16172else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16174/* end confdefs.h. */
16175
16176# include <sys/types.h>
16177# include <sys/socket.h>
16178# include <linux/if_alg.h>
16179int
Pablo Galindoba421752021-05-03 20:33:17 +010016180main (void)
Christian Heimesdffa3942016-09-05 23:54:41 +020016181{
16182struct sockaddr_alg s
16183 ;
16184 return 0;
16185}
16186_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016187if ac_fn_c_try_compile "$LINENO"
16188then :
Christian Heimesdffa3942016-09-05 23:54:41 +020016189 ac_cv_struct_sockaddr_alg=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016190else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016191 ac_cv_struct_sockaddr_alg=no
16192fi
Pablo Galindoba421752021-05-03 20:33:17 +010016193rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020016194fi
16195
Pablo Galindoba421752021-05-03 20:33:17 +010016196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
16197printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020016198if test $ac_cv_struct_sockaddr_alg = yes; then
16199
Pablo Galindoba421752021-05-03 20:33:17 +010016200printf "%s\n" "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020016201
16202fi
16203
Guido van Rossum627b2d71993-12-24 10:39:16 +000016204# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016205
Pablo Galindoba421752021-05-03 20:33:17 +010016206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
16207printf %s "checking whether char is unsigned... " >&6; }
16208if test ${ac_cv_c_char_unsigned+y}
16209then :
16210 printf %s "(cached) " >&6
16211else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016214$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016215int
Pablo Galindoba421752021-05-03 20:33:17 +010016216main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016217{
16218static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016219test_array [0] = 0;
16220return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000016221
16222 ;
16223 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016224}
Martin v. Löwis11437992002-04-12 09:54:03 +000016225_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016226if ac_fn_c_try_compile "$LINENO"
16227then :
Michael W. Hudson54241132001-12-07 15:38:26 +000016228 ac_cv_c_char_unsigned=no
Pablo Galindoba421752021-05-03 20:33:17 +010016229else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016231fi
Pablo Galindoba421752021-05-03 20:33:17 +010016232rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016233fi
Pablo Galindoba421752021-05-03 20:33:17 +010016234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
16235printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
16236if test $ac_cv_c_char_unsigned = yes; then
16237 printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016238
16239fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016240
Pablo Galindoba421752021-05-03 20:33:17 +010016241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
16242printf %s "checking for an ANSI C-conforming const... " >&6; }
16243if test ${ac_cv_c_const+y}
16244then :
16245 printf %s "(cached) " >&6
16246else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016248/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016249
Martin v. Löwis11437992002-04-12 09:54:03 +000016250int
Pablo Galindoba421752021-05-03 20:33:17 +010016251main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016252{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016253
Martin v. Löwis11437992002-04-12 09:54:03 +000016254#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016255 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016257 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000016258 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259 char const *const *pcpcc;
16260 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 /* NEC SVR4.0.2 mips cc rejects this. */
16262 struct point {int x, y;};
16263 static struct point const zero = {0,0};
Pablo Galindoba421752021-05-03 20:33:17 +010016264 /* IBM XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 It does not let you subtract one const X* pointer from another in
16266 an arm of an if-expression whose if-part is not a constant
16267 expression */
16268 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 ++pcpcc;
16272 ppc = (char**) pcpcc;
16273 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016274 { /* SCO 3.2v4 cc rejects this sort of thing. */
16275 char tx;
16276 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016278
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 }
16282 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16283 int x[] = {25, 17};
16284 const int *foo = &x[0];
16285 ++foo;
16286 }
16287 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16288 typedef const int *iptr;
16289 iptr p = 0;
16290 ++p;
16291 }
Pablo Galindoba421752021-05-03 20:33:17 +010016292 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016294 struct s { int j; const int *ap[3]; } bx;
16295 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 }
16297 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16298 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000016302#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016303
Martin v. Löwis11437992002-04-12 09:54:03 +000016304 ;
16305 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016306}
Martin v. Löwis11437992002-04-12 09:54:03 +000016307_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016308if ac_fn_c_try_compile "$LINENO"
16309then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016310 ac_cv_c_const=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016311else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016312 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016313fi
Pablo Galindoba421752021-05-03 20:33:17 +010016314rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016315fi
Pablo Galindoba421752021-05-03 20:33:17 +010016316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
16317printf "%s\n" "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016318if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016319
Pablo Galindoba421752021-05-03 20:33:17 +010016320printf "%s\n" "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016321
16322fi
16323
Michael W. Hudson54241132001-12-07 15:38:26 +000016324
Guido van Rossumda88dad1995-01-26 00:46:29 +000016325works=no
Pablo Galindoba421752021-05-03 20:33:17 +010016326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
16327printf %s "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016329/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016330
Martin v. Löwis11437992002-04-12 09:54:03 +000016331int
Pablo Galindoba421752021-05-03 20:33:17 +010016332main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016333{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016334signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 ;
16336 return 0;
16337}
16338_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016339if ac_fn_c_try_compile "$LINENO"
16340then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000016341 works=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016342else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016343
Pablo Galindoba421752021-05-03 20:33:17 +010016344printf "%s\n" "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016345
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016346
Guido van Rossum7f43da71994-08-01 12:15:30 +000016347fi
Pablo Galindoba421752021-05-03 20:33:17 +010016348rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16350printf "%s\n" "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016351
Guido van Rossumda88dad1995-01-26 00:46:29 +000016352have_prototypes=no
Pablo Galindoba421752021-05-03 20:33:17 +010016353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
16354printf %s "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016356/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016357int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016358int
Pablo Galindoba421752021-05-03 20:33:17 +010016359main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016360{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016361return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 ;
16363 return 0;
16364}
16365_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016366if ac_fn_c_try_compile "$LINENO"
16367then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016368
Pablo Galindoba421752021-05-03 20:33:17 +010016369printf "%s\n" "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016370
Matthias Kloseb159a552010-04-25 21:00:44 +000016371 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016372fi
Pablo Galindoba421752021-05-03 20:33:17 +010016373rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
16375printf "%s\n" "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016376
Guido van Rossumda88dad1995-01-26 00:46:29 +000016377works=no
Pablo Galindoba421752021-05-03 20:33:17 +010016378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
16379printf %s "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016381/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016382
16383#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016384int foo(int x, ...) {
16385 va_list va;
16386 va_start(va, x);
16387 va_arg(va, int);
16388 va_arg(va, char *);
16389 va_arg(va, double);
16390 return 0;
16391}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016392
Martin v. Löwis11437992002-04-12 09:54:03 +000016393int
Pablo Galindoba421752021-05-03 20:33:17 +010016394main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016395{
Guido van Rossum90eea071996-08-30 20:58:57 +000016396return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 ;
16398 return 0;
16399}
16400_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016401if ac_fn_c_try_compile "$LINENO"
16402then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016403
16404
Pablo Galindoba421752021-05-03 20:33:17 +010016405printf "%s\n" "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016406
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016407 works=yes
16408
Guido van Rossum627b2d71993-12-24 10:39:16 +000016409fi
Pablo Galindoba421752021-05-03 20:33:17 +010016410rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16412printf "%s\n" "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016413
Martin v. Löwisd6320502004-08-12 13:45:08 +000016414# check for socketpair
Pablo Galindoba421752021-05-03 20:33:17 +010016415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
16416printf %s "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016418/* end confdefs.h. */
16419
16420#include <sys/types.h>
16421#include <sys/socket.h>
16422
16423int
Pablo Galindoba421752021-05-03 20:33:17 +010016424main (void)
Martin v. Löwisd6320502004-08-12 13:45:08 +000016425{
16426void *x=socketpair
16427 ;
16428 return 0;
16429}
16430_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016431if ac_fn_c_try_compile "$LINENO"
16432then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000016433
Pablo Galindoba421752021-05-03 20:33:17 +010016434printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000016435
Pablo Galindoba421752021-05-03 20:33:17 +010016436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16437printf "%s\n" "yes" >&6; }
16438else $as_nop
16439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16440printf "%s\n" "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000016441
16442fi
Pablo Galindoba421752021-05-03 20:33:17 +010016443rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016444
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016445# check if sockaddr has sa_len member
Pablo Galindoba421752021-05-03 20:33:17 +010016446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
16447printf %s "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016449/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016450#include <sys/types.h>
16451#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016452int
Pablo Galindoba421752021-05-03 20:33:17 +010016453main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016454{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016455struct sockaddr x;
16456x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016457 ;
16458 return 0;
16459}
16460_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016461if ac_fn_c_try_compile "$LINENO"
16462then :
16463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16464printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016465
Pablo Galindoba421752021-05-03 20:33:17 +010016466printf "%s\n" "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016467
Pablo Galindoba421752021-05-03 20:33:17 +010016468else $as_nop
16469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16470printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016471
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016472fi
Pablo Galindoba421752021-05-03 20:33:17 +010016473rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016475# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016476
16477
Matthias Kloseb9621712010-04-24 17:59:49 +000016478ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Pablo Galindoba421752021-05-03 20:33:17 +010016479if test "x$ac_cv_func_gethostbyname_r" = xyes
16480then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016481
Pablo Galindoba421752021-05-03 20:33:17 +010016482 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016483
Pablo Galindoba421752021-05-03 20:33:17 +010016484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
16485printf %s "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016486 OLD_CFLAGS=$CFLAGS
16487 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016489/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016490
16491# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016492
Martin v. Löwis11437992002-04-12 09:54:03 +000016493int
Pablo Galindoba421752021-05-03 20:33:17 +010016494main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016495{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016496
16497 char *name;
16498 struct hostent *he, *res;
16499 char buffer[2048];
16500 int buflen = 2048;
16501 int h_errnop;
16502
16503 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016504
16505 ;
16506 return 0;
16507}
16508_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016509if ac_fn_c_try_compile "$LINENO"
16510then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016511
Pablo Galindoba421752021-05-03 20:33:17 +010016512 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016513
Martin v. Löwis11437992002-04-12 09:54:03 +000016514
Pablo Galindoba421752021-05-03 20:33:17 +010016515printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016516
Pablo Galindoba421752021-05-03 20:33:17 +010016517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16518printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016519
Pablo Galindoba421752021-05-03 20:33:17 +010016520else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016521
Pablo Galindoba421752021-05-03 20:33:17 +010016522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16523printf "%s\n" "no" >&6; }
16524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
16525printf %s "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016527/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016529# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531int
Pablo Galindoba421752021-05-03 20:33:17 +010016532main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016533{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016534
16535 char *name;
16536 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000016537 char buffer[2048];
16538 int buflen = 2048;
16539 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016540
Matthias Kloseb159a552010-04-25 21:00:44 +000016541 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016542
16543 ;
16544 return 0;
16545}
16546_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016547if ac_fn_c_try_compile "$LINENO"
16548then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016549
Pablo Galindoba421752021-05-03 20:33:17 +010016550 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016551
Martin v. Löwis11437992002-04-12 09:54:03 +000016552
Pablo Galindoba421752021-05-03 20:33:17 +010016553printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016554
Pablo Galindoba421752021-05-03 20:33:17 +010016555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16556printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016557
Pablo Galindoba421752021-05-03 20:33:17 +010016558else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016559
Pablo Galindoba421752021-05-03 20:33:17 +010016560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16561printf "%s\n" "no" >&6; }
16562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
16563printf %s "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16565/* end confdefs.h. */
16566
16567# include <netdb.h>
16568
16569int
Pablo Galindoba421752021-05-03 20:33:17 +010016570main (void)
Matthias Kloseb159a552010-04-25 21:00:44 +000016571{
16572
16573 char *name;
16574 struct hostent *he;
16575 struct hostent_data data;
16576
16577 (void) gethostbyname_r(name, he, &data);
16578
16579 ;
16580 return 0;
16581}
16582_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016583if ac_fn_c_try_compile "$LINENO"
16584then :
Matthias Kloseb159a552010-04-25 21:00:44 +000016585
Pablo Galindoba421752021-05-03 20:33:17 +010016586 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016587
16588
Pablo Galindoba421752021-05-03 20:33:17 +010016589printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016590
Pablo Galindoba421752021-05-03 20:33:17 +010016591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16592printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016593
Pablo Galindoba421752021-05-03 20:33:17 +010016594else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000016595
Pablo Galindoba421752021-05-03 20:33:17 +010016596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16597printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016598
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016599fi
Pablo Galindoba421752021-05-03 20:33:17 +010016600rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016601
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016602fi
Pablo Galindoba421752021-05-03 20:33:17 +010016603rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016604
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016605fi
Pablo Galindoba421752021-05-03 20:33:17 +010016606rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016607 CFLAGS=$OLD_CFLAGS
16608
Pablo Galindoba421752021-05-03 20:33:17 +010016609else $as_nop
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016610
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Pablo Galindoba421752021-05-03 20:33:17 +010016612if test "x$ac_cv_func_gethostbyname" = xyes
16613then :
16614 printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016616fi
16617
Michael W. Hudson54241132001-12-07 15:38:26 +000016618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016619fi
16620
Michael W. Hudson54241132001-12-07 15:38:26 +000016621
16622
16623
16624
16625
16626
Guido van Rossum627b2d71993-12-24 10:39:16 +000016627# checks for system services
16628# (none yet)
16629
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016630# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000016631ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Pablo Galindoba421752021-05-03 20:33:17 +010016632if test "x$ac_cv_func___fpu_control" = xyes
16633then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016634
Pablo Galindoba421752021-05-03 20:33:17 +010016635else $as_nop
16636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
16637printf %s "checking for __fpu_control in -lieee... " >&6; }
16638if test ${ac_cv_lib_ieee___fpu_control+y}
16639then :
16640 printf %s "(cached) " >&6
16641else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016643LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647/* Override any GCC internal prototype to avoid an error.
16648 Use char because int might match the return type of a GCC
16649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016650char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016651int
Pablo Galindoba421752021-05-03 20:33:17 +010016652main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 ;
16656 return 0;
16657}
16658_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016659if ac_fn_c_try_link "$LINENO"
16660then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 ac_cv_lib_ieee___fpu_control=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016662else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016663 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016664fi
Pablo Galindoba421752021-05-03 20:33:17 +010016665rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000016666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016667LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016668fi
Pablo Galindoba421752021-05-03 20:33:17 +010016669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
16670printf "%s\n" "$ac_cv_lib_ieee___fpu_control" >&6; }
16671if test "x$ac_cv_lib_ieee___fpu_control" = xyes
16672then :
16673 printf "%s\n" "#define HAVE_LIBIEEE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016674
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016675 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016676
Guido van Rossum627b2d71993-12-24 10:39:16 +000016677fi
16678
Michael W. Hudson54241132001-12-07 15:38:26 +000016679
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016680fi
16681
Michael W. Hudson54241132001-12-07 15:38:26 +000016682
Guido van Rossum7f43da71994-08-01 12:15:30 +000016683# check for --with-libm=...
16684
Guido van Rossum563e7081996-09-10 18:20:48 +000016685case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016686Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016687*) LIBM=-lm
16688esac
Pablo Galindoba421752021-05-03 20:33:17 +010016689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
16690printf %s "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692# Check whether --with-libm was given.
Pablo Galindoba421752021-05-03 20:33:17 +010016693if test ${with_libm+y}
16694then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000016696if test "$withval" = no
16697then LIBM=
Pablo Galindoba421752021-05-03 20:33:17 +010016698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
16699printf "%s\n" "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016700elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016701then LIBM=$withval
Pablo Galindoba421752021-05-03 20:33:17 +010016702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
16703printf "%s\n" "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016704else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016705fi
Pablo Galindoba421752021-05-03 20:33:17 +010016706else $as_nop
16707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
16708printf "%s\n" "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709fi
16710
Guido van Rossum7f43da71994-08-01 12:15:30 +000016711
16712# check for --with-libc=...
16713
Pablo Galindoba421752021-05-03 20:33:17 +010016714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
16715printf %s "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717# Check whether --with-libc was given.
Pablo Galindoba421752021-05-03 20:33:17 +010016718if test ${with_libc+y}
16719then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000016721if test "$withval" = no
16722then LIBC=
Pablo Galindoba421752021-05-03 20:33:17 +010016723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
16724printf "%s\n" "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016725elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016726then LIBC=$withval
Pablo Galindoba421752021-05-03 20:33:17 +010016727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
16728printf "%s\n" "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016729else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016730fi
Pablo Galindoba421752021-05-03 20:33:17 +010016731else $as_nop
16732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
16733printf "%s\n" "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734fi
16735
Guido van Rossum7f43da71994-08-01 12:15:30 +000016736
Stefan Krah1919b7e2012-03-21 18:25:23 +010016737# **************************************
16738# * Check for gcc x64 inline assembler *
16739# **************************************
16740
Pablo Galindoba421752021-05-03 20:33:17 +010016741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
16742printf %s "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16744/* end confdefs.h. */
16745
16746int
Pablo Galindoba421752021-05-03 20:33:17 +010016747main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010016748{
16749
16750 __asm__ __volatile__ ("movq %rcx, %rax");
16751
16752 ;
16753 return 0;
16754}
16755_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016756if ac_fn_c_try_link "$LINENO"
16757then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010016758 have_gcc_asm_for_x64=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016759else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010016760 have_gcc_asm_for_x64=no
16761fi
Pablo Galindoba421752021-05-03 20:33:17 +010016762rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016763 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +010016764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
16765printf "%s\n" "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016766if test "$have_gcc_asm_for_x64" = yes
16767then
16768
Pablo Galindoba421752021-05-03 20:33:17 +010016769printf "%s\n" "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010016770
16771fi
16772
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016773# **************************************************
16774# * Check for various properties of floating point *
16775# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016776
Pablo Galindoba421752021-05-03 20:33:17 +010016777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
16778printf %s "checking whether float word ordering is bigendian... " >&6; }
16779if test ${ax_cv_c_float_words_bigendian+y}
16780then :
16781 printf %s "(cached) " >&6
16782else $as_nop
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016783
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016784
16785ax_cv_c_float_words_bigendian=unknown
16786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016787/* end confdefs.h. */
16788
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016789
16790double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
16791
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016792
16793_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016794if ac_fn_c_try_compile "$LINENO"
16795then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016796
16797
Christian Heimes5d6e8c12021-03-27 14:44:04 +010016798if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016799 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016800fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010016801if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016802 if test "$ax_cv_c_float_words_bigendian" = unknown; then
16803 ax_cv_c_float_words_bigendian=no
16804 else
16805 ax_cv_c_float_words_bigendian=unknown
16806 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016807fi
16808
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016809
16810fi
Pablo Galindoba421752021-05-03 20:33:17 +010016811rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016812fi
Pablo Galindoba421752021-05-03 20:33:17 +010016813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
16814printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016815
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016816case $ax_cv_c_float_words_bigendian in
16817 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016818
Pablo Galindoba421752021-05-03 20:33:17 +010016819printf "%s\n" "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016820 ;;
16821 no)
16822 ;;
16823 *)
16824 as_fn_error $? "
16825
16826Unknown float word ordering. You need to manually preset
16827ax_cv_c_float_words_bigendian=no (or yes) according to your system.
16828
16829 " "$LINENO" 5 ;;
16830esac
16831
16832
16833if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016834then
16835
Pablo Galindoba421752021-05-03 20:33:17 +010016836printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016837
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016838elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016839then
16840
Pablo Galindoba421752021-05-03 20:33:17 +010016841printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016842
16843else
16844 # Some ARM platforms use a mixed-endian representation for doubles.
16845 # While Python doesn't currently have full support for these platforms
16846 # (see e.g., issue 1762561), we can at least make sure that float <-> string
16847 # conversions work.
16848 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
16849 # or little, then it must be this?
16850
Pablo Galindoba421752021-05-03 20:33:17 +010016851printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016852
16853fi
16854
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016855# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000016856# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016857# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000016858# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016859# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000016860# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016861
16862# This inline assembler syntax may also work for suncc and icc,
16863# so we try it on all platforms.
16864
Pablo Galindoba421752021-05-03 20:33:17 +010016865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
16866printf %s "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016868/* end confdefs.h. */
16869
16870int
Pablo Galindoba421752021-05-03 20:33:17 +010016871main (void)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016872{
16873
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016874 unsigned short cw;
16875 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
16876 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016877
16878 ;
16879 return 0;
16880}
16881_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016882if ac_fn_c_try_link "$LINENO"
16883then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016884 have_gcc_asm_for_x87=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016885else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016886 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016887fi
Pablo Galindoba421752021-05-03 20:33:17 +010016888rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016889 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +010016890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
16891printf "%s\n" "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016892if test "$have_gcc_asm_for_x87" = yes
16893then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016894
Pablo Galindoba421752021-05-03 20:33:17 +010016895printf "%s\n" "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016896
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016898
Pablo Galindoba421752021-05-03 20:33:17 +010016899{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
16900printf %s "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16902/* end confdefs.h. */
16903
16904int
Pablo Galindoba421752021-05-03 20:33:17 +010016905main (void)
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016906{
16907
16908 unsigned int fpcr;
16909 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
16910 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
16911
16912 ;
16913 return 0;
16914}
16915_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016916if ac_fn_c_try_link "$LINENO"
16917then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016918 have_gcc_asm_for_mc68881=yes
Pablo Galindoba421752021-05-03 20:33:17 +010016919else $as_nop
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016920 have_gcc_asm_for_mc68881=no
16921fi
Pablo Galindoba421752021-05-03 20:33:17 +010016922rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016923 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +010016924{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
16925printf "%s\n" "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016926if test "$have_gcc_asm_for_mc68881" = yes
16927then
16928
Pablo Galindoba421752021-05-03 20:33:17 +010016929printf "%s\n" "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016930
16931fi
16932
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016933# Detect whether system arithmetic is subject to x87-style double
16934# rounding issues. The result of this test has little meaning on non
16935# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
16936# mode is round-to-nearest and double rounding issues are present, and
16937# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Pablo Galindoba421752021-05-03 20:33:17 +010016938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
16939printf %s "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016940# $BASECFLAGS may affect the result
16941ac_save_cc="$CC"
16942CC="$CC $BASECFLAGS"
Pablo Galindoba421752021-05-03 20:33:17 +010016943if test "$cross_compiling" = yes
16944then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016945 ac_cv_x87_double_rounding=no
Pablo Galindoba421752021-05-03 20:33:17 +010016946else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016948/* end confdefs.h. */
16949
16950#include <stdlib.h>
16951#include <math.h>
16952int main() {
16953 volatile double x, y, z;
16954 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
16955 x = 0.99999999999999989; /* 1-2**-53 */
16956 y = 1./x;
16957 if (y != 1.)
16958 exit(0);
16959 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
16960 x = 1e16;
16961 y = 2.99999;
16962 z = x + y;
16963 if (z != 1e16+4.)
16964 exit(0);
16965 /* both tests show evidence of double rounding */
16966 exit(1);
16967}
16968
16969_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010016970if ac_fn_c_try_run "$LINENO"
16971then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016972 ac_cv_x87_double_rounding=no
Pablo Galindoba421752021-05-03 20:33:17 +010016973else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016974 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016978fi
16979
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016980CC="$ac_save_cc"
Pablo Galindoba421752021-05-03 20:33:17 +010016981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
16982printf "%s\n" "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016983if test "$ac_cv_x87_double_rounding" = yes
16984then
16985
Pablo Galindoba421752021-05-03 20:33:17 +010016986printf "%s\n" "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016987
16988fi
16989
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016990# ************************************
16991# * Check for mathematical functions *
16992# ************************************
16993
16994LIBS_SAVE=$LIBS
16995LIBS="$LIBS $LIBM"
16996
Pablo Galindoba421752021-05-03 20:33:17 +010016997ac_fn_c_check_func "$LINENO" "acosh" "ac_cv_func_acosh"
16998if test "x$ac_cv_func_acosh" = xyes
16999then :
17000 printf "%s\n" "#define HAVE_ACOSH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017001
17002fi
Pablo Galindoba421752021-05-03 20:33:17 +010017003ac_fn_c_check_func "$LINENO" "asinh" "ac_cv_func_asinh"
17004if test "x$ac_cv_func_asinh" = xyes
17005then :
17006 printf "%s\n" "#define HAVE_ASINH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017007
17008fi
Pablo Galindoba421752021-05-03 20:33:17 +010017009ac_fn_c_check_func "$LINENO" "atanh" "ac_cv_func_atanh"
17010if test "x$ac_cv_func_atanh" = xyes
17011then :
17012 printf "%s\n" "#define HAVE_ATANH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017013
Pablo Galindoba421752021-05-03 20:33:17 +010017014fi
17015ac_fn_c_check_func "$LINENO" "copysign" "ac_cv_func_copysign"
17016if test "x$ac_cv_func_copysign" = xyes
17017then :
17018 printf "%s\n" "#define HAVE_COPYSIGN 1" >>confdefs.h
17019
17020fi
17021ac_fn_c_check_func "$LINENO" "erf" "ac_cv_func_erf"
17022if test "x$ac_cv_func_erf" = xyes
17023then :
17024 printf "%s\n" "#define HAVE_ERF 1" >>confdefs.h
17025
17026fi
17027ac_fn_c_check_func "$LINENO" "erfc" "ac_cv_func_erfc"
17028if test "x$ac_cv_func_erfc" = xyes
17029then :
17030 printf "%s\n" "#define HAVE_ERFC 1" >>confdefs.h
17031
17032fi
17033ac_fn_c_check_func "$LINENO" "expm1" "ac_cv_func_expm1"
17034if test "x$ac_cv_func_expm1" = xyes
17035then :
17036 printf "%s\n" "#define HAVE_EXPM1 1" >>confdefs.h
17037
17038fi
17039ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
17040if test "x$ac_cv_func_finite" = xyes
17041then :
17042 printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h
17043
17044fi
17045ac_fn_c_check_func "$LINENO" "gamma" "ac_cv_func_gamma"
17046if test "x$ac_cv_func_gamma" = xyes
17047then :
17048 printf "%s\n" "#define HAVE_GAMMA 1" >>confdefs.h
17049
17050fi
17051
17052ac_fn_c_check_func "$LINENO" "hypot" "ac_cv_func_hypot"
17053if test "x$ac_cv_func_hypot" = xyes
17054then :
17055 printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h
17056
17057fi
17058ac_fn_c_check_func "$LINENO" "lgamma" "ac_cv_func_lgamma"
17059if test "x$ac_cv_func_lgamma" = xyes
17060then :
17061 printf "%s\n" "#define HAVE_LGAMMA 1" >>confdefs.h
17062
17063fi
17064ac_fn_c_check_func "$LINENO" "log1p" "ac_cv_func_log1p"
17065if test "x$ac_cv_func_log1p" = xyes
17066then :
17067 printf "%s\n" "#define HAVE_LOG1P 1" >>confdefs.h
17068
17069fi
17070ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2"
17071if test "x$ac_cv_func_log2" = xyes
17072then :
17073 printf "%s\n" "#define HAVE_LOG2 1" >>confdefs.h
17074
17075fi
17076ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round"
17077if test "x$ac_cv_func_round" = xyes
17078then :
17079 printf "%s\n" "#define HAVE_ROUND 1" >>confdefs.h
17080
17081fi
17082ac_fn_c_check_func "$LINENO" "tgamma" "ac_cv_func_tgamma"
17083if test "x$ac_cv_func_tgamma" = xyes
17084then :
17085 printf "%s\n" "#define HAVE_TGAMMA 1" >>confdefs.h
17086
17087fi
17088
17089ac_fn_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
17090" "$ac_c_undeclared_builtin_options" "CFLAGS"
17091if test "x$ac_cv_have_decl_isinf" = xyes
17092then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017093 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017094else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017095 ac_have_decl=0
17096fi
Pablo Galindoba421752021-05-03 20:33:17 +010017097printf "%s\n" "#define HAVE_DECL_ISINF $ac_have_decl" >>confdefs.h
17098ac_fn_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
17099" "$ac_c_undeclared_builtin_options" "CFLAGS"
17100if test "x$ac_cv_have_decl_isnan" = xyes
17101then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017102 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017103else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017104 ac_have_decl=0
17105fi
Pablo Galindoba421752021-05-03 20:33:17 +010017106printf "%s\n" "#define HAVE_DECL_ISNAN $ac_have_decl" >>confdefs.h
17107ac_fn_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
17108" "$ac_c_undeclared_builtin_options" "CFLAGS"
17109if test "x$ac_cv_have_decl_isfinite" = xyes
17110then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017111 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017112else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017113 ac_have_decl=0
17114fi
Pablo Galindoba421752021-05-03 20:33:17 +010017115printf "%s\n" "#define HAVE_DECL_ISFINITE $ac_have_decl" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017116
17117
Mark Dickinsona614f042009-11-28 12:48:43 +000017118# For multiprocessing module, check that sem_open
17119# actually works. For FreeBSD versions <= 7.2,
17120# the kernel module that provides POSIX semaphores
17121# isn't loaded by default, so an attempt to call
17122# sem_open results in a 'Signal 12' error.
Pablo Galindoba421752021-05-03 20:33:17 +010017123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
17124printf %s "checking whether POSIX semaphores are enabled... " >&6; }
17125if test ${ac_cv_posix_semaphores_enabled+y}
17126then :
17127 printf %s "(cached) " >&6
17128else $as_nop
17129 if test "$cross_compiling" = yes
17130then :
Mark Dickinsona614f042009-11-28 12:48:43 +000017131 ac_cv_posix_semaphores_enabled=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017132else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000017134/* end confdefs.h. */
17135
17136#include <unistd.h>
17137#include <fcntl.h>
17138#include <stdio.h>
17139#include <semaphore.h>
17140#include <sys/stat.h>
17141
17142int main(void) {
17143 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
17144 if (a == SEM_FAILED) {
17145 perror("sem_open");
17146 return 1;
17147 }
17148 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017149 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000017150 return 0;
17151}
17152
17153_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017154if ac_fn_c_try_run "$LINENO"
17155then :
Mark Dickinsona614f042009-11-28 12:48:43 +000017156 ac_cv_posix_semaphores_enabled=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017157else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017158 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000017159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17161 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000017162fi
17163
17164
Mark Dickinsona614f042009-11-28 12:48:43 +000017165fi
17166
Pablo Galindoba421752021-05-03 20:33:17 +010017167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
17168printf "%s\n" "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000017169if test $ac_cv_posix_semaphores_enabled = no
17170then
17171
Pablo Galindoba421752021-05-03 20:33:17 +010017172printf "%s\n" "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000017173
17174fi
17175
Mark Dickinson10683072009-04-18 21:18:19 +000017176# Multiprocessing check for broken sem_getvalue
Pablo Galindoba421752021-05-03 20:33:17 +010017177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
17178printf %s "checking for broken sem_getvalue... " >&6; }
17179if test ${ac_cv_broken_sem_getvalue+y}
17180then :
17181 printf %s "(cached) " >&6
17182else $as_nop
17183 if test "$cross_compiling" = yes
17184then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017185 ac_cv_broken_sem_getvalue=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017186else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000017188/* end confdefs.h. */
17189
17190#include <unistd.h>
17191#include <fcntl.h>
17192#include <stdio.h>
17193#include <semaphore.h>
17194#include <sys/stat.h>
17195
17196int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000017197 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000017198 int count;
17199 int res;
17200 if(a==SEM_FAILED){
17201 perror("sem_open");
17202 return 1;
17203
17204 }
17205 res = sem_getvalue(a, &count);
17206 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017207 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000017208 return res==-1 ? 1 : 0;
17209}
17210
Mark Dickinson10683072009-04-18 21:18:19 +000017211_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017212if ac_fn_c_try_run "$LINENO"
17213then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017214 ac_cv_broken_sem_getvalue=no
Pablo Galindoba421752021-05-03 20:33:17 +010017215else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017216 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17219 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017220fi
17221
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017222
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017223fi
17224
Pablo Galindoba421752021-05-03 20:33:17 +010017225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
17226printf "%s\n" "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017227if test $ac_cv_broken_sem_getvalue = yes
17228then
17229
Pablo Galindoba421752021-05-03 20:33:17 +010017230printf "%s\n" "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017231
17232fi
17233
Pablo Galindoba421752021-05-03 20:33:17 +010017234ac_fn_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
17235" "$ac_c_undeclared_builtin_options" "CFLAGS"
17236if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes
17237then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017238 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017239else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017240 ac_have_decl=0
17241fi
Pablo Galindoba421752021-05-03 20:33:17 +010017242printf "%s\n" "#define HAVE_DECL_RTLD_LAZY $ac_have_decl" >>confdefs.h
17243ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
17244" "$ac_c_undeclared_builtin_options" "CFLAGS"
17245if test "x$ac_cv_have_decl_RTLD_NOW" = xyes
17246then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017247 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017248else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017249 ac_have_decl=0
17250fi
Pablo Galindoba421752021-05-03 20:33:17 +010017251printf "%s\n" "#define HAVE_DECL_RTLD_NOW $ac_have_decl" >>confdefs.h
17252ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
17253" "$ac_c_undeclared_builtin_options" "CFLAGS"
17254if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes
17255then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017256 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017257else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017258 ac_have_decl=0
17259fi
Pablo Galindoba421752021-05-03 20:33:17 +010017260printf "%s\n" "#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl" >>confdefs.h
17261ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
17262" "$ac_c_undeclared_builtin_options" "CFLAGS"
17263if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes
17264then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017265 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017266else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017267 ac_have_decl=0
17268fi
Pablo Galindoba421752021-05-03 20:33:17 +010017269printf "%s\n" "#define HAVE_DECL_RTLD_LOCAL $ac_have_decl" >>confdefs.h
17270ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
17271" "$ac_c_undeclared_builtin_options" "CFLAGS"
17272if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes
17273then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017274 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017275else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017276 ac_have_decl=0
17277fi
Pablo Galindoba421752021-05-03 20:33:17 +010017278printf "%s\n" "#define HAVE_DECL_RTLD_NODELETE $ac_have_decl" >>confdefs.h
17279ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
17280" "$ac_c_undeclared_builtin_options" "CFLAGS"
17281if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes
17282then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017283 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017284else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017285 ac_have_decl=0
17286fi
Pablo Galindoba421752021-05-03 20:33:17 +010017287printf "%s\n" "#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl" >>confdefs.h
17288ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
17289" "$ac_c_undeclared_builtin_options" "CFLAGS"
17290if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes
17291then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017292 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017293else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017294 ac_have_decl=0
17295fi
Pablo Galindoba421752021-05-03 20:33:17 +010017296printf "%s\n" "#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl" >>confdefs.h
17297ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
17298" "$ac_c_undeclared_builtin_options" "CFLAGS"
17299if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes
17300then :
Michael Feltc5ae1692017-12-19 13:58:49 +010017301 ac_have_decl=1
Pablo Galindoba421752021-05-03 20:33:17 +010017302else $as_nop
Michael Feltc5ae1692017-12-19 13:58:49 +010017303 ac_have_decl=0
17304fi
Pablo Galindoba421752021-05-03 20:33:17 +010017305printf "%s\n" "#define HAVE_DECL_RTLD_MEMBER $ac_have_decl" >>confdefs.h
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017306
17307
Mark Dickinsonbd792642009-03-18 20:06:12 +000017308# determine what size digit to use for Python's longs
Pablo Galindoba421752021-05-03 20:33:17 +010017309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
17310printf %s "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017311# Check whether --enable-big-digits was given.
Pablo Galindoba421752021-05-03 20:33:17 +010017312if test ${enable_big_digits+y}
17313then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000017314 enableval=$enable_big_digits; case $enable_big_digits in
17315yes)
17316 enable_big_digits=30 ;;
17317no)
17318 enable_big_digits=15 ;;
1731915|30)
17320 ;;
17321*)
Victor Stinnere0be4232011-10-25 13:06:09 +020017322 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 +000017323esac
Pablo Galindoba421752021-05-03 20:33:17 +010017324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
17325printf "%s\n" "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017326
Pablo Galindoba421752021-05-03 20:33:17 +010017327printf "%s\n" "#define PYLONG_BITS_IN_DIGIT $enable_big_digits" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +000017328
17329
Pablo Galindoba421752021-05-03 20:33:17 +010017330else $as_nop
17331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
17332printf "%s\n" "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017333fi
17334
17335
Guido van Rossumef2255b2000-03-10 22:30:29 +000017336# check for wchar.h
Pablo Galindoba421752021-05-03 20:33:17 +010017337ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
17338if test "x$ac_cv_header_wchar_h" = xyes
17339then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017340
17341
Pablo Galindoba421752021-05-03 20:33:17 +010017342printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017343
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017344 wchar_h="yes"
17345
Pablo Galindoba421752021-05-03 20:33:17 +010017346else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017348
17349fi
17350
Michael W. Hudson54241132001-12-07 15:38:26 +000017351
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017352# determine wchar_t size
17353if test "$wchar_h" = yes
17354then
Matthias Kloseb9621712010-04-24 17:59:49 +000017355 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17357# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17358# This bug is HP SR number 8606223364.
Pablo Galindoba421752021-05-03 20:33:17 +010017359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
17360printf %s "checking size of wchar_t... " >&6; }
17361if test ${ac_cv_sizeof_wchar_t+y}
17362then :
17363 printf %s "(cached) " >&6
17364else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017365 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
Pablo Galindoba421752021-05-03 20:33:17 +010017366"
17367then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017368
Pablo Galindoba421752021-05-03 20:33:17 +010017369else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017370 if test "$ac_cv_type_wchar_t" = yes; then
Pablo Galindoba421752021-05-03 20:33:17 +010017371 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17372printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017373as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020017374See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375 else
17376 ac_cv_sizeof_wchar_t=0
17377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017379
Martin v. Löwis11437992002-04-12 09:54:03 +000017380fi
Pablo Galindoba421752021-05-03 20:33:17 +010017381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
17382printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383
17384
17385
Pablo Galindoba421752021-05-03 20:33:17 +010017386printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017387
Michael W. Hudson54241132001-12-07 15:38:26 +000017388
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017389fi
17390
Pablo Galindoba421752021-05-03 20:33:17 +010017391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
17392printf %s "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017393have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000017394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017395/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017396
17397#include <tcl.h>
17398#if TCL_UTF_MAX != 6
17399# error "NOT UCS4_TCL"
17400#endif
17401int
Pablo Galindoba421752021-05-03 20:33:17 +010017402main (void)
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017403{
17404
17405 ;
17406 return 0;
17407}
17408_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017409if ac_fn_c_try_compile "$LINENO"
17410then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017411
17412
Pablo Galindoba421752021-05-03 20:33:17 +010017413printf "%s\n" "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017414
17415 have_ucs4_tcl=yes
17416
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017417fi
Pablo Galindoba421752021-05-03 20:33:17 +010017418rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
17420printf "%s\n" "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017421
Skip Montanaro6dead952003-09-25 14:50:04 +000017422# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017423if test "$wchar_h" = yes
17424then
17425 # check whether wchar_t is signed or not
Pablo Galindoba421752021-05-03 20:33:17 +010017426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
17427printf %s "checking whether wchar_t is signed... " >&6; }
17428 if test ${ac_cv_wchar_t_signed+y}
17429then :
17430 printf %s "(cached) " >&6
17431else $as_nop
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017432
Pablo Galindoba421752021-05-03 20:33:17 +010017433 if test "$cross_compiling" = yes
17434then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017435 ac_cv_wchar_t_signed=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017436else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017438/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017439
17440 #include <wchar.h>
17441 int main()
17442 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017443 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110017444 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017445 }
17446
17447_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017448if ac_fn_c_try_run "$LINENO"
17449then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017450 ac_cv_wchar_t_signed=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017451else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017452 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017456fi
17457
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017458fi
17459
Pablo Galindoba421752021-05-03 20:33:17 +010017460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
17461printf "%s\n" "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462fi
17463
Pablo Galindoba421752021-05-03 20:33:17 +010017464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
17465printf %s "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017466# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020017467if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000017468 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000017469then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017470
Pablo Galindoba421752021-05-03 20:33:17 +010017471printf "%s\n" "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017472
Pablo Galindoba421752021-05-03 20:33:17 +010017473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17474printf "%s\n" "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017475else
Pablo Galindoba421752021-05-03 20:33:17 +010017476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17477printf "%s\n" "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017478fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017479
Jakub Kulík9032cf52021-04-30 15:21:42 +020017480case $ac_sys_system/$ac_sys_release in
17481SunOS/*)
17482 if test -f /etc/os-release; then
17483 OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
17484 if test "x$OS_NAME" = "xOracle Solaris"; then
17485 # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
17486 # non-Unicode locales is not Unicode and hence cannot be used directly.
17487 # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html
17488
Pablo Galindoba421752021-05-03 20:33:17 +010017489printf "%s\n" "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h
Jakub Kulík9032cf52021-04-30 15:21:42 +020017490
17491 fi
17492 fi
17493 ;;
17494esac
17495
Guido van Rossumef2255b2000-03-10 22:30:29 +000017496# check for endianness
Pablo Galindoba421752021-05-03 20:33:17 +010017497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17498printf %s "checking whether byte ordering is bigendian... " >&6; }
17499if test ${ac_cv_c_bigendian+y}
17500then :
17501 printf %s "(cached) " >&6
17502else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017503 ac_cv_c_bigendian=unknown
17504 # See if we're dealing with a universal compiler.
17505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17506/* end confdefs.h. */
17507#ifndef __APPLE_CC__
17508 not a universal capable compiler
17509 #endif
17510 typedef int dummy;
17511
Skip Montanaro6dead952003-09-25 14:50:04 +000017512_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017513if ac_fn_c_try_compile "$LINENO"
17514then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017515
17516 # Check for potential -arch flags. It is not universal unless
17517 # there are at least two -arch flags with different values.
17518 ac_arch=
17519 ac_prev=
17520 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17521 if test -n "$ac_prev"; then
17522 case $ac_word in
17523 i?86 | x86_64 | ppc | ppc64)
17524 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17525 ac_arch=$ac_word
17526 else
17527 ac_cv_c_bigendian=universal
17528 break
17529 fi
17530 ;;
17531 esac
17532 ac_prev=
17533 elif test "x$ac_word" = "x-arch"; then
17534 ac_prev=arch
17535 fi
17536 done
17537fi
Pablo Galindoba421752021-05-03 20:33:17 +010017538rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017539 if test $ac_cv_c_bigendian = unknown; then
17540 # See if sys/param.h defines the BYTE_ORDER macro.
17541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017542/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017543#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017544 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017545
Martin v. Löwis11437992002-04-12 09:54:03 +000017546int
Pablo Galindoba421752021-05-03 20:33:17 +010017547main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017548{
Matthias Kloseb9621712010-04-24 17:59:49 +000017549#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17550 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17551 && LITTLE_ENDIAN)
17552 bogus endian macros
17553 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017554
17555 ;
17556 return 0;
17557}
17558_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017559if ac_fn_c_try_compile "$LINENO"
17560then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017561 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000017562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017563/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017564#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017565 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017566
Martin v. Löwis11437992002-04-12 09:54:03 +000017567int
Pablo Galindoba421752021-05-03 20:33:17 +010017568main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017569{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017570#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000017571 not big endian
17572 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017573
17574 ;
17575 return 0;
17576}
17577_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017578if ac_fn_c_try_compile "$LINENO"
17579then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017580 ac_cv_c_bigendian=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017581else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017582 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017583fi
Pablo Galindoba421752021-05-03 20:33:17 +010017584rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017585fi
Pablo Galindoba421752021-05-03 20:33:17 +010017586rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017587 fi
17588 if test $ac_cv_c_bigendian = unknown; then
17589 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017591/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017592#include <limits.h>
17593
Martin v. Löwis11437992002-04-12 09:54:03 +000017594int
Pablo Galindoba421752021-05-03 20:33:17 +010017595main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017596{
Matthias Kloseb9621712010-04-24 17:59:49 +000017597#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17598 bogus endian macros
17599 #endif
17600
Martin v. Löwis11437992002-04-12 09:54:03 +000017601 ;
17602 return 0;
17603}
17604_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017605if ac_fn_c_try_compile "$LINENO"
17606then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 # It does; now see whether it defined to _BIG_ENDIAN or not.
17608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17609/* end confdefs.h. */
17610#include <limits.h>
17611
17612int
Pablo Galindoba421752021-05-03 20:33:17 +010017613main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017614{
17615#ifndef _BIG_ENDIAN
17616 not big endian
17617 #endif
17618
17619 ;
17620 return 0;
17621}
17622_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017623if ac_fn_c_try_compile "$LINENO"
17624then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 ac_cv_c_bigendian=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017626else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017627 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017628fi
Pablo Galindoba421752021-05-03 20:33:17 +010017629rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017630fi
Pablo Galindoba421752021-05-03 20:33:17 +010017631rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 fi
17633 if test $ac_cv_c_bigendian = unknown; then
17634 # Compile a test program.
Pablo Galindoba421752021-05-03 20:33:17 +010017635 if test "$cross_compiling" = yes
17636then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017637 # Try to guess by grepping values from an object file.
17638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17639/* end confdefs.h. */
Pablo Galindoba421752021-05-03 20:33:17 +010017640unsigned short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Pablo Galindoba421752021-05-03 20:33:17 +010017642 unsigned short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017643 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17644 int use_ascii (int i) {
17645 return ascii_mm[i] + ascii_ii[i];
17646 }
Pablo Galindoba421752021-05-03 20:33:17 +010017647 unsigned short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017648 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Pablo Galindoba421752021-05-03 20:33:17 +010017649 unsigned short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017650 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17651 int use_ebcdic (int i) {
17652 return ebcdic_mm[i] + ebcdic_ii[i];
17653 }
17654 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655
Matthias Kloseb9621712010-04-24 17:59:49 +000017656int
Pablo Galindoba421752021-05-03 20:33:17 +010017657main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017658{
17659return use_ascii (foo) == use_ebcdic (foo);
17660 ;
17661 return 0;
17662}
17663_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017664if ac_fn_c_try_compile "$LINENO"
17665then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17667 ac_cv_c_bigendian=yes
17668 fi
17669 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17670 if test "$ac_cv_c_bigendian" = unknown; then
17671 ac_cv_c_bigendian=no
17672 else
17673 # finding both strings is unlikely to happen, but who knows?
17674 ac_cv_c_bigendian=unknown
17675 fi
17676 fi
17677fi
Pablo Galindoba421752021-05-03 20:33:17 +010017678rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17679else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017681/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017683int
Pablo Galindoba421752021-05-03 20:33:17 +010017684main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686
Matthias Kloseb9621712010-04-24 17:59:49 +000017687 /* Are we little or big endian? From Harbison&Steele. */
17688 union
17689 {
17690 long int l;
17691 char c[sizeof (long int)];
17692 } u;
17693 u.l = 1;
17694 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695
17696 ;
17697 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017698}
Martin v. Löwis11437992002-04-12 09:54:03 +000017699_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017700if ac_fn_c_try_run "$LINENO"
17701then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017702 ac_cv_c_bigendian=no
Pablo Galindoba421752021-05-03 20:33:17 +010017703else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709
Matthias Kloseb9621712010-04-24 17:59:49 +000017710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017711fi
Pablo Galindoba421752021-05-03 20:33:17 +010017712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17713printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000017714 case $ac_cv_c_bigendian in #(
17715 yes)
Pablo Galindoba421752021-05-03 20:33:17 +010017716 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000017717;; #(
17718 no)
17719 ;; #(
17720 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017721
Pablo Galindoba421752021-05-03 20:33:17 +010017722printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017723
Matthias Kloseb9621712010-04-24 17:59:49 +000017724 ;; #(
17725 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017726 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020017727 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017728 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017729
Michael W. Hudson54241132001-12-07 15:38:26 +000017730
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017731# ABI version string for Python extension modules. This appears between the
17732# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
17733# from the following attributes which affect the ABI of this Python build (in
17734# this order):
17735#
17736# * The Python implementation (always 'cpython-' for us)
17737# * The major and minor version numbers
17738# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017739#
17740# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000017741# would get a shared library ABI version tag of 'cpython-32dmu' and shared
17742# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020017743#
17744# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
17745# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017746
Pablo Galindoba421752021-05-03 20:33:17 +010017747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
17748printf %s "checking ABIFLAGS... " >&6; }
17749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
17750printf "%s\n" "$ABIFLAGS" >&6; }
17751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
17752printf %s "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020017753SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Pablo Galindoba421752021-05-03 20:33:17 +010017754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
17755printf "%s\n" "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017756
Victor Stinner6d13e5b2019-04-26 18:56:19 +020017757# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
17758if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020017759 # Similar to SOABI but remove "d" flag from ABIFLAGS
17760
17761 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
17762
Pablo Galindoba421752021-05-03 20:33:17 +010017763printf "%s\n" "#define ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h
Victor Stinner5422e3c2019-04-26 01:40:00 +020017764
17765fi
17766
Victor Stinner52a327c2020-12-23 03:41:08 +010017767
Matti Picusa44ce6c2020-12-20 04:56:57 +020017768EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070017769
Pablo Galindoba421752021-05-03 20:33:17 +010017770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
17771printf %s "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017772LDVERSION='$(VERSION)$(ABIFLAGS)'
Pablo Galindoba421752021-05-03 20:33:17 +010017773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
17774printf "%s\n" "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017775
E. M. Brayc994c8f2019-05-24 17:33:47 +020017776# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020017777
E. M. Brayb1fc4172019-05-24 18:39:39 +020017778if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020017779 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020017780else
17781 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020017782fi
17783
doko@python.org87421192013-01-26 11:39:31 +010017784
Victor Stinner51ae31e2020-06-09 15:32:43 +020017785
17786BINLIBDEST='$(LIBDIR)/python$(VERSION)'
17787
17788
17789# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010017790# /usr/$LIDIRNAME/python$VERSION
17791
17792PLATLIBDIR="lib"
Pablo Galindoba421752021-05-03 20:33:17 +010017793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
17794printf %s "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017795
17796# Check whether --with-platlibdir was given.
Pablo Galindoba421752021-05-03 20:33:17 +010017797if test ${with_platlibdir+y}
17798then :
Victor Stinner8510f432020-03-10 09:53:09 +010017799 withval=$with_platlibdir;
17800# ignore 3 options:
17801# --with-platlibdir
17802# --with-platlibdir=
17803# --without-platlibdir
17804if test -n "$withval" -a "$withval" != yes -a "$withval" != no
17805then
Pablo Galindoba421752021-05-03 20:33:17 +010017806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17807printf "%s\n" "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017808 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020017809 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020017810else
Pablo Galindoba421752021-05-03 20:33:17 +010017811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17812printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017813fi
Pablo Galindoba421752021-05-03 20:33:17 +010017814else $as_nop
17815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17816printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017817fi
17818
17819
17820
17821
17822if test x$PLATFORM_TRIPLET = x; then
17823 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
17824else
17825 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020017826fi
doko@python.org87421192013-01-26 11:39:31 +010017827
17828
Victor Stinner75e59a92021-01-20 17:07:21 +010017829# Check for --with-wheel-pkg-dir=PATH
17830
17831WHEEL_PKG_DIR=""
Pablo Galindoba421752021-05-03 20:33:17 +010017832{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
17833printf %s "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017834
17835# Check whether --with-wheel-pkg-dir was given.
Pablo Galindoba421752021-05-03 20:33:17 +010017836if test ${with_wheel_pkg_dir+y}
17837then :
Victor Stinner75e59a92021-01-20 17:07:21 +010017838 withval=$with_wheel_pkg_dir;
17839if test -n "$withval"; then
Pablo Galindoba421752021-05-03 20:33:17 +010017840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17841printf "%s\n" "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017842 WHEEL_PKG_DIR="$withval"
17843else
Pablo Galindoba421752021-05-03 20:33:17 +010017844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17845printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017846fi
Pablo Galindoba421752021-05-03 20:33:17 +010017847else $as_nop
17848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17849printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017850fi
17851
17852
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017853# Check whether right shifting a negative integer extends the sign bit
17854# or fills with zeros (like the Cray J90, according to Tim Peters).
Pablo Galindoba421752021-05-03 20:33:17 +010017855{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
17856printf %s "checking whether right shift extends the sign bit... " >&6; }
17857if test ${ac_cv_rshift_extends_sign+y}
17858then :
17859 printf %s "(cached) " >&6
17860else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017861
Pablo Galindoba421752021-05-03 20:33:17 +010017862if test "$cross_compiling" = yes
17863then :
Guido van Rossum3065c942001-09-17 04:03:14 +000017864 ac_cv_rshift_extends_sign=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017865else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017867/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017868
17869int main()
17870{
Joshua Root674fa0a2020-12-14 07:56:34 +110017871 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017872}
17873
Martin v. Löwis11437992002-04-12 09:54:03 +000017874_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017875if ac_fn_c_try_run "$LINENO"
17876then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000017877 ac_cv_rshift_extends_sign=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017878else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017879 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000017883fi
17884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885fi
17886
Pablo Galindoba421752021-05-03 20:33:17 +010017887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
17888printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000017889if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017890then
Martin v. Löwis11437992002-04-12 09:54:03 +000017891
Pablo Galindoba421752021-05-03 20:33:17 +010017892printf "%s\n" "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017893
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017894fi
17895
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017896# check for getc_unlocked and related locking functions
Pablo Galindoba421752021-05-03 20:33:17 +010017897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
17898printf %s "checking for getc_unlocked() and friends... " >&6; }
17899if test ${ac_cv_have_getc_unlocked+y}
17900then :
17901 printf %s "(cached) " >&6
17902else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017903
Matthias Kloseb9621712010-04-24 17:59:49 +000017904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017905/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017906#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017907int
Pablo Galindoba421752021-05-03 20:33:17 +010017908main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017909{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017910
17911 FILE *f = fopen("/dev/null", "r");
17912 flockfile(f);
17913 getc_unlocked(f);
17914 funlockfile(f);
17915
Martin v. Löwis11437992002-04-12 09:54:03 +000017916 ;
17917 return 0;
17918}
17919_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017920if ac_fn_c_try_link "$LINENO"
17921then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017922 ac_cv_have_getc_unlocked=yes
Pablo Galindoba421752021-05-03 20:33:17 +010017923else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017924 ac_cv_have_getc_unlocked=no
17925fi
Pablo Galindoba421752021-05-03 20:33:17 +010017926rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017927 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929
Pablo Galindoba421752021-05-03 20:33:17 +010017930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
17931printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017932if test "$ac_cv_have_getc_unlocked" = yes
17933then
Martin v. Löwis11437992002-04-12 09:54:03 +000017934
Pablo Galindoba421752021-05-03 20:33:17 +010017935printf "%s\n" "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017936
17937fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017938
Roland Hiebere1f77692021-02-09 02:05:25 +010017939
17940# Check whether --with-readline was given.
Pablo Galindoba421752021-05-03 20:33:17 +010017941if test ${with_readline+y}
17942then :
Roland Hiebere1f77692021-02-09 02:05:25 +010017943 withval=$with_readline;
Pablo Galindoba421752021-05-03 20:33:17 +010017944else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010017945 with_readline=yes
17946fi
17947
17948
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017949# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010017950py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000017951# save the value of LIBS so we don't actually link Python with readline
17952LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017953
Roland Hiebere1f77692021-02-09 02:05:25 +010017954if test "$with_readline" != no; then
17955 case "$with_readline" in
17956 editline|edit)
17957 LIBREADLINE=edit
17958
Pablo Galindoba421752021-05-03 20:33:17 +010017959printf "%s\n" "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010017960
17961 ;;
17962 yes|readline)
17963 LIBREADLINE=readline
17964 ;;
17965 *)
17966 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
17967 ;;
17968 esac
17969
17970 # On some systems we need to link readline to a termcap compatible
17971 # library. NOTE: Keep the precedence of listed libraries synchronised
17972 # with setup.py.
Pablo Galindoba421752021-05-03 20:33:17 +010017973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
17974printf %s "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010017975 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
17976 if test -z "$py_libtermcap"; then
17977 READLINE_LIBS="-l$LIBREADLINE"
17978 else
17979 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
17980 fi
17981 LIBS="$READLINE_LIBS $LIBS_no_readline"
17982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017983/* end confdefs.h. */
17984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985/* Override any GCC internal prototype to avoid an error.
17986 Use char because int might match the return type of a GCC
17987 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017988char readline ();
17989int
Pablo Galindoba421752021-05-03 20:33:17 +010017990main (void)
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017993 ;
17994 return 0;
17995}
17996_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010017997if ac_fn_c_try_link "$LINENO"
17998then :
Gregory P. Smith18820942008-09-07 06:24:49 +000017999 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000018000fi
Pablo Galindoba421752021-05-03 20:33:17 +010018001rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010018003 if test $py_cv_lib_readline = yes; then
18004 break
18005 fi
18006 done
18007
18008 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
18009 #AC_SUBST([READLINE_LIBS])
18010 if test $py_cv_lib_readline = no; then
Pablo Galindoba421752021-05-03 20:33:17 +010018011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
18012printf "%s\n" "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010018013 else
Pablo Galindoba421752021-05-03 20:33:17 +010018014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
18015printf "%s\n" "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000018016
Pablo Galindoba421752021-05-03 20:33:17 +010018017printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000018018
Roland Hiebere1f77692021-02-09 02:05:25 +010018019 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000018020fi
18021
Roland Hiebere1f77692021-02-09 02:05:25 +010018022if test "$py_cv_lib_readline" = yes; then
18023 # check for readline 2.2
Pablo Galindoba421752021-05-03 20:33:17 +010018024 ac_fn_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018025#include <stdio.h> /* Must be first for Gnu Readline */
18026#ifdef WITH_EDITLINE
18027# include <editline/readline.h>
18028#else
18029# include <readline/readline.h>
18030#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000018031
Pablo Galindoba421752021-05-03 20:33:17 +010018032" "$ac_c_undeclared_builtin_options" "CFLAGS"
18033if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes
18034then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018035
Pablo Galindoba421752021-05-03 20:33:17 +010018036printf "%s\n" "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018037
18038fi
Pablo Galindoba421752021-05-03 20:33:17 +010018039 ac_fn_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018040#include <stdio.h> /* Must be first for Gnu Readline */
18041#ifdef WITH_EDITLINE
18042# include <editline/readline.h>
18043#else
18044# include <readline/readline.h>
18045#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000018046
Pablo Galindoba421752021-05-03 20:33:17 +010018047" "$ac_c_undeclared_builtin_options" "CFLAGS"
18048if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes
18049then :
Antoine Pitroud5131772009-10-26 19:22:14 +000018050
Pablo Galindoba421752021-05-03 20:33:17 +010018051printf "%s\n" "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000018052
18053fi
Antoine Pitroud5131772009-10-26 19:22:14 +000018054
Roland Hiebere1f77692021-02-09 02:05:25 +010018055 # check for readline 4.0
Pablo Galindoba421752021-05-03 20:33:17 +010018056 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_pre_input_hook" | $as_tr_sh`
18057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
18058printf %s "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
18059if eval test \${$as_ac_Lib+y}
18060then :
18061 printf %s "(cached) " >&6
18062else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018063 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018064LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068/* Override any GCC internal prototype to avoid an error.
18069 Use char because int might match the return type of a GCC
18070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018071char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018072int
Pablo Galindoba421752021-05-03 20:33:17 +010018073main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018076 ;
18077 return 0;
18078}
18079_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018080if ac_fn_c_try_link "$LINENO"
18081then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018082 eval "$as_ac_Lib=yes"
Pablo Galindoba421752021-05-03 20:33:17 +010018083else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018084 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000018085fi
Pablo Galindoba421752021-05-03 20:33:17 +010018086rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018088LIBS=$ac_check_lib_save_LIBS
18089fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018090eval ac_res=\$$as_ac_Lib
Pablo Galindoba421752021-05-03 20:33:17 +010018091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18092printf "%s\n" "$ac_res" >&6; }
18093if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18094then :
Michael W. Hudson54241132001-12-07 15:38:26 +000018095
Pablo Galindoba421752021-05-03 20:33:17 +010018096printf "%s\n" "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000018097
Martin v. Löwis0daad592001-09-30 21:09:59 +000018098fi
18099
Michael W. Hudson54241132001-12-07 15:38:26 +000018100
Roland Hiebere1f77692021-02-09 02:05:25 +010018101 # also in 4.0
Pablo Galindoba421752021-05-03 20:33:17 +010018102 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_display_matches_hook" | $as_tr_sh`
18103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
18104printf %s "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
18105if eval test \${$as_ac_Lib+y}
18106then :
18107 printf %s "(cached) " >&6
18108else $as_nop
Thomas Wouters89d996e2007-09-08 17:39:28 +000018109 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018110LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000018112/* end confdefs.h. */
18113
18114/* Override any GCC internal prototype to avoid an error.
18115 Use char because int might match the return type of a GCC
18116 builtin and then its argument prototype would still apply. */
Thomas Wouters89d996e2007-09-08 17:39:28 +000018117char rl_completion_display_matches_hook ();
18118int
Pablo Galindoba421752021-05-03 20:33:17 +010018119main (void)
Thomas Wouters89d996e2007-09-08 17:39:28 +000018120{
18121return rl_completion_display_matches_hook ();
18122 ;
18123 return 0;
18124}
18125_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018126if ac_fn_c_try_link "$LINENO"
18127then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018128 eval "$as_ac_Lib=yes"
Pablo Galindoba421752021-05-03 20:33:17 +010018129else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018130 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000018131fi
Pablo Galindoba421752021-05-03 20:33:17 +010018132rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018133 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000018134LIBS=$ac_check_lib_save_LIBS
18135fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018136eval ac_res=\$$as_ac_Lib
Pablo Galindoba421752021-05-03 20:33:17 +010018137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18138printf "%s\n" "$ac_res" >&6; }
18139if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18140then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000018141
Pablo Galindoba421752021-05-03 20:33:17 +010018142printf "%s\n" "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000018143
18144fi
18145
18146
Roland Hiebere1f77692021-02-09 02:05:25 +010018147 # also in 4.0, but not in editline
Pablo Galindoba421752021-05-03 20:33:17 +010018148 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_resize_terminal" | $as_tr_sh`
18149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
18150printf %s "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
18151if eval test \${$as_ac_Lib+y}
18152then :
18153 printf %s "(cached) " >&6
18154else $as_nop
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018155 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018156LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18158/* end confdefs.h. */
18159
18160/* Override any GCC internal prototype to avoid an error.
18161 Use char because int might match the return type of a GCC
18162 builtin and then its argument prototype would still apply. */
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018163char rl_resize_terminal ();
18164int
Pablo Galindoba421752021-05-03 20:33:17 +010018165main (void)
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018166{
18167return rl_resize_terminal ();
18168 ;
18169 return 0;
18170}
18171_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018172if ac_fn_c_try_link "$LINENO"
18173then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018174 eval "$as_ac_Lib=yes"
Pablo Galindoba421752021-05-03 20:33:17 +010018175else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018176 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018177fi
Pablo Galindoba421752021-05-03 20:33:17 +010018178rm -f core conftest.err conftest.$ac_objext conftest.beam \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018179 conftest$ac_exeext conftest.$ac_ext
18180LIBS=$ac_check_lib_save_LIBS
18181fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018182eval ac_res=\$$as_ac_Lib
Pablo Galindoba421752021-05-03 20:33:17 +010018183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18184printf "%s\n" "$ac_res" >&6; }
18185if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18186then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018187
Pablo Galindoba421752021-05-03 20:33:17 +010018188printf "%s\n" "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018189
18190fi
18191
18192
Roland Hiebere1f77692021-02-09 02:05:25 +010018193 # check for readline 4.2
Pablo Galindoba421752021-05-03 20:33:17 +010018194 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_matches" | $as_tr_sh`
18195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
18196printf %s "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
18197if eval test \${$as_ac_Lib+y}
18198then :
18199 printf %s "(cached) " >&6
18200else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018201 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018202LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206/* Override any GCC internal prototype to avoid an error.
18207 Use char because int might match the return type of a GCC
18208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018209char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018210int
Pablo Galindoba421752021-05-03 20:33:17 +010018211main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018214 ;
18215 return 0;
18216}
18217_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018218if ac_fn_c_try_link "$LINENO"
18219then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018220 eval "$as_ac_Lib=yes"
Pablo Galindoba421752021-05-03 20:33:17 +010018221else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018222 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000018223fi
Pablo Galindoba421752021-05-03 20:33:17 +010018224rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018226LIBS=$ac_check_lib_save_LIBS
18227fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018228eval ac_res=\$$as_ac_Lib
Pablo Galindoba421752021-05-03 20:33:17 +010018229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18230printf "%s\n" "$ac_res" >&6; }
18231if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18232then :
Michael W. Hudson54241132001-12-07 15:38:26 +000018233
Pablo Galindoba421752021-05-03 20:33:17 +010018234printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000018235
Guido van Rossum353ae582001-07-10 16:45:32 +000018236fi
18237
Jack Jansendd19cf82001-12-06 22:36:17 +000018238
Roland Hiebere1f77692021-02-09 02:05:25 +010018239 # also in readline 4.2
Pablo Galindoba421752021-05-03 20:33:17 +010018240 ac_fn_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018241#include <stdio.h> /* Must be first for Gnu Readline */
18242#ifdef WITH_EDITLINE
18243# include <editline/readline.h>
18244#else
18245# include <readline/readline.h>
18246#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000018247
Pablo Galindoba421752021-05-03 20:33:17 +010018248" "$ac_c_undeclared_builtin_options" "CFLAGS"
18249if test "x$ac_cv_have_decl_rl_catch_signals" = xyes
18250then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018251
Pablo Galindoba421752021-05-03 20:33:17 +010018252printf "%s\n" "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018253
18254fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018255
Pablo Galindoba421752021-05-03 20:33:17 +010018256 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_append_history" | $as_tr_sh`
18257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
18258printf %s "checking for append_history in -l$LIBREADLINE... " >&6; }
18259if eval test \${$as_ac_Lib+y}
18260then :
18261 printf %s "(cached) " >&6
18262else $as_nop
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018263 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018264LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18266/* end confdefs.h. */
18267
18268/* Override any GCC internal prototype to avoid an error.
18269 Use char because int might match the return type of a GCC
18270 builtin and then its argument prototype would still apply. */
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018271char append_history ();
18272int
Pablo Galindoba421752021-05-03 20:33:17 +010018273main (void)
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018274{
18275return append_history ();
18276 ;
18277 return 0;
18278}
18279_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018280if ac_fn_c_try_link "$LINENO"
18281then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018282 eval "$as_ac_Lib=yes"
Pablo Galindoba421752021-05-03 20:33:17 +010018283else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018284 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018285fi
Pablo Galindoba421752021-05-03 20:33:17 +010018286rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018287 conftest$ac_exeext conftest.$ac_ext
18288LIBS=$ac_check_lib_save_LIBS
18289fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018290eval ac_res=\$$as_ac_Lib
Pablo Galindoba421752021-05-03 20:33:17 +010018291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18292printf "%s\n" "$ac_res" >&6; }
18293if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18294then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018295
Pablo Galindoba421752021-05-03 20:33:17 +010018296printf "%s\n" "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018297
18298fi
18299
Roland Hiebere1f77692021-02-09 02:05:25 +010018300fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018301
Martin v. Löwis82bca632006-02-10 20:49:30 +000018302# End of readline checks: restore LIBS
18303LIBS=$LIBS_no_readline
18304
Pablo Galindoba421752021-05-03 20:33:17 +010018305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
18306printf %s "checking for broken nice()... " >&6; }
18307if test ${ac_cv_broken_nice+y}
18308then :
18309 printf %s "(cached) " >&6
18310else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018311
Pablo Galindoba421752021-05-03 20:33:17 +010018312if test "$cross_compiling" = yes
18313then :
Guido van Rossum3065c942001-09-17 04:03:14 +000018314 ac_cv_broken_nice=no
Pablo Galindoba421752021-05-03 20:33:17 +010018315else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018317/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018318
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080018319#include <stdlib.h>
18320#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018321int main()
18322{
18323 int val1 = nice(1);
18324 if (val1 != -1 && val1 == nice(2))
18325 exit(0);
18326 exit(1);
18327}
18328
Martin v. Löwis11437992002-04-12 09:54:03 +000018329_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018330if ac_fn_c_try_run "$LINENO"
18331then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018332 ac_cv_broken_nice=yes
Pablo Galindoba421752021-05-03 20:33:17 +010018333else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018334 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18337 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018338fi
18339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340fi
18341
Pablo Galindoba421752021-05-03 20:33:17 +010018342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
18343printf "%s\n" "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018344if test "$ac_cv_broken_nice" = yes
18345then
Martin v. Löwis11437992002-04-12 09:54:03 +000018346
Pablo Galindoba421752021-05-03 20:33:17 +010018347printf "%s\n" "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018348
18349fi
18350
Pablo Galindoba421752021-05-03 20:33:17 +010018351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
18352printf %s "checking for broken poll()... " >&6; }
18353if test ${ac_cv_broken_poll+y}
18354then :
18355 printf %s "(cached) " >&6
18356else $as_nop
18357 if test "$cross_compiling" = yes
18358then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018359 ac_cv_broken_poll=no
Pablo Galindoba421752021-05-03 20:33:17 +010018360else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018362/* end confdefs.h. */
18363
18364#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110018365#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018366
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018367int main()
18368{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018369 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018370 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018371
18372 close (42);
18373
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018374 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018375 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018376 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018377 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018378 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018379 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018380 return 1;
18381}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018382
18383_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018384if ac_fn_c_try_run "$LINENO"
18385then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018386 ac_cv_broken_poll=yes
Pablo Galindoba421752021-05-03 20:33:17 +010018387else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018388 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018394fi
18395
Pablo Galindoba421752021-05-03 20:33:17 +010018396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
18397printf "%s\n" "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018398if test "$ac_cv_broken_poll" = yes
18399then
18400
Pablo Galindoba421752021-05-03 20:33:17 +010018401printf "%s\n" "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018402
18403fi
18404
Martin v. Löwis1d459062005-03-14 21:23:33 +000018405# check tzset(3) exists and works like we expect it to
Pablo Galindoba421752021-05-03 20:33:17 +010018406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
18407printf %s "checking for working tzset()... " >&6; }
18408if test ${ac_cv_working_tzset+y}
18409then :
18410 printf %s "(cached) " >&6
18411else $as_nop
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018412
Pablo Galindoba421752021-05-03 20:33:17 +010018413if test "$cross_compiling" = yes
18414then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018415 ac_cv_working_tzset=no
Pablo Galindoba421752021-05-03 20:33:17 +010018416else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018418/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018419
18420#include <stdlib.h>
18421#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018422#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000018423
18424#if HAVE_TZNAME
18425extern char *tzname[];
18426#endif
18427
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018428int main()
18429{
Brett Cannon18367812003-09-19 00:59:16 +000018430 /* Note that we need to ensure that not only does tzset(3)
18431 do 'something' with localtime, but it works as documented
18432 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000018433 This includes making sure that tzname is set properly if
18434 tm->tm_zone does not exist since it is the alternative way
18435 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000018436
18437 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000018438 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000018439 */
18440
Martin v. Löwis1d459062005-03-14 21:23:33 +000018441 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000018442 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18443
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018444 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018445 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018446 if (localtime(&groundhogday)->tm_hour != 0)
18447 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018448#if HAVE_TZNAME
18449 /* For UTC, tzname[1] is sometimes "", sometimes " " */
18450 if (strcmp(tzname[0], "UTC") ||
18451 (tzname[1][0] != 0 && tzname[1][0] != ' '))
18452 exit(1);
18453#endif
Brett Cannon18367812003-09-19 00:59:16 +000018454
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018455 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018456 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018457 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018458 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018459#if HAVE_TZNAME
18460 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
18461 exit(1);
18462#endif
Brett Cannon18367812003-09-19 00:59:16 +000018463
18464 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18465 tzset();
18466 if (localtime(&groundhogday)->tm_hour != 11)
18467 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018468#if HAVE_TZNAME
18469 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
18470 exit(1);
18471#endif
18472
18473#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000018474 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18475 exit(1);
18476 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18477 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018478#endif
Brett Cannon18367812003-09-19 00:59:16 +000018479
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018480 exit(0);
18481}
18482
18483_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018484if ac_fn_c_try_run "$LINENO"
18485then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018486 ac_cv_working_tzset=yes
Pablo Galindoba421752021-05-03 20:33:17 +010018487else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018488 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018492fi
18493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494fi
18495
Pablo Galindoba421752021-05-03 20:33:17 +010018496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
18497printf "%s\n" "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018498if test "$ac_cv_working_tzset" = yes
18499then
18500
Pablo Galindoba421752021-05-03 20:33:17 +010018501printf "%s\n" "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018502
18503fi
18504
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018505# Look for subsecond timestamps in struct stat
Pablo Galindoba421752021-05-03 20:33:17 +010018506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
18507printf %s "checking for tv_nsec in struct stat... " >&6; }
18508if test ${ac_cv_stat_tv_nsec+y}
18509then :
18510 printf %s "(cached) " >&6
18511else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018513/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018514#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018515int
Pablo Galindoba421752021-05-03 20:33:17 +010018516main (void)
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018517{
18518
18519struct stat st;
18520st.st_mtim.tv_nsec = 1;
18521
18522 ;
18523 return 0;
18524}
18525_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018526if ac_fn_c_try_compile "$LINENO"
18527then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018528 ac_cv_stat_tv_nsec=yes
Pablo Galindoba421752021-05-03 20:33:17 +010018529else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018530 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018531fi
Pablo Galindoba421752021-05-03 20:33:17 +010018532rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533fi
18534
Pablo Galindoba421752021-05-03 20:33:17 +010018535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
18536printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018537if test "$ac_cv_stat_tv_nsec" = yes
18538then
18539
Pablo Galindoba421752021-05-03 20:33:17 +010018540printf "%s\n" "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018541
18542fi
18543
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018544# Look for BSD style subsecond timestamps in struct stat
Pablo Galindoba421752021-05-03 20:33:17 +010018545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
18546printf %s "checking for tv_nsec2 in struct stat... " >&6; }
18547if test ${ac_cv_stat_tv_nsec2+y}
18548then :
18549 printf %s "(cached) " >&6
18550else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018552/* end confdefs.h. */
18553#include <sys/stat.h>
18554int
Pablo Galindoba421752021-05-03 20:33:17 +010018555main (void)
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018556{
18557
18558struct stat st;
18559st.st_mtimespec.tv_nsec = 1;
18560
18561 ;
18562 return 0;
18563}
18564_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018565if ac_fn_c_try_compile "$LINENO"
18566then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018567 ac_cv_stat_tv_nsec2=yes
Pablo Galindoba421752021-05-03 20:33:17 +010018568else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018569 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018570fi
Pablo Galindoba421752021-05-03 20:33:17 +010018571rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018572fi
18573
Pablo Galindoba421752021-05-03 20:33:17 +010018574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
18575printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018576if test "$ac_cv_stat_tv_nsec2" = yes
18577then
18578
Pablo Galindoba421752021-05-03 20:33:17 +010018579printf "%s\n" "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018580
18581fi
18582
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018583# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020018584ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010018585if test "$cross_compiling" = no; then
18586 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
18587fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018588
Pablo Galindoba421752021-05-03 20:33:17 +010018589ac_fn_c_check_header_compile "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
18590if test "x$ac_cv_header_curses_h" = xyes
18591then :
18592 printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h
18593
18594fi
18595ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default"
18596if test "x$ac_cv_header_ncurses_h" = xyes
18597then :
18598 printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h
Pablo Galindo53e55292021-04-05 17:38:40 +010018599
18600fi
Pablo Galindocc128882021-03-01 16:47:53 +000018601
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018602
18603# On Solaris, term.h requires curses.h
Pablo Galindoba421752021-05-03 20:33:17 +010018604ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018605#ifdef HAVE_CURSES_H
18606#include <curses.h>
18607#endif
18608
18609"
Pablo Galindoba421752021-05-03 20:33:17 +010018610if test "x$ac_cv_header_term_h" = xyes
18611then :
18612 printf "%s\n" "#define HAVE_TERM_H 1" >>confdefs.h
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018613
18614fi
18615
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018616
Jack Jansen666b1e72001-10-31 12:11:48 +000018617# On HP/UX 11.0, mvwdelch is a block with a return statement
Pablo Galindoba421752021-05-03 20:33:17 +010018618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
18619printf %s "checking whether mvwdelch is an expression... " >&6; }
18620if test ${ac_cv_mvwdelch_is_expression+y}
18621then :
18622 printf %s "(cached) " >&6
18623else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018625/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018626#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018627int
Pablo Galindoba421752021-05-03 20:33:17 +010018628main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018629{
Jack Jansen666b1e72001-10-31 12:11:48 +000018630
18631 int rtn;
18632 rtn = mvwdelch(0,0,0);
18633
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 ;
18635 return 0;
18636}
18637_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018638if ac_fn_c_try_compile "$LINENO"
18639then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018640 ac_cv_mvwdelch_is_expression=yes
Pablo Galindoba421752021-05-03 20:33:17 +010018641else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018642 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018643fi
Pablo Galindoba421752021-05-03 20:33:17 +010018644rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645fi
18646
Pablo Galindoba421752021-05-03 20:33:17 +010018647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
18648printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000018649
18650if test "$ac_cv_mvwdelch_is_expression" = yes
18651then
Martin v. Löwis11437992002-04-12 09:54:03 +000018652
Pablo Galindoba421752021-05-03 20:33:17 +010018653printf "%s\n" "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018654
18655fi
18656
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018657# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
18658# structs since version 5.7. If the macro is defined as zero before including
18659# [n]curses.h, ncurses will expose fields of the structs regardless of the
18660# configuration.
Pablo Galindoba421752021-05-03 20:33:17 +010018661{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
18662printf %s "checking whether WINDOW has _flags... " >&6; }
18663if test ${ac_cv_window_has_flags+y}
18664then :
18665 printf %s "(cached) " >&6
18666else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018668/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018669
18670 #define NCURSES_OPAQUE 0
18671 #include <curses.h>
18672
Martin v. Löwis11437992002-04-12 09:54:03 +000018673int
Pablo Galindoba421752021-05-03 20:33:17 +010018674main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018675{
Jack Jansen666b1e72001-10-31 12:11:48 +000018676
18677 WINDOW *w;
18678 w->_flags = 0;
18679
Martin v. Löwis11437992002-04-12 09:54:03 +000018680 ;
18681 return 0;
18682}
18683_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018684if ac_fn_c_try_compile "$LINENO"
18685then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018686 ac_cv_window_has_flags=yes
Pablo Galindoba421752021-05-03 20:33:17 +010018687else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018688 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018689fi
Pablo Galindoba421752021-05-03 20:33:17 +010018690rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018691fi
18692
Pablo Galindoba421752021-05-03 20:33:17 +010018693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
18694printf "%s\n" "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018695
Jack Jansen666b1e72001-10-31 12:11:48 +000018696
18697if test "$ac_cv_window_has_flags" = yes
18698then
Martin v. Löwis11437992002-04-12 09:54:03 +000018699
Pablo Galindoba421752021-05-03 20:33:17 +010018700printf "%s\n" "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018701
18702fi
18703
Pablo Galindoba421752021-05-03 20:33:17 +010018704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
18705printf %s "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18707/* end confdefs.h. */
18708#include <curses.h>
18709int
Pablo Galindoba421752021-05-03 20:33:17 +010018710main (void)
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018711{
18712
18713#ifndef is_pad
18714void *x=is_pad
18715#endif
18716
18717 ;
18718 return 0;
18719}
18720_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018721if ac_fn_c_try_compile "$LINENO"
18722then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018723
Pablo Galindoba421752021-05-03 20:33:17 +010018724printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018725
Pablo Galindoba421752021-05-03 20:33:17 +010018726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18727printf "%s\n" "yes" >&6; }
18728else $as_nop
18729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18730printf "%s\n" "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018731
18732fi
Pablo Galindoba421752021-05-03 20:33:17 +010018733rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018734
Pablo Galindoba421752021-05-03 20:33:17 +010018735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
18736printf %s "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018738/* end confdefs.h. */
18739#include <curses.h>
18740int
Pablo Galindoba421752021-05-03 20:33:17 +010018741main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018742{
18743void *x=is_term_resized
18744 ;
18745 return 0;
18746}
18747_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018748if ac_fn_c_try_compile "$LINENO"
18749then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018750
Pablo Galindoba421752021-05-03 20:33:17 +010018751printf "%s\n" "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018752
Pablo Galindoba421752021-05-03 20:33:17 +010018753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18754printf "%s\n" "yes" >&6; }
18755else $as_nop
18756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18757printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018758
18759fi
Pablo Galindoba421752021-05-03 20:33:17 +010018760rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761
Pablo Galindoba421752021-05-03 20:33:17 +010018762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
18763printf %s "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018765/* end confdefs.h. */
18766#include <curses.h>
18767int
Pablo Galindoba421752021-05-03 20:33:17 +010018768main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018769{
18770void *x=resize_term
18771 ;
18772 return 0;
18773}
18774_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018775if ac_fn_c_try_compile "$LINENO"
18776then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018777
Pablo Galindoba421752021-05-03 20:33:17 +010018778printf "%s\n" "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018779
Pablo Galindoba421752021-05-03 20:33:17 +010018780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18781printf "%s\n" "yes" >&6; }
18782else $as_nop
18783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18784printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018785
18786fi
Pablo Galindoba421752021-05-03 20:33:17 +010018787rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018788
Pablo Galindoba421752021-05-03 20:33:17 +010018789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
18790printf %s "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018792/* end confdefs.h. */
18793#include <curses.h>
18794int
Pablo Galindoba421752021-05-03 20:33:17 +010018795main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018796{
18797void *x=resizeterm
18798 ;
18799 return 0;
18800}
18801_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018802if ac_fn_c_try_compile "$LINENO"
18803then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018804
Pablo Galindoba421752021-05-03 20:33:17 +010018805printf "%s\n" "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018806
Pablo Galindoba421752021-05-03 20:33:17 +010018807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18808printf "%s\n" "yes" >&6; }
18809else $as_nop
18810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18811printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018812
18813fi
Pablo Galindoba421752021-05-03 20:33:17 +010018814rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018815
Pablo Galindoba421752021-05-03 20:33:17 +010018816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
18817printf %s "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18819/* end confdefs.h. */
18820#include <curses.h>
18821int
Pablo Galindoba421752021-05-03 20:33:17 +010018822main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018823{
18824
18825#ifndef immedok
18826void *x=immedok
18827#endif
18828
18829 ;
18830 return 0;
18831}
18832_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018833if ac_fn_c_try_compile "$LINENO"
18834then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018835
Pablo Galindoba421752021-05-03 20:33:17 +010018836printf "%s\n" "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018837
Pablo Galindoba421752021-05-03 20:33:17 +010018838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18839printf "%s\n" "yes" >&6; }
18840else $as_nop
18841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18842printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018843
18844fi
Pablo Galindoba421752021-05-03 20:33:17 +010018845rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018846
Pablo Galindoba421752021-05-03 20:33:17 +010018847{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
18848printf %s "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18850/* end confdefs.h. */
18851#include <curses.h>
18852int
Pablo Galindoba421752021-05-03 20:33:17 +010018853main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018854{
18855
18856#ifndef syncok
18857void *x=syncok
18858#endif
18859
18860 ;
18861 return 0;
18862}
18863_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018864if ac_fn_c_try_compile "$LINENO"
18865then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018866
Pablo Galindoba421752021-05-03 20:33:17 +010018867printf "%s\n" "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018868
Pablo Galindoba421752021-05-03 20:33:17 +010018869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18870printf "%s\n" "yes" >&6; }
18871else $as_nop
18872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18873printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018874
18875fi
Pablo Galindoba421752021-05-03 20:33:17 +010018876rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018877
Pablo Galindoba421752021-05-03 20:33:17 +010018878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
18879printf %s "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18881/* end confdefs.h. */
18882#include <curses.h>
18883int
Pablo Galindoba421752021-05-03 20:33:17 +010018884main (void)
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018885{
18886
18887#ifndef wchgat
18888void *x=wchgat
18889#endif
18890
18891 ;
18892 return 0;
18893}
18894_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018895if ac_fn_c_try_compile "$LINENO"
18896then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018897
Pablo Galindoba421752021-05-03 20:33:17 +010018898printf "%s\n" "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018899
Pablo Galindoba421752021-05-03 20:33:17 +010018900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18901printf "%s\n" "yes" >&6; }
18902else $as_nop
18903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18904printf "%s\n" "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018905
18906fi
Pablo Galindoba421752021-05-03 20:33:17 +010018907rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018908
Pablo Galindoba421752021-05-03 20:33:17 +010018909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
18910printf %s "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18912/* end confdefs.h. */
18913#include <curses.h>
18914int
Pablo Galindoba421752021-05-03 20:33:17 +010018915main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018916{
18917
18918#ifndef filter
18919void *x=filter
18920#endif
18921
18922 ;
18923 return 0;
18924}
18925_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018926if ac_fn_c_try_compile "$LINENO"
18927then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018928
Pablo Galindoba421752021-05-03 20:33:17 +010018929printf "%s\n" "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018930
Pablo Galindoba421752021-05-03 20:33:17 +010018931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18932printf "%s\n" "yes" >&6; }
18933else $as_nop
18934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18935printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018936
18937fi
Pablo Galindoba421752021-05-03 20:33:17 +010018938rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018939
Pablo Galindoba421752021-05-03 20:33:17 +010018940{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
18941printf %s "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18943/* end confdefs.h. */
18944#include <curses.h>
18945int
Pablo Galindoba421752021-05-03 20:33:17 +010018946main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018947{
18948
18949#ifndef has_key
18950void *x=has_key
18951#endif
18952
18953 ;
18954 return 0;
18955}
18956_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018957if ac_fn_c_try_compile "$LINENO"
18958then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018959
Pablo Galindoba421752021-05-03 20:33:17 +010018960printf "%s\n" "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018961
Pablo Galindoba421752021-05-03 20:33:17 +010018962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18963printf "%s\n" "yes" >&6; }
18964else $as_nop
18965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018967
18968fi
Pablo Galindoba421752021-05-03 20:33:17 +010018969rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018970
Pablo Galindoba421752021-05-03 20:33:17 +010018971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
18972printf %s "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18974/* end confdefs.h. */
18975#include <curses.h>
18976int
Pablo Galindoba421752021-05-03 20:33:17 +010018977main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018978{
18979
18980#ifndef typeahead
18981void *x=typeahead
18982#endif
18983
18984 ;
18985 return 0;
18986}
18987_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010018988if ac_fn_c_try_compile "$LINENO"
18989then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018990
Pablo Galindoba421752021-05-03 20:33:17 +010018991printf "%s\n" "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018992
Pablo Galindoba421752021-05-03 20:33:17 +010018993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18994printf "%s\n" "yes" >&6; }
18995else $as_nop
18996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18997printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018998
18999fi
Pablo Galindoba421752021-05-03 20:33:17 +010019000rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019001
Pablo Galindoba421752021-05-03 20:33:17 +010019002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
19003printf %s "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19005/* end confdefs.h. */
19006#include <curses.h>
19007int
Pablo Galindoba421752021-05-03 20:33:17 +010019008main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019009{
19010
19011#ifndef use_env
19012void *x=use_env
19013#endif
19014
19015 ;
19016 return 0;
19017}
19018_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019019if ac_fn_c_try_compile "$LINENO"
19020then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019021
Pablo Galindoba421752021-05-03 20:33:17 +010019022printf "%s\n" "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019023
Pablo Galindoba421752021-05-03 20:33:17 +010019024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19025printf "%s\n" "yes" >&6; }
19026else $as_nop
19027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19028printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019029
19030fi
Pablo Galindoba421752021-05-03 20:33:17 +010019031rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020019032# last curses configure check
19033CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034
Pablo Galindoba421752021-05-03 20:33:17 +010019035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
19036printf "%s\n" "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019037
19038if test "x$cross_compiling" = xyes; then
19039 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Pablo Galindoba421752021-05-03 20:33:17 +010019040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
19041printf %s "checking for /dev/ptmx... " >&6; }
19042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
19043printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019044 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
19045 fi
19046 if test "${ac_cv_file__dev_ptc+set}" != set; then
Pablo Galindoba421752021-05-03 20:33:17 +010019047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
19048printf %s "checking for /dev/ptc... " >&6; }
19049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
19050printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019051 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
19052 fi
19053fi
19054
Pablo Galindoba421752021-05-03 20:33:17 +010019055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
19056printf %s "checking for /dev/ptmx... " >&6; }
19057if test ${ac_cv_file__dev_ptmx+y}
19058then :
19059 printf %s "(cached) " >&6
19060else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019061 test "$cross_compiling" = yes &&
19062 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19063if test -r "/dev/ptmx"; then
19064 ac_cv_file__dev_ptmx=yes
19065else
19066 ac_cv_file__dev_ptmx=no
19067fi
19068fi
Pablo Galindoba421752021-05-03 20:33:17 +010019069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
19070printf "%s\n" "$ac_cv_file__dev_ptmx" >&6; }
19071if test "x$ac_cv_file__dev_ptmx" = xyes
19072then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000019073
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019074fi
19075
19076if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019077
Pablo Galindoba421752021-05-03 20:33:17 +010019078printf "%s\n" "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019079
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019080fi
Pablo Galindoba421752021-05-03 20:33:17 +010019081{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
19082printf %s "checking for /dev/ptc... " >&6; }
19083if test ${ac_cv_file__dev_ptc+y}
19084then :
19085 printf %s "(cached) " >&6
19086else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019087 test "$cross_compiling" = yes &&
19088 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19089if test -r "/dev/ptc"; then
19090 ac_cv_file__dev_ptc=yes
19091else
19092 ac_cv_file__dev_ptc=no
19093fi
19094fi
Pablo Galindoba421752021-05-03 20:33:17 +010019095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
19096printf "%s\n" "$ac_cv_file__dev_ptc" >&6; }
19097if test "x$ac_cv_file__dev_ptc" = xyes
19098then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000019099
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019100fi
19101
19102if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000019103
Pablo Galindoba421752021-05-03 20:33:17 +010019104printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000019105
Neal Norwitz865400f2003-03-21 01:42:58 +000019106fi
19107
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000019108if test $ac_sys_system = Darwin
19109then
19110 LIBS="$LIBS -framework CoreFoundation"
19111fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000019112
Pablo Galindoba421752021-05-03 20:33:17 +010019113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
19114printf %s "checking for %zd printf() format support... " >&6; }
19115if test ${ac_cv_have_size_t_format+y}
19116then :
19117 printf %s "(cached) " >&6
19118else $as_nop
19119 if test "$cross_compiling" = yes
19120then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000019121 ac_cv_have_size_t_format="cross -- assuming yes"
19122
Pablo Galindoba421752021-05-03 20:33:17 +010019123else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019125/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019126
Thomas Wouters477c8d52006-05-27 19:21:47 +000019127#include <stdio.h>
19128#include <stddef.h>
19129#include <string.h>
19130
Christian Heimes2c181612007-12-17 20:04:13 +000019131#ifdef HAVE_SYS_TYPES_H
19132#include <sys/types.h>
19133#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000019134
19135#ifdef HAVE_SSIZE_T
19136typedef ssize_t Py_ssize_t;
19137#elif SIZEOF_VOID_P == SIZEOF_LONG
19138typedef long Py_ssize_t;
19139#else
19140typedef int Py_ssize_t;
19141#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000019142
Christian Heimes2c181612007-12-17 20:04:13 +000019143int main()
19144{
19145 char buffer[256];
19146
Thomas Wouters477c8d52006-05-27 19:21:47 +000019147 if(sprintf(buffer, "%zd", (size_t)123) < 0)
19148 return 1;
19149
Thomas Wouters89f507f2006-12-13 04:49:30 +000019150 if (strcmp(buffer, "123"))
19151 return 1;
19152
19153 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
19154 return 1;
19155
19156 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000019157 return 1;
19158
19159 return 0;
19160}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019161
Thomas Wouters477c8d52006-05-27 19:21:47 +000019162_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019163if ac_fn_c_try_run "$LINENO"
19164then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019165 ac_cv_have_size_t_format=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019166else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019167 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019171fi
19172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019173fi
Pablo Galindoba421752021-05-03 20:33:17 +010019174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
19175printf "%s\n" "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000019176if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019177
Pablo Galindoba421752021-05-03 20:33:17 +010019178printf "%s\n" "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019179
19180fi
19181
Matthias Kloseb9621712010-04-24 17:59:49 +000019182ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000019183#ifdef HAVE_SYS_TYPES_H
19184#include <sys/types.h>
19185#endif
19186#ifdef HAVE_SYS_SOCKET_H
19187#include <sys/socket.h>
19188#endif
19189
Matthias Kloseb9621712010-04-24 17:59:49 +000019190"
Pablo Galindoba421752021-05-03 20:33:17 +010019191if test "x$ac_cv_type_socklen_t" = xyes
19192then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000019193
Pablo Galindoba421752021-05-03 20:33:17 +010019194else $as_nop
Guido van Rossum95713eb2000-05-18 20:53:31 +000019195
Pablo Galindoba421752021-05-03 20:33:17 +010019196printf "%s\n" "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000019197
19198fi
19199
Michael W. Hudson54241132001-12-07 15:38:26 +000019200
Pablo Galindoba421752021-05-03 20:33:17 +010019201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
19202printf %s "checking for broken mbstowcs... " >&6; }
19203if test ${ac_cv_broken_mbstowcs+y}
19204then :
19205 printf %s "(cached) " >&6
19206else $as_nop
19207 if test "$cross_compiling" = yes
19208then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019209 ac_cv_broken_mbstowcs=no
Pablo Galindoba421752021-05-03 20:33:17 +010019210else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019212/* end confdefs.h. */
19213
Stefan Krah19c21392012-11-22 23:47:32 +010019214#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000019215#include<stdlib.h>
19216int main() {
19217 size_t len = -1;
19218 const char *str = "text";
19219 len = mbstowcs(NULL, str, 0);
19220 return (len != 4);
19221}
19222
19223_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019224if ac_fn_c_try_run "$LINENO"
19225then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019226 ac_cv_broken_mbstowcs=no
Pablo Galindoba421752021-05-03 20:33:17 +010019227else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019228 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000019229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019232fi
19233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019234fi
19235
Pablo Galindoba421752021-05-03 20:33:17 +010019236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
19237printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000019238if test "$ac_cv_broken_mbstowcs" = yes
19239then
19240
Pablo Galindoba421752021-05-03 20:33:17 +010019241printf "%s\n" "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000019242
19243fi
19244
Antoine Pitroub52ec782009-01-25 16:34:23 +000019245# Check for --with-computed-gotos
Pablo Galindoba421752021-05-03 20:33:17 +010019246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
19247printf %s "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019248
19249# Check whether --with-computed-gotos was given.
Pablo Galindoba421752021-05-03 20:33:17 +010019250if test ${with_computed_gotos+y}
19251then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000019252 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000019253if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000019254then
19255
Pablo Galindoba421752021-05-03 20:33:17 +010019256printf "%s\n" "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000019257
Pablo Galindoba421752021-05-03 20:33:17 +010019258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19259printf "%s\n" "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019260fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000019261if test "$withval" = no
19262then
19263
Pablo Galindoba421752021-05-03 20:33:17 +010019264printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000019265
Pablo Galindoba421752021-05-03 20:33:17 +010019266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19267printf "%s\n" "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019268fi
19269
Pablo Galindoba421752021-05-03 20:33:17 +010019270else $as_nop
19271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
19272printf "%s\n" "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000019273fi
19274
Antoine Pitroub52ec782009-01-25 16:34:23 +000019275
Pablo Galindoba421752021-05-03 20:33:17 +010019276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
19277printf %s "checking whether $CC supports computed gotos... " >&6; }
19278if test ${ac_cv_computed_gotos+y}
19279then :
19280 printf %s "(cached) " >&6
19281else $as_nop
19282 if test "$cross_compiling" = yes
19283then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019284 if test "${with_computed_gotos+set}" = set; then
19285 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
19286 else
19287 ac_cv_computed_gotos=no
19288 fi
Pablo Galindoba421752021-05-03 20:33:17 +010019289else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19291/* end confdefs.h. */
19292
19293int main(int argc, char **argv)
19294{
19295 static void *targets[1] = { &&LABEL1 };
19296 goto LABEL2;
19297LABEL1:
19298 return 0;
19299LABEL2:
19300 goto *targets[0];
19301 return 1;
19302}
19303
19304_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019305if ac_fn_c_try_run "$LINENO"
19306then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019307 ac_cv_computed_gotos=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019308else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019309 ac_cv_computed_gotos=no
19310fi
19311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19312 conftest.$ac_objext conftest.beam conftest.$ac_ext
19313fi
19314
19315fi
19316
Pablo Galindoba421752021-05-03 20:33:17 +010019317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
19318printf "%s\n" "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010019319case "$ac_cv_computed_gotos" in yes*)
19320
Pablo Galindoba421752021-05-03 20:33:17 +010019321printf "%s\n" "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010019322
19323esac
19324
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019325case $ac_sys_system in
19326AIX*)
19327
Pablo Galindoba421752021-05-03 20:33:17 +010019328printf "%s\n" "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019329 ;;
19330esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019331
Michael W. Hudson54241132001-12-07 15:38:26 +000019332
Mark Dickinsonb2153e92010-05-05 22:31:36 +000019333
19334
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000019335for h in `(cd $srcdir;echo Python/thread_*.h)`
19336do
19337 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
19338done
19339
Michael W. Hudson54241132001-12-07 15:38:26 +000019340
Ned Deily8d02f912020-06-25 10:46:44 -040019341SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Pablo Galindoba421752021-05-03 20:33:17 +010019342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
19343printf %s "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019344for dir in $SRCDIRS; do
19345 if test ! -d $dir; then
19346 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000019347 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019348done
Pablo Galindoba421752021-05-03 20:33:17 +010019349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
19350printf "%s\n" "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000019351
Stefan Krah1919b7e2012-03-21 18:25:23 +010019352# Availability of -O2:
Pablo Galindoba421752021-05-03 20:33:17 +010019353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
19354printf %s "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019355saved_cflags="$CFLAGS"
19356CFLAGS="-O2"
19357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19358/* end confdefs.h. */
19359
19360int
Pablo Galindoba421752021-05-03 20:33:17 +010019361main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010019362{
19363
19364
19365 ;
19366 return 0;
19367}
19368_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019369if ac_fn_c_try_compile "$LINENO"
19370then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019371 have_O2=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019372else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019373 have_O2=no
19374fi
Pablo Galindoba421752021-05-03 20:33:17 +010019375rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
19377printf "%s\n" "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019378CFLAGS="$saved_cflags"
19379
19380# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
19381# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Pablo Galindoba421752021-05-03 20:33:17 +010019382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
19383printf %s "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019384saved_cflags="$CFLAGS"
19385CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
19386if test "$have_O2" = no; then
19387 CFLAGS=""
19388fi
Pablo Galindoba421752021-05-03 20:33:17 +010019389if test "$cross_compiling" = yes
19390then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019391 have_glibc_memmove_bug=undefined
Pablo Galindoba421752021-05-03 20:33:17 +010019392else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19394/* end confdefs.h. */
19395
19396#include <stdio.h>
19397#include <stdlib.h>
19398#include <string.h>
19399void foo(void *p, void *q) { memmove(p, q, 19); }
19400int main() {
19401 char a[32] = "123456789000000000";
19402 foo(&a[9], a);
19403 if (strcmp(a, "123456789123456789000000000") != 0)
19404 return 1;
19405 foo(a, &a[9]);
19406 if (strcmp(a, "123456789000000000") != 0)
19407 return 1;
19408 return 0;
19409}
19410
19411_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019412if ac_fn_c_try_run "$LINENO"
19413then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019414 have_glibc_memmove_bug=no
Pablo Galindoba421752021-05-03 20:33:17 +010019415else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019416 have_glibc_memmove_bug=yes
19417fi
19418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19419 conftest.$ac_objext conftest.beam conftest.$ac_ext
19420fi
19421
19422CFLAGS="$saved_cflags"
Pablo Galindoba421752021-05-03 20:33:17 +010019423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
19424printf "%s\n" "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019425if test "$have_glibc_memmove_bug" = yes; then
19426
Pablo Galindoba421752021-05-03 20:33:17 +010019427printf "%s\n" "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019428
19429fi
19430
19431if test "$have_gcc_asm_for_x87" = yes; then
19432 # Some versions of gcc miscompile inline asm:
19433 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
19434 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
19435 case $CC in
19436 *gcc*)
Pablo Galindoba421752021-05-03 20:33:17 +010019437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
19438printf %s "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019439 saved_cflags="$CFLAGS"
19440 CFLAGS="-O2"
Pablo Galindoba421752021-05-03 20:33:17 +010019441 if test "$cross_compiling" = yes
19442then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019443 have_ipa_pure_const_bug=undefined
Pablo Galindoba421752021-05-03 20:33:17 +010019444else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19446/* end confdefs.h. */
19447
19448 __attribute__((noinline)) int
19449 foo(int *p) {
19450 int r;
19451 asm ( "movl \$6, (%1)\n\t"
19452 "xorl %0, %0\n\t"
19453 : "=r" (r) : "r" (p) : "memory"
19454 );
19455 return r;
19456 }
19457 int main() {
19458 int p = 8;
19459 if ((foo(&p) ? : p) != 6)
19460 return 1;
19461 return 0;
19462 }
19463
19464_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019465if ac_fn_c_try_run "$LINENO"
19466then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019467 have_ipa_pure_const_bug=no
Pablo Galindoba421752021-05-03 20:33:17 +010019468else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019469 have_ipa_pure_const_bug=yes
19470fi
19471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19472 conftest.$ac_objext conftest.beam conftest.$ac_ext
19473fi
19474
19475 CFLAGS="$saved_cflags"
Pablo Galindoba421752021-05-03 20:33:17 +010019476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
19477printf "%s\n" "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019478 if test "$have_ipa_pure_const_bug" = yes; then
19479
Pablo Galindoba421752021-05-03 20:33:17 +010019480printf "%s\n" "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019481
19482 fi
19483 ;;
19484 esac
19485fi
19486
Victor Stinner4f5366e2015-01-09 02:13:19 +010019487# Check for stdatomic.h
Pablo Galindoba421752021-05-03 20:33:17 +010019488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
19489printf %s "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19491/* end confdefs.h. */
19492
19493
19494 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020019495 atomic_int int_var;
19496 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019497 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020019498 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
19499 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
19500 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019501 return 0;
19502 }
19503
19504
19505_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019506if ac_fn_c_try_link "$LINENO"
19507then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019508 have_stdatomic_h=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019509else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019510 have_stdatomic_h=no
19511fi
Pablo Galindoba421752021-05-03 20:33:17 +010019512rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019513 conftest$ac_exeext conftest.$ac_ext
19514
Pablo Galindoba421752021-05-03 20:33:17 +010019515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
19516printf "%s\n" "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019517
19518if test "$have_stdatomic_h" = yes; then
19519
Pablo Galindoba421752021-05-03 20:33:17 +010019520printf "%s\n" "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019521
19522fi
19523
Victor Stinner52a327c2020-12-23 03:41:08 +010019524# Check for GCC >= 4.7 and clang __atomic builtin functions
Pablo Galindoba421752021-05-03 20:33:17 +010019525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
19526printf %s "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19528/* end confdefs.h. */
19529
19530
Victor Stinner52a327c2020-12-23 03:41:08 +010019531 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019532 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010019533 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
19534 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019535 return 0;
19536 }
19537
19538
19539_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019540if ac_fn_c_try_link "$LINENO"
19541then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019542 have_builtin_atomic=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019543else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019544 have_builtin_atomic=no
19545fi
Pablo Galindoba421752021-05-03 20:33:17 +010019546rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019547 conftest$ac_exeext conftest.$ac_ext
19548
Pablo Galindoba421752021-05-03 20:33:17 +010019549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
19550printf "%s\n" "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019551
19552if test "$have_builtin_atomic" = yes; then
19553
Pablo Galindoba421752021-05-03 20:33:17 +010019554printf "%s\n" "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019555
19556fi
19557
Ned Deily322f5ba2013-11-21 23:01:59 -080019558# ensurepip option
Pablo Galindoba421752021-05-03 20:33:17 +010019559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
19560printf %s "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019561
19562# Check whether --with-ensurepip was given.
Pablo Galindoba421752021-05-03 20:33:17 +010019563if test ${with_ensurepip+y}
19564then :
Ned Deily322f5ba2013-11-21 23:01:59 -080019565 withval=$with_ensurepip;
Pablo Galindoba421752021-05-03 20:33:17 +010019566else $as_nop
Ned Deily322f5ba2013-11-21 23:01:59 -080019567 with_ensurepip=upgrade
19568fi
19569
19570case $with_ensurepip in #(
19571 yes|upgrade) :
19572 ENSUREPIP=upgrade ;; #(
19573 install) :
19574 ENSUREPIP=install ;; #(
19575 no) :
19576 ENSUREPIP=no ;; #(
19577 *) :
19578 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
19579esac
Pablo Galindoba421752021-05-03 20:33:17 +010019580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
19581printf "%s\n" "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019582
19583
Victor Stinner35a97c02015-03-08 02:59:09 +010019584# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Pablo Galindoba421752021-05-03 20:33:17 +010019585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
19586printf %s "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19588/* end confdefs.h. */
19589
19590
19591 #include <dirent.h>
19592
19593 int main() {
19594 struct dirent entry;
19595 return entry.d_type == DT_UNKNOWN;
19596 }
19597
19598
19599_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019600if ac_fn_c_try_link "$LINENO"
19601then :
Victor Stinner35a97c02015-03-08 02:59:09 +010019602 have_dirent_d_type=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019603else $as_nop
Victor Stinner35a97c02015-03-08 02:59:09 +010019604 have_dirent_d_type=no
19605fi
Pablo Galindoba421752021-05-03 20:33:17 +010019606rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner35a97c02015-03-08 02:59:09 +010019607 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +010019608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
19609printf "%s\n" "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019610
19611if test "$have_dirent_d_type" = yes; then
19612
Pablo Galindoba421752021-05-03 20:33:17 +010019613printf "%s\n" "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010019614
19615fi
19616
Victor Stinner9eb57c52015-03-19 22:21:49 +010019617# check if the Linux getrandom() syscall is available
Pablo Galindoba421752021-05-03 20:33:17 +010019618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
19619printf %s "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19621/* end confdefs.h. */
19622
19623
Victor Stinner1b80b242016-04-12 22:34:58 +020019624 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019625 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020019626 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019627
19628 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010019629 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020019630 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020019631 const int flags = GRND_NONBLOCK;
19632 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020019633 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010019634 return 0;
19635 }
19636
19637
19638_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019639if ac_fn_c_try_link "$LINENO"
19640then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010019641 have_getrandom_syscall=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019642else $as_nop
Victor Stinner9eb57c52015-03-19 22:21:49 +010019643 have_getrandom_syscall=no
19644fi
Pablo Galindoba421752021-05-03 20:33:17 +010019645rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner9eb57c52015-03-19 22:21:49 +010019646 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +010019647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
19648printf "%s\n" "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019649
19650if test "$have_getrandom_syscall" = yes; then
19651
Pablo Galindoba421752021-05-03 20:33:17 +010019652printf "%s\n" "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010019653
19654fi
19655
Victor Stinner3abf44e2015-09-18 15:38:37 +020019656# check if the getrandom() function is available
19657# the test was written for the Solaris function of <sys/random.h>
Pablo Galindoba421752021-05-03 20:33:17 +010019658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
19659printf %s "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19661/* end confdefs.h. */
19662
19663
19664 #include <sys/random.h>
19665
19666 int main() {
19667 char buffer[1];
19668 const size_t buflen = sizeof(buffer);
19669 const int flags = 0;
19670 /* ignore the result, Python checks for ENOSYS at runtime */
19671 (void)getrandom(buffer, buflen, flags);
19672 return 0;
19673 }
19674
19675
19676_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019677if ac_fn_c_try_link "$LINENO"
19678then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020019679 have_getrandom=yes
Pablo Galindoba421752021-05-03 20:33:17 +010019680else $as_nop
Victor Stinner3abf44e2015-09-18 15:38:37 +020019681 have_getrandom=no
19682fi
Pablo Galindoba421752021-05-03 20:33:17 +010019683rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner3abf44e2015-09-18 15:38:37 +020019684 conftest$ac_exeext conftest.$ac_ext
Pablo Galindoba421752021-05-03 20:33:17 +010019685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
19686printf "%s\n" "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019687
19688if test "$have_getrandom" = yes; then
19689
Pablo Galindoba421752021-05-03 20:33:17 +010019690printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020019691
19692fi
19693
Neil Schemenauer5741c452019-02-08 10:48:46 -080019694# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
19695# shm_* may only be available if linking against librt
19696save_LIBS="$LIBS"
19697save_includes_default="$ac_includes_default"
Pablo Galindoba421752021-05-03 20:33:17 +010019698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
19699printf %s "checking for library containing shm_open... " >&6; }
19700if test ${ac_cv_search_shm_open+y}
19701then :
19702 printf %s "(cached) " >&6
19703else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019704 ac_func_search_save_LIBS=$LIBS
19705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19706/* end confdefs.h. */
19707
19708/* Override any GCC internal prototype to avoid an error.
19709 Use char because int might match the return type of a GCC
19710 builtin and then its argument prototype would still apply. */
Neil Schemenauer5741c452019-02-08 10:48:46 -080019711char shm_open ();
19712int
Pablo Galindoba421752021-05-03 20:33:17 +010019713main (void)
Neil Schemenauer5741c452019-02-08 10:48:46 -080019714{
19715return shm_open ();
19716 ;
19717 return 0;
19718}
19719_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019720for ac_lib in '' rt
19721do
Neil Schemenauer5741c452019-02-08 10:48:46 -080019722 if test -z "$ac_lib"; then
19723 ac_res="none required"
19724 else
19725 ac_res=-l$ac_lib
19726 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19727 fi
Pablo Galindoba421752021-05-03 20:33:17 +010019728 if ac_fn_c_try_link "$LINENO"
19729then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019730 ac_cv_search_shm_open=$ac_res
19731fi
Pablo Galindoba421752021-05-03 20:33:17 +010019732rm -f core conftest.err conftest.$ac_objext conftest.beam \
Neil Schemenauer5741c452019-02-08 10:48:46 -080019733 conftest$ac_exeext
Pablo Galindoba421752021-05-03 20:33:17 +010019734 if test ${ac_cv_search_shm_open+y}
19735then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019736 break
19737fi
19738done
Pablo Galindoba421752021-05-03 20:33:17 +010019739if test ${ac_cv_search_shm_open+y}
19740then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019741
Pablo Galindoba421752021-05-03 20:33:17 +010019742else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019743 ac_cv_search_shm_open=no
19744fi
19745rm conftest.$ac_ext
19746LIBS=$ac_func_search_save_LIBS
19747fi
Pablo Galindoba421752021-05-03 20:33:17 +010019748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
19749printf "%s\n" "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080019750ac_res=$ac_cv_search_shm_open
Pablo Galindoba421752021-05-03 20:33:17 +010019751if test "$ac_res" != no
19752then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019753 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19754
19755fi
19756
19757if test "$ac_cv_search_shm_open" = "-lrt"; then
19758
Pablo Galindoba421752021-05-03 20:33:17 +010019759printf "%s\n" "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019760
19761fi
Pablo Galindoba421752021-05-03 20:33:17 +010019762ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
19763if test "x$ac_cv_header_sys_mman_h" = xyes
19764then :
19765 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019766
19767fi
19768
Neil Schemenauer5741c452019-02-08 10:48:46 -080019769# temporarily override ac_includes_default for AC_CHECK_FUNCS below
19770ac_includes_default="\
19771${ac_includes_default}
19772#ifndef __cplusplus
19773# ifdef HAVE_SYS_MMAN_H
19774# include <sys/mman.h>
19775# endif
19776#endif
19777"
Pablo Galindoba421752021-05-03 20:33:17 +010019778ac_fn_c_check_func "$LINENO" "shm_open" "ac_cv_func_shm_open"
19779if test "x$ac_cv_func_shm_open" = xyes
19780then :
19781 printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019782
19783fi
Pablo Galindoba421752021-05-03 20:33:17 +010019784ac_fn_c_check_func "$LINENO" "shm_unlink" "ac_cv_func_shm_unlink"
19785if test "x$ac_cv_func_shm_unlink" = xyes
19786then :
19787 printf "%s\n" "#define HAVE_SHM_UNLINK 1" >>confdefs.h
19788
19789fi
Neil Schemenauer5741c452019-02-08 10:48:46 -080019790
19791# we don't want to link with librt always, restore LIBS
19792LIBS="$save_LIBS"
19793ac_includes_default="$save_includes_default"
19794
Christian Heimesff5be6e2018-01-20 13:19:21 +010019795# Check for usable OpenSSL
19796
19797 found=false
19798
19799# Check whether --with-openssl was given.
Pablo Galindoba421752021-05-03 20:33:17 +010019800if test ${with_openssl+y}
19801then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019802 withval=$with_openssl;
19803 case "$withval" in
19804 "" | y | ye | yes | n | no)
19805 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
19806 ;;
19807 *) ssldirs="$withval"
19808 ;;
19809 esac
19810
Pablo Galindoba421752021-05-03 20:33:17 +010019811else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019812
19813 # if pkg-config is installed and openssl has installed a .pc file,
19814 # then use that information and don't search ssldirs
19815 if test -n "$ac_tool_prefix"; then
19816 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19817set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +010019818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19819printf %s "checking for $ac_word... " >&6; }
19820if test ${ac_cv_prog_PKG_CONFIG+y}
19821then :
19822 printf %s "(cached) " >&6
19823else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019824 if test -n "$PKG_CONFIG"; then
19825 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
19826else
19827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19828for as_dir in $PATH
19829do
19830 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010019831 case $as_dir in #(((
19832 '') as_dir=./ ;;
19833 */) ;;
19834 *) as_dir=$as_dir/ ;;
19835 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019836 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +010019837 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019838 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Pablo Galindoba421752021-05-03 20:33:17 +010019839 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019840 break 2
19841 fi
19842done
19843 done
19844IFS=$as_save_IFS
19845
19846fi
19847fi
19848PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
19849if test -n "$PKG_CONFIG"; then
Pablo Galindoba421752021-05-03 20:33:17 +010019850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19851printf "%s\n" "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019852else
Pablo Galindoba421752021-05-03 20:33:17 +010019853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19854printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019855fi
19856
19857
19858fi
19859if test -z "$ac_cv_prog_PKG_CONFIG"; then
19860 ac_ct_PKG_CONFIG=$PKG_CONFIG
19861 # Extract the first word of "pkg-config", so it can be a program name with args.
19862set dummy pkg-config; ac_word=$2
Pablo Galindoba421752021-05-03 20:33:17 +010019863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19864printf %s "checking for $ac_word... " >&6; }
19865if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y}
19866then :
19867 printf %s "(cached) " >&6
19868else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019869 if test -n "$ac_ct_PKG_CONFIG"; then
19870 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
19871else
19872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19873for as_dir in $PATH
19874do
19875 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010019876 case $as_dir in #(((
19877 '') as_dir=./ ;;
19878 */) ;;
19879 *) as_dir=$as_dir/ ;;
19880 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019881 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindoba421752021-05-03 20:33:17 +010019882 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019883 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Pablo Galindoba421752021-05-03 20:33:17 +010019884 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019885 break 2
19886 fi
19887done
19888 done
19889IFS=$as_save_IFS
19890
19891fi
19892fi
19893ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
19894if test -n "$ac_ct_PKG_CONFIG"; then
Pablo Galindoba421752021-05-03 20:33:17 +010019895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
19896printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019897else
Pablo Galindoba421752021-05-03 20:33:17 +010019898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19899printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019900fi
19901
19902 if test "x$ac_ct_PKG_CONFIG" = x; then
19903 PKG_CONFIG=""
19904 else
19905 case $cross_compiling:$ac_tool_warned in
19906yes:)
Pablo Galindoba421752021-05-03 20:33:17 +010019907{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19908printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010019909ac_tool_warned=yes ;;
19910esac
19911 PKG_CONFIG=$ac_ct_PKG_CONFIG
19912 fi
19913else
19914 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
19915fi
19916
19917 if test x"$PKG_CONFIG" != x""; then
19918 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
19919 if test $? = 0; then
19920 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
19921 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
19922 found=true
19923 fi
19924 fi
19925
19926 # no such luck; use some default ssldirs
19927 if ! $found; then
19928 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
19929 fi
19930
19931
19932fi
19933
19934
19935
19936 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
19937 # an 'openssl' subdirectory
19938
19939 if ! $found; then
19940 OPENSSL_INCLUDES=
19941 for ssldir in $ssldirs; do
Pablo Galindoba421752021-05-03 20:33:17 +010019942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
19943printf %s "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019944 if test -f "$ssldir/include/openssl/ssl.h"; then
19945 OPENSSL_INCLUDES="-I$ssldir/include"
19946 OPENSSL_LDFLAGS="-L$ssldir/lib"
19947 OPENSSL_LIBS="-lssl -lcrypto"
19948 found=true
Pablo Galindoba421752021-05-03 20:33:17 +010019949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19950printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019951 break
19952 else
Pablo Galindoba421752021-05-03 20:33:17 +010019953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19954printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019955 fi
19956 done
19957
19958 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
19959 # it will just work!
19960 fi
19961
19962 # try the preprocessor and linker with our new flags,
19963 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
19964
Pablo Galindoba421752021-05-03 20:33:17 +010019965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
19966printf %s "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019967 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
19968 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
19969
19970 save_LIBS="$LIBS"
19971 save_LDFLAGS="$LDFLAGS"
19972 save_CPPFLAGS="$CPPFLAGS"
19973 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
19974 LIBS="$OPENSSL_LIBS $LIBS"
19975 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
19976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19977/* end confdefs.h. */
19978#include <openssl/ssl.h>
19979int
Pablo Galindoba421752021-05-03 20:33:17 +010019980main (void)
Christian Heimesff5be6e2018-01-20 13:19:21 +010019981{
19982SSL_new(NULL)
19983 ;
19984 return 0;
19985}
19986_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010019987if ac_fn_c_try_link "$LINENO"
19988then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019989
Pablo Galindoba421752021-05-03 20:33:17 +010019990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19991printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019992 have_openssl=yes
19993
Pablo Galindoba421752021-05-03 20:33:17 +010019994else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019995
Pablo Galindoba421752021-05-03 20:33:17 +010019996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19997printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019998 have_openssl=no
19999
20000fi
Pablo Galindoba421752021-05-03 20:33:17 +010020001rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimesff5be6e2018-01-20 13:19:21 +010020002 conftest$ac_exeext conftest.$ac_ext
20003 CPPFLAGS="$save_CPPFLAGS"
20004 LDFLAGS="$save_LDFLAGS"
20005 LIBS="$save_LIBS"
20006
20007
20008
20009
20010
20011
Christian Heimes32eba612021-03-19 10:29:25 +010020012# rpath to libssl and libcrypto
Pablo Galindoba421752021-05-03 20:33:17 +010020013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
20014printf %s "checking for --with-openssl-rpath... " >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010020015
20016# Check whether --with-openssl-rpath was given.
Pablo Galindoba421752021-05-03 20:33:17 +010020017if test ${with_openssl_rpath+y}
20018then :
Christian Heimes32eba612021-03-19 10:29:25 +010020019 withval=$with_openssl_rpath;
Pablo Galindoba421752021-05-03 20:33:17 +010020020else $as_nop
Christian Heimes32eba612021-03-19 10:29:25 +010020021 with_openssl_rpath=no
20022
20023fi
20024
20025case $with_openssl_rpath in #(
20026 auto|yes) :
20027 OPENSSL_RPATH=auto ;; #(
20028 no) :
20029 OPENSSL_RPATH= ;; #(
20030 *) :
Pablo Galindoba421752021-05-03 20:33:17 +010020031 if test -d "$with_openssl_rpath"
20032then :
Christian Heimes32eba612021-03-19 10:29:25 +010020033 OPENSSL_RPATH="$with_openssl_rpath"
Pablo Galindoba421752021-05-03 20:33:17 +010020034else $as_nop
Christian Heimes32eba612021-03-19 10:29:25 +010020035 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
20036fi
20037
20038 ;;
20039esac
Pablo Galindoba421752021-05-03 20:33:17 +010020040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
20041printf "%s\n" "$OPENSSL_RPATH" >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010020042
20043
Christian Heimes892d66e2018-01-29 14:10:18 +010020044# ssl module default cipher suite string
20045
20046
20047
Pablo Galindoba421752021-05-03 20:33:17 +010020048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
20049printf %s "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010020050
20051# Check whether --with-ssl-default-suites was given.
Pablo Galindoba421752021-05-03 20:33:17 +010020052if test ${with_ssl_default_suites+y}
20053then :
Christian Heimes892d66e2018-01-29 14:10:18 +010020054 withval=$with_ssl_default_suites;
Pablo Galindoba421752021-05-03 20:33:17 +010020055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
20056printf "%s\n" "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010020057case "$withval" in
20058 python)
Pablo Galindoba421752021-05-03 20:33:17 +010020059 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020060
20061 ;;
20062 openssl)
Pablo Galindoba421752021-05-03 20:33:17 +010020063 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020064
20065 ;;
20066 *)
Pablo Galindoba421752021-05-03 20:33:17 +010020067 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020068
Pablo Galindoba421752021-05-03 20:33:17 +010020069 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHER_STRING \"$withval\"" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020070
20071 ;;
20072esac
20073
Pablo Galindoba421752021-05-03 20:33:17 +010020074else $as_nop
Christian Heimes892d66e2018-01-29 14:10:18 +010020075
Pablo Galindoba421752021-05-03 20:33:17 +010020076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: python" >&5
20077printf "%s\n" "python" >&6; }
20078printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020079
20080
20081fi
20082
20083
Christian Heimes9b60e552020-05-15 23:54:53 +020020084# builtin hash modules
20085default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
20086
Pablo Galindoba421752021-05-03 20:33:17 +010020087printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020088
Pablo Galindoba421752021-05-03 20:33:17 +010020089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
20090printf %s "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020020091
20092# Check whether --with-builtin-hashlib-hashes was given.
Pablo Galindoba421752021-05-03 20:33:17 +010020093if test ${with_builtin_hashlib_hashes+y}
20094then :
Christian Heimes9b60e552020-05-15 23:54:53 +020020095 withval=$with_builtin_hashlib_hashes;
20096case "$withval" in
20097 yes)
20098 withval=$default_hashlib_hashes
20099 ;;
20100 no)
20101 withval=""
20102 ;;
20103esac
Pablo Galindoba421752021-05-03 20:33:17 +010020104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
20105printf "%s\n" "$withval" >&6; }
20106printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$withval\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020107
20108
Pablo Galindoba421752021-05-03 20:33:17 +010020109else $as_nop
Christian Heimes9b60e552020-05-15 23:54:53 +020020110
Pablo Galindoba421752021-05-03 20:33:17 +010020111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
20112printf "%s\n" "$default_hashlib_hashes" >&6; };
20113printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$default_hashlib_hashes\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020114
20115
20116fi
20117
20118
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020119# --with-experimental-isolated-subinterpreters
20120
Pablo Galindoba421752021-05-03 20:33:17 +010020121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
20122printf %s "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020123
20124# Check whether --with-experimental-isolated-subinterpreters was given.
Pablo Galindoba421752021-05-03 20:33:17 +010020125if test ${with_experimental_isolated_subinterpreters+y}
20126then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020127 withval=$with_experimental_isolated_subinterpreters;
20128if test "$withval" != no
20129then
Pablo Galindoba421752021-05-03 20:33:17 +010020130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20131printf "%s\n" "yes" >&6; };
20132 printf "%s\n" "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020133
20134else
Pablo Galindoba421752021-05-03 20:33:17 +010020135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20136printf "%s\n" "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020137fi
Pablo Galindoba421752021-05-03 20:33:17 +010020138else $as_nop
20139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20140printf "%s\n" "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020141fi
20142
20143
Victor Stinner801bb0b2021-02-17 11:14:42 +010020144# --with-static-libpython
20145STATIC_LIBPYTHON=1
Pablo Galindoba421752021-05-03 20:33:17 +010020146{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
20147printf %s "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020148
20149# Check whether --with-static-libpython was given.
Pablo Galindoba421752021-05-03 20:33:17 +010020150if test ${with_static_libpython+y}
20151then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010020152 withval=$with_static_libpython;
20153if test "$withval" = no
20154then
Pablo Galindoba421752021-05-03 20:33:17 +010020155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20156printf "%s\n" "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020157 STATIC_LIBPYTHON=0
20158else
Pablo Galindoba421752021-05-03 20:33:17 +010020159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20160printf "%s\n" "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020161fi
Pablo Galindoba421752021-05-03 20:33:17 +010020162else $as_nop
20163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20164printf "%s\n" "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020165fi
20166
20167LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050020168if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010020169 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
20170 if test "$STATIC_LIBPYTHON" = 1; then
20171 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20172 fi
20173else
20174 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20175fi
20176
20177
20178
pxinwr277ce302020-12-30 20:50:39 +080020179# Check whether to disable test modules. Once set, setup.py will not build
20180# test extension modules and "make install" will not install test suites.
Pablo Galindoba421752021-05-03 20:33:17 +010020181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
20182printf %s "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020183# Check whether --enable-test-modules was given.
Pablo Galindoba421752021-05-03 20:33:17 +010020184if test ${enable_test_modules+y}
20185then :
pxinwr277ce302020-12-30 20:50:39 +080020186 enableval=$enable_test_modules;
20187fi
20188
20189if test "$enable_test_modules" = no; then
20190 TEST_MODULES=no
Pablo Galindoba421752021-05-03 20:33:17 +010020191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20192printf "%s\n" "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020193else
20194 TEST_MODULES=yes
Pablo Galindoba421752021-05-03 20:33:17 +010020195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20196printf "%s\n" "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020197fi
20198
20199
Christian Heimes892d66e2018-01-29 14:10:18 +010020200
Guido van Rossum627b2d71993-12-24 10:39:16 +000020201# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020020202ac_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 +000020203
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020204ac_config_files="$ac_config_files Modules/ld_so_aix"
20205
Martin v. Löwis11437992002-04-12 09:54:03 +000020206cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020207# This file is a shell script that caches the results of configure
20208# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020209# scripts and configure runs, see configure's option --config-cache.
20210# It is not useful on other systems. If it contains results you don't
20211# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020212#
Martin v. Löwis11437992002-04-12 09:54:03 +000020213# config.status only pays attention to the cache file if you give it
20214# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020215#
Skip Montanaro6dead952003-09-25 14:50:04 +000020216# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020217# loading this file, other *unset* `ac_cv_foo' will be assigned the
20218# following values.
20219
20220_ACEOF
20221
Guido van Rossumf78abae1997-01-21 22:02:36 +000020222# The following way of writing the cache mishandles newlines in values,
20223# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020224# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020225# Ultrix sh set writes to stderr and can't be redirected directly,
20226# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020227(
20228 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20229 eval ac_val=\$$ac_var
20230 case $ac_val in #(
20231 *${as_nl}*)
20232 case $ac_var in #(
Pablo Galindoba421752021-05-03 20:33:17 +010020233 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20234printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020235 esac
20236 case $ac_var in #(
20237 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000020238 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20239 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020240 esac ;;
20241 esac
20242 done
20243
Martin v. Löwis11437992002-04-12 09:54:03 +000020244 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020245 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20246 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000020247 # `set' does not quote correctly, so add quotes: double-quote
20248 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000020249 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020250 "s/'/'\\\\''/g;
20251 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020252 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000020253 *)
20254 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020255 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020256 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020257 esac |
20258 sort
20259) |
Martin v. Löwis11437992002-04-12 09:54:03 +000020260 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020261 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000020262 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020263 :clear
Pablo Galindoba421752021-05-03 20:33:17 +010020264 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020266 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20267 :end' >>confcache
20268if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20269 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020020270 if test "x$cache_file" != "x/dev/null"; then
Pablo Galindoba421752021-05-03 20:33:17 +010020271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20272printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020020273 if test ! -f "$cache_file" || test -h "$cache_file"; then
20274 cat confcache >"$cache_file"
20275 else
20276 case $cache_file in #(
20277 */* | ?:*)
20278 mv -f confcache "$cache_file"$$ &&
20279 mv -f "$cache_file"$$ "$cache_file" ;; #(
20280 *)
20281 mv -f confcache "$cache_file" ;;
20282 esac
20283 fi
20284 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020285 else
Pablo Galindoba421752021-05-03 20:33:17 +010020286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20287printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020289fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020290rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020292test "x$prefix" = xNONE && prefix=$ac_default_prefix
20293# Let make expand exec_prefix.
20294test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020295
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020296DEFS=-DHAVE_CONFIG_H
20297
Skip Montanaro6dead952003-09-25 14:50:04 +000020298ac_libobjs=
20299ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020300U=
Skip Montanaro6dead952003-09-25 14:50:04 +000020301for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20302 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020303 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Pablo Galindoba421752021-05-03 20:33:17 +010020304 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020305 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20306 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000020307 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20308 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000020309done
20310LIBOBJS=$ac_libobjs
20311
20312LTLIBOBJS=$ac_ltlibobjs
20313
20314
Martin v. Löwis11437992002-04-12 09:54:03 +000020315
Matthias Kloseb9621712010-04-24 17:59:49 +000020316
Victor Stinnere0be4232011-10-25 13:06:09 +020020317: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000020318ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000020319ac_clean_files_save=$ac_clean_files
20320ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Pablo Galindoba421752021-05-03 20:33:17 +010020321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20322printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000020323as_write_fail=0
20324cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020325#! $SHELL
20326# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020327# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020328# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020329# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020330
Martin v. Löwis11437992002-04-12 09:54:03 +000020331debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020332ac_cs_recheck=false
20333ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000020334
Matthias Kloseb9621712010-04-24 17:59:49 +000020335SHELL=\${CONFIG_SHELL-$SHELL}
20336export SHELL
20337_ASEOF
20338cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20339## -------------------- ##
20340## M4sh Initialization. ##
20341## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020343# Be more Bourne compatible
20344DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindoba421752021-05-03 20:33:17 +010020345as_nop=:
20346if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20347then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020348 emulate sh
20349 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000020350 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000020351 # is contrary to our usage. Disable this feature.
20352 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020353 setopt NO_GLOB_SUBST
Pablo Galindoba421752021-05-03 20:33:17 +010020354else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020355 case `(set -o) 2>/dev/null` in #(
20356 *posix*) :
20357 set -o posix ;; #(
20358 *) :
20359 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020360esac
Michael W. Hudson54241132001-12-07 15:38:26 +000020361fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000020362
20363
Pablo Galindoba421752021-05-03 20:33:17 +010020364
20365# Reset variables that may have inherited troublesome values from
20366# the environment.
20367
20368# IFS needs to be set, to space, tab, and newline, in precisely that order.
20369# (If _AS_PATH_WALK were called with IFS unset, it would have the
20370# side effect of setting IFS to empty, thus disabling word splitting.)
20371# Quoting is to prevent editors from complaining about space-tab.
Matthias Kloseb9621712010-04-24 17:59:49 +000020372as_nl='
20373'
20374export as_nl
Pablo Galindoba421752021-05-03 20:33:17 +010020375IFS=" "" $as_nl"
20376
20377PS1='$ '
20378PS2='> '
20379PS4='+ '
20380
20381# Ensure predictable behavior from utilities with locale-dependent output.
20382LC_ALL=C
20383export LC_ALL
20384LANGUAGE=C
20385export LANGUAGE
20386
20387# We cannot yet rely on "unset" to work, but we need these variables
20388# to be unset--not just set to an empty or harmless value--now, to
20389# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
20390# also avoids known problems related to "unset" and subshell syntax
20391# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
20392for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
20393do eval test \${$as_var+y} \
20394 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20395done
20396
20397# Ensure that fds 0, 1, and 2 are open.
20398if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
20399if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
20400if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020401
20402# The user is always right.
Pablo Galindoba421752021-05-03 20:33:17 +010020403if ${PATH_SEPARATOR+false} :; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020404 PATH_SEPARATOR=:
20405 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20406 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20407 PATH_SEPARATOR=';'
20408 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020409fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020412# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020020413as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000020414case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415 *[\\/]* ) as_myself=$0 ;;
20416 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000020417for as_dir in $PATH
20418do
20419 IFS=$as_save_IFS
Pablo Galindoba421752021-05-03 20:33:17 +010020420 case $as_dir in #(((
20421 '') as_dir=./ ;;
20422 */) ;;
20423 *) as_dir=$as_dir/ ;;
20424 esac
20425 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000020426 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020427IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000020428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020429 ;;
20430esac
20431# We did not find ourselves, most probably we were run as `sh COMMAND'
20432# in which case we are not to be found in the path.
20433if test "x$as_myself" = x; then
20434 as_myself=$0
20435fi
20436if test ! -f "$as_myself"; then
Pablo Galindoba421752021-05-03 20:33:17 +010020437 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020438 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020439fi
20440
Matthias Kloseb9621712010-04-24 17:59:49 +000020441
20442
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020443# as_fn_error STATUS ERROR [LINENO LOG_FD]
20444# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000020445# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20446# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020447# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000020448as_fn_error ()
20449{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020450 as_status=$1; test $as_status -eq 0 && as_status=1
20451 if test "$4"; then
20452 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindoba421752021-05-03 20:33:17 +010020453 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000020454 fi
Pablo Galindoba421752021-05-03 20:33:17 +010020455 printf "%s\n" "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020456 as_fn_exit $as_status
20457} # as_fn_error
20458
20459
Pablo Galindoba421752021-05-03 20:33:17 +010020460
Matthias Kloseb9621712010-04-24 17:59:49 +000020461# as_fn_set_status STATUS
20462# -----------------------
20463# Set $? to STATUS, without forking.
20464as_fn_set_status ()
20465{
20466 return $1
20467} # as_fn_set_status
20468
20469# as_fn_exit STATUS
20470# -----------------
20471# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20472as_fn_exit ()
20473{
20474 set +e
20475 as_fn_set_status $1
20476 exit $1
20477} # as_fn_exit
20478
20479# as_fn_unset VAR
20480# ---------------
20481# Portably unset VAR.
20482as_fn_unset ()
20483{
20484 { eval $1=; unset $1;}
20485}
20486as_unset=as_fn_unset
Pablo Galindoba421752021-05-03 20:33:17 +010020487
Matthias Kloseb9621712010-04-24 17:59:49 +000020488# as_fn_append VAR VALUE
20489# ----------------------
20490# Append the text in VALUE to the end of the definition contained in VAR. Take
20491# advantage of any shell optimizations that allow amortized linear growth over
20492# repeated appends, instead of the typical quadratic growth present in naive
20493# implementations.
Pablo Galindoba421752021-05-03 20:33:17 +010020494if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
20495then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020496 eval 'as_fn_append ()
20497 {
20498 eval $1+=\$2
20499 }'
Pablo Galindoba421752021-05-03 20:33:17 +010020500else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020501 as_fn_append ()
20502 {
20503 eval $1=\$$1\$2
20504 }
20505fi # as_fn_append
20506
20507# as_fn_arith ARG...
20508# ------------------
20509# Perform arithmetic evaluation on the ARGs, and store the result in the
20510# global $as_val. Take advantage of shells that can avoid forks. The arguments
20511# must be portable across $(()) and expr.
Pablo Galindoba421752021-05-03 20:33:17 +010020512if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
20513then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020514 eval 'as_fn_arith ()
20515 {
20516 as_val=$(( $* ))
20517 }'
Pablo Galindoba421752021-05-03 20:33:17 +010020518else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020519 as_fn_arith ()
20520 {
20521 as_val=`expr "$@" || test $? -eq 1`
20522 }
20523fi # as_fn_arith
20524
20525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020526if expr a : '\(a\)' >/dev/null 2>&1 &&
20527 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20528 as_expr=expr
20529else
20530 as_expr=false
20531fi
20532
20533if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20534 as_basename=basename
20535else
20536 as_basename=false
20537fi
20538
Matthias Kloseb9621712010-04-24 17:59:49 +000020539if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20540 as_dirname=dirname
20541else
20542 as_dirname=false
20543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020545as_me=`$as_basename -- "$0" ||
20546$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20547 X"$0" : 'X\(//\)$' \| \
20548 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindoba421752021-05-03 20:33:17 +010020549printf "%s\n" X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020550 sed '/^.*\/\([^/][^/]*\)\/*$/{
20551 s//\1/
20552 q
20553 }
20554 /^X\/\(\/\/\)$/{
20555 s//\1/
20556 q
20557 }
20558 /^X\/\(\/\).*/{
20559 s//\1/
20560 q
20561 }
20562 s/.*/./; q'`
20563
Matthias Kloseb9621712010-04-24 17:59:49 +000020564# Avoid depending upon Character Ranges.
20565as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20566as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20567as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20568as_cr_digits='0123456789'
20569as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020570
Pablo Galindoba421752021-05-03 20:33:17 +010020571
20572# Determine whether it's possible to make 'echo' print without a newline.
20573# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
20574# for compatibility with existing Makefiles.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020575ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000020576case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020577-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000020578 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020579 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000020580 xy) ECHO_C='\c';;
20581 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20582 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020583 esac;;
20584*)
20585 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000020586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020587
Pablo Galindoba421752021-05-03 20:33:17 +010020588# For backward compatibility with old third-party macros, we provide
20589# the shell variables $as_echo and $as_echo_n. New code should use
20590# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
20591as_echo='printf %s\n'
20592as_echo_n='printf %s'
20593
Martin v. Löwis11437992002-04-12 09:54:03 +000020594rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020595if test -d conf$$.dir; then
20596 rm -f conf$$.dir/conf$$.file
20597else
20598 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000020599 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000020601if (echo >conf$$.file) 2>/dev/null; then
20602 if ln -s conf$$.file conf$$ 2>/dev/null; then
20603 as_ln_s='ln -s'
20604 # ... but there are two gotchas:
20605 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20606 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020607 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000020608 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020609 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020610 elif ln conf$$.file conf$$ 2>/dev/null; then
20611 as_ln_s=ln
20612 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020613 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020615else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020616 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000020617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020618rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20619rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000020620
Matthias Kloseb9621712010-04-24 17:59:49 +000020621
20622# as_fn_mkdir_p
20623# -------------
20624# Create "$as_dir" as a directory, including parents if necessary.
20625as_fn_mkdir_p ()
20626{
20627
20628 case $as_dir in #(
20629 -*) as_dir=./$as_dir;;
20630 esac
20631 test -d "$as_dir" || eval $as_mkdir_p || {
20632 as_dirs=
20633 while :; do
20634 case $as_dir in #(
Pablo Galindoba421752021-05-03 20:33:17 +010020635 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000020636 *) as_qdir=$as_dir;;
20637 esac
20638 as_dirs="'$as_qdir' $as_dirs"
20639 as_dir=`$as_dirname -- "$as_dir" ||
20640$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20641 X"$as_dir" : 'X\(//\)[^/]' \| \
20642 X"$as_dir" : 'X\(//\)$' \| \
20643 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindoba421752021-05-03 20:33:17 +010020644printf "%s\n" X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000020645 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20646 s//\1/
20647 q
20648 }
20649 /^X\(\/\/\)[^/].*/{
20650 s//\1/
20651 q
20652 }
20653 /^X\(\/\/\)$/{
20654 s//\1/
20655 q
20656 }
20657 /^X\(\/\).*/{
20658 s//\1/
20659 q
20660 }
20661 s/.*/./; q'`
20662 test -d "$as_dir" && break
20663 done
20664 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020665 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000020666
20667
20668} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000020669if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020670 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000020671else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020672 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020673 as_mkdir_p=false
20674fi
20675
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020676
20677# as_fn_executable_p FILE
20678# -----------------------
20679# Test if FILE is an executable regular file.
20680as_fn_executable_p ()
20681{
20682 test -f "$1" && test -x "$1"
20683} # as_fn_executable_p
20684as_test_x='test -x'
20685as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000020686
20687# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020688as_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 +000020689
20690# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020691as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020692
20693
Martin v. Löwis11437992002-04-12 09:54:03 +000020694exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000020695## ----------------------------------- ##
20696## Main body of $CONFIG_STATUS script. ##
20697## ----------------------------------- ##
20698_ASEOF
20699test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020700
Matthias Kloseb9621712010-04-24 17:59:49 +000020701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20702# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000020703# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020704# values after options handling.
20705ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010020706This file was extended by python $as_me 3.10, which was
Pablo Galindoba421752021-05-03 20:33:17 +010020707generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020708
20709 CONFIG_FILES = $CONFIG_FILES
20710 CONFIG_HEADERS = $CONFIG_HEADERS
20711 CONFIG_LINKS = $CONFIG_LINKS
20712 CONFIG_COMMANDS = $CONFIG_COMMANDS
20713 $ $0 $@
20714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020715on `(hostname || uname -n) 2>/dev/null | sed 1q`
20716"
20717
Martin v. Löwis11437992002-04-12 09:54:03 +000020718_ACEOF
20719
Matthias Kloseb9621712010-04-24 17:59:49 +000020720case $ac_config_files in *"
20721"*) set x $ac_config_files; shift; ac_config_files=$*;;
20722esac
20723
20724case $ac_config_headers in *"
20725"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20726esac
20727
20728
20729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020730# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010020731config_files="$ac_config_files"
20732config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000020733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020734_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020735
Matthias Kloseb9621712010-04-24 17:59:49 +000020736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020737ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000020738\`$as_me' instantiates files and other configuration actions
20739from templates according to the current configuration. Unless the files
20740and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000020741
Matthias Kloseb9621712010-04-24 17:59:49 +000020742Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000020743
20744 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020745 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000020746 --config print configuration, then exit
20747 -q, --quiet, --silent
20748 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020749 -d, --debug don't remove temporary files
20750 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000020751 --file=FILE[:TEMPLATE]
20752 instantiate the configuration file FILE
20753 --header=FILE[:TEMPLATE]
20754 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020755
20756Configuration files:
20757$config_files
20758
20759Configuration headers:
20760$config_headers
20761
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070020762Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020764_ACEOF
Pablo Galindoba421752021-05-03 20:33:17 +010020765ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
20766ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Matthias Kloseb9621712010-04-24 17:59:49 +000020767cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Pablo Galindoba421752021-05-03 20:33:17 +010020768ac_cs_config='$ac_cs_config_escaped'
Martin v. Löwis11437992002-04-12 09:54:03 +000020769ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010020770python config.status 3.10
Pablo Galindoba421752021-05-03 20:33:17 +010020771configured by $0, generated by GNU Autoconf 2.71,
Matthias Kloseb9621712010-04-24 17:59:49 +000020772 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000020773
Pablo Galindoba421752021-05-03 20:33:17 +010020774Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020775This config.status script is free software; the Free Software Foundation
20776gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020777
20778ac_pwd='$ac_pwd'
20779srcdir='$srcdir'
20780INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010020781MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000020782test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000020783_ACEOF
20784
Matthias Kloseb9621712010-04-24 17:59:49 +000020785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20786# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000020787ac_need_defaults=:
20788while test $# != 0
20789do
20790 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020791 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020792 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20793 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020794 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020796 --*=)
20797 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20798 ac_optarg=
20799 ac_shift=:
20800 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020801 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020802 ac_option=$1
20803 ac_optarg=$2
20804 ac_shift=shift
20805 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020806 esac
20807
Skip Montanaro6dead952003-09-25 14:50:04 +000020808 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000020810 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20811 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020812 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Pablo Galindoba421752021-05-03 20:33:17 +010020813 printf "%s\n" "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020814 --config | --confi | --conf | --con | --co | --c )
Pablo Galindoba421752021-05-03 20:33:17 +010020815 printf "%s\n" "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020816 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 debug=: ;;
20818 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020819 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020820 case $ac_optarg in
Pablo Galindoba421752021-05-03 20:33:17 +010020821 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020822 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020823 esac
20824 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 ac_need_defaults=false;;
20826 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020827 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020828 case $ac_optarg in
Pablo Galindoba421752021-05-03 20:33:17 +010020829 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020830 esac
20831 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020832 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020833 --he | --h)
20834 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020835 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020836Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020837 --help | --hel | -h )
Pablo Galindoba421752021-05-03 20:33:17 +010020838 printf "%s\n" "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020839 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20840 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20841 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020842
20843 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020844 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020845Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020846
Matthias Kloseb9621712010-04-24 17:59:49 +000020847 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020848 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020849
20850 esac
20851 shift
20852done
20853
Skip Montanaro6dead952003-09-25 14:50:04 +000020854ac_configure_extra_args=
20855
20856if $ac_cs_silent; then
20857 exec 6>/dev/null
20858 ac_configure_extra_args="$ac_configure_extra_args --silent"
20859fi
20860
20861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020862cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000020863if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020864 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000020865 shift
Pablo Galindoba421752021-05-03 20:33:17 +010020866 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000020867 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020868 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000020869 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000020870fi
20871
Martin v. Löwis11437992002-04-12 09:54:03 +000020872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020874exec 5>>config.log
20875{
20876 echo
20877 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20878## Running $as_me. ##
20879_ASBOX
Pablo Galindoba421752021-05-03 20:33:17 +010020880 printf "%s\n" "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020881} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020884cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020885_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020886
Matthias Kloseb9621712010-04-24 17:59:49 +000020887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020888
20889# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000020890for ac_config_target in $ac_config_targets
20891do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020892 case $ac_config_target in
20893 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20894 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
20895 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000020896 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
20897 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000020899 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020020900 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010020901 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020902 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020903
Victor Stinnere0be4232011-10-25 13:06:09 +020020904 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020905 esac
20906done
20907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908
Martin v. Löwis11437992002-04-12 09:54:03 +000020909# If the user did not use the arguments to specify the items to instantiate,
20910# then the envvar interface is used. Set only those that are not.
20911# We use the long form for the default assignment because of an extremely
20912# bizarre bug on SunOS 4.1.3.
20913if $ac_need_defaults; then
Pablo Galindoba421752021-05-03 20:33:17 +010020914 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
20915 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000020916fi
20917
Skip Montanaro6dead952003-09-25 14:50:04 +000020918# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000020920# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020921# Hook for its removal unless debugging.
20922# Note that there is a small window in which the directory will not be cleaned:
20923# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000020924$debug ||
20925{
Victor Stinnere0be4232011-10-25 13:06:09 +020020926 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020927 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020020928 : "${ac_tmp:=$tmp}"
20929 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020930' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000020931 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000020932}
Martin v. Löwis11437992002-04-12 09:54:03 +000020933# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020934
Martin v. Löwis11437992002-04-12 09:54:03 +000020935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020936 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020020937 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000020938} ||
20939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020940 tmp=./conf$$-$RANDOM
20941 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020942} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020020943ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000020944
Matthias Kloseb9621712010-04-24 17:59:49 +000020945# Set up the scripts for CONFIG_FILES section.
20946# No need to generate them if there are no CONFIG_FILES.
20947# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020948if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020949
Matthias Kloseb9621712010-04-24 17:59:49 +000020950
20951ac_cr=`echo X | tr X '\015'`
20952# On cygwin, bash can eat \r inside `` if the user requested igncr.
20953# But we know of no other shell where ac_cr would be empty at this
20954# point, so we can use a bashism as a fallback.
20955if test "x$ac_cr" = x; then
20956 eval ac_cr=\$\'\\r\'
20957fi
20958ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20959if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020960 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000020961else
20962 ac_cs_awk_cr=$ac_cr
20963fi
20964
Victor Stinnere0be4232011-10-25 13:06:09 +020020965echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000020966_ACEOF
20967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020968
Matthias Kloseb9621712010-04-24 17:59:49 +000020969{
20970 echo "cat >conf$$subs.awk <<_ACEOF" &&
20971 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20972 echo "_ACEOF"
20973} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020974 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20975ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020976ac_delim='%!_!# '
20977for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000020978 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020979 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020980
Matthias Kloseb9621712010-04-24 17:59:49 +000020981 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20982 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020983 break
20984 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020985 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020986 else
20987 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000020988 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020989done
Matthias Kloseb9621712010-04-24 17:59:49 +000020990rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020991
Matthias Kloseb9621712010-04-24 17:59:49 +000020992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020020993cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020995sed -n '
20996h
20997s/^/S["/; s/!.*/"]=/
20998p
20999g
21000s/^[^!]*!//
21001:repl
21002t repl
21003s/'"$ac_delim"'$//
21004t delim
21005:nl
21006h
21007s/\(.\{148\}\)..*/\1/
21008t more1
21009s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21010p
21011n
21012b repl
21013:more1
21014s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21015p
21016g
21017s/.\{148\}//
21018t nl
21019:delim
21020h
21021s/\(.\{148\}\)..*/\1/
21022t more2
21023s/["\\]/\\&/g; s/^/"/; s/$/"/
21024p
21025b
21026:more2
21027s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21028p
21029g
21030s/.\{148\}//
21031t delim
21032' <conf$$subs.awk | sed '
21033/^[^""]/{
21034 N
21035 s/\n//
21036}
21037' >>$CONFIG_STATUS || ac_write_fail=1
21038rm -f conf$$subs.awk
21039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21040_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020021041cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000021042 for (key in S) S_is_set[key] = 1
21043 FS = ""
21044
21045}
21046{
21047 line = $ 0
21048 nfields = split(line, field, "@")
21049 substed = 0
21050 len = length(field[1])
21051 for (i = 2; i < nfields; i++) {
21052 key = field[i]
21053 keylen = length(key)
21054 if (S_is_set[key]) {
21055 value = S[key]
21056 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21057 len += length(value) + length(field[++i])
21058 substed = 1
21059 } else
21060 len += 1 + keylen
21061 }
21062
21063 print line
21064}
21065
21066_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21069if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21070 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21071else
21072 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020021073fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021074 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021075_ACEOF
21076
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021077# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
21078# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021079# trailing colons and then remove the whole line if VPATH becomes empty
21080# (actually we leave an empty line to preserve line numbers).
21081if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021082 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
21083h
21084s///
21085s/^/:/
21086s/[ ]*$/:/
21087s/:\$(srcdir):/:/g
21088s/:\${srcdir}:/:/g
21089s/:@srcdir@:/:/g
21090s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021091s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021092x
21093s/\(=[ ]*\).*/\1/
21094G
21095s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021096s/^[^=]*=[ ]*$//
21097}'
21098fi
21099
Matthias Kloseb9621712010-04-24 17:59:49 +000021100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000021101fi # test -n "$CONFIG_FILES"
21102
Matthias Kloseb9621712010-04-24 17:59:49 +000021103# Set up the scripts for CONFIG_HEADERS section.
21104# No need to generate them if there are no CONFIG_HEADERS.
21105# This happens for instance with `./config.status Makefile'.
21106if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020021107cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000021108BEGIN {
21109_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021110
Matthias Kloseb9621712010-04-24 17:59:49 +000021111# Transform confdefs.h into an awk script `defines.awk', embedded as
21112# here-document in config.status, that substitutes the proper values into
21113# config.h.in to produce config.h.
21114
21115# Create a delimiter string that does not exist in confdefs.h, to ease
21116# handling of long lines.
21117ac_delim='%!_!# '
21118for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020021119 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
21120 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000021121 break
21122 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021123 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021124 else
21125 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21126 fi
21127done
21128
21129# For the awk script, D is an array of macro values keyed by name,
21130# likewise P contains macro parameters if any. Preserve backslash
21131# newline sequences.
21132
21133ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21134sed -n '
21135s/.\{148\}/&'"$ac_delim"'/g
21136t rset
21137:rset
21138s/^[ ]*#[ ]*define[ ][ ]*/ /
21139t def
21140d
21141:def
21142s/\\$//
21143t bsnl
21144s/["\\]/\\&/g
21145s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21146D["\1"]=" \3"/p
21147s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21148d
21149:bsnl
21150s/["\\]/\\&/g
21151s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21152D["\1"]=" \3\\\\\\n"\\/p
21153t cont
21154s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21155t cont
21156d
21157:cont
21158n
21159s/.\{148\}/&'"$ac_delim"'/g
21160t clear
21161:clear
21162s/\\$//
21163t bsnlc
21164s/["\\]/\\&/g; s/^/"/; s/$/"/p
21165d
21166:bsnlc
21167s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21168b cont
21169' <confdefs.h | sed '
21170s/'"$ac_delim"'/"\\\
21171"/g' >>$CONFIG_STATUS || ac_write_fail=1
21172
21173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21174 for (key in D) D_is_set[key] = 1
21175 FS = ""
21176}
21177/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21178 line = \$ 0
21179 split(line, arg, " ")
21180 if (arg[1] == "#") {
21181 defundef = arg[2]
21182 mac1 = arg[3]
21183 } else {
21184 defundef = substr(arg[1], 2)
21185 mac1 = arg[2]
21186 }
21187 split(mac1, mac2, "(") #)
21188 macro = mac2[1]
21189 prefix = substr(line, 1, index(line, defundef) - 1)
21190 if (D_is_set[macro]) {
21191 # Preserve the white space surrounding the "#".
21192 print prefix "define", macro P[macro] D[macro]
21193 next
21194 } else {
21195 # Replace #undef with comments. This is necessary, for example,
21196 # in the case of _POSIX_SOURCE, which is predefined and required
21197 # on some systems where configure will not decide to define it.
21198 if (defundef == "undef") {
21199 print "/*", prefix defundef, macro, "*/"
21200 next
21201 }
21202 }
21203}
21204{ print }
21205_ACAWK
21206_ACEOF
21207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021208 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021209fi # test -n "$CONFIG_HEADERS"
21210
21211
21212eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
21213shift
21214for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021215do
21216 case $ac_tag in
21217 :[FHLC]) ac_mode=$ac_tag; continue;;
21218 esac
21219 case $ac_mode$ac_tag in
21220 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020021221 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021222 :[FH]-) ac_tag=-:-;;
21223 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21224 esac
21225 ac_save_IFS=$IFS
21226 IFS=:
21227 set x $ac_tag
21228 IFS=$ac_save_IFS
21229 shift
21230 ac_file=$1
21231 shift
21232
21233 case $ac_mode in
21234 :L) ac_source=$1;;
21235 :[FH])
21236 ac_file_inputs=
21237 for ac_f
21238 do
21239 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020021240 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021241 *) # Look for the file first in the build tree, then in the source tree
21242 # (if the path is not absolute). The absolute path cannot be DOS-style,
21243 # because $ac_f cannot contain `:'.
21244 test -f "$ac_f" ||
21245 case $ac_f in
21246 [\\/$]*) false;;
21247 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21248 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020021249 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021250 esac
Pablo Galindoba421752021-05-03 20:33:17 +010021251 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000021252 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021253 done
21254
21255 # Let's still pretend it is `configure' which instantiates (i.e., don't
21256 # use $as_me), people would be surprised to read:
21257 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000021258 configure_input='Generated from '`
Pablo Galindoba421752021-05-03 20:33:17 +010021259 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000021260 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261 if test x"$ac_file" != x-; then
21262 configure_input="$ac_file. $configure_input"
Pablo Galindoba421752021-05-03 20:33:17 +010021263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21264printf "%s\n" "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021265 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000021266 # Neutralize special characters interpreted by sed in replacement strings.
21267 case $configure_input in #(
21268 *\&* | *\|* | *\\* )
Pablo Galindoba421752021-05-03 20:33:17 +010021269 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000021270 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21271 *) ac_sed_conf_input=$configure_input;;
21272 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273
21274 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020021275 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21276 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021277 esac
21278 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021279 esac
21280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021281 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021282$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021283 X"$ac_file" : 'X\(//\)[^/]' \| \
21284 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021285 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindoba421752021-05-03 20:33:17 +010021286printf "%s\n" X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21288 s//\1/
21289 q
21290 }
21291 /^X\(\/\/\)[^/].*/{
21292 s//\1/
21293 q
21294 }
21295 /^X\(\/\/\)$/{
21296 s//\1/
21297 q
21298 }
21299 /^X\(\/\).*/{
21300 s//\1/
21301 q
21302 }
21303 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000021304 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000021305 ac_builddir=.
21306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021307case "$ac_dir" in
21308.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21309*)
Pablo Galindoba421752021-05-03 20:33:17 +010021310 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021311 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindoba421752021-05-03 20:33:17 +010021312 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021313 case $ac_top_builddir_sub in
21314 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21315 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21316 esac ;;
21317esac
21318ac_abs_top_builddir=$ac_pwd
21319ac_abs_builddir=$ac_pwd$ac_dir_suffix
21320# for backward compatibility:
21321ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000021322
21323case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021324 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021326 ac_top_srcdir=$ac_top_builddir_sub
21327 ac_abs_top_srcdir=$ac_pwd ;;
21328 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000021329 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021330 ac_top_srcdir=$srcdir
21331 ac_abs_top_srcdir=$srcdir ;;
21332 *) # Relative name.
21333 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21334 ac_top_srcdir=$ac_top_build_prefix$srcdir
21335 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021336esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021337ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000021338
Martin v. Löwis11437992002-04-12 09:54:03 +000021339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021340 case $ac_mode in
21341 :F)
21342 #
21343 # CONFIG_FILE
21344 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021345
21346 case $INSTALL in
21347 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021348 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010021350 ac_MKDIR_P=$MKDIR_P
21351 case $MKDIR_P in
21352 [\\/$]* | ?:[\\/]* ) ;;
21353 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21354 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000021355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021356
Matthias Kloseb9621712010-04-24 17:59:49 +000021357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021358# If the template does not know about datarootdir, expand it.
21359# FIXME: This hack should be removed a few years after 2.60.
21360ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000021361ac_sed_dataroot='
21362/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021363 p
21364 q
21365}
21366/@datadir@/p
21367/@docdir@/p
21368/@infodir@/p
21369/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000021370/@mandir@/p'
21371case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021372*datarootdir*) ac_datarootdir_seen=yes;;
21373*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Pablo Galindoba421752021-05-03 20:33:17 +010021374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21375printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021377cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021378 ac_datarootdir_hack='
21379 s&@datadir@&$datadir&g
21380 s&@docdir@&$docdir&g
21381 s&@infodir@&$infodir&g
21382 s&@localedir@&$localedir&g
21383 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000021384 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021385esac
21386_ACEOF
21387
21388# Neutralize VPATH when `$srcdir' = `.'.
21389# Shell code in configure.ac might set extrasub.
21390# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000021391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21392ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000021393$extrasub
21394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021395cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000021396:t
21397/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000021398s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021399s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000021400s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021401s&@srcdir@&$ac_srcdir&;t t
21402s&@abs_srcdir@&$ac_abs_srcdir&;t t
21403s&@top_srcdir@&$ac_top_srcdir&;t t
21404s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21405s&@builddir@&$ac_builddir&;t t
21406s&@abs_builddir@&$ac_abs_builddir&;t t
21407s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21408s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010021409s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021410$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000021411"
Victor Stinnere0be4232011-10-25 13:06:09 +020021412eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21413 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020021416 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21417 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21418 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Pablo Galindoba421752021-05-03 20:33:17 +010021419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021420which seems to be undefined. Please make sure it is defined" >&5
Pablo Galindoba421752021-05-03 20:33:17 +010021421printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021422which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021423
Victor Stinnere0be4232011-10-25 13:06:09 +020021424 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020021426 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21427 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000021428 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021429 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021430 ;;
21431 :H)
21432 #
21433 # CONFIG_HEADER
21434 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021435 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000021436 {
Pablo Galindoba421752021-05-03 20:33:17 +010021437 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021438 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21439 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021440 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020021441 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Pablo Galindoba421752021-05-03 20:33:17 +010021442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21443printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021444 else
Matthias Kloseb9621712010-04-24 17:59:49 +000021445 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020021446 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021447 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021448 fi
21449 else
Pablo Galindoba421752021-05-03 20:33:17 +010021450 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021451 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021452 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021453 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021454 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000021455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021456
21457 esac
21458
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000021459
21460 case $ac_file$ac_mode in
21461 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
21462
21463 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021464done # for ac_tag
21465
Guido van Rossum627b2d71993-12-24 10:39:16 +000021466
Matthias Kloseb9621712010-04-24 17:59:49 +000021467as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000021468_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021469ac_clean_files=$ac_clean_files_save
21470
Matthias Kloseb9621712010-04-24 17:59:49 +000021471test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021472 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021473
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
21475# configure is writing to config.log, and then calls config.status.
21476# config.status does its own redirection, appending to config.log.
21477# Unfortunately, on DOS this fails, as config.log is still kept open
21478# by configure, so config.status won't be able to write to it; its
21479# output is simply discarded. So we exec the FD to /dev/null,
21480# effectively closing config.log, so it can be properly (re)opened and
21481# appended to by config.status. When coming back to configure, we
21482# need to make the FD available again.
21483if test "$no_create" != yes; then
21484 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021485 ac_config_status_args=
21486 test "$silent" = yes &&
21487 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021488 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021489 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 exec 5>>config.log
21491 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21492 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021493 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000021494fi
21495if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Pablo Galindoba421752021-05-03 20:33:17 +010021496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21497printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021498fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021499
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021500
Christian Heimes75ed8902013-11-20 01:11:18 +010021501echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021502if test ! -f Modules/Setup.local
21503then
21504 echo "# Edit this file for local setup changes" >Modules/Setup.local
21505fi
21506
Christian Heimes75ed8902013-11-20 01:11:18 +010021507echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021508$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020021509 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020021510 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021511mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070021512
21513if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
21514 echo "" >&6
21515 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070021516 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 +000021517 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070021518 echo "" >&6
21519 echo "" >&6
21520fi
Pablo Galindoba421752021-05-03 20:33:17 +010021521