blob: e03b9ac5b3ddbbea18b3fb3595313c01d6ec596d [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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +0100172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000174
Pablo Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +0100187 if (eval "$as_required") 2>/dev/null
188then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000189 as_have_required=yes
Pablo Galindo53e55292021-04-05 17:38:40 +0100190else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000191 as_have_required=no
192fi
Pablo Galindo53e55292021-04-05 17:38:40 +0100193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000195
Pablo Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Heimes32eba612021-03-19 10:29:25 +0100226IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +0100436 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000437 fi
Pablo Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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 Galindo53e55292021-04-05 17:38:40 +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
782LIPO_32BIT_FLAGS
783ARCH_RUN_32BIT
784UNIVERSALSDK
785CONFIG_ARGS
786SOVERSION
787VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200788PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200789PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100790host_os
791host_vendor
792host_cpu
793host
794build_os
795build_vendor
796build_cpu
797build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500798HAS_GIT
799GITBRANCH
800GITTAG
801GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400802BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000803target_alias
804host_alias
805build_alias
806LIBS
807ECHO_T
808ECHO_N
809ECHO_C
810DEFS
811mandir
812localedir
813libdir
814psdir
815pdfdir
816dvidir
817htmldir
818infodir
819docdir
820oldincludedir
821includedir
Pablo Galindo53e55292021-04-05 17:38:40 +0100822runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000823localstatedir
824sharedstatedir
825sysconfdir
826datadir
827datarootdir
828libexecdir
829sbindir
830bindir
831program_transform_name
832prefix
833exec_prefix
834PACKAGE_URL
835PACKAGE_BUGREPORT
836PACKAGE_STRING
837PACKAGE_VERSION
838PACKAGE_TARNAME
839PACKAGE_NAME
840PATH_SEPARATOR
841SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000842ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000843ac_user_opts='
844enable_option_checking
845enable_universalsdk
846with_universal_archs
847with_framework_name
848enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_cxx_main
850with_suffix
851enable_shared
852enable_profiling
853with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200854with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200855with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000856enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700857with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100858with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400859with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100860with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800861with_memory_sanitizer
862with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000863with_libs
864with_system_expat
865with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100866with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100867with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000868enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700869with_tcltk_includes
870with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000871with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000872enable_ipv6
873with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000874with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000875with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000876with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700877with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000878with_libm
879with_libc
880enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100881with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100882with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100883with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000884with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800885with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100886with_openssl
Christian Heimes32eba612021-03-19 10:29:25 +0100887with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100888with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200889with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200890with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100891with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800892enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000893'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 ac_precious_vars='build_alias
895host_alias
896target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100897MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898CC
899CFLAGS
900LDFLAGS
901LIBS
902CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800903CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700904PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800905PKG_CONFIG
906PKG_CONFIG_PATH
907PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000911ac_init_help=
912ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000913ac_unrecognized_opts=
914ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915# The variables have the same names as the options, with
916# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000917cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920no_recursion=
921prefix=NONE
922program_prefix=NONE
923program_suffix=NONE
924program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929x_includes=NONE
930x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000931
932# Installation directory options.
933# These are left unexpanded so users can "make install exec_prefix=/foo"
934# and all the variables that are supposed to be based on exec_prefix
935# by default will actually change.
936# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938bindir='${exec_prefix}/bin'
939sbindir='${exec_prefix}/sbin'
940libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941datarootdir='${prefix}/share'
942datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943sysconfdir='${prefix}/etc'
944sharedstatedir='${prefix}/com'
945localstatedir='${prefix}/var'
Pablo Galindo53e55292021-04-05 17:38:40 +0100946runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947includedir='${prefix}/include'
948oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
950infodir='${datarootdir}/info'
951htmldir='${docdir}'
952dvidir='${docdir}'
953pdfdir='${docdir}'
954psdir='${docdir}'
955libdir='${exec_prefix}/lib'
956localedir='${datarootdir}/locale'
957mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000962do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963 # If the previous option needs an argument, assign it.
964 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 ac_prev=
967 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000968 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
972 *=) ac_optarg= ;;
973 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 case $ac_dashdash$ac_option in
977 --)
978 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -bindir | --bindir | --bindi | --bind | --bin | --bi)
981 ac_prev=bindir ;;
982 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
985 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 -cache-file | --cache-file | --cache-fil | --cache-fi \
991 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
992 ac_prev=cache_file ;;
993 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
994 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 cache_file=$ac_optarg ;;
996
997 --config-cache | -C)
998 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001002 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001005 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1006 | --dataroo | --dataro | --datar)
1007 ac_prev=datarootdir ;;
1008 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1009 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1010 datarootdir=$ac_optarg ;;
1011
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001013 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001015 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo53e55292021-04-05 17:38:40 +01001016 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001017 ac_useropt_orig=$ac_useropt
Pablo Galindo53e55292021-04-05 17:38:40 +01001018 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001019 case $ac_user_opts in
1020 *"
1021"enable_$ac_useropt"
1022"*) ;;
1023 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1024 ac_unrecognized_sep=', ';;
1025 esac
1026 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027
1028 -docdir | --docdir | --docdi | --doc | --do)
1029 ac_prev=docdir ;;
1030 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1031 docdir=$ac_optarg ;;
1032
1033 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1034 ac_prev=dvidir ;;
1035 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1036 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
1038 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001039 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001041 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo53e55292021-04-05 17:38:40 +01001042 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001043 ac_useropt_orig=$ac_useropt
Pablo Galindo53e55292021-04-05 17:38:40 +01001044 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001045 case $ac_user_opts in
1046 *"
1047"enable_$ac_useropt"
1048"*) ;;
1049 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1050 ac_unrecognized_sep=', ';;
1051 esac
1052 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1055 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1056 | --exec | --exe | --ex)
1057 ac_prev=exec_prefix ;;
1058 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1059 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1060 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064 # Obsolete; use --with-gas.
1065 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 -help | --help | --hel | --he | -h)
1068 ac_init_help=long ;;
1069 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1070 ac_init_help=recursive ;;
1071 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1072 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001079 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1080 ac_prev=htmldir ;;
1081 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1082 | --ht=*)
1083 htmldir=$ac_optarg ;;
1084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -includedir | --includedir | --includedi | --included | --include \
1086 | --includ | --inclu | --incl | --inc)
1087 ac_prev=includedir ;;
1088 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1089 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
1092 -infodir | --infodir | --infodi | --infod | --info | --inf)
1093 ac_prev=infodir ;;
1094 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
1097 -libdir | --libdir | --libdi | --libd)
1098 ac_prev=libdir ;;
1099 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
1102 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1103 | --libexe | --libex | --libe)
1104 ac_prev=libexecdir ;;
1105 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1106 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001109 -localedir | --localedir | --localedi | --localed | --locale)
1110 ac_prev=localedir ;;
1111 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1112 localedir=$ac_optarg ;;
1113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 ac_prev=localstatedir ;;
1117 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001118 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120
1121 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1122 ac_prev=mandir ;;
1123 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 # Obsolete; use --without-fp.
1128 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
1130 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 no_create=yes ;;
1133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1135 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1136 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1139 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1140 | --oldin | --oldi | --old | --ol | --o)
1141 ac_prev=oldincludedir ;;
1142 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1143 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1144 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1148 ac_prev=prefix ;;
1149 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1153 | --program-pre | --program-pr | --program-p)
1154 ac_prev=program_prefix ;;
1155 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1156 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1160 | --program-suf | --program-su | --program-s)
1161 ac_prev=program_suffix ;;
1162 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1163 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -program-transform-name | --program-transform-name \
1167 | --program-transform-nam | --program-transform-na \
1168 | --program-transform-n | --program-transform- \
1169 | --program-transform | --program-transfor \
1170 | --program-transfo | --program-transf \
1171 | --program-trans | --program-tran \
1172 | --progr-tra | --program-tr | --program-t)
1173 ac_prev=program_transform_name ;;
1174 -program-transform-name=* | --program-transform-name=* \
1175 | --program-transform-nam=* | --program-transform-na=* \
1176 | --program-transform-n=* | --program-transform-=* \
1177 | --program-transform=* | --program-transfor=* \
1178 | --program-transfo=* | --program-transf=* \
1179 | --program-trans=* | --program-tran=* \
1180 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001183 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1184 ac_prev=pdfdir ;;
1185 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1186 pdfdir=$ac_optarg ;;
1187
1188 -psdir | --psdir | --psdi | --psd | --ps)
1189 ac_prev=psdir ;;
1190 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1191 psdir=$ac_optarg ;;
1192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1194 | -silent | --silent | --silen | --sile | --sil)
1195 silent=yes ;;
1196
Pablo Galindo53e55292021-04-05 17:38:40 +01001197 -runstatedir | --runstatedir | --runstatedi | --runstated \
1198 | --runstate | --runstat | --runsta | --runst | --runs \
1199 | --run | --ru | --r)
1200 ac_prev=runstatedir ;;
1201 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1202 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1203 | --run=* | --ru=* | --r=*)
1204 runstatedir=$ac_optarg ;;
1205
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001206 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1207 ac_prev=sbindir ;;
1208 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1209 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001211
1212 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1213 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1214 | --sharedst | --shareds | --shared | --share | --shar \
1215 | --sha | --sh)
1216 ac_prev=sharedstatedir ;;
1217 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1218 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1219 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1220 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001222
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 -site | --site | --sit)
1224 ac_prev=site ;;
1225 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1229 ac_prev=srcdir ;;
1230 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001233 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1234 | --syscon | --sysco | --sysc | --sys | --sy)
1235 ac_prev=sysconfdir ;;
1236 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1237 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001239
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
1245 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1246 verbose=yes ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 -version | --version | --versio | --versi | --vers | -V)
1249 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
1251 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001253 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo53e55292021-04-05 17:38:40 +01001255 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 ac_useropt_orig=$ac_useropt
Pablo Galindo53e55292021-04-05 17:38:40 +01001257 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 case $ac_user_opts in
1259 *"
1260"with_$ac_useropt"
1261"*) ;;
1262 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1263 ac_unrecognized_sep=', ';;
1264 esac
1265 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266
1267 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindo53e55292021-04-05 17:38:40 +01001271 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 ac_useropt_orig=$ac_useropt
Pablo Galindo53e55292021-04-05 17:38:40 +01001273 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 case $ac_user_opts in
1275 *"
1276"with_$ac_useropt"
1277"*) ;;
1278 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1279 ac_unrecognized_sep=', ';;
1280 esac
1281 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283 --x)
1284 # Obsolete; use --with-x.
1285 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286
1287 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1288 | --x-incl | --x-inc | --x-in | --x-i)
1289 ac_prev=x_includes ;;
1290 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1291 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001292 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293
1294 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1295 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1296 ac_prev=x_libraries ;;
1297 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1298 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001299 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1302Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 ;;
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 *=*)
1306 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1307 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001308 case $ac_envvar in #(
1309 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001311 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 export $ac_envvar ;;
1314
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001315 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 # FIXME: should be removed in autoconf 3.0.
Pablo Galindo53e55292021-04-05 17:38:40 +01001317 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Pablo Galindo53e55292021-04-05 17:38:40 +01001319 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001320 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 ;;
1322
1323 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324done
1325
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001327 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329fi
1330
Matthias Kloseb9621712010-04-24 17:59:49 +00001331if test -n "$ac_unrecognized_opts"; then
1332 case $enable_option_checking in
1333 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Pablo Galindo53e55292021-04-05 17:38:40 +01001335 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001336 esac
1337fi
1338
1339# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1341 datadir sysconfdir sharedstatedir localstatedir includedir \
1342 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindo53e55292021-04-05 17:38:40 +01001343 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 # Remove trailing slashes.
1347 case $ac_val in
1348 */ )
1349 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1350 eval $ac_var=\$ac_val;;
1351 esac
1352 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001353 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 [\\/$]* | ?:[\\/]* ) continue;;
1355 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001356 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001357 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001358done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360# There might be people who depend on the old broken behavior: `$host'
1361# used to hold the argument of --host etc.
1362# FIXME: To remove some day.
1363build=$build_alias
1364host=$host_alias
1365target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366
Martin v. Löwis11437992002-04-12 09:54:03 +00001367# FIXME: To remove some day.
1368if test "x$host_alias" != x; then
1369 if test "x$build_alias" = x; then
1370 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 elif test "x$build_alias" != "x$host_alias"; then
1372 cross_compiling=yes
1373 fi
1374fi
1375
1376ac_tool_prefix=
1377test -n "$host_alias" && ac_tool_prefix=$host_alias-
1378
1379test "$silent" = yes && exec 6>/dev/null
1380
Guido van Rossum627b2d71993-12-24 10:39:16 +00001381
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_pwd=`pwd` && test -n "$ac_pwd" &&
1383ac_ls_di=`ls -di .` &&
1384ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001387 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001388
1389
Guido van Rossum627b2d71993-12-24 10:39:16 +00001390# Find the source files, if location was not specified.
1391if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001392 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001393 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001394 ac_confdir=`$as_dirname -- "$as_myself" ||
1395$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1396 X"$as_myself" : 'X\(//\)[^/]' \| \
1397 X"$as_myself" : 'X\(//\)$' \| \
1398 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo53e55292021-04-05 17:38:40 +01001399printf "%s\n" X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1401 s//\1/
1402 q
1403 }
1404 /^X\(\/\/\)[^/].*/{
1405 s//\1/
1406 q
1407 }
1408 /^X\(\/\/\)$/{
1409 s//\1/
1410 q
1411 }
1412 /^X\(\/\).*/{
1413 s//\1/
1414 q
1415 }
1416 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001417 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001418 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001419 srcdir=..
1420 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001421else
1422 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001424if test ! -r "$srcdir/$ac_unique_file"; then
1425 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001426 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1429ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001430 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001431 pwd)`
1432# When building in place, set srcdir=.
1433if test "$ac_abs_confdir" = "$ac_pwd"; then
1434 srcdir=.
1435fi
1436# Remove unnecessary trailing slashes from srcdir.
1437# Double slashes in file names in object file debugging info
1438# mess up M-x gdb in Emacs.
1439case $srcdir in
1440*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1441esac
1442for ac_var in $ac_precious_vars; do
1443 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1444 eval ac_env_${ac_var}_value=\$${ac_var}
1445 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1446 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1447done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001448
Martin v. Löwis11437992002-04-12 09:54:03 +00001449#
1450# Report the --help message.
1451#
1452if test "$ac_init_help" = "long"; then
1453 # Omit some internal or obsolete options to make the list less imposing.
1454 # This message is too long to be a string in the A/UX 3.1 sh.
1455 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001456\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458Usage: $0 [OPTION]... [VAR=VALUE]...
1459
1460To assign environment variables (e.g., CC, CFLAGS...), specify them as
1461VAR=VALUE. See below for descriptions of some of the useful variables.
1462
1463Defaults for the options are specified in brackets.
1464
1465Configuration:
1466 -h, --help display this help and exit
1467 --help=short display options specific to this package
1468 --help=recursive display the short help of all the included packages
1469 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001470 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --cache-file=FILE cache test results in FILE [disabled]
1472 -C, --config-cache alias for \`--cache-file=config.cache'
1473 -n, --no-create do not create output files
1474 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1475
Martin v. Löwis11437992002-04-12 09:54:03 +00001476Installation directories:
1477 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001480 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482By default, \`make install' will install all the files in
1483\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1484an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1485for instance \`--prefix=\$HOME'.
1486
1487For better control, use the options below.
1488
1489Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001490 --bindir=DIR user executables [EPREFIX/bin]
1491 --sbindir=DIR system admin executables [EPREFIX/sbin]
1492 --libexecdir=DIR program executables [EPREFIX/libexec]
1493 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1494 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1495 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Pablo Galindo53e55292021-04-05 17:38:40 +01001496 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 --libdir=DIR object code libraries [EPREFIX/lib]
1498 --includedir=DIR C header files [PREFIX/include]
1499 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1500 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1501 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1502 --infodir=DIR info documentation [DATAROOTDIR/info]
1503 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1504 --mandir=DIR man documentation [DATAROOTDIR/man]
1505 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1506 --htmldir=DIR html documentation [DOCDIR]
1507 --dvidir=DIR dvi documentation [DOCDIR]
1508 --pdfdir=DIR pdf documentation [DOCDIR]
1509 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001510_ACEOF
1511
1512 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001513
1514System types:
1515 --build=BUILD configure for building on BUILD [guessed]
1516 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001517_ACEOF
1518fi
1519
1520if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001521 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001522 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001523 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001524 cat <<\_ACEOF
1525
1526Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001527 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1529 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001530 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001531 create a universal binary build. SDKDIR specifies
1532 which macOS SDK should be used to perform the build,
1533 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001535 create a Python.framework rather than a traditional
1536 Unix install. optional INSTALLDIR specifies the
1537 installation path. see Mac/README.rst (default is
1538 no)
1539 --enable-shared enable building a shared Python library (default is
1540 no)
1541 --enable-profiling enable C-level code profiling with gprof (default is
1542 no)
1543 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1544 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001545 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001546 support loadable extensions in _sqlite module, see
1547 Doc/library/sqlite3.rst (default is no)
1548 --enable-ipv6 enable ipv6 (with ipv4) support, see
1549 Doc/library/socket.rst (default is yes if supported)
1550 --enable-big-digits[=15|30]
1551 use big digits (30 or 15 bits) for Python longs
1552 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001553 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555Optional Packages:
1556 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1557 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001558 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001559 specify the kind of universal binary that should be
1560 created. this option is only valid when
1561 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001562 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1563 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001564 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001565 specify the name for the python framework on macOS
1566 only valid when --enable-framework is set. see
1567 Mac/README.rst (default is 'Python')
1568 --with-cxx-main[=COMPILER]
1569 compile main() and link Python executable with C++
1570 compiler specified in COMPILER (default is $CXX)
1571 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1572 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001573 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001574 (default is no)
1575 --with-assertions build with C assertions enabled (default is no)
1576 --with-lto enable Link-Time-Optimization in any build (default
1577 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001578 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001579 select hash algorithm for use in Python/pyhash.c
1580 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001581 --with-tzpath=<list of absolute paths separated by pathsep>
1582 Select the default time zone search path for zoneinfo.TZPATH
1583
Charles-François Natalid30b0222014-05-08 23:08:51 +01001584 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001585 enable AddressSanitizer memory error detector,
1586 'asan' (default is no)
1587 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1588 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001589 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001590 enable UndefinedBehaviorSanitizer undefined
1591 behaviour detector, 'ubsan' (default is no)
1592 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001593 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001594 library, see Doc/library/pyexpat.rst (default is no)
1595 --with-system-ffi build _ctypes module using an installed ffi library,
1596 see Doc/library/ctypes.rst (default is
1597 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001598 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001599 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001600 --with-decimal-contextvar
1601 build _decimal module using a coroutine-local rather
1602 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001603 --with-tcltk-includes='-I...'
1604 override search for Tcl and Tk include files
1605 --with-tcltk-libs='-L...'
1606 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001607 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001608 override order to check db backends for dbm; a valid
1609 value is a colon separated string with the backend
1610 names `ndbm', `gdbm' and `bdb'.
1611 --with-doc-strings enable documentation strings (default is yes)
1612 --with-pymalloc enable specialized mallocs (default is yes)
1613 --with-c-locale-coercion
1614 enable C locale coercion to a UTF-8 based locale
1615 (default is yes)
1616 --with-valgrind enable Valgrind support (default is no)
1617 --with-dtrace enable DTrace support (default is no)
1618 --with-libm=STRING override libm math library to STRING (default is
1619 system-dependent)
1620 --with-libc=STRING override libc C library to STRING (default is
1621 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001622 --with-platlibdir=DIRNAME
1623 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001624 --with-wheel-pkg-dir=PATH
1625 Directory of wheel packages used by ensurepip
1626 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001627 --with(out)-readline[=editline]
1628 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001629 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001630 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001631 --with-ensurepip[=install|upgrade|no]
1632 "install" or "upgrade" using bundled pip (default is
1633 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001634 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001635 --with-openssl-rpath=[DIR|auto|no]
1636 Set runtime library directory (rpath) for OpenSSL
1637 libraries, no (default): don't set rpath, auto:
1638 auto-detect rpath from --with-openssl and
1639 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001640 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001641 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001642 Python's preferred selection (default), openssl:
1643 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001644 custom string, PROTOCOL_SSLv2 ignores the setting,
1645 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001646 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1647 builtin hash modules, md5, sha1, sha256, sha512,
1648 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001649 --with-experimental-isolated-subinterpreters
1650 better isolate subinterpreters, experimental build
1651 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001652 --without-static-libpython
1653 do not build libpythonMAJOR.MINOR.a and do not
1654 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001655
1656Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001657 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 CC C compiler command
1659 CFLAGS C compiler flags
1660 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1661 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001662 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001663 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001664 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001666 PROFILE_TASK
1667 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001668 PKG_CONFIG path to pkg-config utility
1669 PKG_CONFIG_PATH
1670 directories to add to pkg-config's search path
1671 PKG_CONFIG_LIBDIR
1672 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001673
1674Use these variables to override the choices made by `configure' or to help
1675it to find libraries and programs with nonstandard names/locations.
1676
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001677Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001678_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001679ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001680fi
1681
1682if test "$ac_init_help" = "recursive"; then
1683 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001684 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 test -d "$ac_dir" ||
1686 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1687 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001688 ac_builddir=.
1689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001690case "$ac_dir" in
1691.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1692*)
Pablo Galindo53e55292021-04-05 17:38:40 +01001693 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindo53e55292021-04-05 17:38:40 +01001695 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696 case $ac_top_builddir_sub in
1697 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1698 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1699 esac ;;
1700esac
1701ac_abs_top_builddir=$ac_pwd
1702ac_abs_builddir=$ac_pwd$ac_dir_suffix
1703# for backward compatibility:
1704ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001705
1706case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001708 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001709 ac_top_srcdir=$ac_top_builddir_sub
1710 ac_abs_top_srcdir=$ac_pwd ;;
1711 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001713 ac_top_srcdir=$srcdir
1714 ac_abs_top_srcdir=$srcdir ;;
1715 *) # Relative name.
1716 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1717 ac_top_srcdir=$ac_top_build_prefix$srcdir
1718 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001719esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001720ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001722 cd "$ac_dir" || { ac_status=$?; continue; }
Pablo Galindo53e55292021-04-05 17:38:40 +01001723 # Check for configure.gnu first; this name is used for a wrapper for
1724 # Metaconfig's "Configure" on case-insensitive file systems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001725 if test -f "$ac_srcdir/configure.gnu"; then
1726 echo &&
1727 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1728 elif test -f "$ac_srcdir/configure"; then
1729 echo &&
1730 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 else
Pablo Galindo53e55292021-04-05 17:38:40 +01001732 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733 fi || ac_status=$?
1734 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 done
1736fi
1737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001738test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001739if $ac_init_version; then
1740 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001741python configure 3.10
Pablo Galindo53e55292021-04-05 17:38:40 +01001742generated by GNU Autoconf 2.71
Martin v. Löwis11437992002-04-12 09:54:03 +00001743
Pablo Galindo53e55292021-04-05 17:38:40 +01001744Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001745This configure script is free software; the Free Software Foundation
1746gives unlimited permission to copy, distribute and modify it.
1747_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001748 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001750
1751## ------------------------ ##
1752## Autoconf initialization. ##
1753## ------------------------ ##
1754
1755# ac_fn_c_try_compile LINENO
1756# --------------------------
1757# Try to compile conftest.$ac_ext, and return whether this succeeded.
1758ac_fn_c_try_compile ()
1759{
1760 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo53e55292021-04-05 17:38:40 +01001761 rm -f conftest.$ac_objext conftest.beam
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 if { { ac_try="$ac_compile"
1763case "(($ac_try" in
1764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765 *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01001768printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 (eval "$ac_compile") 2>conftest.err
1770 ac_status=$?
1771 if test -s conftest.err; then
1772 grep -v '^ *+' conftest.err >conftest.er1
1773 cat conftest.er1 >&5
1774 mv -f conftest.er1 conftest.err
1775 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01001776 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 test $ac_status = 0; } && {
1778 test -z "$ac_c_werror_flag" ||
1779 test ! -s conftest.err
Pablo Galindo53e55292021-04-05 17:38:40 +01001780 } && test -s conftest.$ac_objext
1781then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 ac_retval=0
Pablo Galindo53e55292021-04-05 17:38:40 +01001783else $as_nop
1784 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001785sed 's/^/| /' conftest.$ac_ext >&5
1786
1787 ac_retval=1
1788fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 as_fn_set_status $ac_retval
1791
1792} # ac_fn_c_try_compile
1793
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001794# ac_fn_c_try_cpp LINENO
1795# ----------------------
1796# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1797ac_fn_c_try_cpp ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1800 if { { ac_try="$ac_cpp conftest.$ac_ext"
1801case "(($ac_try" in
1802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1803 *) ac_try_echo=$ac_try;;
1804esac
1805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01001806printf "%s\n" "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001807 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1808 ac_status=$?
1809 if test -s conftest.err; then
1810 grep -v '^ *+' conftest.err >conftest.er1
1811 cat conftest.er1 >&5
1812 mv -f conftest.er1 conftest.err
1813 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01001814 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001815 test $ac_status = 0; } > conftest.i && {
1816 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1817 test ! -s conftest.err
Pablo Galindo53e55292021-04-05 17:38:40 +01001818 }
1819then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001820 ac_retval=0
Pablo Galindo53e55292021-04-05 17:38:40 +01001821else $as_nop
1822 printf "%s\n" "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001823sed 's/^/| /' conftest.$ac_ext >&5
1824
1825 ac_retval=1
1826fi
1827 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1828 as_fn_set_status $ac_retval
1829
1830} # ac_fn_c_try_cpp
1831
Matthias Kloseb9621712010-04-24 17:59:49 +00001832# ac_fn_c_try_link LINENO
1833# -----------------------
1834# Try to link conftest.$ac_ext, and return whether this succeeded.
1835ac_fn_c_try_link ()
1836{
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo53e55292021-04-05 17:38:40 +01001838 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 if { { ac_try="$ac_link"
1840case "(($ac_try" in
1841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1842 *) ac_try_echo=$ac_try;;
1843esac
1844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01001845printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001846 (eval "$ac_link") 2>conftest.err
1847 ac_status=$?
1848 if test -s conftest.err; then
1849 grep -v '^ *+' conftest.err >conftest.er1
1850 cat conftest.er1 >&5
1851 mv -f conftest.er1 conftest.err
1852 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01001853 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001854 test $ac_status = 0; } && {
1855 test -z "$ac_c_werror_flag" ||
1856 test ! -s conftest.err
1857 } && test -s conftest$ac_exeext && {
1858 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001859 test -x conftest$ac_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +01001860 }
1861then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001862 ac_retval=0
Pablo Galindo53e55292021-04-05 17:38:40 +01001863else $as_nop
1864 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001865sed 's/^/| /' conftest.$ac_ext >&5
1866
1867 ac_retval=1
1868fi
1869 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1870 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1871 # interfere with the next link command; also delete a directory that is
1872 # left behind by Apple's compiler. We do this before executing the actions.
1873 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001874 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 as_fn_set_status $ac_retval
1876
1877} # ac_fn_c_try_link
1878
Pablo Galindo53e55292021-04-05 17:38:40 +01001879# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001880# -------------------------------------------------------
Pablo Galindo53e55292021-04-05 17:38:40 +01001881# Tests whether HEADER exists and can be compiled using the include files in
1882# INCLUDES, setting the cache variable VAR accordingly.
1883ac_fn_c_check_header_compile ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo53e55292021-04-05 17:38:40 +01001886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887printf %s "checking for $2... " >&6; }
1888if eval test \${$3+y}
1889then :
1890 printf %s "(cached) " >&6
1891else $as_nop
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001893/* end confdefs.h. */
1894$4
1895#include <$2>
1896_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01001897if ac_fn_c_try_compile "$LINENO"
1898then :
1899 eval "$3=yes"
1900else $as_nop
1901 eval "$3=no"
Matthias Kloseb9621712010-04-24 17:59:49 +00001902fi
Pablo Galindo53e55292021-04-05 17:38:40 +01001903rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001904fi
1905eval ac_res=\$$3
Pablo Galindo53e55292021-04-05 17:38:40 +01001906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909
Pablo Galindo53e55292021-04-05 17:38:40 +01001910} # ac_fn_c_check_header_compile
Matthias Kloseb9621712010-04-24 17:59:49 +00001911
1912# ac_fn_c_try_run LINENO
1913# ----------------------
Pablo Galindo53e55292021-04-05 17:38:40 +01001914# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1915# executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001916ac_fn_c_try_run ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 if { { ac_try="$ac_link"
1920case "(($ac_try" in
1921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922 *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01001925printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001926 (eval "$ac_link") 2>&5
1927 ac_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01001928 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1930 { { case "(($ac_try" in
1931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1932 *) ac_try_echo=$ac_try;;
1933esac
1934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01001935printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001936 (eval "$ac_try") 2>&5
1937 ac_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01001938 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1939 test $ac_status = 0; }; }
1940then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001941 ac_retval=0
Pablo Galindo53e55292021-04-05 17:38:40 +01001942else $as_nop
1943 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1944 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001945sed 's/^/| /' conftest.$ac_ext >&5
1946
1947 ac_retval=$ac_status
1948fi
1949 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001950 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 as_fn_set_status $ac_retval
1952
1953} # ac_fn_c_try_run
1954
Matthias Kloseb9621712010-04-24 17:59:49 +00001955# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1956# -------------------------------------------
1957# Tests whether TYPE exists after having included INCLUDES, setting cache
1958# variable VAR accordingly.
1959ac_fn_c_check_type ()
1960{
1961 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo53e55292021-04-05 17:38:40 +01001962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1963printf %s "checking for $2... " >&6; }
1964if eval test \${$3+y}
1965then :
1966 printf %s "(cached) " >&6
1967else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 eval "$3=no"
1969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h. */
1971$4
1972int
Pablo Galindo53e55292021-04-05 17:38:40 +01001973main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001974{
1975if (sizeof ($2))
1976 return 0;
1977 ;
1978 return 0;
1979}
1980_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01001981if ac_fn_c_try_compile "$LINENO"
1982then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986int
Pablo Galindo53e55292021-04-05 17:38:40 +01001987main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001988{
1989if (sizeof (($2)))
1990 return 0;
1991 ;
1992 return 0;
1993}
1994_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01001995if ac_fn_c_try_compile "$LINENO"
1996then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001997
Pablo Galindo53e55292021-04-05 17:38:40 +01001998else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00001999 eval "$3=yes"
2000fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002001rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002002fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002003rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002004fi
2005eval ac_res=\$$3
Pablo Galindo53e55292021-04-05 17:38:40 +01002006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2007printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002008 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002009
2010} # ac_fn_c_check_type
2011
Matthias Kloseb9621712010-04-24 17:59:49 +00002012# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2013# --------------------------------------------
2014# Tries to find the compile-time value of EXPR in a program that includes
2015# INCLUDES, setting VAR accordingly. Returns whether the value could be
2016# computed
2017ac_fn_c_compute_int ()
2018{
2019 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020 if test "$cross_compiling" = yes; then
2021 # Depending upon the size, compute the lo and hi bounds.
2022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$4
2025int
Pablo Galindo53e55292021-04-05 17:38:40 +01002026main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002027{
2028static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002029test_array [0] = 0;
2030return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002031
2032 ;
2033 return 0;
2034}
2035_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002036if ac_fn_c_try_compile "$LINENO"
2037then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002038 ac_lo=0 ac_mid=0
2039 while :; do
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
Pablo Galindo53e55292021-04-05 17:38:40 +01002044main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002045{
2046static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002054if ac_fn_c_try_compile "$LINENO"
2055then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002056 ac_hi=$ac_mid; break
Pablo Galindo53e55292021-04-05 17:38:40 +01002057else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002058 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2059 if test $ac_lo -le $ac_mid; then
2060 ac_lo= ac_hi=
2061 break
2062 fi
2063 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2064fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002065rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002066 done
Pablo Galindo53e55292021-04-05 17:38:40 +01002067else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
Pablo Galindo53e55292021-04-05 17:38:40 +01002072main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002073{
2074static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002082if ac_fn_c_try_compile "$LINENO"
2083then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002084 ac_hi=-1 ac_mid=-1
2085 while :; do
2086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
Pablo Galindo53e55292021-04-05 17:38:40 +01002090main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002091{
2092static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002093test_array [0] = 0;
2094return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002095
2096 ;
2097 return 0;
2098}
2099_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002100if ac_fn_c_try_compile "$LINENO"
2101then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002102 ac_lo=$ac_mid; break
Pablo Galindo53e55292021-04-05 17:38:40 +01002103else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002104 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2105 if test $ac_mid -le $ac_hi; then
2106 ac_lo= ac_hi=
2107 break
2108 fi
2109 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2110fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002111rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002112 done
Pablo Galindo53e55292021-04-05 17:38:40 +01002113else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002114 ac_lo= ac_hi=
2115fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002116rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002117fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002118rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002119# Binary search between lo and hi bounds.
2120while test "x$ac_lo" != "x$ac_hi"; do
2121 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
Pablo Galindo53e55292021-04-05 17:38:40 +01002126main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002129test_array [0] = 0;
2130return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002131
2132 ;
2133 return 0;
2134}
2135_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002136if ac_fn_c_try_compile "$LINENO"
2137then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002138 ac_hi=$ac_mid
Pablo Galindo53e55292021-04-05 17:38:40 +01002139else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002140 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2141fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002142rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002143done
2144case $ac_lo in #((
2145?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2146'') ac_retval=1 ;;
2147esac
2148 else
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
Pablo Galindo53e55292021-04-05 17:38:40 +01002152static long int longval (void) { return $2; }
2153static unsigned long int ulongval (void) { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002154#include <stdio.h>
2155#include <stdlib.h>
2156int
Pablo Galindo53e55292021-04-05 17:38:40 +01002157main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002158{
2159
2160 FILE *f = fopen ("conftest.val", "w");
2161 if (! f)
2162 return 1;
2163 if (($2) < 0)
2164 {
2165 long int i = longval ();
2166 if (i != ($2))
2167 return 1;
2168 fprintf (f, "%ld", i);
2169 }
2170 else
2171 {
2172 unsigned long int i = ulongval ();
2173 if (i != ($2))
2174 return 1;
2175 fprintf (f, "%lu", i);
2176 }
2177 /* Do not output a trailing newline, as this causes \r\n confusion
2178 on some platforms. */
2179 return ferror (f) || fclose (f) != 0;
2180
2181 ;
2182 return 0;
2183}
2184_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002185if ac_fn_c_try_run "$LINENO"
2186then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002187 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Pablo Galindo53e55292021-04-05 17:38:40 +01002188else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 ac_retval=1
2190fi
2191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2192 conftest.$ac_objext conftest.beam conftest.$ac_ext
2193rm -f conftest.val
2194
2195 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002196 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002197 as_fn_set_status $ac_retval
2198
2199} # ac_fn_c_compute_int
2200
2201# ac_fn_c_check_func LINENO FUNC VAR
2202# ----------------------------------
2203# Tests whether FUNC exists, setting the cache variable VAR accordingly
2204ac_fn_c_check_func ()
2205{
2206 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo53e55292021-04-05 17:38:40 +01002207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2208printf %s "checking for $2... " >&6; }
2209if eval test \${$3+y}
2210then :
2211 printf %s "(cached) " >&6
2212else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2216 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2217#define $2 innocuous_$2
2218
2219/* System header to define __stub macros and hopefully few prototypes,
Pablo Galindo53e55292021-04-05 17:38:40 +01002220 which can conflict with char $2 (); below. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002221
Pablo Galindo53e55292021-04-05 17:38:40 +01002222#include <limits.h>
Matthias Kloseb9621712010-04-24 17:59:49 +00002223#undef $2
2224
2225/* Override any GCC internal prototype to avoid an error.
2226 Use char because int might match the return type of a GCC
2227 builtin and then its argument prototype would still apply. */
2228#ifdef __cplusplus
2229extern "C"
2230#endif
2231char $2 ();
2232/* The GNU C library defines this for functions which it implements
2233 to always fail with ENOSYS. Some functions are actually named
2234 something starting with __ and the normal name is an alias. */
2235#if defined __stub_$2 || defined __stub___$2
2236choke me
2237#endif
2238
2239int
Pablo Galindo53e55292021-04-05 17:38:40 +01002240main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002241{
2242return $2 ();
2243 ;
2244 return 0;
2245}
2246_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002247if ac_fn_c_try_link "$LINENO"
2248then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 eval "$3=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +01002250else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002251 eval "$3=no"
2252fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002253rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00002254 conftest$ac_exeext conftest.$ac_ext
2255fi
2256eval ac_res=\$$3
Pablo Galindo53e55292021-04-05 17:38:40 +01002257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002259 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002260
2261} # ac_fn_c_check_func
2262
Pablo Galindo53e55292021-04-05 17:38:40 +01002263# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2264# ------------------------------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002265# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Pablo Galindo53e55292021-04-05 17:38:40 +01002266# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2267ac_fn_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002268{
2269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270 as_decl_name=`echo $2|sed 's/ *(.*//'`
Pablo Galindo53e55292021-04-05 17:38:40 +01002271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2272printf %s "checking whether $as_decl_name is declared... " >&6; }
2273if eval test \${$3+y}
2274then :
2275 printf %s "(cached) " >&6
2276else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002277 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Pablo Galindo53e55292021-04-05 17:38:40 +01002278 eval ac_save_FLAGS=\$$6
2279 as_fn_append $6 " $5"
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h. */
2282$4
2283int
Pablo Galindo53e55292021-04-05 17:38:40 +01002284main (void)
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002285{
2286#ifndef $as_decl_name
2287#ifdef __cplusplus
2288 (void) $as_decl_use;
2289#else
2290 (void) $as_decl_name;
2291#endif
2292#endif
2293
2294 ;
2295 return 0;
2296}
2297_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002298if ac_fn_c_try_compile "$LINENO"
2299then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002300 eval "$3=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +01002301else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002302 eval "$3=no"
2303fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002304rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2305 eval $6=\$ac_save_FLAGS
2306
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002307fi
2308eval ac_res=\$$3
Pablo Galindo53e55292021-04-05 17:38:40 +01002309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2310printf "%s\n" "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002311 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2312
Pablo Galindo53e55292021-04-05 17:38:40 +01002313} # ac_fn_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002314
Matthias Kloseb9621712010-04-24 17:59:49 +00002315# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2316# ----------------------------------------------------
2317# Tries to find if the field MEMBER exists in type AGGR, after including
2318# INCLUDES, setting cache variable VAR accordingly.
2319ac_fn_c_check_member ()
2320{
2321 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo53e55292021-04-05 17:38:40 +01002322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2323printf %s "checking for $2.$3... " >&6; }
2324if eval test \${$4+y}
2325then :
2326 printf %s "(cached) " >&6
2327else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$5
2331int
Pablo Galindo53e55292021-04-05 17:38:40 +01002332main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002333{
2334static $2 ac_aggr;
2335if (ac_aggr.$3)
2336return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002341if ac_fn_c_try_compile "$LINENO"
2342then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002343 eval "$4=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +01002344else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h. */
2347$5
2348int
Pablo Galindo53e55292021-04-05 17:38:40 +01002349main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002350{
2351static $2 ac_aggr;
2352if (sizeof ac_aggr.$3)
2353return 0;
2354 ;
2355 return 0;
2356}
2357_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01002358if ac_fn_c_try_compile "$LINENO"
2359then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002360 eval "$4=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +01002361else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002362 eval "$4=no"
2363fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002364rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002365fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002366rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002367fi
2368eval ac_res=\$$4
Pablo Galindo53e55292021-04-05 17:38:40 +01002369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2370printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002371 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002372
2373} # ac_fn_c_check_member
Pablo Galindo53e55292021-04-05 17:38:40 +01002374ac_configure_args_raw=
2375for ac_arg
2376do
2377 case $ac_arg in
2378 *\'*)
2379 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2380 esac
2381 as_fn_append ac_configure_args_raw " '$ac_arg'"
2382done
2383
2384case $ac_configure_args_raw in
2385 *$as_nl*)
2386 ac_safe_unquote= ;;
2387 *)
2388 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2389 ac_unsafe_a="$ac_unsafe_z#~"
2390 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2391 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2392esac
2393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002395This file contains any messages produced by compilers while
2396running configure, to aid debugging if configure makes a mistake.
2397
Pablo Galindod4fe0982020-05-19 03:33:01 +01002398It was created by python $as_me 3.10, which was
Pablo Galindo53e55292021-04-05 17:38:40 +01002399generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002400
Pablo Galindo53e55292021-04-05 17:38:40 +01002401 $ $0$ac_configure_args_raw
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002405{
2406cat <<_ASUNAME
2407## --------- ##
2408## Platform. ##
2409## --------- ##
2410
2411hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2412uname -m = `(uname -m) 2>/dev/null || echo unknown`
2413uname -r = `(uname -r) 2>/dev/null || echo unknown`
2414uname -s = `(uname -s) 2>/dev/null || echo unknown`
2415uname -v = `(uname -v) 2>/dev/null || echo unknown`
2416
2417/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2418/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2419
2420/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2421/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2422/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002424/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2425/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2426/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2427
2428_ASUNAME
2429
2430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01002434 case $as_dir in #(((
2435 '') as_dir=./ ;;
2436 */) ;;
2437 *) as_dir=$as_dir/ ;;
2438 esac
2439 printf "%s\n" "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443} >&5
2444
2445cat >&5 <<_ACEOF
2446
2447
2448## ----------- ##
2449## Core tests. ##
2450## ----------- ##
2451
2452_ACEOF
2453
2454
2455# Keep a trace of the command line.
2456# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002457# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002458# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002459# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002460ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002461ac_configure_args0=
2462ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002463ac_must_keep_next=false
2464for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002465do
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 for ac_arg
2467 do
2468 case $ac_arg in
2469 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2470 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2471 | -silent | --silent | --silen | --sile | --sil)
2472 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 *\'*)
Pablo Galindo53e55292021-04-05 17:38:40 +01002474 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002475 esac
2476 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002481 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002483 case $ac_arg in
2484 *=* | --config-cache | -C | -disable-* | --disable-* \
2485 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2486 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2487 | -with-* | --with-* | -without-* | --without-* | --x)
2488 case "$ac_configure_args0 " in
2489 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2490 esac
2491 ;;
2492 -* ) ac_must_keep_next=true ;;
2493 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 ;;
2497 esac
2498 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002499done
Matthias Kloseb9621712010-04-24 17:59:49 +00002500{ ac_configure_args0=; unset ac_configure_args0;}
2501{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503# When interrupted or exit'd, cleanup temporary files, and complete
2504# config.log. We remove comments because anyway the quotes in there
2505# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506# WARNING: Use '\'' to represent an apostrophe within the trap.
2507# 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 +00002508trap 'exit_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01002509 # Sanitize IFS.
2510 IFS=" "" $as_nl"
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 # Save into config.log some information that might help in debugging.
2512 {
2513 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002514
Pablo Galindo53e55292021-04-05 17:38:40 +01002515 printf "%s\n" "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002516## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 echo
2519 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520(
2521 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2522 eval ac_val=\$$ac_var
2523 case $ac_val in #(
2524 *${as_nl}*)
2525 case $ac_var in #(
Pablo Galindo53e55292021-04-05 17:38:40 +01002526 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2527printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac
2529 case $ac_var in #(
2530 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2532 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 esac ;;
2534 esac
2535 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2538 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 "s/'\''/'\''\\\\'\'''\''/g;
2541 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2542 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002543 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002545 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 esac |
2547 sort
2548)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002550
Pablo Galindo53e55292021-04-05 17:38:40 +01002551 printf "%s\n" "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002552## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 echo
2555 for ac_var in $ac_subst_vars
2556 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 eval ac_val=\$$ac_var
2558 case $ac_val in
Pablo Galindo53e55292021-04-05 17:38:40 +01002559 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 esac
Pablo Galindo53e55292021-04-05 17:38:40 +01002561 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 done | sort
2563 echo
2564
2565 if test -n "$ac_subst_files"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01002566 printf "%s\n" "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002569 echo
2570 for ac_var in $ac_subst_files
2571 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 eval ac_val=\$$ac_var
2573 case $ac_val in
Pablo Galindo53e55292021-04-05 17:38:40 +01002574 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac
Pablo Galindo53e55292021-04-05 17:38:40 +01002576 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 done | sort
2578 echo
2579 fi
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 if test -s confdefs.h; then
Pablo Galindo53e55292021-04-05 17:38:40 +01002582 printf "%s\n" "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002583## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 echo
2588 fi
2589 test "$ac_signal" != 0 &&
Pablo Galindo53e55292021-04-05 17:38:40 +01002590 printf "%s\n" "$as_me: caught signal $ac_signal"
2591 printf "%s\n" "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 rm -f core *.core core.conftest.* &&
2594 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002597for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002599done
2600ac_signal=0
2601
2602# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002604
Pablo Galindo53e55292021-04-05 17:38:40 +01002605printf "%s\n" "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607# Predefined preprocessor variables.
2608
Pablo Galindo53e55292021-04-05 17:38:40 +01002609printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002610
Pablo Galindo53e55292021-04-05 17:38:40 +01002611printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002612
Pablo Galindo53e55292021-04-05 17:38:40 +01002613printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
Pablo Galindo53e55292021-04-05 17:38:40 +01002615printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002616
Pablo Galindo53e55292021-04-05 17:38:40 +01002617printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002618
Pablo Galindo53e55292021-04-05 17:38:40 +01002619printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621
2622# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002623# Prefer an explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624if test -n "$CONFIG_SITE"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01002625 ac_site_files="$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626elif test "x$prefix" != xNONE; then
Pablo Galindo53e55292021-04-05 17:38:40 +01002627 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628else
Pablo Galindo53e55292021-04-05 17:38:40 +01002629 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630fi
Pablo Galindo53e55292021-04-05 17:38:40 +01002631
2632for ac_site_file in $ac_site_files
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633do
Pablo Galindo53e55292021-04-05 17:38:40 +01002634 case $ac_site_file in #(
2635 */*) :
2636 ;; #(
2637 *) :
2638 ac_site_file=./$ac_site_file ;;
2639esac
2640 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2642printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002644 . "$ac_site_file" \
Pablo Galindo53e55292021-04-05 17:38:40 +01002645 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2646printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002647as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002648See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002649 fi
2650done
2651
2652if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # Some versions of bash will fail to source /dev/null (special files
2654 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2655 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01002656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2657printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2660 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 esac
2662 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002663else
Pablo Galindo53e55292021-04-05 17:38:40 +01002664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2665printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 >$cache_file
2667fi
2668
Pablo Galindo53e55292021-04-05 17:38:40 +01002669# Test code for whether the C compiler supports C89 (global declarations)
2670ac_c_conftest_c89_globals='
2671/* Does the compiler advertise C89 conformance?
2672 Do not test the value of __STDC__, because some compilers set it to 0
2673 while being otherwise adequately conformant. */
2674#if !defined __STDC__
2675# error "Compiler does not advertise C89 conformance"
2676#endif
2677
2678#include <stddef.h>
2679#include <stdarg.h>
2680struct stat;
2681/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2682struct buf { int x; };
2683struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2684static char *e (p, i)
2685 char **p;
2686 int i;
2687{
2688 return p[i];
2689}
2690static char *f (char * (*g) (char **, int), char **p, ...)
2691{
2692 char *s;
2693 va_list v;
2694 va_start (v,p);
2695 s = g (p, va_arg (v,int));
2696 va_end (v);
2697 return s;
2698}
2699
2700/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2701 function prototypes and stuff, but not \xHH hex character constants.
2702 These do not provoke an error unfortunately, instead are silently treated
2703 as an "x". The following induces an error, until -std is added to get
2704 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2705 array size at least. It is necessary to write \x00 == 0 to get something
2706 that is true only with -std. */
2707int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2708
2709/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2710 inside strings and character constants. */
2711#define FOO(x) '\''x'\''
2712int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2713
2714int test (int i, double x);
2715struct s1 {int (*f) (int a);};
2716struct s2 {int (*f) (double a);};
2717int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2718 int, int);'
2719
2720# Test code for whether the C compiler supports C89 (body of main).
2721ac_c_conftest_c89_main='
2722ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2723'
2724
2725# Test code for whether the C compiler supports C99 (global declarations)
2726ac_c_conftest_c99_globals='
2727// Does the compiler advertise C99 conformance?
2728#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2729# error "Compiler does not advertise C99 conformance"
2730#endif
2731
2732#include <stdbool.h>
2733extern int puts (const char *);
2734extern int printf (const char *, ...);
2735extern int dprintf (int, const char *, ...);
2736extern void *malloc (size_t);
2737
2738// Check varargs macros. These examples are taken from C99 6.10.3.5.
2739// dprintf is used instead of fprintf to avoid needing to declare
2740// FILE and stderr.
2741#define debug(...) dprintf (2, __VA_ARGS__)
2742#define showlist(...) puts (#__VA_ARGS__)
2743#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2744static void
2745test_varargs_macros (void)
2746{
2747 int x = 1234;
2748 int y = 5678;
2749 debug ("Flag");
2750 debug ("X = %d\n", x);
2751 showlist (The first, second, and third items.);
2752 report (x>y, "x is %d but y is %d", x, y);
2753}
2754
2755// Check long long types.
2756#define BIG64 18446744073709551615ull
2757#define BIG32 4294967295ul
2758#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2759#if !BIG_OK
2760 #error "your preprocessor is broken"
2761#endif
2762#if BIG_OK
2763#else
2764 #error "your preprocessor is broken"
2765#endif
2766static long long int bignum = -9223372036854775807LL;
2767static unsigned long long int ubignum = BIG64;
2768
2769struct incomplete_array
2770{
2771 int datasize;
2772 double data[];
2773};
2774
2775struct named_init {
2776 int number;
2777 const wchar_t *name;
2778 double average;
2779};
2780
2781typedef const char *ccp;
2782
2783static inline int
2784test_restrict (ccp restrict text)
2785{
2786 // See if C++-style comments work.
2787 // Iterate through items via the restricted pointer.
2788 // Also check for declarations in for loops.
2789 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2790 continue;
2791 return 0;
2792}
2793
2794// Check varargs and va_copy.
2795static bool
2796test_varargs (const char *format, ...)
2797{
2798 va_list args;
2799 va_start (args, format);
2800 va_list args_copy;
2801 va_copy (args_copy, args);
2802
2803 const char *str = "";
2804 int number = 0;
2805 float fnumber = 0;
2806
2807 while (*format)
2808 {
2809 switch (*format++)
2810 {
2811 case '\''s'\'': // string
2812 str = va_arg (args_copy, const char *);
2813 break;
2814 case '\''d'\'': // int
2815 number = va_arg (args_copy, int);
2816 break;
2817 case '\''f'\'': // float
2818 fnumber = va_arg (args_copy, double);
2819 break;
2820 default:
2821 break;
2822 }
2823 }
2824 va_end (args_copy);
2825 va_end (args);
2826
2827 return *str && number && fnumber;
2828}
2829'
2830
2831# Test code for whether the C compiler supports C99 (body of main).
2832ac_c_conftest_c99_main='
2833 // Check bool.
2834 _Bool success = false;
2835 success |= (argc != 0);
2836
2837 // Check restrict.
2838 if (test_restrict ("String literal") == 0)
2839 success = true;
2840 char *restrict newvar = "Another string";
2841
2842 // Check varargs.
2843 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2844 test_varargs_macros ();
2845
2846 // Check flexible array members.
2847 struct incomplete_array *ia =
2848 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2849 ia->datasize = 10;
2850 for (int i = 0; i < ia->datasize; ++i)
2851 ia->data[i] = i * 1.234;
2852
2853 // Check named initializers.
2854 struct named_init ni = {
2855 .number = 34,
2856 .name = L"Test wide string",
2857 .average = 543.34343,
2858 };
2859
2860 ni.number = 58;
2861
2862 int dynamic_array[ni.number];
2863 dynamic_array[0] = argv[0][0];
2864 dynamic_array[ni.number - 1] = 543;
2865
2866 // work around unused variable warnings
2867 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2868 || dynamic_array[ni.number - 1] != 543);
2869'
2870
2871# Test code for whether the C compiler supports C11 (global declarations)
2872ac_c_conftest_c11_globals='
2873// Does the compiler advertise C11 conformance?
2874#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2875# error "Compiler does not advertise C11 conformance"
2876#endif
2877
2878// Check _Alignas.
2879char _Alignas (double) aligned_as_double;
2880char _Alignas (0) no_special_alignment;
2881extern char aligned_as_int;
2882char _Alignas (0) _Alignas (int) aligned_as_int;
2883
2884// Check _Alignof.
2885enum
2886{
2887 int_alignment = _Alignof (int),
2888 int_array_alignment = _Alignof (int[100]),
2889 char_alignment = _Alignof (char)
2890};
2891_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2892
2893// Check _Noreturn.
2894int _Noreturn does_not_return (void) { for (;;) continue; }
2895
2896// Check _Static_assert.
2897struct test_static_assert
2898{
2899 int x;
2900 _Static_assert (sizeof (int) <= sizeof (long int),
2901 "_Static_assert does not work in struct");
2902 long int y;
2903};
2904
2905// Check UTF-8 literals.
2906#define u8 syntax error!
2907char const utf8_literal[] = u8"happens to be ASCII" "another string";
2908
2909// Check duplicate typedefs.
2910typedef long *long_ptr;
2911typedef long int *long_ptr;
2912typedef long_ptr long_ptr;
2913
2914// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2915struct anonymous
2916{
2917 union {
2918 struct { int i; int j; };
2919 struct { int k; long int l; } w;
2920 };
2921 int m;
2922} v1;
2923'
2924
2925# Test code for whether the C compiler supports C11 (body of main).
2926ac_c_conftest_c11_main='
2927 _Static_assert ((offsetof (struct anonymous, i)
2928 == offsetof (struct anonymous, w.k)),
2929 "Anonymous union alignment botch");
2930 v1.i = 2;
2931 v1.w.k = 5;
2932 ok |= v1.i != 5;
2933'
2934
2935# Test code for whether the C compiler supports C11 (complete).
2936ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2937${ac_c_conftest_c99_globals}
2938${ac_c_conftest_c11_globals}
2939
2940int
2941main (int argc, char **argv)
2942{
2943 int ok = 0;
2944 ${ac_c_conftest_c89_main}
2945 ${ac_c_conftest_c99_main}
2946 ${ac_c_conftest_c11_main}
2947 return ok;
2948}
2949"
2950
2951# Test code for whether the C compiler supports C99 (complete).
2952ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2953${ac_c_conftest_c99_globals}
2954
2955int
2956main (int argc, char **argv)
2957{
2958 int ok = 0;
2959 ${ac_c_conftest_c89_main}
2960 ${ac_c_conftest_c99_main}
2961 return ok;
2962}
2963"
2964
2965# Test code for whether the C compiler supports C89 (complete).
2966ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2967
2968int
2969main (int argc, char **argv)
2970{
2971 int ok = 0;
2972 ${ac_c_conftest_c89_main}
2973 return ok;
2974}
2975"
2976
2977as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2978as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2979as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2980as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2981as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2982as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2983as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2984as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2985as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2986as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
2987as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
2988as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2989
2990# Auxiliary files required by this configure script.
2991ac_aux_files="install-sh config.guess config.sub"
2992
2993# Locations in which to look for auxiliary files.
2994ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2995
2996# Search for a directory containing all of the required auxiliary files,
2997# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2998# If we don't find one directory that contains all the files we need,
2999# we report the set of missing files from the *first* directory in
3000# $ac_aux_dir_candidates and give up.
3001ac_missing_aux_files=""
3002ac_first_candidate=:
3003printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3005as_found=false
3006for as_dir in $ac_aux_dir_candidates
3007do
3008 IFS=$as_save_IFS
3009 case $as_dir in #(((
3010 '') as_dir=./ ;;
3011 */) ;;
3012 *) as_dir=$as_dir/ ;;
3013 esac
3014 as_found=:
3015
3016 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
3017 ac_aux_dir_found=yes
3018 ac_install_sh=
3019 for ac_aux in $ac_aux_files
3020 do
3021 # As a special case, if "install-sh" is required, that requirement
3022 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3023 # and $ac_install_sh is set appropriately for whichever one is found.
3024 if test x"$ac_aux" = x"install-sh"
3025 then
3026 if test -f "${as_dir}install-sh"; then
3027 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
3028 ac_install_sh="${as_dir}install-sh -c"
3029 elif test -f "${as_dir}install.sh"; then
3030 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
3031 ac_install_sh="${as_dir}install.sh -c"
3032 elif test -f "${as_dir}shtool"; then
3033 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
3034 ac_install_sh="${as_dir}shtool install -c"
3035 else
3036 ac_aux_dir_found=no
3037 if $ac_first_candidate; then
3038 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3039 else
3040 break
3041 fi
3042 fi
3043 else
3044 if test -f "${as_dir}${ac_aux}"; then
3045 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3046 else
3047 ac_aux_dir_found=no
3048 if $ac_first_candidate; then
3049 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3050 else
3051 break
3052 fi
3053 fi
3054 fi
3055 done
3056 if test "$ac_aux_dir_found" = yes; then
3057 ac_aux_dir="$as_dir"
3058 break
3059 fi
3060 ac_first_candidate=false
3061
3062 as_found=false
3063done
3064IFS=$as_save_IFS
3065if $as_found
3066then :
3067
3068else $as_nop
3069 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3070fi
3071
3072
3073# These three variables are undocumented and unsupported,
3074# and are intended to be withdrawn in a future Autoconf release.
3075# They can cause serious problems if a builder's source tree is in a directory
3076# whose full name contains unusual characters.
3077if test -f "${ac_aux_dir}config.guess"; then
3078 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3079fi
3080if test -f "${ac_aux_dir}config.sub"; then
3081 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3082fi
3083if test -f "$ac_aux_dir/configure"; then
3084 ac_configure="$SHELL ${ac_aux_dir}configure"
3085fi
3086
Martin v. Löwis11437992002-04-12 09:54:03 +00003087# Check that the precious variables saved in the cache have kept the same
3088# value.
3089ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003090for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00003091 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3092 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3094 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 case $ac_old_set,$ac_new_set in
3096 set,)
Pablo Galindo53e55292021-04-05 17:38:40 +01003097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3098printf "%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 +00003099 ac_cache_corrupted=: ;;
3100 ,set)
Pablo Galindo53e55292021-04-05 17:38:40 +01003101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3102printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003103 ac_cache_corrupted=: ;;
3104 ,);;
3105 *)
3106 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003107 # differences in whitespace do not lead to failure.
3108 ac_old_val_w=`echo x $ac_old_val`
3109 ac_new_val_w=`echo x $ac_new_val`
3110 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01003111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3112printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003113 ac_cache_corrupted=:
3114 else
Pablo Galindo53e55292021-04-05 17:38:40 +01003115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3116printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003117 eval $ac_var=\$ac_old_val
3118 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01003119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3120printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3122printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 fi;;
3124 esac
3125 # Pass precious variables to config.status.
3126 if test "$ac_new_set" = set; then
3127 case $ac_new_val in
Pablo Galindo53e55292021-04-05 17:38:40 +01003128 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003129 *) ac_arg=$ac_var=$ac_new_val ;;
3130 esac
3131 case " $ac_configure_args " in
3132 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003134 esac
3135 fi
3136done
3137if $ac_cache_corrupted; then
Pablo Galindo53e55292021-04-05 17:38:40 +01003138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3141printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3142 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3143 and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003145## -------------------- ##
3146## Main body of script. ##
3147## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003150ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00003151ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3152ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3153ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003154
Guido van Rossum627b2d71993-12-24 10:39:16 +00003155
Michael W. Hudson54241132001-12-07 15:38:26 +00003156
Trent Nelson4d4ec652012-10-16 08:51:24 -04003157
Christian Heimesff5be6e2018-01-20 13:19:21 +01003158
3159
Martin Panterc5ee3ca2016-09-12 01:32:03 +00003160if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04003161 # If we're building out-of-tree, we need to make sure the following
3162 # resources get picked up before their $srcdir counterparts.
3163 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01003164 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04003165 # Python/ -> importlib.h
3166 # (A side effect of this is that these resources will automatically be
3167 # regenerated when building out-of-tree, regardless of whether or not
3168 # the $srcdir counterpart is up-to-date. This is an acceptable trade
3169 # off.)
3170 BASECPPFLAGS="-IObjects -IInclude -IPython"
3171else
3172 BASECPPFLAGS=""
3173fi
3174
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003175
3176
3177
3178
Victor Stinner9ed34a82017-05-02 22:35:58 +02003179if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003180then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003181# Extract the first word of "git", so it can be a program name with args.
3182set dummy git; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01003183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3184printf %s "checking for $ac_word... " >&6; }
3185if test ${ac_cv_prog_HAS_GIT+y}
3186then :
3187 printf %s "(cached) " >&6
3188else $as_nop
Ned Deily5c4b0d02017-03-04 00:19:55 -05003189 if test -n "$HAS_GIT"; then
3190 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003191else
3192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3193for as_dir in $PATH
3194do
3195 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01003196 case $as_dir in #(((
3197 '') as_dir=./ ;;
3198 */) ;;
3199 *) as_dir=$as_dir/ ;;
3200 esac
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003201 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01003202 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003203 ac_cv_prog_HAS_GIT="found"
Pablo Galindo53e55292021-04-05 17:38:40 +01003204 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003205 break 2
3206 fi
3207done
3208 done
3209IFS=$as_save_IFS
3210
Ned Deily5c4b0d02017-03-04 00:19:55 -05003211 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003212fi
3213fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003214HAS_GIT=$ac_cv_prog_HAS_GIT
3215if test -n "$HAS_GIT"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01003216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
3217printf "%s\n" "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003218else
Pablo Galindo53e55292021-04-05 17:38:40 +01003219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3220printf "%s\n" "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003221fi
3222
3223
3224else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003225HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003226fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003227if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003228then
Xiang Zhang4c855572018-08-20 22:36:19 +08003229 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
3230 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
3231 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003232else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003233 GITVERSION=""
3234 GITTAG=""
3235 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003236fi
3237
3238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
3241
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003242
3243
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003244
Pablo Galindo53e55292021-04-05 17:38:40 +01003245 # Make sure we can run config.sub.
3246$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3247 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3248
3249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3250printf %s "checking build system type... " >&6; }
3251if test ${ac_cv_build+y}
3252then :
3253 printf %s "(cached) " >&6
3254else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003255 ac_build_alias=$build_alias
3256test "x$ac_build_alias" = x &&
Pablo Galindo53e55292021-04-05 17:38:40 +01003257 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003258test "x$ac_build_alias" = x &&
3259 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Pablo Galindo53e55292021-04-05 17:38:40 +01003260ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3261 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003262
3263fi
Pablo Galindo53e55292021-04-05 17:38:40 +01003264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3265printf "%s\n" "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003266case $ac_cv_build in
3267*-*-*) ;;
3268*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3269esac
3270build=$ac_cv_build
3271ac_save_IFS=$IFS; IFS='-'
3272set x $ac_cv_build
3273shift
3274build_cpu=$1
3275build_vendor=$2
3276shift; shift
3277# Remember, the first character of IFS is used to create $*,
3278# except with old shells:
3279build_os=$*
3280IFS=$ac_save_IFS
3281case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3282
3283
Pablo Galindo53e55292021-04-05 17:38:40 +01003284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3285printf %s "checking host system type... " >&6; }
3286if test ${ac_cv_host+y}
3287then :
3288 printf %s "(cached) " >&6
3289else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003290 if test "x$host_alias" = x; then
3291 ac_cv_host=$ac_cv_build
3292else
Pablo Galindo53e55292021-04-05 17:38:40 +01003293 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3294 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003295fi
3296
3297fi
Pablo Galindo53e55292021-04-05 17:38:40 +01003298{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3299printf "%s\n" "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003300case $ac_cv_host in
3301*-*-*) ;;
3302*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3303esac
3304host=$ac_cv_host
3305ac_save_IFS=$IFS; IFS='-'
3306set x $ac_cv_host
3307shift
3308host_cpu=$1
3309host_vendor=$2
3310shift; shift
3311# Remember, the first character of IFS is used to create $*,
3312# except with old shells:
3313host_os=$*
3314IFS=$ac_save_IFS
3315case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3316
3317
3318
doko@python.orga10e4a92013-01-25 18:45:12 +01003319
3320
Ned Deilyfcbc2462014-08-22 13:32:49 -07003321# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
3322rm -f pybuilddir.txt
3323
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003324for ac_prog in python$PACKAGE_VERSION python3 python
3325do
3326 # Extract the first word of "$ac_prog", so it can be a program name with args.
3327set dummy $ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01003328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3329printf %s "checking for $ac_word... " >&6; }
3330if test ${ac_cv_prog_PYTHON_FOR_REGEN+y}
3331then :
3332 printf %s "(cached) " >&6
3333else $as_nop
Victor Stinnera5c62a82017-05-03 18:21:48 +02003334 if test -n "$PYTHON_FOR_REGEN"; then
3335 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003336else
3337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in $PATH
3339do
3340 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01003341 case $as_dir in #(((
3342 '') as_dir=./ ;;
3343 */) ;;
3344 *) as_dir=$as_dir/ ;;
3345 esac
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003346 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01003347 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02003348 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01003349 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 +02003350 break 2
3351 fi
3352done
3353 done
3354IFS=$as_save_IFS
3355
3356fi
3357fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02003358PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
3359if test -n "$PYTHON_FOR_REGEN"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01003360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
3361printf "%s\n" "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003362else
Pablo Galindo53e55292021-04-05 17:38:40 +01003363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3364printf "%s\n" "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003365fi
3366
3367
Victor Stinnera5c62a82017-05-03 18:21:48 +02003368 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003369done
Victor Stinnera5c62a82017-05-03 18:21:48 +02003370test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003371
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003372
3373
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003374if test "$cross_compiling" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01003375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3376printf %s "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003377 if test -z "$PYTHON_FOR_BUILD"; then
3378 for interp in python$PACKAGE_VERSION python3 python; do
3379 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003380 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 +02003381 break
3382 fi
3383 interp=
3384 done
3385 if test x$interp = x; then
3386 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3387 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01003388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3389printf "%s\n" "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003390 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 +02003391 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003392elif test "$cross_compiling" = maybe; then
3393 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003394else
3395 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3396fi
3397
3398
Martin v. Löwis11437992002-04-12 09:54:03 +00003399
Benjamin Petersond23f8222009-04-05 19:13:16 +00003400if test "$prefix" != "/"; then
3401 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3402fi
3403
3404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405
3406
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003407# We don't use PACKAGE_ variables, and they cause conflicts
3408# with other autoconf-based packages that include Python.h
3409grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3410rm confdefs.h
3411mv confdefs.h.new confdefs.h
3412
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003413
Pablo Galindod4fe0982020-05-19 03:33:01 +01003414VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003415
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003416# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003417
3418SOVERSION=1.0
3419
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003420# The later defininition of _XOPEN_SOURCE disables certain features
3421# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3422
Pablo Galindo53e55292021-04-05 17:38:40 +01003423printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003424
3425
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003426# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3427# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3428# them.
3429
Pablo Galindo53e55292021-04-05 17:38:40 +01003430printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003431
3432
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003433# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3434# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3435# them.
3436
Pablo Galindo53e55292021-04-05 17:38:40 +01003437printf "%s\n" "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003438
3439
Martin v. Löwisd6320502004-08-12 13:45:08 +00003440# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003441# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3442# them.
3443
Pablo Galindo53e55292021-04-05 17:38:40 +01003444printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003445
3446
3447
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003448define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003449
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003450# Arguments passed to configure.
3451
3452CONFIG_ARGS="$ac_configure_args"
3453
Pablo Galindo53e55292021-04-05 17:38:40 +01003454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3455printf %s "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456# Check whether --enable-universalsdk was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01003457if test ${enable_universalsdk+y}
3458then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003460 case $enableval in
3461 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003462 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003463 # information
3464 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003465 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003466 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003467 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3468 if test ! -d "${enableval}"
3469 then
3470 enableval=/
3471 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003472 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003473 ;;
3474 esac
3475 case $enableval in
3476 no)
3477 UNIVERSALSDK=
3478 enable_universalsdk=
3479 ;;
3480 *)
3481 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003482 if test ! -d "${UNIVERSALSDK}"
3483 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003484 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003485 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003486 ;;
3487 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003489
Pablo Galindo53e55292021-04-05 17:38:40 +01003490else $as_nop
Thomas Wouters477c8d52006-05-27 19:21:47 +00003491
3492 UNIVERSALSDK=
3493 enable_universalsdk=
3494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003495fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003496
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003497if test -n "${UNIVERSALSDK}"
3498then
Pablo Galindo53e55292021-04-05 17:38:40 +01003499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3500printf "%s\n" "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003501else
Pablo Galindo53e55292021-04-05 17:38:40 +01003502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3503printf "%s\n" "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003504fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003507
Ned Deily87adb6e2013-10-18 21:09:56 -07003508ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003509
Ned Deilycbfb9a52012-06-23 16:02:19 -07003510# For backward compatibility reasons we prefer to select '32-bit' if available,
3511# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003512UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513if test "`uname -s`" = "Darwin"
3514then
3515 if test -n "${UNIVERSALSDK}"
3516 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003517 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518 then
3519 UNIVERSAL_ARCHS="intel"
3520 fi
3521 fi
3522fi
3523
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003524
Pablo Galindo53e55292021-04-05 17:38:40 +01003525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3526printf %s "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003527
3528# Check whether --with-universal-archs was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01003529if test ${with_universal_archs+y}
3530then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003531 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003532 UNIVERSAL_ARCHS="$withval"
3533
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003534fi
3535
Ned Deily87adb6e2013-10-18 21:09:56 -07003536if test -n "${UNIVERSALSDK}"
3537then
Pablo Galindo53e55292021-04-05 17:38:40 +01003538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3539printf "%s\n" "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003540else
Pablo Galindo53e55292021-04-05 17:38:40 +01003541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3542printf "%s\n" "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003543fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003544
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003545
3546# Check whether --with-framework-name was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01003547if test ${with_framework_name+y}
3548then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003549 withval=$with_framework_name;
3550 PYTHONFRAMEWORK=${withval}
3551 PYTHONFRAMEWORKDIR=${withval}.framework
3552 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3553
Pablo Galindo53e55292021-04-05 17:38:40 +01003554else $as_nop
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003555
3556 PYTHONFRAMEWORK=Python
3557 PYTHONFRAMEWORKDIR=Python.framework
3558 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3559
3560fi
3561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562# Check whether --enable-framework was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01003563if test ${enable_framework+y}
3564then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003566 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003568 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003569 esac
3570 case $enableval in
3571 no)
3572 PYTHONFRAMEWORK=
3573 PYTHONFRAMEWORKDIR=no-framework
3574 PYTHONFRAMEWORKPREFIX=
3575 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003576 FRAMEWORKINSTALLFIRST=
3577 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003578 FRAMEWORKALTINSTALLFIRST=
3579 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003580 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003581 if test "x${prefix}" = "xNONE"; then
3582 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3583 else
3584 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3585 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003586 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003587 ;;
3588 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003589 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003590 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003591 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003592 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003593 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3594 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003595 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003596 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003597
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003598 if test "x${prefix}" = "xNONE" ; then
3599 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003600
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003601 else
3602 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3603 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003604
3605 case "${enableval}" in
3606 /System*)
3607 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3608 if test "${prefix}" = "NONE" ; then
3609 # See below
3610 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3611 fi
3612 ;;
3613
3614 /Library*)
3615 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3616 ;;
3617
3618 */Library/Frameworks)
3619 MDIR="`dirname "${enableval}"`"
3620 MDIR="`dirname "${MDIR}"`"
3621 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3622
3623 if test "${prefix}" = "NONE"; then
3624 # User hasn't specified the
3625 # --prefix option, but wants to install
3626 # the framework in a non-default location,
3627 # ensure that the compatibility links get
3628 # installed relative to that prefix as well
3629 # instead of in /usr/local.
3630 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3631 fi
3632 ;;
3633
3634 *)
3635 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3636 ;;
3637 esac
3638
Jack Jansen127e56e2001-09-11 14:41:54 +00003639 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003640
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003641 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003642 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003646
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003647 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3648
3649 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3650
Jack Jansene578a632001-08-15 01:27:14 +00003651 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
Pablo Galindo53e55292021-04-05 17:38:40 +01003653else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
Jack Jansene578a632001-08-15 01:27:14 +00003655 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003656 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003657 PYTHONFRAMEWORKPREFIX=
3658 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003659 FRAMEWORKINSTALLFIRST=
3660 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003661 FRAMEWORKALTINSTALLFIRST=
3662 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003663 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003664 if test "x${prefix}" = "xNONE" ; then
3665 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3666 else
3667 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3668 fi
Jack Jansene578a632001-08-15 01:27:14 +00003669 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003670
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672fi
3673
Thomas Wouters477c8d52006-05-27 19:21:47 +00003674
3675
Michael W. Hudson54241132001-12-07 15:38:26 +00003676
3677
3678
3679
Jack Jansene578a632001-08-15 01:27:14 +00003680
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003681
3682
3683
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003684
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003685
Ned Deilyb8f944f2013-11-21 22:42:25 -08003686
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003687
Pablo Galindo53e55292021-04-05 17:38:40 +01003688printf "%s\n" "#define _PYTHONFRAMEWORK \"${PYTHONFRAMEWORK}\"" >>confdefs.h
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003689
3690
Jack Jansene578a632001-08-15 01:27:14 +00003691##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003692## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003693## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003694##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003695# Set name for machine-dependent library files
3696
Pablo Galindo53e55292021-04-05 17:38:40 +01003697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3698printf %s "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003699if test -z "$MACHDEP"
3700then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003701 # avoid using uname for cross builds
3702 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003703 # ac_sys_system and ac_sys_release are used for setting
3704 # a lot of different things including 'define_xopen_source'
3705 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003706 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003707 *-*-linux-android*)
3708 ac_sys_system=Linux-android
3709 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003710 *-*-linux*)
3711 ac_sys_system=Linux
3712 ;;
3713 *-*-cygwin*)
3714 ac_sys_system=Cygwin
3715 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003716 *-*-vxworks*)
3717 ac_sys_system=VxWorks
3718 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003719 *)
3720 # for now, limit cross builds to known configurations
3721 MACHDEP="unknown"
3722 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3723 esac
3724 ac_sys_release=
3725 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003726 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003727 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003728 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003729 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003730 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003731 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003732 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003733 fi
3734 ac_md_system=`echo $ac_sys_system |
3735 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3736 ac_md_release=`echo $ac_sys_release |
3737 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3738 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003739
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003740 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003741 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003742 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003743 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003744 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003745 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003746 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003747fi
Pablo Galindo53e55292021-04-05 17:38:40 +01003748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3749printf "%s\n" "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003750
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003751
3752if test "$cross_compiling" = yes; then
3753 case "$host" in
3754 *-*-linux*)
3755 case "$host_cpu" in
3756 arm*)
3757 _host_cpu=arm
3758 ;;
3759 *)
3760 _host_cpu=$host_cpu
3761 esac
3762 ;;
3763 *-*-cygwin*)
3764 _host_cpu=
3765 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003766 *-*-vxworks*)
3767 _host_cpu=$host_cpu
3768 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003769 *)
3770 # for now, limit cross builds to known configurations
3771 MACHDEP="unknown"
3772 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3773 esac
3774 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3775fi
3776
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003777# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3778# disable features if it is defined, without any means to access these
3779# features as extensions. For these systems, we skip the definition of
3780# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3781# some feature, make sure there is no alternative way to access this
3782# feature. Also, when using wildcards, make sure you have verified the
3783# need for not defining _XOPEN_SOURCE on all systems matching the
3784# wildcard, and that the wildcard does not include future systems
3785# (which may remove their limitations).
3786case $ac_sys_system/$ac_sys_release in
3787 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3788 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003789 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003790 # In addition, Stefan Krah confirms that issue #1244610 exists through
3791 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003792 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003793 define_xopen_source=no
3794 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3795 # also defined. This can be overridden by defining _BSD_SOURCE
3796 # As this has a different meaning on Linux, only define it on OpenBSD
3797
Pablo Galindo53e55292021-04-05 17:38:40 +01003798printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003799
3800 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003801 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003802 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3803 # also defined. This can be overridden by defining _BSD_SOURCE
3804 # As this has a different meaning on Linux, only define it on OpenBSD
3805
Pablo Galindo53e55292021-04-05 17:38:40 +01003806printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003807
3808 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003809 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3810 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3811 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003812 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 +00003813 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003814 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3815 # request to enable features supported by the standard as a request
3816 # to disable features not supported by the standard. The best way
3817 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3818 # entirely and define __EXTENSIONS__ instead.
3819 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003820 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003821 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3822 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003823 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003824 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003825 define_xopen_source=no;;
3826 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003827 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003828 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003829 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003830 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3831 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3832 # identifies itself as Darwin/7.*
3833 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3834 # disables platform specific features beyond repair.
3835 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3836 # has no effect, don't bother defining them
3837 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003838 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003839 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003840 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003841 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3842 # defining NI_NUMERICHOST.
3843 QNX/6.3.2)
3844 define_xopen_source=no
3845 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003846 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3847 # in network headers still using system V types.
3848 VxWorks/*)
3849 define_xopen_source=no
3850 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003851
Ian Nortona9edf442020-02-14 03:09:11 +00003852 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3853 # chroot() and other functions
3854 hp*|HP*)
3855 define_xopen_source=no
3856 ;;
3857
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003858esac
3859
3860if test $define_xopen_source = yes
3861then
Victor Stinner14d098d2011-09-07 22:29:43 +02003862 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003863
Pablo Galindo53e55292021-04-05 17:38:40 +01003864printf "%s\n" "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003865
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003866
3867 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3868 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3869 # several APIs are not declared. Since this is also needed in some
3870 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003871
Pablo Galindo53e55292021-04-05 17:38:40 +01003872printf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003873
3874
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003875
Pablo Galindo53e55292021-04-05 17:38:40 +01003876printf "%s\n" "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003878fi
3879
Christian Heimes647cd872013-12-07 23:39:33 +01003880# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3881case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003882 hp*|HP*)
3883 define_stdc_a1=yes;;
3884 *)
3885 define_stdc_a1=no;;
3886esac
3887
3888if test $define_stdc_a1 = yes
3889then
Christian Heimes647cd872013-12-07 23:39:33 +01003890
Pablo Galindo53e55292021-04-05 17:38:40 +01003891printf "%s\n" "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003892
Christian Heimesb02bcae2013-12-08 15:21:08 +01003893fi
Christian Heimes647cd872013-12-07 23:39:33 +01003894
Jack Jansen6b08a402004-06-03 12:41:45 +00003895# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3896# it may influence the way we can build extensions, so distutils
3897# needs to check it
3898
Thomas Wouters477c8d52006-05-27 19:21:47 +00003899
Jack Jansen6b08a402004-06-03 12:41:45 +00003900CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003901EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003902
Guido van Rossum627b2d71993-12-24 10:39:16 +00003903# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003904
3905# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3906# for debug/optimization stuff. BASECFLAGS is for flags that are required
3907# just to get things to compile and link. Users are free to override OPT
3908# when running configure or make. The build should not break if they do.
3909# BASECFLAGS should generally not be messed with, however.
3910
Guido van Rossum8b131c51995-03-09 14:10:13 +00003911# If the user switches compilers, we can't believe the cache
3912if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3913then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003914 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003915(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003916fi
3917
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003918# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3919# when the compiler supports them, but we don't always want -O2, and
3920# we set -g later.
3921if test -z "$CFLAGS"; then
3922 CFLAGS=
3923fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003924
3925if test "$ac_sys_system" = "Darwin"
3926then
3927 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003928 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003929 # information
3930 if test -z "${CC}"
3931 then
3932 found_gcc=
3933 found_clang=
3934 as_save_IFS=$IFS; IFS=:
3935 for as_dir in $PATH
3936 do
3937 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003938 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003939 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003940 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003941 fi
3942 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003943 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003944 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003945 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003946 fi
3947 fi
3948 done
3949 IFS=$as_save_IFS
3950
3951 if test -n "$found_gcc" -a -n "$found_clang"
3952 then
3953 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3954 then
Pablo Galindo53e55292021-04-05 17:38:40 +01003955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3956printf "%s\n" "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003957 CC="$found_clang"
3958 CXX="$found_clang++"
3959 fi
3960
3961
3962 elif test -z "$found_gcc" -a -n "$found_clang"
3963 then
Pablo Galindo53e55292021-04-05 17:38:40 +01003964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3965printf "%s\n" "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003966 CC="$found_clang"
3967 CXX="$found_clang++"
3968
3969 elif test -z "$found_gcc" -a -z "$found_clang"
3970 then
3971 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3972 if test -n "${found_clang}"
3973 then
Pablo Galindo53e55292021-04-05 17:38:40 +01003974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3975printf "%s\n" "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003976 CC="${found_clang}"
3977 CXX="`/usr/bin/xcrun -find clang++`"
3978
3979 # else: use default behaviour
3980 fi
3981 fi
3982 fi
3983fi
Pablo Galindo53e55292021-04-05 17:38:40 +01003984
3985
3986
3987
3988
3989
3990
3991
3992
Martin v. Löwis11437992002-04-12 09:54:03 +00003993ac_ext=c
3994ac_cpp='$CPP $CPPFLAGS'
3995ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3996ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3997ac_compiler_gnu=$ac_cv_c_compiler_gnu
3998if test -n "$ac_tool_prefix"; then
3999 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4000set dummy ${ac_tool_prefix}gcc; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01004001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4002printf %s "checking for $ac_word... " >&6; }
4003if test ${ac_cv_prog_CC+y}
4004then :
4005 printf %s "(cached) " >&6
4006else $as_nop
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004007 if test -n "$CC"; then
4008 ac_cv_prog_CC="$CC" # Let the user override the test.
4009else
Martin v. Löwis11437992002-04-12 09:54:03 +00004010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4011for as_dir in $PATH
4012do
4013 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01004014 case $as_dir in #(((
4015 '') as_dir=./ ;;
4016 */) ;;
4017 *) as_dir=$as_dir/ ;;
4018 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01004020 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Pablo Galindo53e55292021-04-05 17:38:40 +01004022 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 +00004023 break 2
4024 fi
4025done
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004028
Jack Jansendd19cf82001-12-06 22:36:17 +00004029fi
4030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004031CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00004032if test -n "$CC"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01004033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4034printf "%s\n" "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004035else
Pablo Galindo53e55292021-04-05 17:38:40 +01004036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4037printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004038fi
4039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040
Martin v. Löwis11437992002-04-12 09:54:03 +00004041fi
4042if test -z "$ac_cv_prog_CC"; then
4043 ac_ct_CC=$CC
4044 # Extract the first word of "gcc", so it can be a program name with args.
4045set dummy gcc; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01004046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4047printf %s "checking for $ac_word... " >&6; }
4048if test ${ac_cv_prog_ac_ct_CC+y}
4049then :
4050 printf %s "(cached) " >&6
4051else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 if test -n "$ac_ct_CC"; then
4053 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4054else
4055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4056for as_dir in $PATH
4057do
4058 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01004059 case $as_dir in #(((
4060 '') as_dir=./ ;;
4061 */) ;;
4062 *) as_dir=$as_dir/ ;;
4063 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01004065 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004066 ac_cv_prog_ac_ct_CC="gcc"
Pablo Galindo53e55292021-04-05 17:38:40 +01004067 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 +00004068 break 2
4069 fi
4070done
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004073
4074fi
4075fi
4076ac_ct_CC=$ac_cv_prog_ac_ct_CC
4077if test -n "$ac_ct_CC"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01004078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4079printf "%s\n" "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004080else
Pablo Galindo53e55292021-04-05 17:38:40 +01004081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4082printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004083fi
4084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085 if test "x$ac_ct_CC" = x; then
4086 CC=""
4087 else
4088 case $cross_compiling:$ac_tool_warned in
4089yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01004090{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4091printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092ac_tool_warned=yes ;;
4093esac
4094 CC=$ac_ct_CC
4095 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004096else
4097 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00004098fi
4099
Jack Jansendd19cf82001-12-06 22:36:17 +00004100if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101 if test -n "$ac_tool_prefix"; then
4102 # 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 +00004103set dummy ${ac_tool_prefix}cc; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01004104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4105printf %s "checking for $ac_word... " >&6; }
4106if test ${ac_cv_prog_CC+y}
4107then :
4108 printf %s "(cached) " >&6
4109else $as_nop
Jack Jansendd19cf82001-12-06 22:36:17 +00004110 if test -n "$CC"; then
4111 ac_cv_prog_CC="$CC" # Let the user override the test.
4112else
Martin v. Löwis11437992002-04-12 09:54:03 +00004113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4114for as_dir in $PATH
4115do
4116 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01004117 case $as_dir in #(((
4118 '') as_dir=./ ;;
4119 */) ;;
4120 *) as_dir=$as_dir/ ;;
4121 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01004123 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 ac_cv_prog_CC="${ac_tool_prefix}cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01004125 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 +00004126 break 2
4127 fi
4128done
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
4132fi
4133fi
4134CC=$ac_cv_prog_CC
4135if test -n "$CC"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01004136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4137printf "%s\n" "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004138else
Pablo Galindo53e55292021-04-05 17:38:40 +01004139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4140printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
4142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
4146if test -z "$CC"; then
4147 # Extract the first word of "cc", so it can be a program name with args.
4148set dummy cc; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01004149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4150printf %s "checking for $ac_word... " >&6; }
4151if test ${ac_cv_prog_CC+y}
4152then :
4153 printf %s "(cached) " >&6
4154else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 if test -n "$CC"; then
4156 ac_cv_prog_CC="$CC" # Let the user override the test.
4157else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004158 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4160for as_dir in $PATH
4161do
4162 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01004163 case $as_dir in #(((
4164 '') as_dir=./ ;;
4165 */) ;;
4166 *) as_dir=$as_dir/ ;;
4167 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01004169 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4170 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_prog_rejected=yes
4172 continue
4173 fi
4174 ac_cv_prog_CC="cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01004175 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 +00004176 break 2
4177 fi
4178done
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004182if test $ac_prog_rejected = yes; then
4183 # We found a bogon in the path, so make sure we never use it.
4184 set dummy $ac_cv_prog_CC
4185 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00004186 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004187 # We chose a different compiler from the bogus one.
4188 # However, it has the same basename, so the bogon will be chosen
4189 # first if we set CC to just the basename; use the full file name.
4190 shift
Pablo Galindo53e55292021-04-05 17:38:40 +01004191 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004192 fi
4193fi
4194fi
4195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004196CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004197if test -n "$CC"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01004198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4199printf "%s\n" "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004200else
Pablo Galindo53e55292021-04-05 17:38:40 +01004201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4202printf "%s\n" "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004203fi
4204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205
Martin v. Löwis11437992002-04-12 09:54:03 +00004206fi
4207if test -z "$CC"; then
4208 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00004210 do
4211 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4212set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01004213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4214printf %s "checking for $ac_word... " >&6; }
4215if test ${ac_cv_prog_CC+y}
4216then :
4217 printf %s "(cached) " >&6
4218else $as_nop
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004219 if test -n "$CC"; then
4220 ac_cv_prog_CC="$CC" # Let the user override the test.
4221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223for as_dir in $PATH
4224do
4225 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01004226 case $as_dir in #(((
4227 '') as_dir=./ ;;
4228 */) ;;
4229 *) as_dir=$as_dir/ ;;
4230 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01004232 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01004234 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 +00004235 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004237done
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004240
4241fi
4242fi
4243CC=$ac_cv_prog_CC
4244if test -n "$CC"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01004245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4246printf "%s\n" "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004247else
Pablo Galindo53e55292021-04-05 17:38:40 +01004248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4249printf "%s\n" "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004250fi
4251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 test -n "$CC" && break
4254 done
4255fi
4256if test -z "$CC"; then
4257 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00004259do
4260 # Extract the first word of "$ac_prog", so it can be a program name with args.
4261set dummy $ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01004262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4263printf %s "checking for $ac_word... " >&6; }
4264if test ${ac_cv_prog_ac_ct_CC+y}
4265then :
4266 printf %s "(cached) " >&6
4267else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 if test -n "$ac_ct_CC"; then
4269 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4270else
4271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272for as_dir in $PATH
4273do
4274 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01004275 case $as_dir in #(((
4276 '') as_dir=./ ;;
4277 */) ;;
4278 *) as_dir=$as_dir/ ;;
4279 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01004281 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 ac_cv_prog_ac_ct_CC="$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01004283 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 +00004284 break 2
4285 fi
4286done
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00004289
Martin v. Löwis11437992002-04-12 09:54:03 +00004290fi
4291fi
4292ac_ct_CC=$ac_cv_prog_ac_ct_CC
4293if test -n "$ac_ct_CC"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01004294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4295printf "%s\n" "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004296else
Pablo Galindo53e55292021-04-05 17:38:40 +01004297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4298printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004299fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 test -n "$ac_ct_CC" && break
4303done
Michael W. Hudson54241132001-12-07 15:38:26 +00004304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 if test "x$ac_ct_CC" = x; then
4306 CC=""
4307 else
4308 case $cross_compiling:$ac_tool_warned in
4309yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01004310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4311printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312ac_tool_warned=yes ;;
4313esac
4314 CC=$ac_ct_CC
4315 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004316fi
4317
4318fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004319if test -z "$CC"; then
4320 if test -n "$ac_tool_prefix"; then
4321 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4322set dummy ${ac_tool_prefix}clang; ac_word=$2
4323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4324printf %s "checking for $ac_word... " >&6; }
4325if test ${ac_cv_prog_CC+y}
4326then :
4327 printf %s "(cached) " >&6
4328else $as_nop
4329 if test -n "$CC"; then
4330 ac_cv_prog_CC="$CC" # Let the user override the test.
4331else
4332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4333for as_dir in $PATH
4334do
4335 IFS=$as_save_IFS
4336 case $as_dir in #(((
4337 '') as_dir=./ ;;
4338 */) ;;
4339 *) as_dir=$as_dir/ ;;
4340 esac
4341 for ac_exec_ext in '' $ac_executable_extensions; do
4342 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4343 ac_cv_prog_CC="${ac_tool_prefix}clang"
4344 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4345 break 2
4346 fi
4347done
4348 done
4349IFS=$as_save_IFS
4350
4351fi
4352fi
4353CC=$ac_cv_prog_CC
4354if test -n "$CC"; then
4355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4356printf "%s\n" "$CC" >&6; }
4357else
4358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4359printf "%s\n" "no" >&6; }
4360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004361
4362
Pablo Galindo53e55292021-04-05 17:38:40 +01004363fi
4364if test -z "$ac_cv_prog_CC"; then
4365 ac_ct_CC=$CC
4366 # Extract the first word of "clang", so it can be a program name with args.
4367set dummy clang; ac_word=$2
4368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4369printf %s "checking for $ac_word... " >&6; }
4370if test ${ac_cv_prog_ac_ct_CC+y}
4371then :
4372 printf %s "(cached) " >&6
4373else $as_nop
4374 if test -n "$ac_ct_CC"; then
4375 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4376else
4377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4378for as_dir in $PATH
4379do
4380 IFS=$as_save_IFS
4381 case $as_dir in #(((
4382 '') as_dir=./ ;;
4383 */) ;;
4384 *) as_dir=$as_dir/ ;;
4385 esac
4386 for ac_exec_ext in '' $ac_executable_extensions; do
4387 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4388 ac_cv_prog_ac_ct_CC="clang"
4389 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4390 break 2
4391 fi
4392done
4393 done
4394IFS=$as_save_IFS
4395
4396fi
4397fi
4398ac_ct_CC=$ac_cv_prog_ac_ct_CC
4399if test -n "$ac_ct_CC"; then
4400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4401printf "%s\n" "$ac_ct_CC" >&6; }
4402else
4403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4404printf "%s\n" "no" >&6; }
4405fi
4406
4407 if test "x$ac_ct_CC" = x; then
4408 CC=""
4409 else
4410 case $cross_compiling:$ac_tool_warned in
4411yes:)
4412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4413printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4414ac_tool_warned=yes ;;
4415esac
4416 CC=$ac_ct_CC
4417 fi
4418else
4419 CC="$ac_cv_prog_CC"
4420fi
4421
4422fi
4423
4424
4425test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4426printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004427as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004428See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004429
4430# Provide some information about the compiler.
Pablo Galindo53e55292021-04-05 17:38:40 +01004431printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004432set X $ac_compile
4433ac_compiler=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01004434for ac_option in --version -v -V -qversion -version; do
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436case "(($ac_try" in
4437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4438 *) ac_try_echo=$ac_try;;
4439esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004440eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01004441printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004442 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004443 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 if test -s conftest.err; then
4445 sed '10a\
4446... rest of stderr output deleted ...
4447 10q' conftest.err >conftest.er1
4448 cat conftest.er1 >&5
4449 fi
4450 rm -f conftest.er1 conftest.err
Pablo Galindo53e55292021-04-05 17:38:40 +01004451 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004452 test $ac_status = 0; }
4453done
Martin v. Löwis11437992002-04-12 09:54:03 +00004454
Matthias Kloseb9621712010-04-24 17:59:49 +00004455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004456/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004457
Martin v. Löwis11437992002-04-12 09:54:03 +00004458int
Pablo Galindo53e55292021-04-05 17:38:40 +01004459main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004460{
4461
4462 ;
4463 return 0;
4464}
4465_ACEOF
4466ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004467ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004468# Try to create an executable without -o first, disregard a.out.
4469# It will help us diagnose broken compilers, and finding out an intuition
4470# of exeext.
Pablo Galindo53e55292021-04-05 17:38:40 +01004471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4472printf %s "checking whether the C compiler works... " >&6; }
4473ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00004474
4475# The possible output files:
4476ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004478ac_rmfiles=
4479for ac_file in $ac_files
4480do
4481 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004482 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4484 esac
4485done
4486rm -f $ac_rmfiles
4487
Matthias Kloseb9621712010-04-24 17:59:49 +00004488if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004489case "(($ac_try" in
4490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4491 *) ac_try_echo=$ac_try;;
4492esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004493eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01004494printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004496 ac_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01004497 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4498 test $ac_status = 0; }
4499then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004500 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4501# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4502# in a Makefile. We should not override ac_cv_exeext if it was cached,
4503# so that the user can short-circuit this test for compilers unknown to
4504# Autoconf.
4505for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004506do
4507 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004508 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004510 ;;
4511 [ab].out )
4512 # We found the default executable, but exeext='' is most
4513 # certainly right.
4514 break;;
4515 *.* )
Pablo Galindo53e55292021-04-05 17:38:40 +01004516 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004517 then :; else
4518 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4519 fi
4520 # We set ac_cv_exeext here because the later test for it is not
4521 # safe: cross compilers may not add the suffix if given an `-o'
4522 # argument, so we may need to know it at that point already.
4523 # Even if this section looks crufty: it has the advantage of
4524 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004525 break;;
4526 * )
4527 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004528 esac
4529done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004530test "$ac_cv_exeext" = no && ac_cv_exeext=
4531
Pablo Galindo53e55292021-04-05 17:38:40 +01004532else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004533 ac_file=''
4534fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004535if test -z "$ac_file"
4536then :
4537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4538printf "%s\n" "no" >&6; }
4539printf "%s\n" "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004540sed 's/^/| /' conftest.$ac_ext >&5
4541
Pablo Galindo53e55292021-04-05 17:38:40 +01004542{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4543printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004544as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004545See \`config.log' for more details" "$LINENO" 5; }
Pablo Galindo53e55292021-04-05 17:38:40 +01004546else $as_nop
4547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4548printf "%s\n" "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004549fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4551printf %s "checking for C compiler default output file name... " >&6; }
4552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4553printf "%s\n" "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004554ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004555
Matthias Kloseb9621712010-04-24 17:59:49 +00004556rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004557ac_clean_files=$ac_clean_files_save
Pablo Galindo53e55292021-04-05 17:38:40 +01004558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4559printf %s "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004560if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004561case "(($ac_try" in
4562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4563 *) ac_try_echo=$ac_try;;
4564esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01004566printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004567 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004568 ac_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01004569 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4570 test $ac_status = 0; }
4571then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004572 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4573# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4574# work properly (i.e., refer to `conftest.exe'), while it won't with
4575# `rm'.
4576for ac_file in conftest.exe conftest conftest.*; do
4577 test -f "$ac_file" || continue
4578 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004579 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004580 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4581 break;;
4582 * ) break;;
4583 esac
4584done
Pablo Galindo53e55292021-04-05 17:38:40 +01004585else $as_nop
4586 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4587printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004588as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004589See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004591rm -f conftest conftest$ac_cv_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +01004592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4593printf "%s\n" "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004594
4595rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004596EXEEXT=$ac_cv_exeext
4597ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599/* end confdefs.h. */
4600#include <stdio.h>
4601int
Pablo Galindo53e55292021-04-05 17:38:40 +01004602main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00004603{
4604FILE *f = fopen ("conftest.out", "w");
4605 return ferror (f) || fclose (f) != 0;
4606
4607 ;
4608 return 0;
4609}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004611ac_clean_files="$ac_clean_files conftest.out"
4612# Check that the compiler produces executables we can run. If not, either
4613# the compiler is broken, or we cross compile.
Pablo Galindo53e55292021-04-05 17:38:40 +01004614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4615printf %s "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004616if test "$cross_compiling" != yes; then
4617 { { ac_try="$ac_link"
4618case "(($ac_try" in
4619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4620 *) ac_try_echo=$ac_try;;
4621esac
4622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01004623printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004624 (eval "$ac_link") 2>&5
4625 ac_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01004626 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004627 test $ac_status = 0; }
4628 if { ac_try='./conftest$ac_cv_exeext'
4629 { { case "(($ac_try" in
4630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4631 *) ac_try_echo=$ac_try;;
4632esac
4633eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01004634printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004635 (eval "$ac_try") 2>&5
4636 ac_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01004637 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004638 test $ac_status = 0; }; }; then
4639 cross_compiling=no
4640 else
4641 if test "$cross_compiling" = maybe; then
4642 cross_compiling=yes
4643 else
Pablo Galindo53e55292021-04-05 17:38:40 +01004644 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4645printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4646as_fn_error 77 "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004647If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004648See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 fi
4650 fi
4651fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4653printf "%s\n" "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004654
4655rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4656ac_clean_files=$ac_clean_files_save
Pablo Galindo53e55292021-04-05 17:38:40 +01004657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4658printf %s "checking for suffix of object files... " >&6; }
4659if test ${ac_cv_objext+y}
4660then :
4661 printf %s "(cached) " >&6
4662else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004664/* end confdefs.h. */
4665
4666int
Pablo Galindo53e55292021-04-05 17:38:40 +01004667main (void)
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004668{
4669
4670 ;
4671 return 0;
4672}
4673_ACEOF
4674rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004675if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004676case "(($ac_try" in
4677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4678 *) ac_try_echo=$ac_try;;
4679esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindo53e55292021-04-05 17:38:40 +01004681printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004682 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004683 ac_status=$?
Pablo Galindo53e55292021-04-05 17:38:40 +01004684 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4685 test $ac_status = 0; }
4686then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004687 for ac_file in conftest.o conftest.obj conftest.*; do
4688 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004690 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004691 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4692 break;;
4693 esac
4694done
Pablo Galindo53e55292021-04-05 17:38:40 +01004695else $as_nop
4696 printf "%s\n" "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004697sed 's/^/| /' conftest.$ac_ext >&5
4698
Pablo Galindo53e55292021-04-05 17:38:40 +01004699{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4700printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004701as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004702See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004703fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004704rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004705fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4707printf "%s\n" "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004708OBJEXT=$ac_cv_objext
4709ac_objext=$OBJEXT
Pablo Galindo53e55292021-04-05 17:38:40 +01004710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4711printf %s "checking whether the compiler supports GNU C... " >&6; }
4712if test ${ac_cv_c_compiler_gnu+y}
4713then :
4714 printf %s "(cached) " >&6
4715else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004718
Martin v. Löwis11437992002-04-12 09:54:03 +00004719int
Pablo Galindo53e55292021-04-05 17:38:40 +01004720main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004721{
4722#ifndef __GNUC__
4723 choke me
4724#endif
4725
4726 ;
4727 return 0;
4728}
4729_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01004730if ac_fn_c_try_compile "$LINENO"
4731then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004732 ac_compiler_gnu=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01004733else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004735fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004736rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004737ac_cv_c_compiler_gnu=$ac_compiler_gnu
4738
4739fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4741printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4742ac_compiler_gnu=$ac_cv_c_compiler_gnu
4743
Matthias Kloseb9621712010-04-24 17:59:49 +00004744if test $ac_compiler_gnu = yes; then
4745 GCC=yes
4746else
4747 GCC=
4748fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004749ac_test_CFLAGS=${CFLAGS+y}
Martin v. Löwis11437992002-04-12 09:54:03 +00004750ac_save_CFLAGS=$CFLAGS
Pablo Galindo53e55292021-04-05 17:38:40 +01004751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4752printf %s "checking whether $CC accepts -g... " >&6; }
4753if test ${ac_cv_prog_cc_g+y}
4754then :
4755 printf %s "(cached) " >&6
4756else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004757 ac_save_c_werror_flag=$ac_c_werror_flag
4758 ac_c_werror_flag=yes
4759 ac_cv_prog_cc_g=no
4760 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004763
Martin v. Löwis11437992002-04-12 09:54:03 +00004764int
Pablo Galindo53e55292021-04-05 17:38:40 +01004765main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004766{
4767
4768 ;
4769 return 0;
4770}
4771_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01004772if ac_fn_c_try_compile "$LINENO"
4773then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004774 ac_cv_prog_cc_g=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01004775else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 CFLAGS=""
4777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004778/* end confdefs.h. */
4779
4780int
Pablo Galindo53e55292021-04-05 17:38:40 +01004781main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004782{
4783
4784 ;
4785 return 0;
4786}
4787_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01004788if ac_fn_c_try_compile "$LINENO"
4789then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004790
Pablo Galindo53e55292021-04-05 17:38:40 +01004791else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004793 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795/* end confdefs.h. */
4796
4797int
Pablo Galindo53e55292021-04-05 17:38:40 +01004798main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004799{
4800
4801 ;
4802 return 0;
4803}
4804_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01004805if ac_fn_c_try_compile "$LINENO"
4806then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004808fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004809rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004810fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004811rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004812fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004813rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004814 ac_c_werror_flag=$ac_save_c_werror_flag
4815fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4817printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4818if test $ac_test_CFLAGS; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004820elif test $ac_cv_prog_cc_g = yes; then
4821 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004822 CFLAGS="-g -O2"
4823 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004824 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004825 fi
4826else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004827 if test "$GCC" = yes; then
4828 CFLAGS="-O2"
4829 else
4830 CFLAGS=
4831 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004832fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004833ac_prog_cc_stdc=no
4834if test x$ac_prog_cc_stdc = xno
4835then :
4836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4837printf %s "checking for $CC option to enable C11 features... " >&6; }
4838if test ${ac_cv_prog_cc_c11+y}
4839then :
4840 printf %s "(cached) " >&6
4841else $as_nop
4842 ac_cv_prog_cc_c11=no
4843ac_save_CC=$CC
4844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845/* end confdefs.h. */
4846$ac_c_conftest_c11_program
4847_ACEOF
4848for ac_arg in '' -std=gnu11
4849do
4850 CC="$ac_save_CC $ac_arg"
4851 if ac_fn_c_try_compile "$LINENO"
4852then :
4853 ac_cv_prog_cc_c11=$ac_arg
4854fi
4855rm -f core conftest.err conftest.$ac_objext conftest.beam
4856 test "x$ac_cv_prog_cc_c11" != "xno" && break
4857done
4858rm -f conftest.$ac_ext
4859CC=$ac_save_CC
4860fi
4861
4862if test "x$ac_cv_prog_cc_c11" = xno
4863then :
4864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4865printf "%s\n" "unsupported" >&6; }
4866else $as_nop
4867 if test "x$ac_cv_prog_cc_c11" = x
4868then :
4869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4870printf "%s\n" "none needed" >&6; }
4871else $as_nop
4872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4873printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4874 CC="$CC $ac_cv_prog_cc_c11"
4875fi
4876 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4877 ac_prog_cc_stdc=c11
4878fi
4879fi
4880if test x$ac_prog_cc_stdc = xno
4881then :
4882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4883printf %s "checking for $CC option to enable C99 features... " >&6; }
4884if test ${ac_cv_prog_cc_c99+y}
4885then :
4886 printf %s "(cached) " >&6
4887else $as_nop
4888 ac_cv_prog_cc_c99=no
4889ac_save_CC=$CC
4890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4891/* end confdefs.h. */
4892$ac_c_conftest_c99_program
4893_ACEOF
4894for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4895do
4896 CC="$ac_save_CC $ac_arg"
4897 if ac_fn_c_try_compile "$LINENO"
4898then :
4899 ac_cv_prog_cc_c99=$ac_arg
4900fi
4901rm -f core conftest.err conftest.$ac_objext conftest.beam
4902 test "x$ac_cv_prog_cc_c99" != "xno" && break
4903done
4904rm -f conftest.$ac_ext
4905CC=$ac_save_CC
4906fi
4907
4908if test "x$ac_cv_prog_cc_c99" = xno
4909then :
4910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4911printf "%s\n" "unsupported" >&6; }
4912else $as_nop
4913 if test "x$ac_cv_prog_cc_c99" = x
4914then :
4915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4916printf "%s\n" "none needed" >&6; }
4917else $as_nop
4918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4919printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4920 CC="$CC $ac_cv_prog_cc_c99"
4921fi
4922 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4923 ac_prog_cc_stdc=c99
4924fi
4925fi
4926if test x$ac_prog_cc_stdc = xno
4927then :
4928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4929printf %s "checking for $CC option to enable C89 features... " >&6; }
4930if test ${ac_cv_prog_cc_c89+y}
4931then :
4932 printf %s "(cached) " >&6
4933else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004934 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004935ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004937/* end confdefs.h. */
Pablo Galindo53e55292021-04-05 17:38:40 +01004938$ac_c_conftest_c89_program
Skip Montanaro6dead952003-09-25 14:50:04 +00004939_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01004940for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004941do
4942 CC="$ac_save_CC $ac_arg"
Pablo Galindo53e55292021-04-05 17:38:40 +01004943 if ac_fn_c_try_compile "$LINENO"
4944then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004945 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004946fi
Pablo Galindo53e55292021-04-05 17:38:40 +01004947rm -f core conftest.err conftest.$ac_objext conftest.beam
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004948 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004949done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004950rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004951CC=$ac_save_CC
Pablo Galindocc128882021-03-01 16:47:53 +00004952fi
Christian Heimes32eba612021-03-19 10:29:25 +01004953
Pablo Galindo53e55292021-04-05 17:38:40 +01004954if test "x$ac_cv_prog_cc_c89" = xno
4955then :
4956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4957printf "%s\n" "unsupported" >&6; }
4958else $as_nop
4959 if test "x$ac_cv_prog_cc_c89" = x
4960then :
4961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4962printf "%s\n" "none needed" >&6; }
4963else $as_nop
4964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4965printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4966 CC="$CC $ac_cv_prog_cc_c89"
4967fi
4968 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4969 ac_prog_cc_stdc=c89
4970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004971fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004972
Martin v. Löwis11437992002-04-12 09:54:03 +00004973ac_ext=c
4974ac_cpp='$CPP $CPPFLAGS'
4975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4977ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004978
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004979ac_ext=c
4980ac_cpp='$CPP $CPPFLAGS'
4981ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4982ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4983ac_compiler_gnu=$ac_cv_c_compiler_gnu
Pablo Galindo53e55292021-04-05 17:38:40 +01004984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4985printf %s "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004986# On Suns, sometimes $CPP names a directory.
4987if test -n "$CPP" && test -d "$CPP"; then
4988 CPP=
4989fi
4990if test -z "$CPP"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01004991 if test ${ac_cv_prog_CPP+y}
4992then :
4993 printf %s "(cached) " >&6
4994else $as_nop
4995 # Double quotes because $CC needs to be expanded
4996 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004997 do
4998 ac_preproc_ok=false
4999for ac_c_preproc_warn_flag in '' yes
5000do
5001 # Use a header file that comes with gcc, so configuring glibc
5002 # with a fresh cross-compiler works.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005003 # On the NeXT, cc -E runs the code through the compiler's parser,
5004 # not just through cpp. "Syntax error" is here to catch this case.
5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006/* end confdefs.h. */
Pablo Galindo53e55292021-04-05 17:38:40 +01005007#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005008 Syntax error
5009_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01005010if ac_fn_c_try_cpp "$LINENO"
5011then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005012
Pablo Galindo53e55292021-04-05 17:38:40 +01005013else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005014 # Broken: fails on valid input.
5015continue
5016fi
5017rm -f conftest.err conftest.i conftest.$ac_ext
5018
5019 # OK, works on sane cases. Now check whether nonexistent headers
5020 # can be detected and how.
5021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5022/* end confdefs.h. */
5023#include <ac_nonexistent.h>
5024_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01005025if ac_fn_c_try_cpp "$LINENO"
5026then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005027 # Broken: success on invalid input.
5028continue
Pablo Galindo53e55292021-04-05 17:38:40 +01005029else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005030 # Passes both tests.
5031ac_preproc_ok=:
5032break
5033fi
5034rm -f conftest.err conftest.i conftest.$ac_ext
5035
5036done
5037# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5038rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01005039if $ac_preproc_ok
5040then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005041 break
5042fi
5043
5044 done
5045 ac_cv_prog_CPP=$CPP
5046
5047fi
5048 CPP=$ac_cv_prog_CPP
5049else
5050 ac_cv_prog_CPP=$CPP
5051fi
Pablo Galindo53e55292021-04-05 17:38:40 +01005052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5053printf "%s\n" "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005054ac_preproc_ok=false
5055for ac_c_preproc_warn_flag in '' yes
5056do
5057 # Use a header file that comes with gcc, so configuring glibc
5058 # with a fresh cross-compiler works.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005059 # On the NeXT, cc -E runs the code through the compiler's parser,
5060 # not just through cpp. "Syntax error" is here to catch this case.
5061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5062/* end confdefs.h. */
Pablo Galindo53e55292021-04-05 17:38:40 +01005063#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005064 Syntax error
5065_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01005066if ac_fn_c_try_cpp "$LINENO"
5067then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005068
Pablo Galindo53e55292021-04-05 17:38:40 +01005069else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005070 # Broken: fails on valid input.
5071continue
5072fi
5073rm -f conftest.err conftest.i conftest.$ac_ext
5074
5075 # OK, works on sane cases. Now check whether nonexistent headers
5076 # can be detected and how.
5077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5078/* end confdefs.h. */
5079#include <ac_nonexistent.h>
5080_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01005081if ac_fn_c_try_cpp "$LINENO"
5082then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005083 # Broken: success on invalid input.
5084continue
Pablo Galindo53e55292021-04-05 17:38:40 +01005085else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005086 # Passes both tests.
5087ac_preproc_ok=:
5088break
5089fi
5090rm -f conftest.err conftest.i conftest.$ac_ext
5091
5092done
5093# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5094rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01005095if $ac_preproc_ok
5096then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005097
Pablo Galindo53e55292021-04-05 17:38:40 +01005098else $as_nop
5099 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5100printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005101as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5102See \`config.log' for more details" "$LINENO" 5; }
5103fi
5104
5105ac_ext=c
5106ac_cpp='$CPP $CPPFLAGS'
5107ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5108ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5109ac_compiler_gnu=$ac_cv_c_compiler_gnu
5110
Pablo Galindo53e55292021-04-05 17:38:40 +01005111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5112printf %s "checking for grep that handles long lines and -e... " >&6; }
5113if test ${ac_cv_path_GREP+y}
5114then :
5115 printf %s "(cached) " >&6
5116else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005117 if test -z "$GREP"; then
5118 ac_path_GREP_found=false
5119 # Loop through the user's path and test for each of PROGNAME-LIST
5120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5121for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5122do
5123 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005124 case $as_dir in #(((
5125 '') as_dir=./ ;;
5126 */) ;;
5127 *) as_dir=$as_dir/ ;;
5128 esac
5129 for ac_prog in grep ggrep
5130 do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005131 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005132 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005133 as_fn_executable_p "$ac_path_GREP" || continue
5134# Check for GNU ac_path_GREP and select it if it is found.
5135 # Check for GNU $ac_path_GREP
5136case `"$ac_path_GREP" --version 2>&1` in
5137*GNU*)
5138 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5139*)
5140 ac_count=0
Pablo Galindo53e55292021-04-05 17:38:40 +01005141 printf %s 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005142 while :
5143 do
5144 cat "conftest.in" "conftest.in" >"conftest.tmp"
5145 mv "conftest.tmp" "conftest.in"
5146 cp "conftest.in" "conftest.nl"
Pablo Galindo53e55292021-04-05 17:38:40 +01005147 printf "%s\n" 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005148 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5149 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5150 as_fn_arith $ac_count + 1 && ac_count=$as_val
5151 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5152 # Best one so far, save it but keep looking for a better one
5153 ac_cv_path_GREP="$ac_path_GREP"
5154 ac_path_GREP_max=$ac_count
5155 fi
5156 # 10*(2^10) chars as input seems more than enough
5157 test $ac_count -gt 10 && break
5158 done
5159 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5160esac
5161
5162 $ac_path_GREP_found && break 3
5163 done
5164 done
5165 done
5166IFS=$as_save_IFS
5167 if test -z "$ac_cv_path_GREP"; then
5168 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5169 fi
5170else
5171 ac_cv_path_GREP=$GREP
5172fi
5173
5174fi
Pablo Galindo53e55292021-04-05 17:38:40 +01005175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5176printf "%s\n" "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005177 GREP="$ac_cv_path_GREP"
5178
5179
Pablo Galindo53e55292021-04-05 17:38:40 +01005180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5181printf %s "checking for a sed that does not truncate output... " >&6; }
5182if test ${ac_cv_path_SED+y}
5183then :
5184 printf %s "(cached) " >&6
5185else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -07005186 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5187 for ac_i in 1 2 3 4 5 6 7; do
5188 ac_script="$ac_script$as_nl$ac_script"
5189 done
5190 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5191 { ac_script=; unset ac_script;}
5192 if test -z "$SED"; then
5193 ac_path_SED_found=false
5194 # Loop through the user's path and test for each of PROGNAME-LIST
5195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5196for as_dir in $PATH
5197do
5198 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005199 case $as_dir in #(((
5200 '') as_dir=./ ;;
5201 */) ;;
5202 *) as_dir=$as_dir/ ;;
5203 esac
5204 for ac_prog in sed gsed
5205 do
Łukasz Langaa785c872016-09-09 17:37:37 -07005206 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005207 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07005208 as_fn_executable_p "$ac_path_SED" || continue
5209# Check for GNU ac_path_SED and select it if it is found.
5210 # Check for GNU $ac_path_SED
5211case `"$ac_path_SED" --version 2>&1` in
5212*GNU*)
5213 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5214*)
5215 ac_count=0
Pablo Galindo53e55292021-04-05 17:38:40 +01005216 printf %s 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07005217 while :
5218 do
5219 cat "conftest.in" "conftest.in" >"conftest.tmp"
5220 mv "conftest.tmp" "conftest.in"
5221 cp "conftest.in" "conftest.nl"
Pablo Galindo53e55292021-04-05 17:38:40 +01005222 printf "%s\n" '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07005223 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5224 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5225 as_fn_arith $ac_count + 1 && ac_count=$as_val
5226 if test $ac_count -gt ${ac_path_SED_max-0}; then
5227 # Best one so far, save it but keep looking for a better one
5228 ac_cv_path_SED="$ac_path_SED"
5229 ac_path_SED_max=$ac_count
5230 fi
5231 # 10*(2^10) chars as input seems more than enough
5232 test $ac_count -gt 10 && break
5233 done
5234 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5235esac
5236
5237 $ac_path_SED_found && break 3
5238 done
5239 done
5240 done
5241IFS=$as_save_IFS
5242 if test -z "$ac_cv_path_SED"; then
5243 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5244 fi
5245else
5246 ac_cv_path_SED=$SED
5247fi
5248
5249fi
Pablo Galindo53e55292021-04-05 17:38:40 +01005250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5251printf "%s\n" "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07005252 SED="$ac_cv_path_SED"
5253 rm -f conftest.sed
5254
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005255
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005256
5257
Pablo Galindo53e55292021-04-05 17:38:40 +01005258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
5259printf %s "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005261# Check whether --with-cxx_main was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01005262if test ${with_cxx_main+y}
5263then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005264 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005265
5266 case $withval in
5267 no) with_cxx_main=no
5268 MAINCC='$(CC)';;
5269 yes) with_cxx_main=yes
5270 MAINCC='$(CXX)';;
5271 *) with_cxx_main=yes
5272 MAINCC=$withval
5273 if test -z "$CXX"
5274 then
5275 CXX=$withval
5276 fi;;
5277 esac
Pablo Galindo53e55292021-04-05 17:38:40 +01005278else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005279
5280 with_cxx_main=no
5281 MAINCC='$(CC)'
5282
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005283fi
5284
Pablo Galindo53e55292021-04-05 17:38:40 +01005285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
5286printf "%s\n" "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005287
5288preset_cxx="$CXX"
5289if test -z "$CXX"
5290then
5291 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005292 gcc) if test -n "$ac_tool_prefix"; then
5293 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
5294set dummy ${ac_tool_prefix}g++; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5296printf %s "checking for $ac_word... " >&6; }
5297if test ${ac_cv_path_CXX+y}
5298then :
5299 printf %s "(cached) " >&6
5300else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005301 case $CXX in
5302 [\\/]* | ?:[\\/]*)
5303 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5304 ;;
5305 *)
5306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in notfound
5308do
5309 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005310 case $as_dir in #(((
5311 '') as_dir=./ ;;
5312 */) ;;
5313 *) as_dir=$as_dir/ ;;
5314 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005315 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005316 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5317 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5318 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 +02005319 break 2
5320 fi
5321done
5322 done
5323IFS=$as_save_IFS
5324
5325 ;;
5326esac
5327fi
5328CXX=$ac_cv_path_CXX
5329if test -n "$CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5331printf "%s\n" "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005332else
Pablo Galindo53e55292021-04-05 17:38:40 +01005333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005335fi
5336
5337
5338fi
5339if test -z "$ac_cv_path_CXX"; then
5340 ac_pt_CXX=$CXX
5341 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005342set dummy g++; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5344printf %s "checking for $ac_word... " >&6; }
5345if test ${ac_cv_path_ac_pt_CXX+y}
5346then :
5347 printf %s "(cached) " >&6
5348else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005349 case $ac_pt_CXX in
5350 [\\/]* | ?:[\\/]*)
5351 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5352 ;;
5353 *)
5354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5355for as_dir in notfound
5356do
5357 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005358 case $as_dir in #(((
5359 '') as_dir=./ ;;
5360 */) ;;
5361 *) as_dir=$as_dir/ ;;
5362 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005363 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005364 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5365 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5366 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 +02005367 break 2
5368 fi
5369done
5370 done
5371IFS=$as_save_IFS
5372
5373 ;;
5374esac
5375fi
5376ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5377if test -n "$ac_pt_CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5379printf "%s\n" "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005380else
Pablo Galindo53e55292021-04-05 17:38:40 +01005381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005383fi
5384
5385 if test "x$ac_pt_CXX" = x; then
5386 CXX="g++"
5387 else
5388 case $cross_compiling:$ac_tool_warned in
5389yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01005390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5391printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005392ac_tool_warned=yes ;;
5393esac
5394 CXX=$ac_pt_CXX
5395 fi
5396else
5397 CXX="$ac_cv_path_CXX"
5398fi
5399 ;;
5400 cc) if test -n "$ac_tool_prefix"; then
5401 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
5402set dummy ${ac_tool_prefix}c++; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5404printf %s "checking for $ac_word... " >&6; }
5405if test ${ac_cv_path_CXX+y}
5406then :
5407 printf %s "(cached) " >&6
5408else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005409 case $CXX in
5410 [\\/]* | ?:[\\/]*)
5411 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5412 ;;
5413 *)
5414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5415for as_dir in notfound
5416do
5417 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005418 case $as_dir in #(((
5419 '') as_dir=./ ;;
5420 */) ;;
5421 *) as_dir=$as_dir/ ;;
5422 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005424 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5425 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5426 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005427 break 2
5428 fi
5429done
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005432
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005433 ;;
5434esac
5435fi
5436CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005437if test -n "$CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5439printf "%s\n" "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005440else
Pablo Galindo53e55292021-04-05 17:38:40 +01005441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5442printf "%s\n" "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005445
5446fi
5447if test -z "$ac_cv_path_CXX"; then
5448 ac_pt_CXX=$CXX
5449 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005450set dummy c++; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452printf %s "checking for $ac_word... " >&6; }
5453if test ${ac_cv_path_ac_pt_CXX+y}
5454then :
5455 printf %s "(cached) " >&6
5456else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005457 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005458 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005459 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 +00005460 ;;
5461 *)
5462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in notfound
5464do
5465 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005466 case $as_dir in #(((
5467 '') as_dir=./ ;;
5468 */) ;;
5469 *) as_dir=$as_dir/ ;;
5470 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005472 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5473 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5474 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005475 break 2
5476 fi
5477done
Matthias Kloseb9621712010-04-24 17:59:49 +00005478 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005479IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005480
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005481 ;;
5482esac
5483fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005484ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5485if test -n "$ac_pt_CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5487printf "%s\n" "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005488else
Pablo Galindo53e55292021-04-05 17:38:40 +01005489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5490printf "%s\n" "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005492
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005493 if test "x$ac_pt_CXX" = x; then
5494 CXX="c++"
5495 else
5496 case $cross_compiling:$ac_tool_warned in
5497yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01005498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5499printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005500ac_tool_warned=yes ;;
5501esac
5502 CXX=$ac_pt_CXX
5503 fi
5504else
5505 CXX="$ac_cv_path_CXX"
5506fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005507 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005508 clang|*/clang) if test -n "$ac_tool_prefix"; then
5509 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
5510set dummy ${ac_tool_prefix}clang++; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512printf %s "checking for $ac_word... " >&6; }
5513if test ${ac_cv_path_CXX+y}
5514then :
5515 printf %s "(cached) " >&6
5516else $as_nop
Ned Deilycbfb9a52012-06-23 16:02:19 -07005517 case $CXX in
5518 [\\/]* | ?:[\\/]*)
5519 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5520 ;;
5521 *)
5522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in notfound
5524do
5525 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005526 case $as_dir in #(((
5527 '') as_dir=./ ;;
5528 */) ;;
5529 *) as_dir=$as_dir/ ;;
5530 esac
Ned Deilycbfb9a52012-06-23 16:02:19 -07005531 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005532 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5533 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5534 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07005535 break 2
5536 fi
5537done
5538 done
5539IFS=$as_save_IFS
5540
Ned Deilycbfb9a52012-06-23 16:02:19 -07005541 ;;
5542esac
5543fi
5544CXX=$ac_cv_path_CXX
5545if test -n "$CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5547printf "%s\n" "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07005548else
Pablo Galindo53e55292021-04-05 17:38:40 +01005549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5550printf "%s\n" "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07005551fi
5552
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005553
5554fi
5555if test -z "$ac_cv_path_CXX"; then
5556 ac_pt_CXX=$CXX
5557 # Extract the first word of "clang++", so it can be a program name with args.
5558set dummy clang++; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560printf %s "checking for $ac_word... " >&6; }
5561if test ${ac_cv_path_ac_pt_CXX+y}
5562then :
5563 printf %s "(cached) " >&6
5564else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005565 case $ac_pt_CXX in
5566 [\\/]* | ?:[\\/]*)
5567 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5568 ;;
5569 *)
5570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5571for as_dir in notfound
5572do
5573 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005574 case $as_dir in #(((
5575 '') as_dir=./ ;;
5576 */) ;;
5577 *) as_dir=$as_dir/ ;;
5578 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005579 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005580 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5581 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5582 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 +02005583 break 2
5584 fi
5585done
5586 done
5587IFS=$as_save_IFS
5588
5589 ;;
5590esac
5591fi
5592ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5593if test -n "$ac_pt_CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5595printf "%s\n" "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005596else
Pablo Galindo53e55292021-04-05 17:38:40 +01005597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5598printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005599fi
5600
5601 if test "x$ac_pt_CXX" = x; then
5602 CXX="clang++"
5603 else
5604 case $cross_compiling:$ac_tool_warned in
5605yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01005606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5607printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005608ac_tool_warned=yes ;;
5609esac
5610 CXX=$ac_pt_CXX
5611 fi
5612else
5613 CXX="$ac_cv_path_CXX"
5614fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005615 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005616 icc|*/icc) if test -n "$ac_tool_prefix"; then
5617 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5618set dummy ${ac_tool_prefix}icpc; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5620printf %s "checking for $ac_word... " >&6; }
5621if test ${ac_cv_path_CXX+y}
5622then :
5623 printf %s "(cached) " >&6
5624else $as_nop
Zachary Ware5af85642015-12-21 12:09:17 -06005625 case $CXX in
5626 [\\/]* | ?:[\\/]*)
5627 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5628 ;;
5629 *)
5630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5631for as_dir in notfound
5632do
5633 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005634 case $as_dir in #(((
5635 '') as_dir=./ ;;
5636 */) ;;
5637 *) as_dir=$as_dir/ ;;
5638 esac
Zachary Ware5af85642015-12-21 12:09:17 -06005639 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005640 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5641 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5642 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005643 break 2
5644 fi
5645done
5646 done
5647IFS=$as_save_IFS
5648
5649 ;;
5650esac
5651fi
5652CXX=$ac_cv_path_CXX
5653if test -n "$CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5655printf "%s\n" "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005656else
Pablo Galindo53e55292021-04-05 17:38:40 +01005657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5658printf "%s\n" "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005659fi
5660
5661
5662fi
5663if test -z "$ac_cv_path_CXX"; then
5664 ac_pt_CXX=$CXX
5665 # Extract the first word of "icpc", so it can be a program name with args.
5666set dummy icpc; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005667{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5668printf %s "checking for $ac_word... " >&6; }
5669if test ${ac_cv_path_ac_pt_CXX+y}
5670then :
5671 printf %s "(cached) " >&6
5672else $as_nop
Zachary Ware5af85642015-12-21 12:09:17 -06005673 case $ac_pt_CXX in
5674 [\\/]* | ?:[\\/]*)
5675 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5676 ;;
5677 *)
5678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5679for as_dir in notfound
5680do
5681 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005682 case $as_dir in #(((
5683 '') as_dir=./ ;;
5684 */) ;;
5685 *) as_dir=$as_dir/ ;;
5686 esac
Zachary Ware5af85642015-12-21 12:09:17 -06005687 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005688 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5689 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5690 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005691 break 2
5692 fi
5693done
5694 done
5695IFS=$as_save_IFS
5696
5697 ;;
5698esac
5699fi
5700ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5701if test -n "$ac_pt_CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5703printf "%s\n" "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005704else
Pablo Galindo53e55292021-04-05 17:38:40 +01005705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706printf "%s\n" "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005707fi
5708
5709 if test "x$ac_pt_CXX" = x; then
5710 CXX="icpc"
5711 else
5712 case $cross_compiling:$ac_tool_warned in
5713yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01005714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5715printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005716ac_tool_warned=yes ;;
5717esac
5718 CXX=$ac_pt_CXX
5719 fi
5720else
5721 CXX="$ac_cv_path_CXX"
5722fi
5723 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005724 esac
5725 if test "$CXX" = "notfound"
5726 then
5727 CXX=""
5728 fi
5729fi
5730if test -z "$CXX"
5731then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005732 if test -n "$ac_tool_prefix"; then
5733 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5734 do
5735 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5736set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738printf %s "checking for $ac_word... " >&6; }
5739if test ${ac_cv_prog_CXX+y}
5740then :
5741 printf %s "(cached) " >&6
5742else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005743 if test -n "$CXX"; then
5744 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5745else
5746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005750 case $as_dir in #(((
5751 '') as_dir=./ ;;
5752 */) ;;
5753 *) as_dir=$as_dir/ ;;
5754 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005755 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005756 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005757 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01005758 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005759 break 2
5760 fi
5761done
Matthias Kloseb9621712010-04-24 17:59:49 +00005762 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005763IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005764
5765fi
5766fi
5767CXX=$ac_cv_prog_CXX
5768if test -n "$CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5770printf "%s\n" "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005771else
Pablo Galindo53e55292021-04-05 17:38:40 +01005772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773printf "%s\n" "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005774fi
5775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005776
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005777 test -n "$CXX" && break
5778 done
5779fi
5780if test -z "$CXX"; then
5781 ac_ct_CXX=$CXX
5782 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5783do
5784 # Extract the first word of "$ac_prog", so it can be a program name with args.
5785set dummy $ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01005786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5787printf %s "checking for $ac_word... " >&6; }
5788if test ${ac_cv_prog_ac_ct_CXX+y}
5789then :
5790 printf %s "(cached) " >&6
5791else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005792 if test -n "$ac_ct_CXX"; then
5793 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5794else
5795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5796for as_dir in $PATH
5797do
5798 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01005799 case $as_dir in #(((
5800 '') as_dir=./ ;;
5801 */) ;;
5802 *) as_dir=$as_dir/ ;;
5803 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01005805 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005806 ac_cv_prog_ac_ct_CXX="$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01005807 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 +02005808 break 2
5809 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005810done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005811 done
5812IFS=$as_save_IFS
5813
5814fi
5815fi
5816ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5817if test -n "$ac_ct_CXX"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01005818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5819printf "%s\n" "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005820else
Pablo Galindo53e55292021-04-05 17:38:40 +01005821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5822printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005823fi
5824
5825
5826 test -n "$ac_ct_CXX" && break
5827done
5828
5829 if test "x$ac_ct_CXX" = x; then
5830 CXX="notfound"
5831 else
5832 case $cross_compiling:$ac_tool_warned in
5833yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01005834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5835printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005836ac_tool_warned=yes ;;
5837esac
5838 CXX=$ac_ct_CXX
5839 fi
5840fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005841
5842 if test "$CXX" = "notfound"
5843 then
5844 CXX=""
5845 fi
5846fi
5847if test "$preset_cxx" != "$CXX"
5848then
Pablo Galindo53e55292021-04-05 17:38:40 +01005849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005850
5851 By default, distutils will build C++ extension modules with \"$CXX\".
5852 If this is not intended, then set CXX on the configure command line.
5853 " >&5
Pablo Galindo53e55292021-04-05 17:38:40 +01005854printf "%s\n" "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005855
5856 By default, distutils will build C++ extension modules with \"$CXX\".
5857 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005858 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005859fi
5860
5861
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005862MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5863
5864
Pablo Galindo53e55292021-04-05 17:38:40 +01005865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5866printf %s "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005867cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005868#undef bfin
5869#undef cris
5870#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005871#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005872#undef hppa
5873#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005874#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005875#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005876#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005877#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005878#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005879#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005880 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005881#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005882# if defined(__x86_64__) && defined(__LP64__)
5883 x86_64-linux-gnu
5884# elif defined(__x86_64__) && defined(__ILP32__)
5885 x86_64-linux-gnux32
5886# elif defined(__i386__)
5887 i386-linux-gnu
5888# elif defined(__aarch64__) && defined(__AARCH64EL__)
5889# if defined(__ILP32__)
5890 aarch64_ilp32-linux-gnu
5891# else
5892 aarch64-linux-gnu
5893# endif
5894# elif defined(__aarch64__) && defined(__AARCH64EB__)
5895# if defined(__ILP32__)
5896 aarch64_be_ilp32-linux-gnu
5897# else
5898 aarch64_be-linux-gnu
5899# endif
5900# elif defined(__alpha__)
5901 alpha-linux-gnu
5902# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5903# if defined(__ARMEL__)
5904 arm-linux-gnueabihf
5905# else
5906 armeb-linux-gnueabihf
5907# endif
5908# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5909# if defined(__ARMEL__)
5910 arm-linux-gnueabi
5911# else
5912 armeb-linux-gnueabi
5913# endif
5914# elif defined(__hppa__)
5915 hppa-linux-gnu
5916# elif defined(__ia64__)
5917 ia64-linux-gnu
5918# elif defined(__m68k__) && !defined(__mcoldfire__)
5919 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005920# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5921# if _MIPS_SIM == _ABIO32
5922 mipsisa32r6el-linux-gnu
5923# elif _MIPS_SIM == _ABIN32
5924 mipsisa64r6el-linux-gnuabin32
5925# elif _MIPS_SIM == _ABI64
5926 mipsisa64r6el-linux-gnuabi64
5927# else
5928# error unknown platform triplet
5929# endif
5930# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5931# if _MIPS_SIM == _ABIO32
5932 mipsisa32r6-linux-gnu
5933# elif _MIPS_SIM == _ABIN32
5934 mipsisa64r6-linux-gnuabin32
5935# elif _MIPS_SIM == _ABI64
5936 mipsisa64r6-linux-gnuabi64
5937# else
5938# error unknown platform triplet
5939# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005940# elif defined(__mips_hard_float) && defined(_MIPSEL)
5941# if _MIPS_SIM == _ABIO32
5942 mipsel-linux-gnu
5943# elif _MIPS_SIM == _ABIN32
5944 mips64el-linux-gnuabin32
5945# elif _MIPS_SIM == _ABI64
5946 mips64el-linux-gnuabi64
5947# else
5948# error unknown platform triplet
5949# endif
5950# elif defined(__mips_hard_float)
5951# if _MIPS_SIM == _ABIO32
5952 mips-linux-gnu
5953# elif _MIPS_SIM == _ABIN32
5954 mips64-linux-gnuabin32
5955# elif _MIPS_SIM == _ABI64
5956 mips64-linux-gnuabi64
5957# else
5958# error unknown platform triplet
5959# endif
5960# elif defined(__or1k__)
5961 or1k-linux-gnu
5962# elif defined(__powerpc__) && defined(__SPE__)
5963 powerpc-linux-gnuspe
5964# elif defined(__powerpc64__)
5965# if defined(__LITTLE_ENDIAN__)
5966 powerpc64le-linux-gnu
5967# else
5968 powerpc64-linux-gnu
5969# endif
5970# elif defined(__powerpc__)
5971 powerpc-linux-gnu
5972# elif defined(__s390x__)
5973 s390x-linux-gnu
5974# elif defined(__s390__)
5975 s390-linux-gnu
5976# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5977 sh4-linux-gnu
5978# elif defined(__sparc__) && defined(__arch64__)
5979 sparc64-linux-gnu
5980# elif defined(__sparc__)
5981 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005982# elif defined(__riscv)
5983# if __riscv_xlen == 32
5984 riscv32-linux-gnu
5985# elif __riscv_xlen == 64
5986 riscv64-linux-gnu
5987# else
5988# error unknown platform triplet
5989# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005990# else
5991# error unknown platform triplet
5992# endif
5993#elif defined(__FreeBSD_kernel__)
5994# if defined(__LP64__)
5995 x86_64-kfreebsd-gnu
5996# elif defined(__i386__)
5997 i386-kfreebsd-gnu
5998# else
5999# error unknown platform triplet
6000# endif
6001#elif defined(__gnu_hurd__)
6002 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07006003#elif defined(__APPLE__)
6004 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08006005#elif defined(__VXWORKS__)
6006 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006007#else
6008# error unknown platform triplet
6009#endif
6010
6011EOF
6012
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02006013if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006014 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Pablo Galindo53e55292021-04-05 17:38:40 +01006015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
6016printf "%s\n" "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006017else
Pablo Galindo53e55292021-04-05 17:38:40 +01006018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
6019printf "%s\n" "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006020fi
6021rm -f conftest.c conftest.out
6022
6023if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
6024 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
6025 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
6026 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02006027elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
6028 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006029fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006030
doko@ubuntu.com55532312016-06-14 08:55:19 +02006031if test x$MULTIARCH != x; then
6032 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
6033fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006034
6035
Pablo Galindo53e55292021-04-05 17:38:40 +01006036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
6037printf %s "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006038save_LDFLAGS="$LDFLAGS"
6039LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00006040
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042/* end confdefs.h. */
6043
6044int
Pablo Galindo53e55292021-04-05 17:38:40 +01006045main (void)
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006046{
6047
6048 ;
6049 return 0;
6050}
6051_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01006052if ac_fn_c_try_link "$LINENO"
6053then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006054 NO_AS_NEEDED="-Wl,--no-as-needed"
Pablo Galindo53e55292021-04-05 17:38:40 +01006055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6056printf "%s\n" "yes" >&6; }
6057else $as_nop
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006058 NO_AS_NEEDED=""
Pablo Galindo53e55292021-04-05 17:38:40 +01006059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6060printf "%s\n" "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006061fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006062rm -f core conftest.err conftest.$ac_objext conftest.beam \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006063 conftest$ac_exeext conftest.$ac_ext
6064LDFLAGS="$save_LDFLAGS"
6065
6066
6067
6068# checks for UNIX variants that set C preprocessor variables
Pablo Galindo53e55292021-04-05 17:38:40 +01006069ac_header= ac_cache=
6070for ac_item in $ac_header_c_list
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006071do
Pablo Galindo53e55292021-04-05 17:38:40 +01006072 if test $ac_cache; then
6073 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6074 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6075 printf "%s\n" "#define $ac_item 1" >> confdefs.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006076 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006077 ac_header= ac_cache=
6078 elif test $ac_header; then
6079 ac_cache=$ac_item
6080 else
6081 ac_header=$ac_item
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006083done
6084
6085
6086
Pablo Galindo53e55292021-04-05 17:38:40 +01006087
6088
6089
6090
6091
6092if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6093then :
6094
6095printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6096
Matthias Kloseb9621712010-04-24 17:59:49 +00006097fi
6098
6099
Matthias Kloseb9621712010-04-24 17:59:49 +00006100
6101
Matthias Kloseb9621712010-04-24 17:59:49 +00006102
6103
Pablo Galindo53e55292021-04-05 17:38:40 +01006104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6105printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6106if test ${ac_cv_safe_to_define___extensions__+y}
6107then :
6108 printf %s "(cached) " >&6
6109else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6111/* end confdefs.h. */
6112
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006113# define __EXTENSIONS__ 1
6114 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00006115int
Pablo Galindo53e55292021-04-05 17:38:40 +01006116main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00006117{
6118
6119 ;
6120 return 0;
6121}
6122_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01006123if ac_fn_c_try_compile "$LINENO"
6124then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 ac_cv_safe_to_define___extensions__=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01006126else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00006127 ac_cv_safe_to_define___extensions__=no
6128fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006129rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006130fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6132printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00006133
Pablo Galindo53e55292021-04-05 17:38:40 +01006134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6135printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6136if test ${ac_cv_should_define__xopen_source+y}
6137then :
6138 printf %s "(cached) " >&6
6139else $as_nop
6140 ac_cv_should_define__xopen_source=no
6141 if test $ac_cv_header_wchar_h = yes
6142then :
6143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6144/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00006145
Pablo Galindo53e55292021-04-05 17:38:40 +01006146 #include <wchar.h>
6147 mbstate_t x;
6148int
6149main (void)
6150{
Matthias Kloseb9621712010-04-24 17:59:49 +00006151
Pablo Galindo53e55292021-04-05 17:38:40 +01006152 ;
6153 return 0;
6154}
6155_ACEOF
6156if ac_fn_c_try_compile "$LINENO"
6157then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006158
Pablo Galindo53e55292021-04-05 17:38:40 +01006159else $as_nop
6160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6161/* end confdefs.h. */
6162
6163 #define _XOPEN_SOURCE 500
6164 #include <wchar.h>
6165 mbstate_t x;
6166int
6167main (void)
6168{
6169
6170 ;
6171 return 0;
6172}
6173_ACEOF
6174if ac_fn_c_try_compile "$LINENO"
6175then :
6176 ac_cv_should_define__xopen_source=yes
6177fi
6178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6179fi
6180rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6181fi
6182fi
6183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6184printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6185
6186 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6187
6188 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6189
6190 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6191
6192 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6193
6194 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6195
6196 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6197
6198 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6199
6200 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6201
6202 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6203
6204 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6205
6206 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6207
6208 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6209
6210 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6211
6212 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6213
6214 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6215
6216 if test $ac_cv_header_minix_config_h = yes
6217then :
6218 MINIX=yes
6219 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6220
6221 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6222
6223 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6224
6225else $as_nop
6226 MINIX=
6227fi
6228 if test $ac_cv_safe_to_define___extensions__ = yes
6229then :
6230 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6231
6232fi
6233 if test $ac_cv_should_define__xopen_source = yes
6234then :
6235 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6236
6237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006238
6239
Pablo Galindo53e55292021-04-05 17:38:40 +01006240{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
6241printf %s "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02006242cat >> conftest.c <<EOF
6243#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006244android_api = __ANDROID_API__
6245arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02006246#else
6247#error not Android
6248#endif
6249EOF
6250
6251if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006252 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
6253 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Pablo Galindo53e55292021-04-05 17:38:40 +01006254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
6255printf "%s\n" "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01006256 if test -z "$ANDROID_API_LEVEL"; then
6257 echo 'Fatal: you must define __ANDROID_API__'
6258 exit 1
6259 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02006260
Pablo Galindo53e55292021-04-05 17:38:40 +01006261printf "%s\n" "#define ANDROID_API_LEVEL $ANDROID_API_LEVEL" >>confdefs.h
Xavier de Gaye95750b12016-07-09 11:05:42 +02006262
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006263
Pablo Galindo53e55292021-04-05 17:38:40 +01006264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
6265printf %s "checking for the Android arm ABI... " >&6; }
6266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
6267printf "%s\n" "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006268 if test "$_arm_arch" = 7; then
6269 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
6270 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
6271 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02006272else
Pablo Galindo53e55292021-04-05 17:38:40 +01006273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
6274printf "%s\n" "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02006275fi
6276rm -f conftest.c conftest.out
6277
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278# Check for unsupported systems
6279case $ac_sys_system/$ac_sys_release in
6280atheos*|Linux*/1*)
6281 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
6282 echo See README for details.
6283 exit 1;;
6284esac
6285
6286
Pablo Galindo53e55292021-04-05 17:38:40 +01006287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
6288printf %s "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289
6290# Check whether --with-suffix was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01006291if test ${with_suffix+y}
6292then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293 withval=$with_suffix;
6294 case $withval in
6295 no) EXEEXT=;;
6296 yes) EXEEXT=.exe;;
6297 *) EXEEXT=$withval;;
6298 esac
6299fi
6300
Pablo Galindo53e55292021-04-05 17:38:40 +01006301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
6302printf "%s\n" "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303
6304# Test whether we're running on a non-case-sensitive system, in which
6305# case we give a warning if no ext is given
6306
Pablo Galindo53e55292021-04-05 17:38:40 +01006307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
6308printf %s "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309if test ! -d CaseSensitiveTestDir; then
6310mkdir CaseSensitiveTestDir
6311fi
6312
6313if test -d casesensitivetestdir
6314then
Pablo Galindo53e55292021-04-05 17:38:40 +01006315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6316printf "%s\n" "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 BUILDEXEEXT=.exe
6318else
Pablo Galindo53e55292021-04-05 17:38:40 +01006319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 BUILDEXEEXT=$EXEEXT
6322fi
6323rmdir CaseSensitiveTestDir
6324
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325case $ac_sys_system in
6326hp*|HP*)
6327 case $CC in
6328 cc|*/cc) CC="$CC -Ae";;
6329 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330esac
6331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
Pablo Galindo53e55292021-04-05 17:38:40 +01006333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
6334printf %s "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335if test -z "$LIBRARY"
6336then
Barry Warsawf040d7d2010-10-18 17:09:07 +00006337 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
6340printf "%s\n" "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341
6342# LDLIBRARY is the name of the library to link against (as opposed to the
6343# name of the library into which to insert object files). BLDLIBRARY is also
6344# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
6345# is blank as the main program is not linked directly against LDLIBRARY.
6346# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
6347# systems without shared libraries, LDLIBRARY is the same as LIBRARY
6348# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
6349# DLLLIBRARY is the shared (i.e., DLL) library.
6350#
6351# RUNSHARED is used to run shared python without installed libraries
6352#
6353# INSTSONAME is the name of the shared library that will be use to install
6354# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006355#
6356# LDVERSION is the shared library version number, normally the Python version
6357# with the ABI build flags appended.
6358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359
6360
6361
6362
6363
6364
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006365
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366LDLIBRARY="$LIBRARY"
6367BLDLIBRARY='$(LDLIBRARY)'
6368INSTSONAME='$(LDLIBRARY)'
6369DLLLIBRARY=''
6370LDLIBRARYDIR=''
6371RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006372LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373
6374# LINKCC is the command that links the python executable -- default is $(CC).
6375# If CXX is set, and if it is needed to link a main function that was
6376# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
6377# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378
Pablo Galindo53e55292021-04-05 17:38:40 +01006379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
6380printf %s "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381if test -z "$LINKCC"
6382then
6383 LINKCC='$(PURIFY) $(MAINCC)'
6384 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385 QNX*)
6386 # qcc must be used because the other compilers do not
6387 # support -N.
6388 LINKCC=qcc;;
6389 esac
6390fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
6392printf "%s\n" "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393
Stefan Krahe6dcd372020-08-29 17:00:08 +02006394# EXPORTSYMS holds the list of exported symbols for AIX.
6395# EXPORTSFROM holds the module name exporting symbols on AIX.
6396EXPORTSYMS=
6397EXPORTSFROM=
6398
6399
Pablo Galindo53e55292021-04-05 17:38:40 +01006400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
6401printf %s "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02006402case $ac_sys_system in
6403AIX*)
6404 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06006405 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02006406 ;;
6407esac
Pablo Galindo53e55292021-04-05 17:38:40 +01006408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
6409printf "%s\n" "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02006410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
6412# make sure we default having it set to "no": this is used by
6413# distutils.unixccompiler to know if it should add --enable-new-dtags
6414# to linker command lines, and failing to detect GNU ld simply results
6415# in the same bahaviour as before.
6416
Pablo Galindo53e55292021-04-05 17:38:40 +01006417{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6418printf %s "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419ac_prog=ld
6420if test "$GCC" = yes; then
6421 ac_prog=`$CC -print-prog-name=ld`
6422fi
6423case `"$ac_prog" -V 2>&1 < /dev/null` in
6424 *GNU*)
6425 GNULD=yes;;
6426 *)
6427 GNULD=no;;
6428esac
Pablo Galindo53e55292021-04-05 17:38:40 +01006429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
6430printf "%s\n" "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431
Pablo Galindo53e55292021-04-05 17:38:40 +01006432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
6433printf %s "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434# Check whether --enable-shared was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01006435if test ${enable_shared+y}
6436then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437 enableval=$enable_shared;
6438fi
6439
6440
6441if test -z "$enable_shared"
6442then
6443 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006444 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 enable_shared="yes";;
6446 *)
6447 enable_shared="no";;
6448 esac
6449fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
6451printf "%s\n" "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452
Pablo Galindo53e55292021-04-05 17:38:40 +01006453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
6454printf %s "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455# Check whether --enable-profiling was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01006456if test ${enable_profiling+y}
6457then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02006458 enableval=$enable_profiling;
6459fi
6460
6461if test "x$enable_profiling" = xyes; then
6462 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04006463 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00006464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465/* end confdefs.h. */
6466int main() { return 0; }
6467_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01006468if ac_fn_c_try_link "$LINENO"
6469then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02006470
Pablo Galindo53e55292021-04-05 17:38:40 +01006471else $as_nop
doko@ubuntu.comba015832012-06-30 16:52:05 +02006472 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006474rm -f core conftest.err conftest.$ac_objext conftest.beam \
doko@ubuntu.comba015832012-06-30 16:52:05 +02006475 conftest$ac_exeext conftest.$ac_ext
6476 CC="$ac_save_cc"
6477else
6478 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
6481printf "%s\n" "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006482
doko@ubuntu.comba015832012-06-30 16:52:05 +02006483if test "x$enable_profiling" = xyes; then
6484 BASECFLAGS="-pg $BASECFLAGS"
6485 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486fi
6487
Pablo Galindo53e55292021-04-05 17:38:40 +01006488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
6489printf %s "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490
6491# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
6492# library that we build, but we do not want to link against it (we
6493# will find it with a -framework option). For this reason there is an
6494# extra variable BLDLIBRARY against which Python and the extension
6495# modules are linked, BLDLIBRARY. This is normally the same as
6496# LDLIBRARY, but empty for MacOSX framework builds.
6497if test "$enable_framework"
6498then
6499 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006500 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501 BLDLIBRARY=''
6502else
6503 BLDLIBRARY='$(LDLIBRARY)'
6504fi
6505
6506# Other platforms follow
6507if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006508 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509
Pablo Galindo53e55292021-04-05 17:38:40 +01006510printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511
6512 case $ac_sys_system in
6513 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006514 LDLIBRARY='libpython$(LDVERSION).dll.a'
6515 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516 ;;
6517 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006518 LDLIBRARY='libpython$(LDVERSION).so'
6519 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006520 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006522 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006523 then
6524 PY3LIBRARY=libpython3.so
6525 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006526 ;;
pxinwrc1174262020-12-15 06:14:43 +08006527 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006528 LDLIBRARY='libpython$(LDVERSION).so'
6529 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006530 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006531 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006532 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006533 then
6534 PY3LIBRARY=libpython3.so
6535 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006536 ;;
6537 hp*|HP*)
6538 case `uname -m` in
6539 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006540 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541 ;;
6542 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006543 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544 ;;
6545 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006546 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006547 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006548 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006550 LDLIBRARY='libpython$(LDVERSION).dylib'
6551 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006552 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006554 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006555 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006556 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006557 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558
6559 esac
6560else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006561 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562 case $ac_sys_system in
6563 CYGWIN*)
6564 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006565 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566 ;;
6567 esac
6568fi
6569
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006570if test "$cross_compiling" = yes; then
6571 RUNSHARED=
6572fi
6573
Pablo Galindo53e55292021-04-05 17:38:40 +01006574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6575printf "%s\n" "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006576
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006578if test -n "$ac_tool_prefix"; then
6579 for ac_prog in ar aal
6580 do
6581 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6582set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01006583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584printf %s "checking for $ac_word... " >&6; }
6585if test ${ac_cv_prog_AR+y}
6586then :
6587 printf %s "(cached) " >&6
6588else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006589 if test -n "$AR"; then
6590 ac_cv_prog_AR="$AR" # Let the user override the test.
6591else
6592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6593for as_dir in $PATH
6594do
6595 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01006596 case $as_dir in #(((
6597 '') as_dir=./ ;;
6598 */) ;;
6599 *) as_dir=$as_dir/ ;;
6600 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01006602 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006603 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01006604 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605 break 2
6606 fi
6607done
Matthias Kloseb9621712010-04-24 17:59:49 +00006608 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006609IFS=$as_save_IFS
6610
6611fi
6612fi
6613AR=$ac_cv_prog_AR
6614if test -n "$AR"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01006615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6616printf "%s\n" "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617else
Pablo Galindo53e55292021-04-05 17:38:40 +01006618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6619printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620fi
6621
6622
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006623 test -n "$AR" && break
6624 done
6625fi
6626if test -z "$AR"; then
6627 ac_ct_AR=$AR
6628 for ac_prog in ar aal
6629do
6630 # Extract the first word of "$ac_prog", so it can be a program name with args.
6631set dummy $ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01006632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6633printf %s "checking for $ac_word... " >&6; }
6634if test ${ac_cv_prog_ac_ct_AR+y}
6635then :
6636 printf %s "(cached) " >&6
6637else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006638 if test -n "$ac_ct_AR"; then
6639 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6640else
6641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642for as_dir in $PATH
6643do
6644 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01006645 case $as_dir in #(((
6646 '') as_dir=./ ;;
6647 */) ;;
6648 *) as_dir=$as_dir/ ;;
6649 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006650 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01006651 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006652 ac_cv_prog_ac_ct_AR="$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01006653 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 +02006654 break 2
6655 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006657 done
6658IFS=$as_save_IFS
6659
6660fi
6661fi
6662ac_ct_AR=$ac_cv_prog_ac_ct_AR
6663if test -n "$ac_ct_AR"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01006664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6665printf "%s\n" "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006666else
Pablo Galindo53e55292021-04-05 17:38:40 +01006667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6668printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006669fi
6670
6671
6672 test -n "$ac_ct_AR" && break
6673done
6674
6675 if test "x$ac_ct_AR" = x; then
6676 AR="ar"
6677 else
6678 case $cross_compiling:$ac_tool_warned in
6679yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01006680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6681printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006682ac_tool_warned=yes ;;
6683esac
6684 AR=$ac_ct_AR
6685 fi
6686fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687
6688
6689# tweak ARFLAGS only if the user didn't set it on the command line
6690
6691if test -z "$ARFLAGS"
6692then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006693 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694fi
6695
doko@ubuntu.com58844492012-06-30 18:25:32 +02006696if test -n "$ac_tool_prefix"; then
6697 for ac_prog in readelf
6698 do
6699 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6700set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01006701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702printf %s "checking for $ac_word... " >&6; }
6703if test ${ac_cv_prog_READELF+y}
6704then :
6705 printf %s "(cached) " >&6
6706else $as_nop
doko@ubuntu.com58844492012-06-30 18:25:32 +02006707 if test -n "$READELF"; then
6708 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6709else
6710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6711for as_dir in $PATH
6712do
6713 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01006714 case $as_dir in #(((
6715 '') as_dir=./ ;;
6716 */) ;;
6717 *) as_dir=$as_dir/ ;;
6718 esac
doko@ubuntu.com58844492012-06-30 18:25:32 +02006719 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01006720 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006721 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01006722 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 +02006723 break 2
6724 fi
6725done
6726 done
6727IFS=$as_save_IFS
6728
6729fi
6730fi
6731READELF=$ac_cv_prog_READELF
6732if test -n "$READELF"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01006733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6734printf "%s\n" "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006735else
Pablo Galindo53e55292021-04-05 17:38:40 +01006736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6737printf "%s\n" "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006738fi
6739
6740
6741 test -n "$READELF" && break
6742 done
6743fi
6744if test -z "$READELF"; then
6745 ac_ct_READELF=$READELF
6746 for ac_prog in readelf
6747do
6748 # Extract the first word of "$ac_prog", so it can be a program name with args.
6749set dummy $ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01006750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6751printf %s "checking for $ac_word... " >&6; }
6752if test ${ac_cv_prog_ac_ct_READELF+y}
6753then :
6754 printf %s "(cached) " >&6
6755else $as_nop
doko@ubuntu.com58844492012-06-30 18:25:32 +02006756 if test -n "$ac_ct_READELF"; then
6757 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6758else
6759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6760for as_dir in $PATH
6761do
6762 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01006763 case $as_dir in #(((
6764 '') as_dir=./ ;;
6765 */) ;;
6766 *) as_dir=$as_dir/ ;;
6767 esac
doko@ubuntu.com58844492012-06-30 18:25:32 +02006768 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01006769 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006770 ac_cv_prog_ac_ct_READELF="$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +01006771 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 +02006772 break 2
6773 fi
6774done
6775 done
6776IFS=$as_save_IFS
6777
6778fi
6779fi
6780ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6781if test -n "$ac_ct_READELF"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01006782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6783printf "%s\n" "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006784else
Pablo Galindo53e55292021-04-05 17:38:40 +01006785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6786printf "%s\n" "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006787fi
6788
6789
6790 test -n "$ac_ct_READELF" && break
6791done
6792
6793 if test "x$ac_ct_READELF" = x; then
6794 READELF=":"
6795 else
6796 case $cross_compiling:$ac_tool_warned in
6797yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01006798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6799printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006800ac_tool_warned=yes ;;
6801esac
6802 READELF=$ac_ct_READELF
6803 fi
6804fi
6805
6806if test "$cross_compiling" = yes; then
6807 case "$READELF" in
6808 readelf|:)
6809 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6810 ;;
6811 esac
6812fi
6813
6814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006817hp*|HP*)
6818 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819 if test -z "$INSTALL"
6820 then
6821 INSTALL="${srcdir}/install-sh -c"
6822 fi
6823esac
Pablo Galindo53e55292021-04-05 17:38:40 +01006824
6825 # Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826# so one script is as good as another. But avoid the broken or
6827# incompatible versions:
6828# SysV /etc/install, /usr/sbin/install
6829# SunOS /usr/etc/install
6830# IRIX /sbin/install
6831# AIX /bin/install
6832# AmigaOS /C/install, which installs bootblocks on floppy discs
6833# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6834# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6835# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6836# OS/2's system install, which has a completely different semantic
6837# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006838# Reject install programs that cannot install multiple files.
Pablo Galindo53e55292021-04-05 17:38:40 +01006839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6840printf %s "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841if test -z "$INSTALL"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01006842if test ${ac_cv_path_install+y}
6843then :
6844 printf %s "(cached) " >&6
6845else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6847for as_dir in $PATH
6848do
6849 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01006850 case $as_dir in #(((
6851 '') as_dir=./ ;;
6852 */) ;;
6853 *) as_dir=$as_dir/ ;;
6854 esac
6855 # Account for fact that we put trailing slashes in our PATH walk.
6856case $as_dir in #((
6857 ./ | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 /usr/ucb/* ) ;;
6861 *)
6862 # OSF1 and SCO ODT 3.0 have their own names for install.
6863 # Don't use installbsd from OSF since it installs stuff as root
6864 # by default.
6865 for ac_prog in ginstall scoinst install; do
6866 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01006867 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 if test $ac_prog = install &&
Pablo Galindo53e55292021-04-05 17:38:40 +01006869 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 # AIX install. It has an incompatible calling convention.
6871 :
6872 elif test $ac_prog = install &&
Pablo Galindo53e55292021-04-05 17:38:40 +01006873 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874 # program-specific install script used by HP pwplus--don't use.
6875 :
6876 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 rm -rf conftest.one conftest.two conftest.dir
6878 echo one > conftest.one
6879 echo two > conftest.two
6880 mkdir conftest.dir
Pablo Galindo53e55292021-04-05 17:38:40 +01006881 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 test -s conftest.one && test -s conftest.two &&
6883 test -s conftest.dir/conftest.one &&
6884 test -s conftest.dir/conftest.two
6885 then
Pablo Galindo53e55292021-04-05 17:38:40 +01006886 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006887 break 3
6888 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 fi
6890 fi
6891 done
6892 done
6893 ;;
6894esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006895
6896 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897IFS=$as_save_IFS
6898
Matthias Kloseb9621712010-04-24 17:59:49 +00006899rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900
6901fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006902 if test ${ac_cv_path_install+y}; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 INSTALL=$ac_cv_path_install
6904 else
6905 # As a last resort, use the slow shell script. Don't cache a
6906 # value for INSTALL within a source directory, because that will
6907 # break other packages using the cache if that directory is
6908 # removed, or if the value is a relative name.
6909 INSTALL=$ac_install_sh
6910 fi
6911fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6913printf "%s\n" "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914
6915# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6916# It thinks the first close brace ends the variable substitution.
6917test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6918
6919test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6920
6921test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6922
Pablo Galindo53e55292021-04-05 17:38:40 +01006923
6924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
6925printf %s "checking for a race-free mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006926if test -z "$MKDIR_P"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01006927 if test ${ac_cv_path_mkdir+y}
6928then :
6929 printf %s "(cached) " >&6
6930else $as_nop
Matthias Klose93a0ef12012-03-15 18:08:34 +01006931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6932for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6933do
6934 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01006935 case $as_dir in #(((
6936 '') as_dir=./ ;;
6937 */) ;;
6938 *) as_dir=$as_dir/ ;;
6939 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +01006940 for ac_prog in mkdir gmkdir; do
6941 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01006942 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
6943 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
6944 'mkdir ('*'coreutils) '* | \
6945 'BusyBox '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006946 'mkdir (fileutils) '4.1*)
Pablo Galindo53e55292021-04-05 17:38:40 +01006947 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006948 break 3;;
6949 esac
6950 done
6951 done
6952 done
6953IFS=$as_save_IFS
6954
6955fi
6956
6957 test -d ./--version && rmdir ./--version
Pablo Galindo53e55292021-04-05 17:38:40 +01006958 if test ${ac_cv_path_mkdir+y}; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006959 MKDIR_P="$ac_cv_path_mkdir -p"
6960 else
6961 # As a last resort, use the slow shell script. Don't cache a
6962 # value for MKDIR_P within a source directory, because that will
6963 # break other packages using the cache if that directory is
6964 # removed, or if the value is a relative name.
6965 MKDIR_P="$ac_install_sh -d"
6966 fi
6967fi
Pablo Galindo53e55292021-04-05 17:38:40 +01006968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6969printf "%s\n" "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971
6972# Not every filesystem supports hard links
6973
6974if test -z "$LN" ; then
6975 case $ac_sys_system in
6976 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977 *) LN=ln;;
6978 esac
6979fi
6980
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006981# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006982
6983ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006984
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985# Check for --with-pydebug
Pablo Galindo53e55292021-04-05 17:38:40 +01006986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6987printf %s "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988
6989# Check whether --with-pydebug was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01006990if test ${with_pydebug+y}
6991then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006992 withval=$with_pydebug;
6993if test "$withval" != no
6994then
6995
Pablo Galindo53e55292021-04-05 17:38:40 +01006996printf "%s\n" "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997
Pablo Galindo53e55292021-04-05 17:38:40 +01006998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6999printf "%s\n" "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007001 ABIFLAGS="${ABIFLAGS}d"
Pablo Galindo53e55292021-04-05 17:38:40 +01007002else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7003printf "%s\n" "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007005else $as_nop
7006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7007printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008fi
7009
7010
Victor Stinnerf4e47032019-04-25 00:56:28 +02007011# Check for --with-trace-refs
7012# --with-trace-refs
Pablo Galindo53e55292021-04-05 17:38:40 +01007013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
7014printf %s "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02007015
7016# Check whether --with-trace-refs was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01007017if test ${with_trace_refs+y}
7018then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02007019 withval=$with_trace_refs;
Pablo Galindo53e55292021-04-05 17:38:40 +01007020else $as_nop
Victor Stinnerf4e47032019-04-25 00:56:28 +02007021 with_trace_refs=no
7022fi
7023
Pablo Galindo53e55292021-04-05 17:38:40 +01007024{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
7025printf "%s\n" "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02007026
7027if test "$with_trace_refs" = "yes"
7028then
7029
Pablo Galindo53e55292021-04-05 17:38:40 +01007030printf "%s\n" "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02007031
7032fi
7033
7034# Check for --with-assertions.
7035# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02007036assertions='false'
Pablo Galindo53e55292021-04-05 17:38:40 +01007037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
7038printf %s "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007039
7040# Check whether --with-assertions was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01007041if test ${with_assertions+y}
7042then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02007043 withval=$with_assertions;
7044if test "$withval" != no
7045then
7046 assertions='true'
7047fi
7048fi
7049
7050if test "$assertions" = 'true'; then
Pablo Galindo53e55292021-04-05 17:38:40 +01007051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7052printf "%s\n" "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007053elif test "$Py_DEBUG" = 'true'; then
7054 assertions='true'
Pablo Galindo53e55292021-04-05 17:38:40 +01007055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
7056printf "%s\n" "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007057else
Pablo Galindo53e55292021-04-05 17:38:40 +01007058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7059printf "%s\n" "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007060fi
7061
Brett Cannon63d98bc2016-09-06 17:12:40 -07007062# Enable optimization flags
7063
7064
7065Py_OPT='false'
Pablo Galindo53e55292021-04-05 17:38:40 +01007066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
7067printf %s "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007068# Check whether --enable-optimizations was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01007069if test ${enable_optimizations+y}
7070then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007071 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04007072if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07007073then
7074 Py_OPT='true'
Pablo Galindo53e55292021-04-05 17:38:40 +01007075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7076printf "%s\n" "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07007077else
7078 Py_OPT='false'
Pablo Galindo53e55292021-04-05 17:38:40 +01007079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7080printf "%s\n" "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07007081fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007082else $as_nop
7083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7084printf "%s\n" "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07007085fi
7086
7087if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00007088 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
7089 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07007090 # 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 +00007091 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07007092 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007093 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07007094 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01007095 case $CC in
7096 *gcc*)
Pablo Galindo53e55292021-04-05 17:38:40 +01007097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
7098printf %s "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
7099if test ${ax_cv_check_cflags___fno_semantic_interposition+y}
7100then :
7101 printf %s "(cached) " >&6
7102else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007103
7104 ax_check_save_flags=$CFLAGS
7105 CFLAGS="$CFLAGS -fno-semantic-interposition"
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h. */
7108
7109int
Pablo Galindo53e55292021-04-05 17:38:40 +01007110main (void)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007111{
7112
7113 ;
7114 return 0;
7115}
7116_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007117if ac_fn_c_try_compile "$LINENO"
7118then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007119 ax_cv_check_cflags___fno_semantic_interposition=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01007120else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007121 ax_cv_check_cflags___fno_semantic_interposition=no
7122fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007123rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007124 CFLAGS=$ax_check_save_flags
7125fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
7127printf "%s\n" "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
7128if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes
7129then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007130
Pablo Galindob451b0e2020-10-21 22:46:52 +01007131 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
7132 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007133
Pablo Galindo53e55292021-04-05 17:38:40 +01007134else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007135 :
7136fi
7137
Pablo Galindob451b0e2020-10-21 22:46:52 +01007138 ;;
7139 esac
7140
7141
Brett Cannon63d98bc2016-09-06 17:12:40 -07007142else
7143 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007144 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07007145 DEF_MAKE_RULE="all"
7146fi
7147
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007148
Pablo Galindo53e55292021-04-05 17:38:40 +01007149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
7150printf %s "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007151if test -z "$PROFILE_TASK"
7152then
Victor Stinner67900052021-01-27 11:16:15 +01007153 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007154fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
7156printf "%s\n" "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007157
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007158# Make llvm-relatec checks work on systems where llvm tools are not installed with their
7159# normal names in the default $PATH (ie: Ubuntu). They exist under the
7160# non-suffixed name in their versioned llvm directory.
7161
7162llvm_bin_dir=''
7163llvm_path="${PATH}"
7164if test "${CC}" = "clang"
7165then
7166 clang_bin=`which clang`
7167 # Some systems install clang elsewhere as a symlink to the real path
7168 # which is where the related llvm tools are located.
7169 if test -L "${clang_bin}"
7170 then
7171 clang_dir=`dirname "${clang_bin}"`
7172 clang_bin=`readlink "${clang_bin}"`
7173 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
7174 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
7175 fi
7176fi
7177
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007178# Enable LTO flags
Pablo Galindo53e55292021-04-05 17:38:40 +01007179{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
7180printf %s "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007181
7182# Check whether --with-lto was given.
Pablo Galindo53e55292021-04-05 17:38:40 +01007183if test ${with_lto+y}
7184then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007185 withval=$with_lto;
7186if test "$withval" != no
7187then
7188 Py_LTO='true'
Pablo Galindo53e55292021-04-05 17:38:40 +01007189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7190printf "%s\n" "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007191else
7192 Py_LTO='false'
Pablo Galindo53e55292021-04-05 17:38:40 +01007193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194printf "%s\n" "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007195fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007196else $as_nop
7197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7198printf "%s\n" "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007199fi
7200
7201if test "$Py_LTO" = 'true' ; then
7202 case $CC in
7203 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02007204
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007205 if test -n "$ac_tool_prefix"; then
7206 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
7207set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01007208{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209printf %s "checking for $ac_word... " >&6; }
7210if test ${ac_cv_path_LLVM_AR+y}
7211then :
7212 printf %s "(cached) " >&6
7213else $as_nop
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007214 case $LLVM_AR in
7215 [\\/]* | ?:[\\/]*)
7216 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
7217 ;;
7218 *)
7219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7220for as_dir in ${llvm_path}
7221do
7222 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01007223 case $as_dir in #(((
7224 '') as_dir=./ ;;
7225 */) ;;
7226 *) as_dir=$as_dir/ ;;
7227 esac
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007228 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01007229 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7230 ac_cv_path_LLVM_AR="$as_dir$ac_word$ac_exec_ext"
7231 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 +02007232 break 2
7233 fi
7234done
7235 done
7236IFS=$as_save_IFS
7237
7238 ;;
7239esac
7240fi
7241LLVM_AR=$ac_cv_path_LLVM_AR
7242if test -n "$LLVM_AR"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01007243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
7244printf "%s\n" "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007245else
Pablo Galindo53e55292021-04-05 17:38:40 +01007246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7247printf "%s\n" "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007248fi
7249
7250
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007251fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007252if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007253 ac_pt_LLVM_AR=$LLVM_AR
7254 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007255set dummy llvm-ar; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01007256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7257printf %s "checking for $ac_word... " >&6; }
7258if test ${ac_cv_path_ac_pt_LLVM_AR+y}
7259then :
7260 printf %s "(cached) " >&6
7261else $as_nop
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007262 case $ac_pt_LLVM_AR in
7263 [\\/]* | ?:[\\/]*)
7264 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
7265 ;;
7266 *)
7267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7268for as_dir in ${llvm_path}
7269do
7270 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01007271 case $as_dir in #(((
7272 '') as_dir=./ ;;
7273 */) ;;
7274 *) as_dir=$as_dir/ ;;
7275 esac
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007276 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01007277 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7278 ac_cv_path_ac_pt_LLVM_AR="$as_dir$ac_word$ac_exec_ext"
7279 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 +02007280 break 2
7281 fi
7282done
7283 done
7284IFS=$as_save_IFS
7285
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007286 ;;
7287esac
7288fi
7289ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
7290if test -n "$ac_pt_LLVM_AR"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01007291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
7292printf "%s\n" "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007293else
Pablo Galindo53e55292021-04-05 17:38:40 +01007294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295printf "%s\n" "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007296fi
7297
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007298 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007299 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007300 else
7301 case $cross_compiling:$ac_tool_warned in
7302yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01007303{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7304printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007305ac_tool_warned=yes ;;
7306esac
7307 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007308 fi
7309else
7310 LLVM_AR="$ac_cv_path_LLVM_AR"
7311fi
7312
7313
7314 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
7315 then
7316 LLVM_AR_FOUND="found"
7317 else
7318 LLVM_AR_FOUND="not-found"
7319 fi
7320 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
7321 then
7322 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
7323 if test -n "${found_llvm_ar}"
7324 then
7325 LLVM_AR='/usr/bin/xcrun llvm-ar'
7326 LLVM_AR_FOUND=found
Pablo Galindo53e55292021-04-05 17:38:40 +01007327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
7328printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007329 fi
7330 fi
7331 if test $LLVM_AR_FOUND = not-found
7332 then
7333 LLVM_PROFR_ERR=yes
7334 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
7335 else
7336 LLVM_AR_ERR=no
7337 fi
7338 AR="${LLVM_AR}"
7339 case $ac_sys_system in
7340 Darwin*)
7341 # Any changes made here should be reflected in the GCC+Darwin case below
7342 LTOFLAGS="-flto -Wl,-export_dynamic"
7343 ;;
7344 *)
7345 LTOFLAGS="-flto"
7346 ;;
7347 esac
7348 ;;
7349 *gcc*)
7350 case $ac_sys_system in
7351 Darwin*)
7352 LTOFLAGS="-flto -Wl,-export_dynamic"
7353 ;;
7354 *)
7355 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
7356 ;;
7357 esac
7358 ;;
7359 esac
7360
7361 if test "$ac_cv_prog_cc_g" = "yes"
7362 then
7363 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
7364 # to get debug symbols.
7365 LTOFLAGS="$LTOFLAGS -g"
7366 fi
7367
stratakisf92c7aa2018-12-04 15:54:01 +01007368 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01007369 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007370fi
7371
7372# Enable PGO flags.
7373
7374
7375
7376
7377
7378
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007379if test -n "$ac_tool_prefix"; then
7380 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
7381set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01007382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7383printf %s "checking for $ac_word... " >&6; }
7384if test ${ac_cv_path_LLVM_PROFDATA+y}
7385then :
7386 printf %s "(cached) " >&6
7387else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007388 case $LLVM_PROFDATA in
7389 [\\/]* | ?:[\\/]*)
7390 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
7391 ;;
7392 *)
7393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07007395do
7396 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01007397 case $as_dir in #(((
7398 '') as_dir=./ ;;
7399 */) ;;
7400 *) as_dir=$as_dir/ ;;
7401 esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007402 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01007403 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7404 ac_cv_path_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7405 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07007406 break 2
7407 fi
7408done
7409 done
7410IFS=$as_save_IFS
7411
Gregory P. Smith799520c2016-09-07 16:10:00 -07007412 ;;
7413esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007414fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007415LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
7416if test -n "$LLVM_PROFDATA"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01007417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
7418printf "%s\n" "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007419else
Pablo Galindo53e55292021-04-05 17:38:40 +01007420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421printf "%s\n" "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007422fi
7423
7424
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007425fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007426if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007427 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
7428 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07007429set dummy llvm-profdata; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +01007430{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7431printf %s "checking for $ac_word... " >&6; }
7432if test ${ac_cv_path_ac_pt_LLVM_PROFDATA+y}
7433then :
7434 printf %s "(cached) " >&6
7435else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007436 case $ac_pt_LLVM_PROFDATA in
7437 [\\/]* | ?:[\\/]*)
7438 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
7439 ;;
7440 *)
7441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7442for as_dir in ${llvm_path}
7443do
7444 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +01007445 case $as_dir in #(((
7446 '') as_dir=./ ;;
7447 */) ;;
7448 *) as_dir=$as_dir/ ;;
7449 esac
Gregory P. Smith799520c2016-09-07 16:10:00 -07007450 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +01007451 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7452 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7453 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 -07007454 break 2
7455 fi
7456done
7457 done
7458IFS=$as_save_IFS
7459
Gregory P. Smith799520c2016-09-07 16:10:00 -07007460 ;;
7461esac
7462fi
7463ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
7464if test -n "$ac_pt_LLVM_PROFDATA"; then
Pablo Galindo53e55292021-04-05 17:38:40 +01007465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
7466printf "%s\n" "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007467else
Pablo Galindo53e55292021-04-05 17:38:40 +01007468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469printf "%s\n" "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007470fi
7471
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007472 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07007473 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007474 else
7475 case $cross_compiling:$ac_tool_warned in
7476yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +01007477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007479ac_tool_warned=yes ;;
7480esac
7481 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07007482 fi
7483else
7484 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
7485fi
7486
7487
7488if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
7489then
7490 LLVM_PROF_FOUND="found"
7491else
7492 LLVM_PROF_FOUND="not-found"
7493fi
7494if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
7495then
7496 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
7497 if test -n "${found_llvm_profdata}"
7498 then
7499 # llvm-profdata isn't directly in $PATH in some cases.
7500 # https://apple.stackexchange.com/questions/197053/
7501 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
7502 LLVM_PROF_FOUND=found
Pablo Galindo53e55292021-04-05 17:38:40 +01007503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
7504printf "%s\n" "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07007505 fi
7506fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007507LLVM_PROF_ERR=no
7508case $CC in
7509 *clang*)
7510 # Any changes made here should be reflected in the GCC+Darwin case below
7511 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7512 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007513 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007514 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
7515 if test $LLVM_PROF_FOUND = not-found
7516 then
7517 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007518 if test "${REQUIRE_PGO}" = "yes"
7519 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007520 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 -07007521 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007522 fi
7523 ;;
7524 *gcc*)
7525 case $ac_sys_system in
7526 Darwin*)
7527 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7528 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007529 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007530 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07007531 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007532 then
7533 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007534 if test "${REQUIRE_PGO}" = "yes"
7535 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007536 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 -07007537 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007538 fi
7539 ;;
7540 *)
7541 PGO_PROF_GEN_FLAG="-fprofile-generate"
7542 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
7543 LLVM_PROF_MERGER="true"
7544 LLVM_PROF_FILE=""
7545 ;;
7546 esac
7547 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007548 *icc*)
7549 PGO_PROF_GEN_FLAG="-prof-gen"
7550 PGO_PROF_USE_FLAG="-prof-use"
7551 LLVM_PROF_MERGER="true"
7552 LLVM_PROF_FILE=""
7553 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07007554esac
7555
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
7557# merged with this chunk of code?
7558
7559# Optimizer/debugger flags
7560# ------------------------
7561# (The following bit of code is complicated enough - please keep things
7562# indented properly. Just pretend you're editing Python code. ;-)
7563
7564# There are two parallel sets of case statements below, one that checks to
7565# see if OPT was set and one that does BASECFLAGS setting based upon
7566# compiler and platform. BASECFLAGS tweaks need to be made even if the
7567# user set OPT.
7568
Victor Stinner23a683a2019-04-12 21:27:37 +02007569case $CC in
7570 *clang*)
7571 cc_is_clang=1
7572 ;;
7573 *)
7574 if $CC --version 2>&1 | grep -q clang
7575 then
7576 cc_is_clang=1
7577 else
7578 cc_is_clang=
7579 fi
7580esac
7581
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582# tweak OPT based on compiler and platform, only if the user didn't set
7583# it on the command line
7584
Victor Stinner9ed34a82017-05-02 22:35:58 +02007585
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00007586if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587then
7588 case $GCC in
7589 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590 # For gcc 4.x we need to use -fwrapv so lets check if its supported
7591 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
7592 WRAP="-fwrapv"
7593 fi
Stefan Krah962055d2011-09-14 15:14:08 +02007594
Victor Stinner35f3d242017-04-21 12:35:24 +02007595 if test -n "${cc_is_clang}"
7596 then
7597 # Clang also needs -fwrapv
7598 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02007599 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
7600 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02007601 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02007602 fi
7603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604 case $ac_cv_prog_cc_g in
7605 yes)
7606 if test "$Py_DEBUG" = 'true' ; then
7607 # Optimization messes up debuggers, so turn it off for
7608 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007609 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02007610 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007611 else
Victor Stinner28205b22017-04-21 11:24:34 +02007612 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007613 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614 else
Victor Stinner28205b22017-04-21 11:24:34 +02007615 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616 fi
7617 ;;
7618 *)
Victor Stinner28205b22017-04-21 11:24:34 +02007619 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620 ;;
7621 esac
Victor Stinner28205b22017-04-21 11:24:34 +02007622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623 case $ac_sys_system in
7624 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7625 ;;
7626 esac
7627 ;;
7628
7629 *)
7630 OPT="-O"
7631 ;;
7632 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633fi
7634
7635
7636
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007637
stratakiscf10a752018-12-19 18:19:01 +01007638
Ronald Oussoren41761932020-11-08 10:05:27 +01007639# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640UNIVERSAL_ARCH_FLAGS=
7641
7642
7643# tweak BASECFLAGS based on compiler and platform
7644case $GCC in
7645yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007646 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007647
Pablo Galindo53e55292021-04-05 17:38:40 +01007648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7649printf %s "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007650 ac_save_cc="$CC"
7651 CC="$CC -Wextra -Werror"
Pablo Galindo53e55292021-04-05 17:38:40 +01007652 if test ${ac_cv_extra_warnings+y}
7653then :
7654 printf %s "(cached) " >&6
7655else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7657/* end confdefs.h. */
7658
7659
7660int
Pablo Galindo53e55292021-04-05 17:38:40 +01007661main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007662{
7663
7664 ;
7665 return 0;
7666}
7667
7668_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007669if ac_fn_c_try_compile "$LINENO"
7670then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007671
7672 ac_cv_extra_warnings=yes
7673
Pablo Galindo53e55292021-04-05 17:38:40 +01007674else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007675
7676 ac_cv_extra_warnings=no
7677
7678fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007679rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007680fi
7681
7682 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01007683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7684printf "%s\n" "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007685
7686 if test $ac_cv_extra_warnings = yes
7687 then
7688 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7689 fi
7690
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007691 # Python doesn't violate C99 aliasing rules, but older versions of
7692 # GCC produce warnings for legal Python code. Enable
7693 # -fno-strict-aliasing on versions of GCC that support but produce
7694 # warnings. See Issue3326
Pablo Galindo53e55292021-04-05 17:38:40 +01007695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7696printf %s "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697 ac_save_cc="$CC"
7698 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007699 save_CFLAGS="$CFLAGS"
Pablo Galindo53e55292021-04-05 17:38:40 +01007700 if test ${ac_cv_no_strict_aliasing+y}
7701then :
7702 printf %s "(cached) " >&6
7703else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007706
Matthias Kloseb159a552010-04-25 21:00:44 +00007707
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007708int
Pablo Galindo53e55292021-04-05 17:38:40 +01007709main (void)
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007710{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007711
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007712 ;
7713 return 0;
7714}
Matthias Kloseb159a552010-04-25 21:00:44 +00007715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007717if ac_fn_c_try_compile "$LINENO"
7718then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007719
7720 CC="$ac_save_cc -fstrict-aliasing"
7721 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007723/* end confdefs.h. */
7724
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007725 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007726int
Pablo Galindo53e55292021-04-05 17:38:40 +01007727main (void)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007728{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007729double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007730 ;
7731 return 0;
7732}
Matthias Kloseb159a552010-04-25 21:00:44 +00007733
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007734_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007735if ac_fn_c_try_compile "$LINENO"
7736then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007737
7738 ac_cv_no_strict_aliasing=no
7739
Pablo Galindo53e55292021-04-05 17:38:40 +01007740else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007741
7742 ac_cv_no_strict_aliasing=yes
7743
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007744fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007745rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007746
Pablo Galindo53e55292021-04-05 17:38:40 +01007747else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007748
7749 ac_cv_no_strict_aliasing=no
7750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007751fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007752rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007753fi
7754
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007755 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01007757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7758printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007759 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760 then
7761 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7762 fi
7763
Zachary Ware5af85642015-12-21 12:09:17 -06007764 # ICC doesn't recognize the option, but only emits a warning
7765 ## XXX does it emit an unused result warning and can it be disabled?
7766 case "$CC" in
7767 *icc*)
7768 ac_cv_disable_unused_result_warning=no
7769 ;;
7770 *)
Pablo Galindo53e55292021-04-05 17:38:40 +01007771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7772printf %s "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007773 ac_save_cc="$CC"
7774 CC="$CC -Wunused-result -Werror"
7775 save_CFLAGS="$CFLAGS"
Pablo Galindo53e55292021-04-05 17:38:40 +01007776 if test ${ac_cv_disable_unused_result_warning+y}
7777then :
7778 printf %s "(cached) " >&6
7779else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7781/* end confdefs.h. */
7782
7783
7784int
Pablo Galindo53e55292021-04-05 17:38:40 +01007785main (void)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007786{
7787
7788 ;
7789 return 0;
7790}
7791
7792_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007793if ac_fn_c_try_compile "$LINENO"
7794then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007795
7796 ac_cv_disable_unused_result_warning=yes
7797
Pablo Galindo53e55292021-04-05 17:38:40 +01007798else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007799
7800 ac_cv_disable_unused_result_warning=no
7801
7802fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007803rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007804fi
7805
7806 CFLAGS="$save_CFLAGS"
7807 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01007808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7809printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007810 ;;
7811 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007812
7813 if test $ac_cv_disable_unused_result_warning = yes
7814 then
7815 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007816 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7817 fi
7818
Pablo Galindo53e55292021-04-05 17:38:40 +01007819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7820printf %s "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007821 ac_save_cc="$CC"
7822 CC="$CC -Wunused-parameter -Werror"
Pablo Galindo53e55292021-04-05 17:38:40 +01007823 if test ${ac_cv_disable_unused_parameter_warning+y}
7824then :
7825 printf %s "(cached) " >&6
7826else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7828/* end confdefs.h. */
7829
7830
7831int
Pablo Galindo53e55292021-04-05 17:38:40 +01007832main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007833{
7834
7835 ;
7836 return 0;
7837}
7838
7839_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007840if ac_fn_c_try_compile "$LINENO"
7841then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007842
7843 ac_cv_disable_unused_parameter_warning=yes
7844
Pablo Galindo53e55292021-04-05 17:38:40 +01007845else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007846
7847 ac_cv_disable_unused_parameter_warning=no
7848
7849fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007850rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007851fi
7852
7853 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01007854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7855printf "%s\n" "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007856
7857 if test $ac_cv_disable_unused_parameter_warning = yes
7858 then
7859 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7860 fi
7861
Pablo Galindo53e55292021-04-05 17:38:40 +01007862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7863printf %s "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007864 ac_save_cc="$CC"
7865 CC="$CC -Wmissing-field-initializers -Werror"
Pablo Galindo53e55292021-04-05 17:38:40 +01007866 if test ${ac_cv_disable_missing_field_initializers+y}
7867then :
7868 printf %s "(cached) " >&6
7869else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7871/* end confdefs.h. */
7872
7873
7874int
Pablo Galindo53e55292021-04-05 17:38:40 +01007875main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007876{
7877
7878 ;
7879 return 0;
7880}
7881
7882_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007883if ac_fn_c_try_compile "$LINENO"
7884then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007885
7886 ac_cv_disable_missing_field_initializers=yes
7887
Pablo Galindo53e55292021-04-05 17:38:40 +01007888else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007889
7890 ac_cv_disable_missing_field_initializers=no
7891
7892fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007893rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007894fi
7895
7896 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01007897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7898printf "%s\n" "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007899
7900 if test $ac_cv_disable_missing_field_initializers = yes
7901 then
7902 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007903 fi
7904
Pablo Galindo53e55292021-04-05 17:38:40 +01007905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7906printf %s "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007907 ac_save_cc="$CC"
7908 CC="$CC -Wsign-compare"
7909 save_CFLAGS="$CFLAGS"
Pablo Galindo53e55292021-04-05 17:38:40 +01007910 if test ${ac_cv_enable_sign_compare_warning+y}
7911then :
7912 printf %s "(cached) " >&6
7913else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7915/* end confdefs.h. */
7916
7917
7918int
Pablo Galindo53e55292021-04-05 17:38:40 +01007919main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007920{
7921
7922 ;
7923 return 0;
7924}
7925
7926_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007927if ac_fn_c_try_compile "$LINENO"
7928then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007929
7930 ac_cv_enable_sign_compare_warning=yes
7931
Pablo Galindo53e55292021-04-05 17:38:40 +01007932else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007933
7934 ac_cv_enable_sign_compare_warning=no
7935
7936fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007937rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007938fi
7939
7940 CFLAGS="$save_CFLAGS"
7941 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01007942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7943printf "%s\n" "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007944
7945 if test $ac_cv_enable_sign_compare_warning = yes
7946 then
7947 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7948 fi
7949
Pablo Galindo53e55292021-04-05 17:38:40 +01007950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7951printf %s "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007952 ac_save_cc="$CC"
7953 CC="$CC -Wunreachable-code"
7954 save_CFLAGS="$CFLAGS"
Pablo Galindo53e55292021-04-05 17:38:40 +01007955 if test ${ac_cv_enable_unreachable_code_warning+y}
7956then :
7957 printf %s "(cached) " >&6
7958else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7960/* end confdefs.h. */
7961
7962
7963int
Pablo Galindo53e55292021-04-05 17:38:40 +01007964main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007965{
7966
7967 ;
7968 return 0;
7969}
7970
7971_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01007972if ac_fn_c_try_compile "$LINENO"
7973then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007974
7975 ac_cv_enable_unreachable_code_warning=yes
7976
Pablo Galindo53e55292021-04-05 17:38:40 +01007977else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007978
7979 ac_cv_enable_unreachable_code_warning=no
7980
7981fi
Pablo Galindo53e55292021-04-05 17:38:40 +01007982rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007983fi
7984
7985 CFLAGS="$save_CFLAGS"
7986 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007987
7988 # Don't enable unreachable code warning in debug mode, since it usually
7989 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007990 # Issue #24324: Unfortunately, the unreachable code warning does not work
7991 # correctly on gcc and has been silently removed from the compiler.
7992 # It is supported on clang but on OS X systems gcc may be an alias
7993 # for clang. Try to determine if the compiler is not really gcc and,
7994 # if so, only then enable the warning.
7995 if test $ac_cv_enable_unreachable_code_warning = yes && \
7996 test "$Py_DEBUG" != "true" && \
7997 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007998 then
7999 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05008000 else
8001 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01008002 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
8004printf "%s\n" "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01008005
Pablo Galindo53e55292021-04-05 17:38:40 +01008006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
8007printf %s "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008008 ac_save_cc="$CC"
8009 CC="$CC -Werror -Wstrict-prototypes"
Pablo Galindo53e55292021-04-05 17:38:40 +01008010 if test ${ac_cv_enable_enable_strict_prototypes_warning+y}
8011then :
8012 printf %s "(cached) " >&6
8013else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8015/* end confdefs.h. */
8016
8017
8018int
Pablo Galindo53e55292021-04-05 17:38:40 +01008019main (void)
INADA Naokie3364842018-06-05 20:40:53 +09008020{
8021
8022 ;
8023 return 0;
8024}
8025
8026_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008027if ac_fn_c_try_compile "$LINENO"
8028then :
INADA Naokie3364842018-06-05 20:40:53 +09008029
8030 ac_cv_enable_strict_prototypes_warning=yes
8031
Pablo Galindo53e55292021-04-05 17:38:40 +01008032else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008033
8034 ac_cv_enable_strict_prototypes_warning=no
8035
8036fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008037rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09008038fi
8039
8040 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01008041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
8042printf "%s\n" "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008043
8044 if test $ac_cv_enable_strict_prototypes_warning = yes
8045 then
8046 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
8047 fi
8048
Pablo Galindo53e55292021-04-05 17:38:40 +01008049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
8050printf %s "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008051 ac_save_cc="$CC"
8052 CC="$CC -Werror=implicit-function-declaration"
Pablo Galindo53e55292021-04-05 17:38:40 +01008053 if test ${ac_cv_enable_implicit_function_declaration_error+y}
8054then :
8055 printf %s "(cached) " >&6
8056else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8058/* end confdefs.h. */
8059
8060
8061int
Pablo Galindo53e55292021-04-05 17:38:40 +01008062main (void)
Victor Stinner193ee0a2017-02-06 14:24:00 +01008063{
8064
8065 ;
8066 return 0;
8067}
8068
8069_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008070if ac_fn_c_try_compile "$LINENO"
8071then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01008072
8073 ac_cv_enable_implicit_function_declaration_error=yes
8074
Pablo Galindo53e55292021-04-05 17:38:40 +01008075else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008076
8077 ac_cv_enable_implicit_function_declaration_error=no
8078
8079fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008080rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01008081fi
8082
8083 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01008084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
8085printf "%s\n" "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008086
8087 if test $ac_cv_enable_implicit_function_declaration_error = yes
8088 then
8089 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
8090 fi
8091
Pablo Galindo53e55292021-04-05 17:38:40 +01008092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
8093printf %s "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008094 ac_save_cc="$CC"
8095 CC="$CC -fvisibility=hidden"
Pablo Galindo53e55292021-04-05 17:38:40 +01008096 if test ${ac_cv_enable_visibility+y}
8097then :
8098 printf %s "(cached) " >&6
8099else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8101/* end confdefs.h. */
8102
8103
8104int
Pablo Galindo53e55292021-04-05 17:38:40 +01008105main (void)
Vinay Sajip0b60f642019-10-15 08:26:12 +01008106{
8107
8108 ;
8109 return 0;
8110}
8111
8112_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008113if ac_fn_c_try_compile "$LINENO"
8114then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01008115
8116 ac_cv_enable_visibility=yes
8117
Pablo Galindo53e55292021-04-05 17:38:40 +01008118else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008119
8120 ac_cv_enable_visibility=no
8121
8122fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008123rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01008124fi
8125
8126 CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +01008127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
8128printf "%s\n" "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008129
8130 if test $ac_cv_enable_visibility = yes
8131 then
8132 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
8133 fi
8134
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008135 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
8136 # support. Without this, treatment of subnormals doesn't follow
8137 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01008138 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008139 alpha*)
8140 BASECFLAGS="$BASECFLAGS -mieee"
8141 ;;
8142 esac
8143
8144 case $ac_sys_system in
8145 SCO_SV*)
8146 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
8147 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008148
Ned Deily87adb6e2013-10-18 21:09:56 -07008149 Darwin*)
8150 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
8151 # used to be here, but non-Apple gcc doesn't accept them.
8152 if test "${CC}" = gcc
8153 then
Pablo Galindo53e55292021-04-05 17:38:40 +01008154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
8155printf %s "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008156 case "${UNIVERSALSDK}" in
8157 */MacOSX10.4u.sdk)
8158 # Build using 10.4 SDK, force usage of gcc when the
8159 # compiler is gcc, otherwise the user will get very
8160 # confusing error messages when building on OSX 10.6
8161 CC=gcc-4.0
8162 CPP=cpp-4.0
8163 ;;
8164 esac
Pablo Galindo53e55292021-04-05 17:38:40 +01008165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8166printf "%s\n" "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008167 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008168
Ned Deily87adb6e2013-10-18 21:09:56 -07008169 if test "${enable_universalsdk}"
8170 then
8171 case "$UNIVERSAL_ARCHS" in
8172 32-bit)
8173 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
8174 LIPO_32BIT_FLAGS=""
8175 ARCH_RUN_32BIT=""
8176 ;;
8177 64-bit)
8178 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
8179 LIPO_32BIT_FLAGS=""
8180 ARCH_RUN_32BIT="true"
8181 ;;
8182 all)
8183 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
8184 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8185 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8186 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01008187 universal2)
8188 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
8189 LIPO_32BIT_FLAGS=""
8190 ARCH_RUN_32BIT="true"
8191 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008192 intel)
8193 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
8194 LIPO_32BIT_FLAGS="-extract i386"
8195 ARCH_RUN_32BIT="/usr/bin/arch -i386"
8196 ;;
8197 intel-32)
8198 UNIVERSAL_ARCH_FLAGS="-arch i386"
8199 LIPO_32BIT_FLAGS=""
8200 ARCH_RUN_32BIT=""
8201 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05008202 intel-64)
8203 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
8204 LIPO_32BIT_FLAGS=""
8205 ARCH_RUN_32BIT="true"
8206 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008207 3-way)
8208 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
8209 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8210 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8211 ;;
8212 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01008213 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 -07008214 ;;
8215 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008216
Ned Deily87adb6e2013-10-18 21:09:56 -07008217 if test "${UNIVERSALSDK}" != "/"
8218 then
Ned Deily8c9bb722018-01-30 07:42:14 -05008219 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
8220 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008221 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05008222 else
8223 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
8224 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008225 fi
8226 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008227
Ned Deily87adb6e2013-10-18 21:09:56 -07008228 # Calculate an appropriate deployment target for this build:
8229 # The deployment target value is used explicitly to enable certain
8230 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07008231 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07008232 # component of the string returned by distutils.get_platform().
8233 #
8234 # Use the value from:
8235 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
8236 # 2. the operating system version of the build machine if >= 10.6
8237 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
8238 # below to pick either 10.3, 10.4, or 10.5 as the target.
8239 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008240
Pablo Galindo53e55292021-04-05 17:38:40 +01008241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
8242printf %s "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07008243 cur_target_major=`sw_vers -productVersion | \
8244 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8245 cur_target_minor=`sw_vers -productVersion | \
8246 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8247 cur_target="${cur_target_major}.${cur_target_minor}"
8248 if test ${cur_target_major} -eq 10 && \
8249 test ${cur_target_minor} -ge 3 && \
8250 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07008251 then
Ned Deily36820b62014-06-25 13:44:22 -07008252 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07008253 cur_target=10.3
8254 if test ${enable_universalsdk}
8255 then
8256 case "$UNIVERSAL_ARCHS" in
8257 all|3-way|intel|64-bit)
8258 # These configurations were first supported in 10.5
8259 cur_target='10.5'
8260 ;;
8261 esac
8262 else
8263 if test `/usr/bin/arch` = "i386"
8264 then
8265 # 10.4 was the first release to support Intel archs
8266 cur_target="10.4"
8267 fi
8268 fi
8269 fi
8270 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008271
Ned Deily87adb6e2013-10-18 21:09:56 -07008272 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
8273 # environment with a value that is the same as what we'll use
8274 # in the Makefile to ensure that we'll get the same compiler
8275 # environment during configure and build time.
8276 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
8277 export MACOSX_DEPLOYMENT_TARGET
8278 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Pablo Galindo53e55292021-04-05 17:38:40 +01008279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
8280printf "%s\n" "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008281
Pablo Galindo53e55292021-04-05 17:38:40 +01008282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
8283printf %s "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8285/* end confdefs.h. */
8286#include <stdio.h>
8287int
Pablo Galindo53e55292021-04-05 17:38:40 +01008288main (void)
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008289{
8290printf("%d", 42);
8291 ;
8292 return 0;
8293}
8294_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008295if ac_fn_c_try_link "$LINENO"
8296then :
8297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8298printf "%s\n" "yes" >&6; }
8299else $as_nop
8300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8301printf "%s\n" "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008302 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
8303
8304fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008305rm -f core conftest.err conftest.$ac_objext conftest.beam \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008306 conftest$ac_exeext conftest.$ac_ext
8307
Ned Deily87adb6e2013-10-18 21:09:56 -07008308 # end of Darwin* tests
8309 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008310 esac
8311 ;;
8312
8313*)
8314 case $ac_sys_system in
8315 OpenUNIX*|UnixWare*)
8316 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
8317 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008318 SCO_SV*)
8319 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
8320 ;;
8321 esac
8322 ;;
8323esac
8324
Zachary Ware5af85642015-12-21 12:09:17 -06008325case "$CC" in
8326*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02008327 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06008328 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
8329 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02008330*xlc*)
8331 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
8332 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06008333esac
8334
T. Woutersddbfa2c2017-05-23 01:30:49 +02008335if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008336 :
8337else
8338 OPT="-DNDEBUG $OPT"
8339fi
8340
8341if test "$ac_arch_flags"
8342then
8343 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
8344fi
8345
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008346# On some compilers, pthreads are available without further options
8347# (e.g. MacOS X). On some of these systems, the compiler will not
8348# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
8349# So we have to see first whether pthreads are available without
8350# options before we can check whether -Kpthread improves anything.
Pablo Galindo53e55292021-04-05 17:38:40 +01008351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
8352printf %s "checking whether pthreads are available without options... " >&6; }
8353if test ${ac_cv_pthread_is_default+y}
8354then :
8355 printf %s "(cached) " >&6
8356else $as_nop
8357 if test "$cross_compiling" = yes
8358then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008359 ac_cv_pthread_is_default=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008360else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008362/* end confdefs.h. */
8363
Stefan Krah7dba5942012-11-22 22:49:11 +01008364#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008365#include <pthread.h>
8366
8367void* routine(void* p){return NULL;}
8368
8369int main(){
8370 pthread_t p;
8371 if(pthread_create(&p,NULL,routine,NULL)!=0)
8372 return 1;
8373 (void)pthread_detach(p);
8374 return 0;
8375}
8376
8377_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008378if ac_fn_c_try_run "$LINENO"
8379then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008380
8381 ac_cv_pthread_is_default=yes
8382 ac_cv_kthread=no
8383 ac_cv_pthread=no
8384
Pablo Galindo53e55292021-04-05 17:38:40 +01008385else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008390fi
8391
8392
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008393fi
8394
Pablo Galindo53e55292021-04-05 17:38:40 +01008395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
8396printf "%s\n" "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008397
8398
8399if test $ac_cv_pthread_is_default = yes
8400then
8401 ac_cv_kpthread=no
8402else
8403# -Kpthread, if available, provides the right #defines
8404# and linker options to make pthread_create available
8405# Some compilers won't report that they do not support -Kpthread,
8406# so we need to run a program to see whether it really made the
8407# function available.
Pablo Galindo53e55292021-04-05 17:38:40 +01008408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
8409printf %s "checking whether $CC accepts -Kpthread... " >&6; }
8410if test ${ac_cv_kpthread+y}
8411then :
8412 printf %s "(cached) " >&6
8413else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008414 ac_save_cc="$CC"
8415CC="$CC -Kpthread"
Pablo Galindo53e55292021-04-05 17:38:40 +01008416if test "$cross_compiling" = yes
8417then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008418 ac_cv_kpthread=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008419else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008421/* end confdefs.h. */
8422
Stefan Krah7dba5942012-11-22 22:49:11 +01008423#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008424#include <pthread.h>
8425
8426void* routine(void* p){return NULL;}
8427
8428int main(){
8429 pthread_t p;
8430 if(pthread_create(&p,NULL,routine,NULL)!=0)
8431 return 1;
8432 (void)pthread_detach(p);
8433 return 0;
8434}
8435
8436_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008437if ac_fn_c_try_run "$LINENO"
8438then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008439 ac_cv_kpthread=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01008440else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8444 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008445fi
8446
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008447CC="$ac_save_cc"
8448fi
8449
Pablo Galindo53e55292021-04-05 17:38:40 +01008450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
8451printf "%s\n" "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008452fi
8453
8454if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
8455then
8456# -Kthread, if available, provides the right #defines
8457# and linker options to make pthread_create available
8458# Some compilers won't report that they do not support -Kthread,
8459# so we need to run a program to see whether it really made the
8460# function available.
Pablo Galindo53e55292021-04-05 17:38:40 +01008461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
8462printf %s "checking whether $CC accepts -Kthread... " >&6; }
8463if test ${ac_cv_kthread+y}
8464then :
8465 printf %s "(cached) " >&6
8466else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008467 ac_save_cc="$CC"
8468CC="$CC -Kthread"
Pablo Galindo53e55292021-04-05 17:38:40 +01008469if test "$cross_compiling" = yes
8470then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008471 ac_cv_kthread=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008472else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008474/* end confdefs.h. */
8475
Stefan Krah7dba5942012-11-22 22:49:11 +01008476#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008477#include <pthread.h>
8478
8479void* routine(void* p){return NULL;}
8480
8481int main(){
8482 pthread_t p;
8483 if(pthread_create(&p,NULL,routine,NULL)!=0)
8484 return 1;
8485 (void)pthread_detach(p);
8486 return 0;
8487}
8488
8489_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008490if ac_fn_c_try_run "$LINENO"
8491then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008492 ac_cv_kthread=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01008493else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008498fi
8499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008500CC="$ac_save_cc"
8501fi
8502
Pablo Galindo53e55292021-04-05 17:38:40 +01008503{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
8504printf "%s\n" "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008505fi
8506
8507if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
8508then
8509# -pthread, if available, provides the right #defines
8510# and linker options to make pthread_create available
8511# Some compilers won't report that they do not support -pthread,
8512# so we need to run a program to see whether it really made the
8513# function available.
Pablo Galindo53e55292021-04-05 17:38:40 +01008514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
8515printf %s "checking whether $CC accepts -pthread... " >&6; }
8516if test ${ac_cv_pthread+y}
8517then :
8518 printf %s "(cached) " >&6
8519else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008520 ac_save_cc="$CC"
8521CC="$CC -pthread"
Pablo Galindo53e55292021-04-05 17:38:40 +01008522if test "$cross_compiling" = yes
8523then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008524 ac_cv_pthread=no
Pablo Galindo53e55292021-04-05 17:38:40 +01008525else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008527/* end confdefs.h. */
8528
Stefan Krah7dba5942012-11-22 22:49:11 +01008529#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008530#include <pthread.h>
8531
8532void* routine(void* p){return NULL;}
8533
8534int main(){
8535 pthread_t p;
8536 if(pthread_create(&p,NULL,routine,NULL)!=0)
8537 return 1;
8538 (void)pthread_detach(p);
8539 return 0;
8540}
8541
8542_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01008543if ac_fn_c_try_run "$LINENO"
8544then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008545 ac_cv_pthread=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01008546else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008551fi
8552
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008553CC="$ac_save_cc"
8554fi
8555
Pablo Galindo53e55292021-04-05 17:38:40 +01008556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
8557printf "%s\n" "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008558fi
8559
8560# If we have set a CC compiler flag for thread support then
8561# check if it works for CXX, too.
8562ac_cv_cxx_thread=no
8563if test ! -z "$CXX"
8564then
Pablo Galindo53e55292021-04-05 17:38:40 +01008565{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
8566printf %s "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008567ac_save_cxx="$CXX"
8568
8569if test "$ac_cv_kpthread" = "yes"
8570then
8571 CXX="$CXX -Kpthread"
8572 ac_cv_cxx_thread=yes
8573elif test "$ac_cv_kthread" = "yes"
8574then
8575 CXX="$CXX -Kthread"
8576 ac_cv_cxx_thread=yes
8577elif test "$ac_cv_pthread" = "yes"
8578then
8579 CXX="$CXX -pthread"
8580 ac_cv_cxx_thread=yes
8581fi
8582
8583if test $ac_cv_cxx_thread = yes
8584then
8585 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
8586 $CXX -c conftest.$ac_ext 2>&5
8587 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
8588 && test -s conftest$ac_exeext && ./conftest$ac_exeext
8589 then
8590 ac_cv_cxx_thread=yes
8591 else
8592 ac_cv_cxx_thread=no
8593 fi
8594 rm -fr conftest*
8595fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
8597printf "%s\n" "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008598fi
8599CXX="$ac_save_cxx"
8600
8601
8602# checks for header files
Pablo Galindo53e55292021-04-05 17:38:40 +01008603# Autoupdate added the next two lines to ensure that your configure
8604# script's behavior did not change. They are probably safe to remove.
8605
8606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8607printf %s "checking for egrep... " >&6; }
8608if test ${ac_cv_path_EGREP+y}
8609then :
8610 printf %s "(cached) " >&6
8611else $as_nop
8612 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8613 then ac_cv_path_EGREP="$GREP -E"
8614 else
8615 if test -z "$EGREP"; then
8616 ac_path_EGREP_found=false
8617 # Loop through the user's path and test for each of PROGNAME-LIST
8618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8619for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8620do
8621 IFS=$as_save_IFS
8622 case $as_dir in #(((
8623 '') as_dir=./ ;;
8624 */) ;;
8625 *) as_dir=$as_dir/ ;;
8626 esac
8627 for ac_prog in egrep
8628 do
8629 for ac_exec_ext in '' $ac_executable_extensions; do
8630 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8631 as_fn_executable_p "$ac_path_EGREP" || continue
8632# Check for GNU ac_path_EGREP and select it if it is found.
8633 # Check for GNU $ac_path_EGREP
8634case `"$ac_path_EGREP" --version 2>&1` in
8635*GNU*)
8636 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8637*)
8638 ac_count=0
8639 printf %s 0123456789 >"conftest.in"
8640 while :
8641 do
8642 cat "conftest.in" "conftest.in" >"conftest.tmp"
8643 mv "conftest.tmp" "conftest.in"
8644 cp "conftest.in" "conftest.nl"
8645 printf "%s\n" 'EGREP' >> "conftest.nl"
8646 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8647 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8648 as_fn_arith $ac_count + 1 && ac_count=$as_val
8649 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8650 # Best one so far, save it but keep looking for a better one
8651 ac_cv_path_EGREP="$ac_path_EGREP"
8652 ac_path_EGREP_max=$ac_count
8653 fi
8654 # 10*(2^10) chars as input seems more than enough
8655 test $ac_count -gt 10 && break
8656 done
8657 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8658esac
8659
8660 $ac_path_EGREP_found && break 3
8661 done
8662 done
8663 done
8664IFS=$as_save_IFS
8665 if test -z "$ac_cv_path_EGREP"; then
8666 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8667 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008668else
Pablo Galindo53e55292021-04-05 17:38:40 +01008669 ac_cv_path_EGREP=$EGREP
Pablo Galindocc128882021-03-01 16:47:53 +00008670fi
Pablo Galindocc128882021-03-01 16:47:53 +00008671
Pablo Galindo53e55292021-04-05 17:38:40 +01008672 fi
Pablo Galindocc128882021-03-01 16:47:53 +00008673fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8675printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8676 EGREP="$ac_cv_path_EGREP"
8677
8678
8679
8680ac_fn_c_check_header_compile "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default"
8681if test "x$ac_cv_header_asm_types_h" = xyes
8682then :
8683 printf "%s\n" "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +00008684
8685fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008686ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
8687if test "x$ac_cv_header_crypt_h" = xyes
8688then :
8689 printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +00008690
8691fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008692ac_fn_c_check_header_compile "$LINENO" "conio.h" "ac_cv_header_conio_h" "$ac_includes_default"
8693if test "x$ac_cv_header_conio_h" = xyes
8694then :
8695 printf "%s\n" "#define HAVE_CONIO_H 1" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +00008696
8697fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008698ac_fn_c_check_header_compile "$LINENO" "direct.h" "ac_cv_header_direct_h" "$ac_includes_default"
8699if test "x$ac_cv_header_direct_h" = xyes
8700then :
8701 printf "%s\n" "#define HAVE_DIRECT_H 1" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +00008702
8703fi
Pablo Galindo53e55292021-04-05 17:38:40 +01008704ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
8705if test "x$ac_cv_header_dlfcn_h" = xyes
8706then :
8707 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +00008708
Pablo Galindo53e55292021-04-05 17:38:40 +01008709fi
8710ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
8711if test "x$ac_cv_header_errno_h" = xyes
8712then :
8713 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
8714
8715fi
8716ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
8717if test "x$ac_cv_header_fcntl_h" = xyes
8718then :
8719 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
8720
8721fi
8722ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default"
8723if test "x$ac_cv_header_grp_h" = xyes
8724then :
8725 printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
8726
8727fi
8728ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
8729if test "x$ac_cv_header_ieeefp_h" = xyes
8730then :
8731 printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h
8732
8733fi
8734ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default"
8735if test "x$ac_cv_header_io_h" = xyes
8736then :
8737 printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h
8738
8739fi
8740ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
8741if test "x$ac_cv_header_langinfo_h" = xyes
8742then :
8743 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
8744
8745fi
8746ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
8747if test "x$ac_cv_header_libintl_h" = xyes
8748then :
8749 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
8750
8751fi
8752ac_fn_c_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default"
8753if test "x$ac_cv_header_process_h" = xyes
8754then :
8755 printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h
8756
8757fi
8758ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8759if test "x$ac_cv_header_pthread_h" = xyes
8760then :
8761 printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
8762
8763fi
8764ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
8765if test "x$ac_cv_header_sched_h" = xyes
8766then :
8767 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
8768
8769fi
8770ac_fn_c_check_header_compile "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
8771if test "x$ac_cv_header_shadow_h" = xyes
8772then :
8773 printf "%s\n" "#define HAVE_SHADOW_H 1" >>confdefs.h
8774
8775fi
8776ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
8777if test "x$ac_cv_header_signal_h" = xyes
8778then :
8779 printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
8780
8781fi
8782ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
8783if test "x$ac_cv_header_stropts_h" = xyes
8784then :
8785 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
8786
8787fi
8788ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
8789if test "x$ac_cv_header_termios_h" = xyes
8790then :
8791 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
8792
8793fi
8794ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
8795if test "x$ac_cv_header_utime_h" = xyes
8796then :
8797 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
8798
8799fi
8800ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
8801if test "x$ac_cv_header_poll_h" = xyes
8802then :
8803 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
8804
8805fi
8806ac_fn_c_check_header_compile "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default"
8807if test "x$ac_cv_header_sys_devpoll_h" = xyes
8808then :
8809 printf "%s\n" "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h
8810
8811fi
8812ac_fn_c_check_header_compile "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
8813if test "x$ac_cv_header_sys_epoll_h" = xyes
8814then :
8815 printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h
8816
8817fi
8818ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
8819if test "x$ac_cv_header_sys_poll_h" = xyes
8820then :
8821 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
8822
8823fi
8824ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
8825if test "x$ac_cv_header_sys_audioio_h" = xyes
8826then :
8827 printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h
8828
8829fi
8830ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
8831if test "x$ac_cv_header_sys_xattr_h" = xyes
8832then :
8833 printf "%s\n" "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
8834
8835fi
8836ac_fn_c_check_header_compile "$LINENO" "sys/bsdtty.h" "ac_cv_header_sys_bsdtty_h" "$ac_includes_default"
8837if test "x$ac_cv_header_sys_bsdtty_h" = xyes
8838then :
8839 printf "%s\n" "#define HAVE_SYS_BSDTTY_H 1" >>confdefs.h
8840
8841fi
8842ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
8843if test "x$ac_cv_header_sys_event_h" = xyes
8844then :
8845 printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h
8846
8847fi
8848ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
8849if test "x$ac_cv_header_sys_file_h" = xyes
8850then :
8851 printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
8852
8853fi
8854ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
8855if test "x$ac_cv_header_sys_ioctl_h" = xyes
8856then :
8857 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
8858
8859fi
8860ac_fn_c_check_header_compile "$LINENO" "sys/kern_control.h" "ac_cv_header_sys_kern_control_h" "$ac_includes_default"
8861if test "x$ac_cv_header_sys_kern_control_h" = xyes
8862then :
8863 printf "%s\n" "#define HAVE_SYS_KERN_CONTROL_H 1" >>confdefs.h
8864
8865fi
8866ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
8867if test "x$ac_cv_header_sys_loadavg_h" = xyes
8868then :
8869 printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h
8870
8871fi
8872ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default"
8873if test "x$ac_cv_header_sys_lock_h" = xyes
8874then :
8875 printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h
8876
8877fi
8878ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8879if test "x$ac_cv_header_sys_mkdev_h" = xyes
8880then :
8881 printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h
8882
8883fi
8884ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
8885if test "x$ac_cv_header_sys_modem_h" = xyes
8886then :
8887 printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h
8888
8889fi
8890ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
8891if test "x$ac_cv_header_sys_param_h" = xyes
8892then :
8893 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
8894
8895fi
8896ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
8897if test "x$ac_cv_header_sys_random_h" = xyes
8898then :
8899 printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
8900
8901fi
8902ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
8903if test "x$ac_cv_header_sys_select_h" = xyes
8904then :
8905 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
8906
8907fi
8908ac_fn_c_check_header_compile "$LINENO" "sys/sendfile.h" "ac_cv_header_sys_sendfile_h" "$ac_includes_default"
8909if test "x$ac_cv_header_sys_sendfile_h" = xyes
8910then :
8911 printf "%s\n" "#define HAVE_SYS_SENDFILE_H 1" >>confdefs.h
8912
8913fi
8914ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
8915if test "x$ac_cv_header_sys_socket_h" = xyes
8916then :
8917 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
8918
8919fi
8920ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
8921if test "x$ac_cv_header_sys_statvfs_h" = xyes
8922then :
8923 printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h
8924
8925fi
8926ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
8927if test "x$ac_cv_header_sys_stat_h" = xyes
8928then :
8929 printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
8930
8931fi
8932ac_fn_c_check_header_compile "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default"
8933if test "x$ac_cv_header_sys_syscall_h" = xyes
8934then :
8935 printf "%s\n" "#define HAVE_SYS_SYSCALL_H 1" >>confdefs.h
8936
8937fi
8938ac_fn_c_check_header_compile "$LINENO" "sys/sys_domain.h" "ac_cv_header_sys_sys_domain_h" "$ac_includes_default"
8939if test "x$ac_cv_header_sys_sys_domain_h" = xyes
8940then :
8941 printf "%s\n" "#define HAVE_SYS_SYS_DOMAIN_H 1" >>confdefs.h
8942
8943fi
8944ac_fn_c_check_header_compile "$LINENO" "sys/termio.h" "ac_cv_header_sys_termio_h" "$ac_includes_default"
8945if test "x$ac_cv_header_sys_termio_h" = xyes
8946then :
8947 printf "%s\n" "#define HAVE_SYS_TERMIO_H 1" >>confdefs.h
8948
8949fi
8950ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
8951if test "x$ac_cv_header_sys_time_h" = xyes
8952then :
8953 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
8954
8955fi
8956ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default"
8957if test "x$ac_cv_header_sys_times_h" = xyes
8958then :
8959 printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h
8960
8961fi
8962ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
8963if test "x$ac_cv_header_sys_types_h" = xyes
8964then :
8965 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
8966
8967fi
8968ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
8969if test "x$ac_cv_header_sys_uio_h" = xyes
8970then :
8971 printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
8972
8973fi
8974ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
8975if test "x$ac_cv_header_sys_un_h" = xyes
8976then :
8977 printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
8978
8979fi
8980ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
8981if test "x$ac_cv_header_sys_utsname_h" = xyes
8982then :
8983 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
8984
8985fi
8986ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
8987if test "x$ac_cv_header_sys_wait_h" = xyes
8988then :
8989 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8990
8991fi
8992ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default"
8993if test "x$ac_cv_header_pty_h" = xyes
8994then :
8995 printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h
8996
8997fi
8998ac_fn_c_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default"
8999if test "x$ac_cv_header_libutil_h" = xyes
9000then :
9001 printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h
9002
9003fi
9004ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
9005if test "x$ac_cv_header_sys_resource_h" = xyes
9006then :
9007 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
9008
9009fi
9010ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
9011if test "x$ac_cv_header_netpacket_packet_h" = xyes
9012then :
9013 printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h
9014
9015fi
9016ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
9017if test "x$ac_cv_header_sysexits_h" = xyes
9018then :
9019 printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
9020
9021fi
9022ac_fn_c_check_header_compile "$LINENO" "bluetooth.h" "ac_cv_header_bluetooth_h" "$ac_includes_default"
9023if test "x$ac_cv_header_bluetooth_h" = xyes
9024then :
9025 printf "%s\n" "#define HAVE_BLUETOOTH_H 1" >>confdefs.h
9026
9027fi
9028ac_fn_c_check_header_compile "$LINENO" "linux/tipc.h" "ac_cv_header_linux_tipc_h" "$ac_includes_default"
9029if test "x$ac_cv_header_linux_tipc_h" = xyes
9030then :
9031 printf "%s\n" "#define HAVE_LINUX_TIPC_H 1" >>confdefs.h
9032
9033fi
9034ac_fn_c_check_header_compile "$LINENO" "linux/random.h" "ac_cv_header_linux_random_h" "$ac_includes_default"
9035if test "x$ac_cv_header_linux_random_h" = xyes
9036then :
9037 printf "%s\n" "#define HAVE_LINUX_RANDOM_H 1" >>confdefs.h
9038
9039fi
9040ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default"
9041if test "x$ac_cv_header_spawn_h" = xyes
9042then :
9043 printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h
9044
9045fi
9046ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
9047if test "x$ac_cv_header_util_h" = xyes
9048then :
9049 printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h
9050
9051fi
9052ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default"
9053if test "x$ac_cv_header_alloca_h" = xyes
9054then :
9055 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
9056
9057fi
9058ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default"
9059if test "x$ac_cv_header_endian_h" = xyes
9060then :
9061 printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
9062
9063fi
9064ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default"
9065if test "x$ac_cv_header_sys_endian_h" = xyes
9066then :
9067 printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
9068
9069fi
9070ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9071if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9072then :
9073 printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h
9074
9075fi
9076ac_fn_c_check_header_compile "$LINENO" "linux/memfd.h" "ac_cv_header_linux_memfd_h" "$ac_includes_default"
9077if test "x$ac_cv_header_linux_memfd_h" = xyes
9078then :
9079 printf "%s\n" "#define HAVE_LINUX_MEMFD_H 1" >>confdefs.h
9080
9081fi
9082ac_fn_c_check_header_compile "$LINENO" "linux/wait.h" "ac_cv_header_linux_wait_h" "$ac_includes_default"
9083if test "x$ac_cv_header_linux_wait_h" = xyes
9084then :
9085 printf "%s\n" "#define HAVE_LINUX_WAIT_H 1" >>confdefs.h
9086
9087fi
9088ac_fn_c_check_header_compile "$LINENO" "sys/memfd.h" "ac_cv_header_sys_memfd_h" "$ac_includes_default"
9089if test "x$ac_cv_header_sys_memfd_h" = xyes
9090then :
9091 printf "%s\n" "#define HAVE_SYS_MEMFD_H 1" >>confdefs.h
9092
9093fi
9094ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
9095if test "x$ac_cv_header_sys_mman_h" = xyes
9096then :
9097 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
9098
9099fi
9100ac_fn_c_check_header_compile "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default"
9101if test "x$ac_cv_header_sys_eventfd_h" = xyes
9102then :
9103 printf "%s\n" "#define HAVE_SYS_EVENTFD_H 1" >>confdefs.h
9104
9105fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009107ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009108for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Pablo Galindo53e55292021-04-05 17:38:40 +01009109 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9111printf %s "checking for $ac_hdr that defines DIR... " >&6; }
9112if eval test \${$as_ac_Header+y}
9113then :
9114 printf %s "(cached) " >&6
9115else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009117/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009118#include <sys/types.h>
9119#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00009120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121int
Pablo Galindo53e55292021-04-05 17:38:40 +01009122main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009123{
9124if ((DIR *) 0)
9125return 0;
9126 ;
9127 return 0;
9128}
9129_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01009130if ac_fn_c_try_compile "$LINENO"
9131then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 eval "$as_ac_Header=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +01009133else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009134 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009135fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009136rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138eval ac_res=\$$as_ac_Header
Pablo Galindo53e55292021-04-05 17:38:40 +01009139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9140printf "%s\n" "$ac_res" >&6; }
9141if eval test \"x\$"$as_ac_Header"\" = x"yes"
9142then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 cat >>confdefs.h <<_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01009144#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
9146
9147ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00009148fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009150done
9151# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9152if test $ac_header_dirent = dirent.h; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9154printf %s "checking for library containing opendir... " >&6; }
9155if test ${ac_cv_search_opendir+y}
9156then :
9157 printf %s "(cached) " >&6
9158else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163/* Override any GCC internal prototype to avoid an error.
9164 Use char because int might match the return type of a GCC
9165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009166char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009167int
Pablo Galindo53e55292021-04-05 17:38:40 +01009168main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ;
9172 return 0;
9173}
9174_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01009175for ac_lib in '' dir
9176do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009177 if test -z "$ac_lib"; then
9178 ac_res="none required"
9179 else
9180 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009181 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009183 if ac_fn_c_try_link "$LINENO"
9184then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009186fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009187rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 conftest$ac_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +01009189 if test ${ac_cv_search_opendir+y}
9190then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009193done
Pablo Galindo53e55292021-04-05 17:38:40 +01009194if test ${ac_cv_search_opendir+y}
9195then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009196
Pablo Galindo53e55292021-04-05 17:38:40 +01009197else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198 ac_cv_search_opendir=no
9199fi
9200rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009201LIBS=$ac_func_search_save_LIBS
9202fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9204printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205ac_res=$ac_cv_search_opendir
Pablo Galindo53e55292021-04-05 17:38:40 +01009206if test "$ac_res" != no
9207then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00009209
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009210fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009211
Michael W. Hudson54241132001-12-07 15:38:26 +00009212else
Pablo Galindo53e55292021-04-05 17:38:40 +01009213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9214printf %s "checking for library containing opendir... " >&6; }
9215if test ${ac_cv_search_opendir+y}
9216then :
9217 printf %s "(cached) " >&6
9218else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009223/* Override any GCC internal prototype to avoid an error.
9224 Use char because int might match the return type of a GCC
9225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009226char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009227int
Pablo Galindo53e55292021-04-05 17:38:40 +01009228main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ;
9232 return 0;
9233}
9234_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01009235for ac_lib in '' x
9236do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009237 if test -z "$ac_lib"; then
9238 ac_res="none required"
9239 else
9240 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009241 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242 fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009243 if ac_fn_c_try_link "$LINENO"
9244then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009245 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009246fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009247rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 conftest$ac_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +01009249 if test ${ac_cv_search_opendir+y}
9250then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009251 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253done
Pablo Galindo53e55292021-04-05 17:38:40 +01009254if test ${ac_cv_search_opendir+y}
9255then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009256
Pablo Galindo53e55292021-04-05 17:38:40 +01009257else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258 ac_cv_search_opendir=no
9259fi
9260rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009261LIBS=$ac_func_search_save_LIBS
9262fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9264printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265ac_res=$ac_cv_search_opendir
Pablo Galindo53e55292021-04-05 17:38:40 +01009266if test "$ac_res" != no
9267then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009269
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009270fi
9271
9272fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009273
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009274
Pablo Galindo53e55292021-04-05 17:38:40 +01009275ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
9276if test "x$ac_cv_header_sys_mkdev_h" = xyes
9277then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009278
Pablo Galindo53e55292021-04-05 17:38:40 +01009279printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009280
9281fi
9282
Pablo Galindo53e55292021-04-05 17:38:40 +01009283if test $ac_cv_header_sys_mkdev_h = no; then
9284 ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9285if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9286then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009287
Pablo Galindo53e55292021-04-05 17:38:40 +01009288printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009289
9290fi
9291
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009292fi
9293
Michael W. Hudson54241132001-12-07 15:38:26 +00009294
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009295# bluetooth/bluetooth.h has been known to not compile with -std=c99.
9296# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
9297SAVE_CFLAGS=$CFLAGS
9298CFLAGS="-std=c99 $CFLAGS"
Pablo Galindo53e55292021-04-05 17:38:40 +01009299ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
9300if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes
9301then :
9302 printf "%s\n" "#define HAVE_BLUETOOTH_BLUETOOTH_H 1" >>confdefs.h
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009303
9304fi
9305
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009306CFLAGS=$SAVE_CFLAGS
9307
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009308# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Pablo Galindo53e55292021-04-05 17:38:40 +01009309ac_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 -07009310#ifdef STDC_HEADERS
9311# include <stdlib.h>
9312# include <stddef.h>
9313#else
9314# ifdef HAVE_STDLIB_H
9315# include <stdlib.h>
9316# endif
9317#endif
9318#ifdef HAVE_SYS_SOCKET_H
9319# include <sys/socket.h>
9320#endif
9321
9322"
Pablo Galindo53e55292021-04-05 17:38:40 +01009323if test "x$ac_cv_header_net_if_h" = xyes
9324then :
9325 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009326
9327fi
9328
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009329
Martin v. Löwis11017b12006-01-14 18:12:57 +00009330# On Linux, netlink.h requires asm/types.h
Pablo Galindo53e55292021-04-05 17:38:40 +01009331ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00009332#ifdef HAVE_ASM_TYPES_H
9333#include <asm/types.h>
9334#endif
9335#ifdef HAVE_SYS_SOCKET_H
9336#include <sys/socket.h>
9337#endif
9338
Matthias Kloseb9621712010-04-24 17:59:49 +00009339"
Pablo Galindo53e55292021-04-05 17:38:40 +01009340if test "x$ac_cv_header_linux_netlink_h" = xyes
9341then :
9342 printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00009343
9344fi
9345
Martin v. Löwis11017b12006-01-14 18:12:57 +00009346
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009347# On Linux, qrtr.h requires asm/types.h
Pablo Galindo53e55292021-04-05 17:38:40 +01009348ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009349#ifdef HAVE_ASM_TYPES_H
9350#include <asm/types.h>
9351#endif
9352#ifdef HAVE_SYS_SOCKET_H
9353#include <sys/socket.h>
9354#endif
9355
9356"
Pablo Galindo53e55292021-04-05 17:38:40 +01009357if test "x$ac_cv_header_linux_qrtr_h" = xyes
9358then :
9359 printf "%s\n" "#define HAVE_LINUX_QRTR_H 1" >>confdefs.h
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009360
9361fi
9362
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009363
Pablo Galindo53e55292021-04-05 17:38:40 +01009364ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04009365#ifdef HAVE_SYS_SOCKET_H
9366#include <sys/socket.h>
9367#endif
9368
9369"
Pablo Galindo53e55292021-04-05 17:38:40 +01009370if test "x$ac_cv_header_linux_vm_sockets_h" = xyes
9371then :
9372 printf "%s\n" "#define HAVE_LINUX_VM_SOCKETS_H 1" >>confdefs.h
caaveryeffc12f2017-09-06 18:18:10 -04009373
9374fi
9375
caaveryeffc12f2017-09-06 18:18:10 -04009376
karl ding360371f2020-04-29 15:31:19 -07009377# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Pablo Galindo53e55292021-04-05 17:38:40 +01009378ac_fn_c_check_header_compile "$LINENO" "linux/can.h" "ac_cv_header_linux_can_h" "
Charles-François Natali47413c12011-10-06 19:47:44 +02009379#ifdef HAVE_SYS_SOCKET_H
9380#include <sys/socket.h>
9381#endif
9382
9383"
Pablo Galindo53e55292021-04-05 17:38:40 +01009384if test "x$ac_cv_header_linux_can_h" = xyes
9385then :
9386 printf "%s\n" "#define HAVE_LINUX_CAN_H 1" >>confdefs.h
Charles-François Natali47413c12011-10-06 19:47:44 +02009387
9388fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009389ac_fn_c_check_header_compile "$LINENO" "linux/can/bcm.h" "ac_cv_header_linux_can_bcm_h" "
9390#ifdef HAVE_SYS_SOCKET_H
9391#include <sys/socket.h>
9392#endif
Charles-François Natali47413c12011-10-06 19:47:44 +02009393
Pablo Galindo53e55292021-04-05 17:38:40 +01009394"
9395if test "x$ac_cv_header_linux_can_bcm_h" = xyes
9396then :
9397 printf "%s\n" "#define HAVE_LINUX_CAN_BCM_H 1" >>confdefs.h
9398
9399fi
9400ac_fn_c_check_header_compile "$LINENO" "linux/can/j1939.h" "ac_cv_header_linux_can_j1939_h" "
9401#ifdef HAVE_SYS_SOCKET_H
9402#include <sys/socket.h>
9403#endif
9404
9405"
9406if test "x$ac_cv_header_linux_can_j1939_h" = xyes
9407then :
9408 printf "%s\n" "#define HAVE_LINUX_CAN_J1939_H 1" >>confdefs.h
9409
9410fi
9411ac_fn_c_check_header_compile "$LINENO" "linux/can/raw.h" "ac_cv_header_linux_can_raw_h" "
9412#ifdef HAVE_SYS_SOCKET_H
9413#include <sys/socket.h>
9414#endif
9415
9416"
9417if test "x$ac_cv_header_linux_can_raw_h" = xyes
9418then :
9419 printf "%s\n" "#define HAVE_LINUX_CAN_RAW_H 1" >>confdefs.h
9420
9421fi
Charles-François Natali47413c12011-10-06 19:47:44 +02009422
9423
Guido van Rossum627b2d71993-12-24 10:39:16 +00009424# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00009425was_it_defined=no
Pablo Galindo53e55292021-04-05 17:38:40 +01009426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
9427printf %s "checking for clock_t in time.h... " >&6; }
9428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009431#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009432
9433_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +01009435 $EGREP "clock_t" >/dev/null 2>&1
9436then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00009437 was_it_defined=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01009438else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
9440
Pablo Galindo53e55292021-04-05 17:38:40 +01009441printf "%s\n" "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009442
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009443
Guido van Rossum627b2d71993-12-24 10:39:16 +00009444fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009445rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009446
Pablo Galindo53e55292021-04-05 17:38:40 +01009447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
9448printf "%s\n" "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00009449
Pablo Galindo53e55292021-04-05 17:38:40 +01009450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
9451printf %s "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00009452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009453/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009454
Jesus Cea740f53a2010-04-28 11:35:30 +00009455#if defined(MAJOR_IN_MKDEV)
9456#include <sys/mkdev.h>
9457#elif defined(MAJOR_IN_SYSMACROS)
9458#include <sys/sysmacros.h>
9459#else
9460#include <sys/types.h>
9461#endif
9462
Neal Norwitz11690112002-07-30 01:08:28 +00009463int
Pablo Galindo53e55292021-04-05 17:38:40 +01009464main (void)
Neal Norwitz11690112002-07-30 01:08:28 +00009465{
Jesus Cea740f53a2010-04-28 11:35:30 +00009466
9467 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00009468 ;
9469 return 0;
9470}
Matthias Kloseb159a552010-04-25 21:00:44 +00009471
Neal Norwitz11690112002-07-30 01:08:28 +00009472_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01009473if ac_fn_c_try_link "$LINENO"
9474then :
Neal Norwitz11690112002-07-30 01:08:28 +00009475 ac_cv_has_makedev=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01009476else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00009478fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009479rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01009481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
9482printf "%s\n" "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00009483if test "$ac_cv_has_makedev" = "yes"; then
9484
Pablo Galindo53e55292021-04-05 17:38:40 +01009485printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00009486
9487fi
9488
Christian Heimes985ecdc2013-11-20 11:46:18 +01009489# byte swapping
Pablo Galindo53e55292021-04-05 17:38:40 +01009490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
9491printf %s "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9493/* end confdefs.h. */
9494
9495#ifdef HAVE_ENDIAN_H
9496#include <endian.h>
9497#elif defined(HAVE_SYS_ENDIAN_H)
9498#include <sys/endian.h>
9499#endif
9500
9501int
Pablo Galindo53e55292021-04-05 17:38:40 +01009502main (void)
Christian Heimes985ecdc2013-11-20 11:46:18 +01009503{
9504
9505 le64toh(1)
9506 ;
9507 return 0;
9508}
9509
9510_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01009511if ac_fn_c_try_link "$LINENO"
9512then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01009513 ac_cv_has_le64toh=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01009514else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +01009515 ac_cv_has_le64toh=no
9516fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009517rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimes985ecdc2013-11-20 11:46:18 +01009518 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +01009519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
9520printf "%s\n" "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009521if test "$ac_cv_has_le64toh" = "yes"; then
9522
Pablo Galindo53e55292021-04-05 17:38:40 +01009523printf "%s\n" "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01009524
9525fi
9526
Martin v. Löwis399a6892002-10-04 10:22:02 +00009527use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02009528# Don't use largefile support for GNU/Hurd
9529case $ac_sys_system in GNU*)
9530 use_lfs=no
9531esac
9532
Martin v. Löwis399a6892002-10-04 10:22:02 +00009533if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00009534# Two defines needed to enable largefile support on various platforms
9535# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00009536case $ac_sys_system/$ac_sys_release in
9537AIX*)
9538
Pablo Galindo53e55292021-04-05 17:38:40 +01009539printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00009540
9541 ;;
9542esac
Guido van Rossum810cc512001-09-09 23:51:39 +00009543
Pablo Galindo53e55292021-04-05 17:38:40 +01009544printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009545
9546
Pablo Galindo53e55292021-04-05 17:38:40 +01009547printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00009548
Martin v. Löwis399a6892002-10-04 10:22:02 +00009549fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009550
Guido van Rossum84e7b241996-08-19 21:59:00 +00009551# Add some code to confdefs.h so that the test for off_t works on SCO
9552cat >> confdefs.h <<\EOF
9553#if defined(SCO_DS)
9554#undef _OFF_T
9555#endif
9556EOF
9557
Guido van Rossumef2255b2000-03-10 22:30:29 +00009558# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00009559ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +01009560if test "x$ac_cv_type_mode_t" = xyes
9561then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009562
Pablo Galindo53e55292021-04-05 17:38:40 +01009563else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Pablo Galindo53e55292021-04-05 17:38:40 +01009565printf "%s\n" "#define mode_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009566
9567fi
9568
Matthias Kloseb9621712010-04-24 17:59:49 +00009569ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +01009570if test "x$ac_cv_type_off_t" = xyes
9571then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009572
Pablo Galindo53e55292021-04-05 17:38:40 +01009573else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009574
Pablo Galindo53e55292021-04-05 17:38:40 +01009575printf "%s\n" "#define off_t long int" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +00009576
9577fi
9578
9579
Pablo Galindo53e55292021-04-05 17:38:40 +01009580 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9581"
9582if test "x$ac_cv_type_pid_t" = xyes
9583then :
9584
9585else $as_nop
9586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9587/* end confdefs.h. */
9588
9589 #if defined _WIN64 && !defined __CYGWIN__
9590 LLP64
9591 #endif
9592
9593int
9594main (void)
9595{
9596
9597 ;
9598 return 0;
9599}
9600
Christian Heimes32eba612021-03-19 10:29:25 +01009601_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +01009602if ac_fn_c_try_compile "$LINENO"
9603then :
9604 ac_pid_type='int'
9605else $as_nop
9606 ac_pid_type='__int64'
9607fi
9608rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9609
9610printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
9611
9612
9613fi
9614
9615
9616
9617printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009618
Matthias Kloseb9621712010-04-24 17:59:49 +00009619ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +01009620if test "x$ac_cv_type_size_t" = xyes
9621then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009622
Pablo Galindo53e55292021-04-05 17:38:40 +01009623else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
Pablo Galindo53e55292021-04-05 17:38:40 +01009625printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009626
9627fi
9628
Pablo Galindo53e55292021-04-05 17:38:40 +01009629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9630printf %s "checking for uid_t in sys/types.h... " >&6; }
9631if test ${ac_cv_type_uid_t+y}
9632then :
9633 printf %s "(cached) " >&6
9634else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009637#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009638
9639_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +01009641 $EGREP "uid_t" >/dev/null 2>&1
9642then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009643 ac_cv_type_uid_t=yes
Pablo Galindo53e55292021-04-05 17:38:40 +01009644else $as_nop
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009645 ac_cv_type_uid_t=no
9646fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009647rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009648
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009649fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9651printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00009652if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009653
Pablo Galindo53e55292021-04-05 17:38:40 +01009654printf "%s\n" "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009655
9656
Pablo Galindo53e55292021-04-05 17:38:40 +01009657printf "%s\n" "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009658
9659fi
9660
Mark Dickinson983bc162012-12-02 12:11:38 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +01009663if test "x$ac_cv_type_ssize_t" = xyes
9664then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665
Pablo Galindo53e55292021-04-05 17:38:40 +01009666printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00009667
9668fi
9669
Stefan Krah1919b7e2012-03-21 18:25:23 +01009670ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +01009671if test "x$ac_cv_type___uint128_t" = xyes
9672then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01009673
Pablo Galindo53e55292021-04-05 17:38:40 +01009674printf "%s\n" "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01009675
9676fi
9677
Jack Jansendd19cf82001-12-06 22:36:17 +00009678
Jessica Clarkedec07572021-03-31 11:12:39 +01009679# Sizes and alignments of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00009680# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681# The cast to long int works around a bug in the HP C Compiler
9682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9684# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9686printf %s "checking size of int... " >&6; }
9687if test ${ac_cv_sizeof_int+y}
9688then :
9689 printf %s "(cached) " >&6
9690else $as_nop
9691 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
9692then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009693
Pablo Galindo53e55292021-04-05 17:38:40 +01009694else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 if test "$ac_cv_type_int" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009696 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9697printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009698as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02009699See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009700 else
9701 ac_cv_sizeof_int=0
9702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009704
Martin v. Löwis11437992002-04-12 09:54:03 +00009705fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9707printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708
9709
9710
Pablo Galindo53e55292021-04-05 17:38:40 +01009711printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009712
9713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714# The cast to long int works around a bug in the HP C Compiler
9715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9717# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9719printf %s "checking size of long... " >&6; }
9720if test ${ac_cv_sizeof_long+y}
9721then :
9722 printf %s "(cached) " >&6
9723else $as_nop
9724 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
9725then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
Pablo Galindo53e55292021-04-05 17:38:40 +01009727else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 if test "$ac_cv_type_long" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009729 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9730printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009731as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02009732See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733 else
9734 ac_cv_sizeof_long=0
9735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009737
Martin v. Löwis11437992002-04-12 09:54:03 +00009738fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9740printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741
9742
9743
Pablo Galindo53e55292021-04-05 17:38:40 +01009744printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009745
9746
Jessica Clarkedec07572021-03-31 11:12:39 +01009747# The cast to long int works around a bug in the HP C Compiler,
9748# see AC_CHECK_SIZEOF for more information.
Pablo Galindo53e55292021-04-05 17:38:40 +01009749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
9750printf %s "checking alignment of long... " >&6; }
9751if test ${ac_cv_alignof_long+y}
9752then :
9753 printf %s "(cached) " >&6
9754else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +01009755 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
Pablo Galindo53e55292021-04-05 17:38:40 +01009756typedef struct { char x; long y; } ac__type_alignof_;"
9757then :
Jessica Clarkedec07572021-03-31 11:12:39 +01009758
Pablo Galindo53e55292021-04-05 17:38:40 +01009759else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +01009760 if test "$ac_cv_type_long" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009761 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9762printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01009763as_fn_error 77 "cannot compute alignment of long
9764See \`config.log' for more details" "$LINENO" 5; }
9765 else
9766 ac_cv_alignof_long=0
9767 fi
9768fi
9769
9770fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
9772printf "%s\n" "$ac_cv_alignof_long" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01009773
9774
9775
Pablo Galindo53e55292021-04-05 17:38:40 +01009776printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h
Jessica Clarkedec07572021-03-31 11:12:39 +01009777
9778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779# The cast to long int works around a bug in the HP C Compiler
9780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9782# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9784printf %s "checking size of long long... " >&6; }
9785if test ${ac_cv_sizeof_long_long+y}
9786then :
9787 printf %s "(cached) " >&6
9788else $as_nop
9789 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
9790then :
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009791
Pablo Galindo53e55292021-04-05 17:38:40 +01009792else $as_nop
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009793 if test "$ac_cv_type_long_long" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009794 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9795printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009796as_fn_error 77 "cannot compute sizeof (long long)
9797See \`config.log' for more details" "$LINENO" 5; }
9798 else
9799 ac_cv_sizeof_long_long=0
9800 fi
9801fi
9802
9803fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9805printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009806
9807
9808
Pablo Galindo53e55292021-04-05 17:38:40 +01009809printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009810
9811
9812# The cast to long int works around a bug in the HP C Compiler
9813# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9814# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9815# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
9817printf %s "checking size of void *... " >&6; }
9818if test ${ac_cv_sizeof_void_p+y}
9819then :
9820 printf %s "(cached) " >&6
9821else $as_nop
9822 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
9823then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
Pablo Galindo53e55292021-04-05 17:38:40 +01009825else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 if test "$ac_cv_type_void_p" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009827 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9828printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009829as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02009830See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 else
9832 ac_cv_sizeof_void_p=0
9833 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009835
Martin v. Löwis11437992002-04-12 09:54:03 +00009836fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
9838printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839
9840
9841
Pablo Galindo53e55292021-04-05 17:38:40 +01009842printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009843
9844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845# The cast to long int works around a bug in the HP C Compiler
9846# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9847# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9848# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9850printf %s "checking size of short... " >&6; }
9851if test ${ac_cv_sizeof_short+y}
9852then :
9853 printf %s "(cached) " >&6
9854else $as_nop
9855 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
9856then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009857
Pablo Galindo53e55292021-04-05 17:38:40 +01009858else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 if test "$ac_cv_type_short" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009860 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9861printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009862as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02009863See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 else
9865 ac_cv_sizeof_short=0
9866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009868
Martin v. Löwis11437992002-04-12 09:54:03 +00009869fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9871printf "%s\n" "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872
9873
9874
Pablo Galindo53e55292021-04-05 17:38:40 +01009875printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009876
9877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878# The cast to long int works around a bug in the HP C Compiler
9879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9881# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
9883printf %s "checking size of float... " >&6; }
9884if test ${ac_cv_sizeof_float+y}
9885then :
9886 printf %s "(cached) " >&6
9887else $as_nop
9888 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"
9889then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009890
Pablo Galindo53e55292021-04-05 17:38:40 +01009891else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 if test "$ac_cv_type_float" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009893 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9894printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009895as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02009896See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 else
9898 ac_cv_sizeof_float=0
9899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901
Martin v. Löwis11437992002-04-12 09:54:03 +00009902fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
9904printf "%s\n" "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905
9906
9907
Pablo Galindo53e55292021-04-05 17:38:40 +01009908printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009909
9910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911# The cast to long int works around a bug in the HP C Compiler
9912# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9913# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9914# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
9916printf %s "checking size of double... " >&6; }
9917if test ${ac_cv_sizeof_double+y}
9918then :
9919 printf %s "(cached) " >&6
9920else $as_nop
9921 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
9922then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009923
Pablo Galindo53e55292021-04-05 17:38:40 +01009924else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 if test "$ac_cv_type_double" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009926 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9927printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009928as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009929See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930 else
9931 ac_cv_sizeof_double=0
9932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009934
Martin v. Löwis11437992002-04-12 09:54:03 +00009935fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
9937printf "%s\n" "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938
9939
9940
Pablo Galindo53e55292021-04-05 17:38:40 +01009941printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009942
9943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944# The cast to long int works around a bug in the HP C Compiler
9945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9947# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
9949printf %s "checking size of fpos_t... " >&6; }
9950if test ${ac_cv_sizeof_fpos_t+y}
9951then :
9952 printf %s "(cached) " >&6
9953else $as_nop
9954 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"
9955then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009956
Pablo Galindo53e55292021-04-05 17:38:40 +01009957else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 if test "$ac_cv_type_fpos_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009959 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9960printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009961as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009962See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963 else
9964 ac_cv_sizeof_fpos_t=0
9965 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967
Martin v. Löwis11437992002-04-12 09:54:03 +00009968fi
Pablo Galindo53e55292021-04-05 17:38:40 +01009969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
9970printf "%s\n" "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971
9972
9973
Pablo Galindo53e55292021-04-05 17:38:40 +01009974printf "%s\n" "#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009975
Michael W. Hudson54241132001-12-07 15:38:26 +00009976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977# The cast to long int works around a bug in the HP C Compiler
9978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9980# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +01009981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
9982printf %s "checking size of size_t... " >&6; }
9983if test ${ac_cv_sizeof_size_t+y}
9984then :
9985 printf %s "(cached) " >&6
9986else $as_nop
9987 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
9988then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00009989
Pablo Galindo53e55292021-04-05 17:38:40 +01009990else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +01009992 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9993printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009994as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009995See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 else
9997 ac_cv_sizeof_size_t=0
9998 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00009999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010000
Martin v. Löwis18e16552006-02-15 17:27:45 +000010001fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
10003printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004
10005
10006
Pablo Galindo53e55292021-04-05 17:38:40 +010010007printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +000010008
10009
Jessica Clarkedec07572021-03-31 11:12:39 +010010010# The cast to long int works around a bug in the HP C Compiler,
10011# see AC_CHECK_SIZEOF for more information.
Pablo Galindo53e55292021-04-05 17:38:40 +010010012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5
10013printf %s "checking alignment of size_t... " >&6; }
10014if test ${ac_cv_alignof_size_t+y}
10015then :
10016 printf %s "(cached) " >&6
10017else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +010010018 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
Pablo Galindo53e55292021-04-05 17:38:40 +010010019typedef struct { char x; size_t y; } ac__type_alignof_;"
10020then :
Jessica Clarkedec07572021-03-31 11:12:39 +010010021
Pablo Galindo53e55292021-04-05 17:38:40 +010010022else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +010010023 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010024 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10025printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +010010026as_fn_error 77 "cannot compute alignment of size_t
10027See \`config.log' for more details" "$LINENO" 5; }
10028 else
10029 ac_cv_alignof_size_t=0
10030 fi
10031fi
10032
10033fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
10035printf "%s\n" "$ac_cv_alignof_size_t" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +010010036
10037
10038
Pablo Galindo53e55292021-04-05 17:38:40 +010010039printf "%s\n" "#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t" >>confdefs.h
Jessica Clarkedec07572021-03-31 11:12:39 +010010040
10041
Christian Heimes400adb02008-02-01 08:12:03 +000010042# The cast to long int works around a bug in the HP C Compiler
10043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10045# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
10047printf %s "checking size of pid_t... " >&6; }
10048if test ${ac_cv_sizeof_pid_t+y}
10049then :
10050 printf %s "(cached) " >&6
10051else $as_nop
10052 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"
10053then :
Christian Heimes400adb02008-02-01 08:12:03 +000010054
Pablo Galindo53e55292021-04-05 17:38:40 +010010055else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 if test "$ac_cv_type_pid_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010057 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10058printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010059as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010060See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +000010061 else
10062 ac_cv_sizeof_pid_t=0
10063 fi
10064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010065
Christian Heimes400adb02008-02-01 08:12:03 +000010066fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
10068printf "%s\n" "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010069
10070
10071
Pablo Galindo53e55292021-04-05 17:38:40 +010010072printf "%s\n" "#define SIZEOF_PID_T $ac_cv_sizeof_pid_t" >>confdefs.h
Christian Heimes400adb02008-02-01 08:12:03 +000010073
10074
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010075# The cast to long int works around a bug in the HP C Compiler
10076# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10077# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10078# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
10080printf %s "checking size of uintptr_t... " >&6; }
10081if test ${ac_cv_sizeof_uintptr_t+y}
10082then :
10083 printf %s "(cached) " >&6
10084else $as_nop
10085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"
10086then :
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010087
Pablo Galindo53e55292021-04-05 17:38:40 +010010088else $as_nop
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010089 if test "$ac_cv_type_uintptr_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010090 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10091printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010092as_fn_error 77 "cannot compute sizeof (uintptr_t)
10093See \`config.log' for more details" "$LINENO" 5; }
10094 else
10095 ac_cv_sizeof_uintptr_t=0
10096 fi
10097fi
10098
10099fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
10101printf "%s\n" "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010102
10103
10104
Pablo Galindo53e55292021-04-05 17:38:40 +010010105printf "%s\n" "#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t" >>confdefs.h
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010106
10107
Michael W. Hudson54241132001-12-07 15:38:26 +000010108
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010109
Pablo Galindo53e55292021-04-05 17:38:40 +010010110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
10111printf %s "checking for long double... " >&6; }
10112if test ${ac_cv_type_long_double+y}
10113then :
10114 printf %s "(cached) " >&6
10115else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010116 if test "$GCC" = yes; then
10117 ac_cv_type_long_double=yes
10118 else
10119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10120/* end confdefs.h. */
10121/* The Stardent Vistra knows sizeof (long double), but does
10122 not support it. */
10123 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010124int
Pablo Galindo53e55292021-04-05 17:38:40 +010010125main (void)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010126{
Eitan Adler3055c942018-05-15 22:58:09 -070010127static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
10128 sizeof (double) <= sizeof (long double))];
10129test_array [0] = 0;
10130return test_array [0];
10131
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010132 ;
10133 return 0;
10134}
10135_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010010136if ac_fn_c_try_compile "$LINENO"
10137then :
Eitan Adler3055c942018-05-15 22:58:09 -070010138 ac_cv_type_long_double=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010010139else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010140 ac_cv_type_long_double=no
10141fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010142rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -070010143 fi
10144fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
10146printf "%s\n" "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -070010147 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010148
Pablo Galindo53e55292021-04-05 17:38:40 +010010149printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010150
Eitan Adler3055c942018-05-15 22:58:09 -070010151 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010152
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010153# The cast to long int works around a bug in the HP C Compiler
10154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10156# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
10158printf %s "checking size of long double... " >&6; }
10159if test ${ac_cv_sizeof_long_double+y}
10160then :
10161 printf %s "(cached) " >&6
10162else $as_nop
10163 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
10164then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010165
Pablo Galindo53e55292021-04-05 17:38:40 +010010166else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 if test "$ac_cv_type_long_double" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010168 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10169printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010170as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +020010171See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010172 else
10173 ac_cv_sizeof_long_double=0
10174 fi
10175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010176
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010177fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
10179printf "%s\n" "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010180
10181
10182
Pablo Galindo53e55292021-04-05 17:38:40 +010010183printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010184
10185
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187# The cast to long int works around a bug in the HP C Compiler
10188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10189# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10190# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
10192printf %s "checking size of _Bool... " >&6; }
10193if test ${ac_cv_sizeof__Bool+y}
10194then :
10195 printf %s "(cached) " >&6
10196else $as_nop
10197 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"
10198then :
Thomas Woutersb2137042007-02-01 18:02:27 +000010199
Pablo Galindo53e55292021-04-05 17:38:40 +010010200else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 if test "$ac_cv_type__Bool" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010202 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10203printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010204as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +020010205See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206 else
10207 ac_cv_sizeof__Bool=0
10208 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000010209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010210
Thomas Woutersb2137042007-02-01 18:02:27 +000010211fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
10213printf "%s\n" "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214
10215
10216
Pablo Galindo53e55292021-04-05 17:38:40 +010010217printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +000010218
10219
Thomas Woutersb2137042007-02-01 18:02:27 +000010220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010221# The cast to long int works around a bug in the HP C Compiler
10222# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10223# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10224# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
10226printf %s "checking size of off_t... " >&6; }
10227if test ${ac_cv_sizeof_off_t+y}
10228then :
10229 printf %s "(cached) " >&6
10230else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010232#ifdef HAVE_SYS_TYPES_H
10233#include <sys/types.h>
10234#endif
10235
Pablo Galindo53e55292021-04-05 17:38:40 +010010236"
10237then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010238
Pablo Galindo53e55292021-04-05 17:38:40 +010010239else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 if test "$ac_cv_type_off_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010241 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10242printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010243as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010244See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010245 else
10246 ac_cv_sizeof_off_t=0
10247 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010249
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010250fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
10252printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010254
10255
Pablo Galindo53e55292021-04-05 17:38:40 +010010256printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010257
Michael W. Hudson54241132001-12-07 15:38:26 +000010258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010259
Pablo Galindo53e55292021-04-05 17:38:40 +010010260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
10261printf %s "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000010262if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010263 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010264
Pablo Galindo53e55292021-04-05 17:38:40 +010010265printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010266
Pablo Galindo53e55292021-04-05 17:38:40 +010010267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10268printf "%s\n" "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010269else
Pablo Galindo53e55292021-04-05 17:38:40 +010010270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271printf "%s\n" "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010272fi
10273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010274# The cast to long int works around a bug in the HP C Compiler
10275# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10276# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10277# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10279printf %s "checking size of time_t... " >&6; }
10280if test ${ac_cv_sizeof_time_t+y}
10281then :
10282 printf %s "(cached) " >&6
10283else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010285#ifdef HAVE_SYS_TYPES_H
10286#include <sys/types.h>
10287#endif
10288#ifdef HAVE_TIME_H
10289#include <time.h>
10290#endif
10291
Pablo Galindo53e55292021-04-05 17:38:40 +010010292"
10293then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010294
Pablo Galindo53e55292021-04-05 17:38:40 +010010295else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 if test "$ac_cv_type_time_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010297 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10298printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010299as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010300See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010301 else
10302 ac_cv_sizeof_time_t=0
10303 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010305
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010306fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10308printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010309
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010310
10311
Pablo Galindo53e55292021-04-05 17:38:40 +010010312printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010313
Michael W. Hudson54241132001-12-07 15:38:26 +000010314
10315
Trent Mick635f6fb2000-08-23 21:33:05 +000010316# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010317ac_save_cc="$CC"
10318if test "$ac_cv_kpthread" = "yes"
10319then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010320elif test "$ac_cv_kthread" = "yes"
10321then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010322elif test "$ac_cv_pthread" = "yes"
10323then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010324fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010325
Pablo Galindo53e55292021-04-05 17:38:40 +010010326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
10327printf %s "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010328have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010330/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010331
10332 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010333int
Pablo Galindo53e55292021-04-05 17:38:40 +010010334main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010335{
Guido van Rossum12580492000-09-24 16:47:19 +000010336pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 ;
10338 return 0;
10339}
Matthias Kloseb159a552010-04-25 21:00:44 +000010340
Martin v. Löwis11437992002-04-12 09:54:03 +000010341_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010010342if ac_fn_c_try_compile "$LINENO"
10343then :
Trent Mick635f6fb2000-08-23 21:33:05 +000010344 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +000010345fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010346rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
10348printf "%s\n" "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010349if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10353# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
10355printf %s "checking size of pthread_t... " >&6; }
10356if test ${ac_cv_sizeof_pthread_t+y}
10357then :
10358 printf %s "(cached) " >&6
10359else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010361#ifdef HAVE_PTHREAD_H
10362#include <pthread.h>
10363#endif
10364
Pablo Galindo53e55292021-04-05 17:38:40 +010010365"
10366then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010367
Pablo Galindo53e55292021-04-05 17:38:40 +010010368else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 if test "$ac_cv_type_pthread_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010370 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10371printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010372as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010373See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010374 else
10375 ac_cv_sizeof_pthread_t=0
10376 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000010377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378
Trent Mick635f6fb2000-08-23 21:33:05 +000010379fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010380{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
10381printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010382
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010383
10384
Pablo Galindo53e55292021-04-05 17:38:40 +010010385printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
Trent Mick635f6fb2000-08-23 21:33:05 +000010386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010387
Trent Mick635f6fb2000-08-23 21:33:05 +000010388fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010389
10390# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
10391# This checking will be unnecessary after removing deprecated TLS API.
10392# The cast to long int works around a bug in the HP C Compiler
10393# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10394# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10395# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010010396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
10397printf %s "checking size of pthread_key_t... " >&6; }
10398if test ${ac_cv_sizeof_pthread_key_t+y}
10399then :
10400 printf %s "(cached) " >&6
10401else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010402 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Pablo Galindo53e55292021-04-05 17:38:40 +010010403"
10404then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010405
Pablo Galindo53e55292021-04-05 17:38:40 +010010406else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010407 if test "$ac_cv_type_pthread_key_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010010408 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10409printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010410as_fn_error 77 "cannot compute sizeof (pthread_key_t)
10411See \`config.log' for more details" "$LINENO" 5; }
10412 else
10413 ac_cv_sizeof_pthread_key_t=0
10414 fi
10415fi
10416
10417fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
10419printf "%s\n" "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010420
10421
10422
Pablo Galindo53e55292021-04-05 17:38:40 +010010423printf "%s\n" "#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010424
10425
Pablo Galindo53e55292021-04-05 17:38:40 +010010426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
10427printf %s "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010428if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
10429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10430/* end confdefs.h. */
10431#include <pthread.h>
10432int
Pablo Galindo53e55292021-04-05 17:38:40 +010010433main (void)
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010434{
10435pthread_key_t k; k * 1;
10436 ;
10437 return 0;
10438}
10439_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010010440if ac_fn_c_try_compile "$LINENO"
10441then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010442 ac_pthread_key_t_is_arithmetic_type=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010010443else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010444 ac_pthread_key_t_is_arithmetic_type=no
10445
10446fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010447rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
10449printf "%s\n" "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010450 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
10451
Pablo Galindo53e55292021-04-05 17:38:40 +010010452printf "%s\n" "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010453
10454 fi
10455else
Pablo Galindo53e55292021-04-05 17:38:40 +010010456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10457printf "%s\n" "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010458fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010459CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010460
Michael W. Hudson54241132001-12-07 15:38:26 +000010461
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010462case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010463 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010464 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10465 ;;
10466 Darwin/*)
10467 OTHER_LIBTOOL_OPT=""
10468 ;;
10469esac
10470
10471
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010472
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010473case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010474 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010475 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
10476 if test "${enable_universalsdk}"; then
10477 :
10478 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010479 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000010480 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000010481 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010482 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010483 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000010484 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010485 if test ${gcc_version} '<' 4.0
10486 then
10487 LIBTOOL_CRUFT="-lcc_dynamic"
10488 else
10489 LIBTOOL_CRUFT=""
10490 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010491 if test "$cross_compiling" = yes
10492then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010493 ac_osx_32bit=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010010494else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010496/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010497
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010498 #include <unistd.h>
10499 int main(int argc, char*argv[])
10500 {
10501 if (sizeof(long) == 4) {
10502 return 0;
10503 } else {
10504 return 1;
10505 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010506 }
10507
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010508_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010010509if ac_fn_c_try_run "$LINENO"
10510then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010511 ac_osx_32bit=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010010512else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010517fi
10518
10519
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010520 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010521 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010522 i386)
10523 MACOSX_DEFAULT_ARCH="i386"
10524 ;;
10525 ppc)
10526 MACOSX_DEFAULT_ARCH="ppc"
10527 ;;
10528 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010529 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010530 ;;
10531 esac
10532 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010533 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010534 i386)
10535 MACOSX_DEFAULT_ARCH="x86_64"
10536 ;;
10537 ppc)
10538 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +010010539 ;;
10540 arm64)
10541 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010542 ;;
10543 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010544 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010545 ;;
10546 esac
10547
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010548 fi
10549
10550 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000010551 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010552 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010553esac
Pablo Galindo53e55292021-04-05 17:38:40 +010010554{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
10555printf %s "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010556if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010557then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010558 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010560 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010561
Pablo Galindo53e55292021-04-05 17:38:40 +010010562printf "%s\n" "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010563
Pablo Galindo53e55292021-04-05 17:38:40 +010010564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10565printf "%s\n" "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000010566 if test $enable_shared = "yes"
10567 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010568 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 +000010569 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010570else
Pablo Galindo53e55292021-04-05 17:38:40 +010010571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572printf "%s\n" "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010573fi
10574
Pablo Galindo53e55292021-04-05 17:38:40 +010010575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
10576printf %s "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010577case $ac_sys_system/$ac_sys_release in
10578 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010579
Pablo Galindo53e55292021-04-05 17:38:40 +010010580printf "%s\n" "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010581
Pablo Galindo53e55292021-04-05 17:38:40 +010010582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
10583printf "%s\n" "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010584 ;;
10585 *)
Pablo Galindo53e55292021-04-05 17:38:40 +010010586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587printf "%s\n" "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010588 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010589esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010590
Guido van Rossum0a516c91994-09-12 10:58:40 +000010591# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010592
Michael W. Hudson54241132001-12-07 15:38:26 +000010593
10594
10595
10596
Benjamin Peterson99f03762010-04-11 22:15:28 +000010597
Thomas Wouters477c8d52006-05-27 19:21:47 +000010598
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010599# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
10600# -- usually .so, .sl on HP-UX, .dll on Cygwin
Pablo Galindo53e55292021-04-05 17:38:40 +010010601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
10602printf %s "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010603if test -z "$SHLIB_SUFFIX"; then
10604 case $ac_sys_system in
10605 hp*|HP*)
10606 case `uname -m` in
10607 ia64) SHLIB_SUFFIX=.so;;
10608 *) SHLIB_SUFFIX=.sl;;
10609 esac
10610 ;;
10611 CYGWIN*) SHLIB_SUFFIX=.dll;;
10612 *) SHLIB_SUFFIX=.so;;
10613 esac
10614fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
10616printf "%s\n" "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010617
Guido van Rossum0a516c91994-09-12 10:58:40 +000010618# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -070010619# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010620# (Shared libraries in this instance are shared modules to be loaded into
10621# Python, as opposed to building Python itself as a shared library.)
Pablo Galindo53e55292021-04-05 17:38:40 +010010622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
10623printf %s "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010624if test -z "$LDSHARED"
10625then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010626 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010627 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +000010628 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +000010629 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010630 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010632 if test "$GCC" = "yes" ; then
10633 LDSHARED='$(CC) -shared'
10634 LDCXXSHARED='$(CXX) -shared'
10635 else
10636 LDSHARED='$(CC) -G'
10637 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +000010638 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010639 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010640 if test "$GCC" = "yes" ; then
10641 LDSHARED='$(CC) -shared'
10642 LDCXXSHARED='$(CXX) -shared'
10643 else
Rob Boehne9d25bd12017-12-06 11:58:17 -060010644 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010645 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010646 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +000010647 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010648 LDSHARED='$(CC) -bundle'
10649 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000010650 if test "$enable_framework" ; then
10651 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010652 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10653 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010654 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010655 else
10656 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010657 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +000010658 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010659 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010660 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010661 LDSHARED='$(CC) -bundle'
10662 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000010663 if test "$enable_framework" ; then
10664 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010665 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10666 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010667 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010668 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010669 # No framework, use the Python app as bundle-loader
10670 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010671 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010672 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010673 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010674 Darwin/*)
10675 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10676 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000010677
Ned Deily36820b62014-06-25 13:44:22 -070010678 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10679 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
10680 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10681 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
10682 if test ${dep_target_major} -eq 10 && \
10683 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +000010684 then
Ned Deily36820b62014-06-25 13:44:22 -070010685 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +000010686 LDSHARED='$(CC) -bundle'
10687 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000010688 if test "$enable_framework" ; then
10689 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010690 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10691 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010692 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010693 else
10694 # No framework, use the Python app as bundle-loader
10695 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10696 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010697 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010698 fi
Ned Deily36820b62014-06-25 13:44:22 -070010699 else
10700 # building for OS X 10.3 and later
10701 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
10702 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
10703 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010704 fi
10705 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010706 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010707 LDSHARED='$(CC) -shared'
10708 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010709 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010710 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010711 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010712 LDSHARED='$(CC) -shared'
10713 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +000010714 else
Antoine Pitroud4958c22010-10-13 17:01:10 +000010715 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010716 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010717 OpenBSD*)
10718 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10719 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010720 LDSHARED='$(CC) -shared $(CCSHARED)'
10721 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010722 else
10723 case `uname -r` in
10724 [01].* | 2.[0-7] | 2.[0-7].*)
10725 LDSHARED="ld -Bshareable ${LDFLAGS}"
10726 ;;
10727 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010728 LDSHARED='$(CC) -shared $(CCSHARED)'
10729 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010730 ;;
10731 esac
10732 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010733 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +000010734 LDSHARED='$(CC) -shared'
10735 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010736 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010737 if test "$GCC" = "yes" ; then
10738 LDSHARED='$(CC) -shared'
10739 LDCXXSHARED='$(CXX) -shared'
10740 else
10741 LDSHARED='$(CC) -G'
10742 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010743 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010744 SCO_SV*)
10745 LDSHARED='$(CC) -Wl,-G,-Bexport'
10746 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
10747 CYGWIN*)
10748 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
10749 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010750 *) LDSHARED="ld";;
10751 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010752fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
10754printf "%s\n" "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +000010755LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010756BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010757# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010758# library (module) -- this is only needed for a few systems
Pablo Galindo53e55292021-04-05 17:38:40 +010010759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
10760printf %s "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010761if test -z "$CCSHARED"
10762then
Guido van Rossum07397971997-04-29 21:49:50 +000010763 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010764 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010765 then CCSHARED="-fPIC";
10766 elif test `uname -p` = sparc;
10767 then CCSHARED="-xcode=pic32";
10768 else CCSHARED="-Kpic";
10769 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010770 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010771 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010772 else CCSHARED="+z";
10773 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010774 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010775 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010776 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010777 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010778 if test "$GCC" = "yes"
10779 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010780 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010781 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010782 SCO_SV*)
10783 if test "$GCC" = "yes"
10784 then CCSHARED="-fPIC"
10785 else CCSHARED="-Kpic -belf"
10786 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010787 VxWorks*)
10788 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +000010789 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010790fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
10792printf "%s\n" "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010793# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010794# the python executable -- this is only needed for a few systems
Pablo Galindo53e55292021-04-05 17:38:40 +010010795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
10796printf %s "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010797if test -z "$LINKFORSHARED"
10798then
Guido van Rossum07397971997-04-29 21:49:50 +000010799 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010800 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010801 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010802 LINKFORSHARED="-Wl,-E -Wl,+s";;
10803# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010804 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010805 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010806 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010807 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000010808 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -040010809
10810 # Issue #18075: the default maximum stack size (8MBytes) is too
10811 # small for the default recursion limit. Increase the stack size
10812 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +020010813 # Note: This matches the value of THREAD_STACK_SIZE in
10814 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -040010815 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
10816
Jack Jansene578a632001-08-15 01:27:14 +000010817 if test "$enable_framework"
10818 then
Jack Jansenda49e192005-01-07 13:08:22 +000010819 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010820 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010821 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010822 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010823 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010824 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010825 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010826 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10827 then
10828 LINKFORSHARED="-Wl,--export-dynamic"
10829 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010830 SunOS/5*) case $CC in
10831 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010832 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010833 then
10834 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010835 fi;;
10836 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010837 CYGWIN*)
10838 if test $enable_shared = "no"
10839 then
10840 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10841 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000010842 QNX*)
10843 # -Wl,-E causes the symbols to be added to the dynamic
10844 # symbol table so that they can be found when a module
10845 # is loaded. -N 2048K causes the stack size to be set
10846 # to 2048 kilobytes so that the stack doesn't overflow
10847 # when running test_compile.py.
10848 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +080010849 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +080010850 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010851 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010852fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
10854printf "%s\n" "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010855
Michael W. Hudson54241132001-12-07 15:38:26 +000010856
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010857
Pablo Galindo53e55292021-04-05 17:38:40 +010010858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
10859printf %s "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010860if test ! "$LIBRARY" = "$LDLIBRARY"
10861then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010862 case $ac_sys_system in
10863 CYGWIN*)
10864 # Cygwin needs CCSHARED when building extension DLLs
10865 # but not when building the interpreter DLL.
10866 CFLAGSFORSHARED='';;
10867 *)
10868 CFLAGSFORSHARED='$(CCSHARED)'
10869 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010870fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010871{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
10872printf "%s\n" "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010873
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010874# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10875# library (with --enable-shared).
10876# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010877# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10878# if it is not required, since it creates a dependency of the shared library
10879# to LIBS. This, in turn, means that applications linking the shared libpython
10880# don't need to link LIBS explicitly. The default should be only changed
10881# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010882
Pablo Galindo53e55292021-04-05 17:38:40 +010010883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
10884printf %s "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010885case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010886 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010887 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010888esac
Pablo Galindo53e55292021-04-05 17:38:40 +010010889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
10890printf "%s\n" "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010891
10892
Guido van Rossum627b2d71993-12-24 10:39:16 +000010893# checks for libraries
Pablo Galindo53e55292021-04-05 17:38:40 +010010894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
10895printf %s "checking for sendfile in -lsendfile... " >&6; }
10896if test ${ac_cv_lib_sendfile_sendfile+y}
10897then :
10898 printf %s "(cached) " >&6
10899else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010900 ac_check_lib_save_LIBS=$LIBS
10901LIBS="-lsendfile $LIBS"
10902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10903/* end confdefs.h. */
10904
10905/* Override any GCC internal prototype to avoid an error.
10906 Use char because int might match the return type of a GCC
10907 builtin and then its argument prototype would still apply. */
Georg Brandl941f9562011-02-25 15:21:47 +000010908char sendfile ();
10909int
Pablo Galindo53e55292021-04-05 17:38:40 +010010910main (void)
Georg Brandl941f9562011-02-25 15:21:47 +000010911{
10912return sendfile ();
10913 ;
10914 return 0;
10915}
10916_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010010917if ac_fn_c_try_link "$LINENO"
10918then :
Georg Brandl941f9562011-02-25 15:21:47 +000010919 ac_cv_lib_sendfile_sendfile=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010010920else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010921 ac_cv_lib_sendfile_sendfile=no
10922fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010923rm -f core conftest.err conftest.$ac_objext conftest.beam \
Georg Brandl941f9562011-02-25 15:21:47 +000010924 conftest$ac_exeext conftest.$ac_ext
10925LIBS=$ac_check_lib_save_LIBS
10926fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
10928printf "%s\n" "$ac_cv_lib_sendfile_sendfile" >&6; }
10929if test "x$ac_cv_lib_sendfile_sendfile" = xyes
10930then :
10931 printf "%s\n" "#define HAVE_LIBSENDFILE 1" >>confdefs.h
Georg Brandl941f9562011-02-25 15:21:47 +000010932
10933 LIBS="-lsendfile $LIBS"
10934
10935fi
10936
Pablo Galindo53e55292021-04-05 17:38:40 +010010937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10938printf %s "checking for dlopen in -ldl... " >&6; }
10939if test ${ac_cv_lib_dl_dlopen+y}
10940then :
10941 printf %s "(cached) " >&6
10942else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010944LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948/* Override any GCC internal prototype to avoid an error.
10949 Use char because int might match the return type of a GCC
10950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010951char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010952int
Pablo Galindo53e55292021-04-05 17:38:40 +010010953main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010954{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 ;
10957 return 0;
10958}
10959_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010010960if ac_fn_c_try_link "$LINENO"
10961then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_cv_lib_dl_dlopen=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010010963else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010965fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010966rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010968LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010969fi
Pablo Galindo53e55292021-04-05 17:38:40 +010010970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10971printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
10972if test "x$ac_cv_lib_dl_dlopen" = xyes
10973then :
10974 printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010975
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010976 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010977
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010978fi
10979 # Dynamic linking for SunOS/Solaris and SYSV
Pablo Galindo53e55292021-04-05 17:38:40 +010010980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10981printf %s "checking for shl_load in -ldld... " >&6; }
10982if test ${ac_cv_lib_dld_shl_load+y}
10983then :
10984 printf %s "(cached) " >&6
10985else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010987LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991/* Override any GCC internal prototype to avoid an error.
10992 Use char because int might match the return type of a GCC
10993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010994char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010995int
Pablo Galindo53e55292021-04-05 17:38:40 +010010996main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 ;
11000 return 0;
11001}
11002_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011003if ac_fn_c_try_link "$LINENO"
11004then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 ac_cv_lib_dld_shl_load=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010011006else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011008fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011009rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011011LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011012fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
11014printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
11015if test "x$ac_cv_lib_dld_shl_load" = xyes
11016then :
11017 printf "%s\n" "#define HAVE_LIBDLD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011018
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011019 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021fi
11022 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011023
Michael Felt0d3ccb42017-12-30 22:39:20 +010011024# checks for uuid.h location
Pablo Galindo53e55292021-04-05 17:38:40 +010011025ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11026if test "x$ac_cv_header_uuid_uuid_h" = xyes
11027then :
11028 printf "%s\n" "#define HAVE_UUID_UUID_H 1" >>confdefs.h
11029
11030fi
11031ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11032if test "x$ac_cv_header_uuid_h" = xyes
11033then :
11034 printf "%s\n" "#define HAVE_UUID_H 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010011035
11036fi
11037
Michael Felt0d3ccb42017-12-30 22:39:20 +010011038
Pablo Galindo53e55292021-04-05 17:38:40 +010011039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
11040printf %s "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030011041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11042/* end confdefs.h. */
11043#include <uuid/uuid.h>
11044int
Pablo Galindo53e55292021-04-05 17:38:40 +010011045main (void)
Berker Peksag9a10ff42017-11-08 23:09:16 +030011046{
11047
11048#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030011049void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030011050#endif
11051
11052 ;
11053 return 0;
11054}
11055_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011056if ac_fn_c_try_compile "$LINENO"
11057then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030011058
Pablo Galindo53e55292021-04-05 17:38:40 +010011059printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030011060
Pablo Galindo53e55292021-04-05 17:38:40 +010011061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11062printf "%s\n" "yes" >&6; }
11063else $as_nop
11064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065printf "%s\n" "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030011066
11067fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011068rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030011069
Michael Felt0d3ccb42017-12-30 22:39:20 +010011070# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000011071# FreeBSD and OpenBSD provides support as well
Pablo Galindo53e55292021-04-05 17:38:40 +010011072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
11073printf %s "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075/* end confdefs.h. */
11076#include <uuid.h>
11077int
Pablo Galindo53e55292021-04-05 17:38:40 +010011078main (void)
Michael Felt0d3ccb42017-12-30 22:39:20 +010011079{
11080
11081#ifndef uuid_create
11082void *x = uuid_create
11083#endif
11084
11085 ;
11086 return 0;
11087}
11088_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011089if ac_fn_c_try_compile "$LINENO"
11090then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010011091
Pablo Galindo53e55292021-04-05 17:38:40 +010011092printf "%s\n" "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010011093
Pablo Galindo53e55292021-04-05 17:38:40 +010011094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11095printf "%s\n" "yes" >&6; }
11096else $as_nop
11097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098printf "%s\n" "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011099
11100fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011101rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010011102
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011103# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
11104# stream in big-endian byte-order
Pablo Galindo53e55292021-04-05 17:38:40 +010011105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
11106printf %s "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11108/* end confdefs.h. */
11109#include <uuid.h>
11110int
Pablo Galindo53e55292021-04-05 17:38:40 +010011111main (void)
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011112{
11113
11114#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040011115void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011116#endif
11117
11118 ;
11119 return 0;
11120}
11121_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011122if ac_fn_c_try_compile "$LINENO"
11123then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011124
Pablo Galindo53e55292021-04-05 17:38:40 +010011125printf "%s\n" "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011126
Pablo Galindo53e55292021-04-05 17:38:40 +010011127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11128printf "%s\n" "yes" >&6; }
11129else $as_nop
11130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131printf "%s\n" "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011132
11133fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011134rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011135
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011136# 'Real Time' functions on Solaris
11137# posix4 on Solaris 2.6
11138# pthread (first!) on Linux
Pablo Galindo53e55292021-04-05 17:38:40 +010011139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
11140printf %s "checking for library containing sem_init... " >&6; }
11141if test ${ac_cv_search_sem_init+y}
11142then :
11143 printf %s "(cached) " >&6
11144else $as_nop
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011145 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000011146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149/* Override any GCC internal prototype to avoid an error.
11150 Use char because int might match the return type of a GCC
11151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011152char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011153int
Pablo Galindo53e55292021-04-05 17:38:40 +010011154main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ;
11158 return 0;
11159}
11160_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011161for ac_lib in '' pthread rt posix4
11162do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011163 if test -z "$ac_lib"; then
11164 ac_res="none required"
11165 else
11166 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011167 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011169 if ac_fn_c_try_link "$LINENO"
11170then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000011172fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011173rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 conftest$ac_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +010011175 if test ${ac_cv_search_sem_init+y}
11176then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011177 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179done
Pablo Galindo53e55292021-04-05 17:38:40 +010011180if test ${ac_cv_search_sem_init+y}
11181then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011182
Pablo Galindo53e55292021-04-05 17:38:40 +010011183else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184 ac_cv_search_sem_init=no
11185fi
11186rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011187LIBS=$ac_func_search_save_LIBS
11188fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
11190printf "%s\n" "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191ac_res=$ac_cv_search_sem_init
Pablo Galindo53e55292021-04-05 17:38:40 +010011192if test "$ac_res" != no
11193then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011195
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011196fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011197
Martin v. Löwis519adae2003-09-20 10:47:47 +000011198
Martin v. Löwis19d17342003-06-14 21:03:05 +000011199# check if we need libintl for locale functions
Pablo Galindo53e55292021-04-05 17:38:40 +010011200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
11201printf %s "checking for textdomain in -lintl... " >&6; }
11202if test ${ac_cv_lib_intl_textdomain+y}
11203then :
11204 printf %s "(cached) " >&6
11205else $as_nop
Martin v. Löwis19d17342003-06-14 21:03:05 +000011206 ac_check_lib_save_LIBS=$LIBS
11207LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011209/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011211/* Override any GCC internal prototype to avoid an error.
11212 Use char because int might match the return type of a GCC
11213 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011214char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011215int
Pablo Galindo53e55292021-04-05 17:38:40 +010011216main (void)
Martin v. Löwis19d17342003-06-14 21:03:05 +000011217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011219 ;
11220 return 0;
11221}
11222_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011223if ac_fn_c_try_link "$LINENO"
11224then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011225 ac_cv_lib_intl_textdomain=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010011226else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000011228fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011229rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011231LIBS=$ac_check_lib_save_LIBS
11232fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011233{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
11234printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; }
11235if test "x$ac_cv_lib_intl_textdomain" = xyes
11236then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011237
Pablo Galindo53e55292021-04-05 17:38:40 +010011238printf "%s\n" "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000011239
Brett Cannonc6d936e2009-06-07 20:09:53 +000011240 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000011241fi
11242
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011243
11244# checks for system dependent C++ extensions support
11245case "$ac_sys_system" in
Pablo Galindo53e55292021-04-05 17:38:40 +010011246 AIX*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
11247printf %s "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011250
Georg Brandl59e87bd2011-02-15 19:48:59 +000011251 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011252int
Pablo Galindo53e55292021-04-05 17:38:40 +010011253main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011254{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011255loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 ;
11257 return 0;
11258}
Matthias Kloseb159a552010-04-25 21:00:44 +000011259
Martin v. Löwis11437992002-04-12 09:54:03 +000011260_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011261if ac_fn_c_try_link "$LINENO"
11262then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011263
Matthias Kloseb159a552010-04-25 21:00:44 +000011264
Pablo Galindo53e55292021-04-05 17:38:40 +010011265printf "%s\n" "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Pablo Galindo53e55292021-04-05 17:38:40 +010011267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11268printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011269
Pablo Galindo53e55292021-04-05 17:38:40 +010011270else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000011271
Pablo Galindo53e55292021-04-05 17:38:40 +010011272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11273printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011274
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011275fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011276rm -f core conftest.err conftest.$ac_objext conftest.beam \
Michael Felt39afa2d2019-12-15 15:17:53 +010011277 conftest$ac_exeext conftest.$ac_ext
11278# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
11279# of the AIX system used to build/package Python executable. This tag serves
11280# as a baseline for bdist module packages
Pablo Galindo53e55292021-04-05 17:38:40 +010011281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
11282printf %s "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011283 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
11284
Pablo Galindo53e55292021-04-05 17:38:40 +010011285printf "%s\n" "#define AIX_BUILDDATE $AIX_BUILDDATE" >>confdefs.h
Michael Felt39afa2d2019-12-15 15:17:53 +010011286
Pablo Galindo53e55292021-04-05 17:38:40 +010011287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
11288printf "%s\n" "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011289 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011290 *) ;;
11291esac
11292
Christian Heimes985ecdc2013-11-20 11:46:18 +010011293# check for systems that require aligned memory access
Pablo Galindo53e55292021-04-05 17:38:40 +010011294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
11295printf %s "checking aligned memory access is required... " >&6; }
11296if test ${ac_cv_aligned_required+y}
11297then :
11298 printf %s "(cached) " >&6
11299else $as_nop
11300 if test "$cross_compiling" = yes
11301then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011302 ac_cv_aligned_required=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010011303else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +010011304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11305/* end confdefs.h. */
11306
11307int main()
11308{
11309 char s[16];
11310 int i, *p1, *p2;
11311 for (i=0; i < 16; i++)
11312 s[i] = i;
11313 p1 = (int*)(s+1);
11314 p2 = (int*)(s+2);
11315 if (*p1 == *p2)
11316 return 1;
11317 return 0;
11318}
Christian Heimes985ecdc2013-11-20 11:46:18 +010011319_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011320if ac_fn_c_try_run "$LINENO"
11321then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011322 ac_cv_aligned_required=no
Pablo Galindo53e55292021-04-05 17:38:40 +010011323else $as_nop
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011324 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010011325fi
11326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11327 conftest.$ac_objext conftest.beam conftest.$ac_ext
11328fi
11329
11330
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011331fi
11332
Pablo Galindo53e55292021-04-05 17:38:40 +010011333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
11334printf "%s\n" "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011335if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010011336
Pablo Galindo53e55292021-04-05 17:38:40 +010011337printf "%s\n" "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011338
11339fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010011340
11341# str, bytes and memoryview hash algorithm
11342
11343
Pablo Galindo53e55292021-04-05 17:38:40 +010011344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
11345printf %s "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011346
11347# Check whether --with-hash_algorithm was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011348if test ${with_hash_algorithm+y}
11349then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010011350 withval=$with_hash_algorithm;
Pablo Galindo53e55292021-04-05 17:38:40 +010011351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11352printf "%s\n" "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011353case "$withval" in
11354 siphash24)
Pablo Galindo53e55292021-04-05 17:38:40 +010011355 printf "%s\n" "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011356
11357 ;;
11358 fnv)
Pablo Galindo53e55292021-04-05 17:38:40 +010011359 printf "%s\n" "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011360
11361 ;;
11362 *)
11363 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
11364 ;;
11365esac
11366
Pablo Galindo53e55292021-04-05 17:38:40 +010011367else $as_nop
11368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5
11369printf "%s\n" "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011370fi
11371
11372
Paul Ganssle62972d92020-05-16 04:20:06 -040011373validate_tzpath() {
11374 # Checks that each element of hte path is an absolute path
11375 if test -z "$1"; then
11376 # Empty string is allowed: it indicates no system TZPATH
11377 return 0
11378 fi
11379
11380 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050011381 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040011382 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
11383 return 1;
11384 fi
11385}
11386
11387TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Pablo Galindo53e55292021-04-05 17:38:40 +010011388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
11389printf %s "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011390
11391# Check whether --with-tzpath was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011392if test ${with_tzpath+y}
11393then :
Paul Ganssle62972d92020-05-16 04:20:06 -040011394 withval=$with_tzpath;
11395case "$withval" in
11396 yes)
11397 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
11398 ;;
11399 *)
11400 validate_tzpath "$withval"
11401 TZPATH="$withval"
Pablo Galindo53e55292021-04-05 17:38:40 +010011402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
11403printf "%s\n" "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011404 ;;
11405esac
11406
Pablo Galindo53e55292021-04-05 17:38:40 +010011407else $as_nop
Paul Ganssle62972d92020-05-16 04:20:06 -040011408 validate_tzpath "$TZPATH"
Pablo Galindo53e55292021-04-05 17:38:40 +010011409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
11410printf "%s\n" "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011411fi
11412
11413
11414
Pablo Galindo53e55292021-04-05 17:38:40 +010011415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
11416printf %s "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011417
11418# Check whether --with-address_sanitizer was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011419if test ${with_address_sanitizer+y}
11420then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010011421 withval=$with_address_sanitizer;
Pablo Galindo53e55292021-04-05 17:38:40 +010011422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11423printf "%s\n" "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011424BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
11425LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080011426# ASan works by controlling memory allocation, our own malloc interferes.
11427with_pymalloc="no"
11428
Pablo Galindo53e55292021-04-05 17:38:40 +010011429else $as_nop
11430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11431printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011432fi
11433
11434
Pablo Galindo53e55292021-04-05 17:38:40 +010011435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
11436printf %s "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011437
11438# Check whether --with-memory_sanitizer was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011439if test ${with_memory_sanitizer+y}
11440then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011441 withval=$with_memory_sanitizer;
Pablo Galindo53e55292021-04-05 17:38:40 +010011442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11443printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011444BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
11445LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
11446# MSan works by controlling memory allocation, our own malloc interferes.
11447with_pymalloc="no"
11448
Pablo Galindo53e55292021-04-05 17:38:40 +010011449else $as_nop
11450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011452fi
11453
11454
Pablo Galindo53e55292021-04-05 17:38:40 +010011455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
11456printf %s "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011457
11458# Check whether --with-undefined_behavior_sanitizer was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011459if test ${with_undefined_behavior_sanitizer+y}
11460then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011461 withval=$with_undefined_behavior_sanitizer;
Pablo Galindo53e55292021-04-05 17:38:40 +010011462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11463printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011464BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
11465LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010011466
Pablo Galindo53e55292021-04-05 17:38:40 +010011467else $as_nop
11468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469printf "%s\n" "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011470fi
11471
11472
Guido van Rossum70c7f481998-03-26 18:44:10 +000011473# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Pablo Galindo53e55292021-04-05 17:38:40 +010011474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
11475printf %s "checking for t_open in -lnsl... " >&6; }
11476if test ${ac_cv_lib_nsl_t_open+y}
11477then :
11478 printf %s "(cached) " >&6
11479else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011480 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011481LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485/* Override any GCC internal prototype to avoid an error.
11486 Use char because int might match the return type of a GCC
11487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011488char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011489int
Pablo Galindo53e55292021-04-05 17:38:40 +010011490main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 ;
11494 return 0;
11495}
11496_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011497if ac_fn_c_try_link "$LINENO"
11498then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 ac_cv_lib_nsl_t_open=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010011500else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011502fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011503rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011505LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011506fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
11508printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; }
11509if test "x$ac_cv_lib_nsl_t_open" = xyes
11510then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011511 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011512fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011513 # SVR4
Pablo Galindo53e55292021-04-05 17:38:40 +010011514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
11515printf %s "checking for socket in -lsocket... " >&6; }
11516if test ${ac_cv_lib_socket_socket+y}
11517then :
11518 printf %s "(cached) " >&6
11519else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011521LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525/* Override any GCC internal prototype to avoid an error.
11526 Use char because int might match the return type of a GCC
11527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011528char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011529int
Pablo Galindo53e55292021-04-05 17:38:40 +010011530main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011531{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 ;
11534 return 0;
11535}
11536_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011537if ac_fn_c_try_link "$LINENO"
11538then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 ac_cv_lib_socket_socket=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010011540else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011542fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011543rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011545LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011546fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
11548printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
11549if test "x$ac_cv_lib_socket_socket" = xyes
11550then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011551 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011552fi
11553 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011554
Pablo Galindo53e55292021-04-05 17:38:40 +010011555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
11556printf %s "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558# Check whether --with-libs was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011559if test ${with_libs+y}
11560then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561 withval=$with_libs;
Pablo Galindo53e55292021-04-05 17:38:40 +010011562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11563printf "%s\n" "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000011564LIBS="$withval $LIBS"
11565
Pablo Galindo53e55292021-04-05 17:38:40 +010011566else $as_nop
11567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568printf "%s\n" "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569fi
11570
Guido van Rossum7f43da71994-08-01 12:15:30 +000011571
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011572
11573
11574
11575
11576
11577
Victor Stinnerb477d192020-01-22 22:48:16 +010011578
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011579if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11580 if test -n "$ac_tool_prefix"; then
11581 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11582set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +010011583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11584printf %s "checking for $ac_word... " >&6; }
11585if test ${ac_cv_path_PKG_CONFIG+y}
11586then :
11587 printf %s "(cached) " >&6
11588else $as_nop
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011589 case $PKG_CONFIG in
11590 [\\/]* | ?:[\\/]*)
11591 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11592 ;;
11593 *)
11594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11595for as_dir in $PATH
11596do
11597 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +010011598 case $as_dir in #(((
11599 '') as_dir=./ ;;
11600 */) ;;
11601 *) as_dir=$as_dir/ ;;
11602 esac
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011603 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +010011604 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11605 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
11606 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 +080011607 break 2
11608 fi
11609done
11610 done
11611IFS=$as_save_IFS
11612
11613 ;;
11614esac
11615fi
11616PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11617if test -n "$PKG_CONFIG"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010011618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11619printf "%s\n" "$PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011620else
Pablo Galindo53e55292021-04-05 17:38:40 +010011621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011623fi
11624
11625
11626fi
11627if test -z "$ac_cv_path_PKG_CONFIG"; then
11628 ac_pt_PKG_CONFIG=$PKG_CONFIG
11629 # Extract the first word of "pkg-config", so it can be a program name with args.
11630set dummy pkg-config; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +010011631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11632printf %s "checking for $ac_word... " >&6; }
11633if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
11634then :
11635 printf %s "(cached) " >&6
11636else $as_nop
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011637 case $ac_pt_PKG_CONFIG in
11638 [\\/]* | ?:[\\/]*)
11639 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11640 ;;
11641 *)
11642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH
11644do
11645 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +010011646 case $as_dir in #(((
11647 '') as_dir=./ ;;
11648 */) ;;
11649 *) as_dir=$as_dir/ ;;
11650 esac
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011651 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +010011652 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11653 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
11654 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 +080011655 break 2
11656 fi
11657done
11658 done
11659IFS=$as_save_IFS
11660
11661 ;;
11662esac
11663fi
11664ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11665if test -n "$ac_pt_PKG_CONFIG"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010011666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11667printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011668else
Pablo Galindo53e55292021-04-05 17:38:40 +010011669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11670printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011671fi
11672
11673 if test "x$ac_pt_PKG_CONFIG" = x; then
11674 PKG_CONFIG=""
11675 else
11676 case $cross_compiling:$ac_tool_warned in
11677yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +010011678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11679printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011680ac_tool_warned=yes ;;
11681esac
11682 PKG_CONFIG=$ac_pt_PKG_CONFIG
11683 fi
11684else
11685 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11686fi
11687
11688fi
11689if test -n "$PKG_CONFIG"; then
11690 _pkg_min_version=0.9.0
Pablo Galindo53e55292021-04-05 17:38:40 +010011691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11692printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011693 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Pablo Galindo53e55292021-04-05 17:38:40 +010011694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11695printf "%s\n" "yes" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011696 else
Pablo Galindo53e55292021-04-05 17:38:40 +010011697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11698printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011699 PKG_CONFIG=""
11700 fi
11701fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011702
11703# Check for use of the system expat library
Pablo Galindo53e55292021-04-05 17:38:40 +010011704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
11705printf %s "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011706
11707# Check whether --with-system_expat was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011708if test ${with_system_expat+y}
11709then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011710 withval=$with_system_expat;
Pablo Galindo53e55292021-04-05 17:38:40 +010011711else $as_nop
Benjamin Peterson79263252010-10-31 16:50:44 +000011712 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011713fi
11714
11715
Pablo Galindo53e55292021-04-05 17:38:40 +010011716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
11717printf "%s\n" "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011718
11719# Check for use of the system libffi library
Pablo Galindo53e55292021-04-05 17:38:40 +010011720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
11721printf %s "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011722
11723# Check whether --with-system_ffi was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011724if test ${with_system_ffi+y}
11725then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011726 withval=$with_system_ffi;
11727fi
11728
11729
Zachary Waref40d4dd2016-09-17 01:25:24 -050011730if test "$ac_sys_system" = "Darwin"
11731then
11732 case "$with_system_ffi" in
11733 "")
11734 with_system_ffi="no"
11735 ;;
11736 yes|no)
11737 ;;
11738 *)
11739 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
11740 ;;
11741 esac
Pablo Galindo53e55292021-04-05 17:38:40 +010011742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
11743printf "%s\n" "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011744else
Pablo Galindo53e55292021-04-05 17:38:40 +010011745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11746printf "%s\n" "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011747 if test "$with_system_ffi" != ""
11748 then
Pablo Galindo53e55292021-04-05 17:38:40 +010011749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
11750printf "%s\n" "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050011751 fi
11752 with_system_ffi="yes"
11753fi
Zachary Ware935043d2016-09-09 17:01:21 -070011754
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011755if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000011756 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
11757else
11758 LIBFFI_INCLUDEDIR=""
11759fi
11760
11761
Stefan Krah60187b52012-03-23 19:06:27 +010011762# Check for use of the system libmpdec library
Pablo Galindo53e55292021-04-05 17:38:40 +010011763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
11764printf %s "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011765
11766# Check whether --with-system_libmpdec was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011767if test ${with_system_libmpdec+y}
11768then :
Stefan Krah60187b52012-03-23 19:06:27 +010011769 withval=$with_system_libmpdec;
Pablo Galindo53e55292021-04-05 17:38:40 +010011770else $as_nop
Stefan Krah60187b52012-03-23 19:06:27 +010011771 with_system_libmpdec="no"
11772fi
11773
11774
Pablo Galindo53e55292021-04-05 17:38:40 +010011775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
11776printf "%s\n" "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011777
Stefan Krah815280e2020-02-29 19:43:42 +010011778# Check whether _decimal should use a coroutine-local or thread-local context
Pablo Galindo53e55292021-04-05 17:38:40 +010011779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
11780printf %s "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011781
11782# Check whether --with-decimal_contextvar was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011783if test ${with_decimal_contextvar+y}
11784then :
Stefan Krah815280e2020-02-29 19:43:42 +010011785 withval=$with_decimal_contextvar;
Pablo Galindo53e55292021-04-05 17:38:40 +010011786else $as_nop
Stefan Krah815280e2020-02-29 19:43:42 +010011787 with_decimal_contextvar="yes"
11788fi
11789
11790
11791if test "$with_decimal_contextvar" != "no"
11792then
11793
Pablo Galindo53e55292021-04-05 17:38:40 +010011794printf "%s\n" "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010011795
11796fi
11797
Pablo Galindo53e55292021-04-05 17:38:40 +010011798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
11799printf "%s\n" "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011800
Benjamin Peterson076ed002010-10-31 17:11:02 +000011801# Check for support for loadable sqlite extensions
Pablo Galindo53e55292021-04-05 17:38:40 +010011802{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
11803printf %s "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011804# Check whether --enable-loadable-sqlite-extensions was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011805if test ${enable_loadable_sqlite_extensions+y}
11806then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000011807 enableval=$enable_loadable_sqlite_extensions;
Pablo Galindo53e55292021-04-05 17:38:40 +010011808else $as_nop
Benjamin Peterson076ed002010-10-31 17:11:02 +000011809 enable_loadable_sqlite_extensions="no"
11810fi
11811
11812
Pablo Galindo53e55292021-04-05 17:38:40 +010011813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
11814printf "%s\n" "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011815
Ned Deilyd819b932013-09-06 01:07:05 -070011816# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
11817
11818
Pablo Galindo53e55292021-04-05 17:38:40 +010011819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
11820printf %s "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011821
11822# Check whether --with-tcltk-includes was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011823if test ${with_tcltk_includes+y}
11824then :
Ned Deilyd819b932013-09-06 01:07:05 -070011825 withval=$with_tcltk_includes;
Pablo Galindo53e55292021-04-05 17:38:40 +010011826else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011827 with_tcltk_includes="default"
11828fi
11829
Pablo Galindo53e55292021-04-05 17:38:40 +010011830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
11831printf "%s\n" "$with_tcltk_includes" >&6; }
11832{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
11833printf %s "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011834
11835# Check whether --with-tcltk-libs was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011836if test ${with_tcltk_libs+y}
11837then :
Ned Deilyd819b932013-09-06 01:07:05 -070011838 withval=$with_tcltk_libs;
Pablo Galindo53e55292021-04-05 17:38:40 +010011839else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011840 with_tcltk_libs="default"
11841fi
11842
Pablo Galindo53e55292021-04-05 17:38:40 +010011843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
11844printf "%s\n" "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011845if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
11846then
11847 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
11848 then
11849 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
11850 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010011851 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
11852 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
11853 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
11854 else
11855 TCLTK_INCLUDES=""
11856 TCLTK_LIBS=""
11857 fi
Ned Deilyd819b932013-09-06 01:07:05 -070011858else
11859 TCLTK_INCLUDES="$with_tcltk_includes"
11860 TCLTK_LIBS="$with_tcltk_libs"
11861fi
11862
Matthias Klose55708cc2009-04-30 08:06:49 +000011863# Check for --with-dbmliborder
Pablo Galindo53e55292021-04-05 17:38:40 +010011864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
11865printf %s "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011866
11867# Check whether --with-dbmliborder was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010011868if test ${with_dbmliborder+y}
11869then :
Matthias Klose55708cc2009-04-30 08:06:49 +000011870 withval=$with_dbmliborder;
11871if test x$with_dbmliborder = xyes
11872then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011873as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011874else
11875 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
11876 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
11877 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011878 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011879 fi
11880 done
11881fi
11882fi
11883
Pablo Galindo53e55292021-04-05 17:38:40 +010011884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
11885printf "%s\n" "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011886
Martin v. Löwis11437992002-04-12 09:54:03 +000011887# Templates for things AC_DEFINEd more than once.
11888# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011889
11890
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011891if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011892then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011893 # Defining _REENTRANT on system with POSIX threads should not hurt.
Pablo Galindo53e55292021-04-05 17:38:40 +010011894 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011895
11896 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020011897 if test "$ac_sys_system" = "SunOS"; then
11898 CFLAGS="$CFLAGS -D_REENTRANT"
11899 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000011900elif test "$ac_cv_kpthread" = "yes"
11901then
11902 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011903 if test "$ac_cv_cxx_thread" = "yes"; then
11904 CXX="$CXX -Kpthread"
11905 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011906 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011907elif test "$ac_cv_kthread" = "yes"
11908then
11909 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011910 if test "$ac_cv_cxx_thread" = "yes"; then
11911 CXX="$CXX -Kthread"
11912 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011913 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011914elif test "$ac_cv_pthread" = "yes"
11915then
11916 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011917 if test "$ac_cv_cxx_thread" = "yes"; then
11918 CXX="$CXX -pthread"
11919 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011920 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011921else
Martin v. Löwis130fb172001-07-19 11:00:41 +000011922 if test ! -z "$withval" -a -d "$withval"
11923 then LDFLAGS="$LDFLAGS -L$withval"
11924 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011925
11926 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011927 # define _POSIX_THREADS in unistd.h. Some apparently don't
11928 # (e.g. gnu pth with pthread emulation)
Pablo Galindo53e55292021-04-05 17:38:40 +010011929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
11930printf %s "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011932/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011933
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011934#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011935#ifdef _POSIX_THREADS
11936yes
11937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
11939_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +010011941 $EGREP "yes" >/dev/null 2>&1
11942then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011943 unistd_defines_pthreads=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010011944else $as_nop
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011945 unistd_defines_pthreads=no
11946fi
Pablo Galindo53e55292021-04-05 17:38:40 +010011947rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011948
Pablo Galindo53e55292021-04-05 17:38:40 +010011949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
11950printf "%s\n" "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011951
Pablo Galindo53e55292021-04-05 17:38:40 +010011952 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011953
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011954 # Just looking for pthread_create in libpthread is not enough:
11955 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11956 # So we really have to include pthread.h, and then link.
11957 _libs=$LIBS
11958 LIBS="$LIBS -lpthread"
Pablo Galindo53e55292021-04-05 17:38:40 +010011959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
11960printf %s "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011962/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011963
11964#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011965#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011966
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011967void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011968int
Pablo Galindo53e55292021-04-05 17:38:40 +010011969main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011970{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011971
11972pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011973 ;
11974 return 0;
11975}
11976_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010011977if ac_fn_c_try_link "$LINENO"
11978then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
Pablo Galindo53e55292021-04-05 17:38:40 +010011980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11981printf "%s\n" "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011982 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011983
Pablo Galindo53e55292021-04-05 17:38:40 +010011984else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011985
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011986 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Pablo Galindo53e55292021-04-05 17:38:40 +010011988if test "x$ac_cv_func_pthread_detach" = xyes
11989then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011990
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011991 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011992
Pablo Galindo53e55292021-04-05 17:38:40 +010011993else $as_nop
Guido van Rossumad678af1998-10-02 14:42:15 +000011994
Pablo Galindo53e55292021-04-05 17:38:40 +010011995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
11996printf %s "checking for pthread_create in -lpthreads... " >&6; }
11997if test ${ac_cv_lib_pthreads_pthread_create+y}
11998then :
11999 printf %s "(cached) " >&6
12000else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012002LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006/* Override any GCC internal prototype to avoid an error.
12007 Use char because int might match the return type of a GCC
12008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012009char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012010int
Pablo Galindo53e55292021-04-05 17:38:40 +010012011main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012013return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 ;
12015 return 0;
12016}
12017_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012018if ac_fn_c_try_link "$LINENO"
12019then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 ac_cv_lib_pthreads_pthread_create=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010012021else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012023fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012024rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012026LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012027fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
12029printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; }
12030if test "x$ac_cv_lib_pthreads_pthread_create" = xyes
12031then :
Greg Steinadf63d62000-07-05 10:38:09 +000012032
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012033 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012034 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012035
Pablo Galindo53e55292021-04-05 17:38:40 +010012036else $as_nop
Greg Steinadf63d62000-07-05 10:38:09 +000012037
Pablo Galindo53e55292021-04-05 17:38:40 +010012038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
12039printf %s "checking for pthread_create in -lc_r... " >&6; }
12040if test ${ac_cv_lib_c_r_pthread_create+y}
12041then :
12042 printf %s "(cached) " >&6
12043else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012045LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049/* Override any GCC internal prototype to avoid an error.
12050 Use char because int might match the return type of a GCC
12051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012052char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012053int
Pablo Galindo53e55292021-04-05 17:38:40 +010012054main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012056return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 ;
12058 return 0;
12059}
12060_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012061if ac_fn_c_try_link "$LINENO"
12062then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 ac_cv_lib_c_r_pthread_create=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010012064else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012066fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012067rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012069LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012070fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
12072printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; }
12073if test "x$ac_cv_lib_c_r_pthread_create" = xyes
12074then :
Guido van Rossum49545951997-12-02 19:28:29 +000012075
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012076 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012077 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012078
Pablo Galindo53e55292021-04-05 17:38:40 +010012079else $as_nop
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012080
Pablo Galindo53e55292021-04-05 17:38:40 +010012081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
12082printf %s "checking for __pthread_create_system in -lpthread... " >&6; }
12083if test ${ac_cv_lib_pthread___pthread_create_system+y}
12084then :
12085 printf %s "(cached) " >&6
12086else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012088LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092/* Override any GCC internal prototype to avoid an error.
12093 Use char because int might match the return type of a GCC
12094 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012095char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012096int
Pablo Galindo53e55292021-04-05 17:38:40 +010012097main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012100 ;
12101 return 0;
12102}
12103_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012104if ac_fn_c_try_link "$LINENO"
12105then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ac_cv_lib_pthread___pthread_create_system=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010012107else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012109fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012110rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012112LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012113fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12115printf "%s\n" "$ac_cv_lib_pthread___pthread_create_system" >&6; }
12116if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes
12117then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012118
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012119 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012120 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012121
Pablo Galindo53e55292021-04-05 17:38:40 +010012122else $as_nop
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012123
Pablo Galindo53e55292021-04-05 17:38:40 +010012124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
12125printf %s "checking for pthread_create in -lcma... " >&6; }
12126if test ${ac_cv_lib_cma_pthread_create+y}
12127then :
12128 printf %s "(cached) " >&6
12129else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012131LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135/* Override any GCC internal prototype to avoid an error.
12136 Use char because int might match the return type of a GCC
12137 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012138char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012139int
Pablo Galindo53e55292021-04-05 17:38:40 +010012140main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 ;
12144 return 0;
12145}
12146_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012147if ac_fn_c_try_link "$LINENO"
12148then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 ac_cv_lib_cma_pthread_create=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010012150else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012152fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012153rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012155LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012156fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
12158printf "%s\n" "$ac_cv_lib_cma_pthread_create" >&6; }
12159if test "x$ac_cv_lib_cma_pthread_create" = xyes
12160then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000012161
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012162 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012163 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012164
Pablo Galindo53e55292021-04-05 17:38:40 +010012165else $as_nop
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012166
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012167 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
12168
Guido van Rossum2d38f911996-06-26 19:47:01 +000012169fi
12170
Guido van Rossum627b2d71993-12-24 10:39:16 +000012171
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012172fi
12173
Guido van Rossum0be3e491997-05-22 20:33:33 +000012174fi
12175
Guido van Rossum49545951997-12-02 19:28:29 +000012176fi
12177
Guido van Rossumb93a8621998-05-07 13:27:32 +000012178fi
12179
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012180fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012181rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012183
Pablo Galindo53e55292021-04-05 17:38:40 +010012184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
12185printf %s "checking for usconfig in -lmpc... " >&6; }
12186if test ${ac_cv_lib_mpc_usconfig+y}
12187then :
12188 printf %s "(cached) " >&6
12189else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012191LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195/* Override any GCC internal prototype to avoid an error.
12196 Use char because int might match the return type of a GCC
12197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012198char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012199int
Pablo Galindo53e55292021-04-05 17:38:40 +010012200main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 ;
12204 return 0;
12205}
12206_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012207if ac_fn_c_try_link "$LINENO"
12208then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 ac_cv_lib_mpc_usconfig=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010012210else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012212fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012213rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012215LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012216fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
12218printf "%s\n" "$ac_cv_lib_mpc_usconfig" >&6; }
12219if test "x$ac_cv_lib_mpc_usconfig" = xyes
12220then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221
Martin v. Löwis130fb172001-07-19 11:00:41 +000012222 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012223
Guido van Rossum627b2d71993-12-24 10:39:16 +000012224fi
12225
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012226
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012227fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012228
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012229if test "$posix_threads" = "yes"; then
12230 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012231
Pablo Galindo53e55292021-04-05 17:38:40 +010012232printf "%s\n" "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012233
12234 fi
12235
12236 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12237 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020012238 SunOS/5.6)
Pablo Galindo53e55292021-04-05 17:38:40 +010012239printf "%s\n" "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012240
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012241 ;;
12242 SunOS/5.8)
Pablo Galindo53e55292021-04-05 17:38:40 +010012243printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012244
12245 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020012246 AIX/*)
Pablo Galindo53e55292021-04-05 17:38:40 +010012247printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000012248
12249 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012250 esac
12251
Pablo Galindo53e55292021-04-05 17:38:40 +010012252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12253printf %s "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
12254 if test ${ac_cv_pthread_system_supported+y}
12255then :
12256 printf %s "(cached) " >&6
12257else $as_nop
12258 if test "$cross_compiling" = yes
12259then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012260 ac_cv_pthread_system_supported=no
Pablo Galindo53e55292021-04-05 17:38:40 +010012261else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010012264
12265 #include <stdio.h>
12266 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012267 void *foo(void *parm) {
12268 return NULL;
12269 }
12270 main() {
12271 pthread_attr_t attr;
12272 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110012273 if (pthread_attr_init(&attr)) return (-1);
12274 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
12275 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
12276 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012277 }
12278_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012279if ac_fn_c_try_run "$LINENO"
12280then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012281 ac_cv_pthread_system_supported=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010012282else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12286 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012287fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290fi
12291
Pablo Galindo53e55292021-04-05 17:38:40 +010012292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
12293printf "%s\n" "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012294 if test "$ac_cv_pthread_system_supported" = "yes"; then
12295
Pablo Galindo53e55292021-04-05 17:38:40 +010012296printf "%s\n" "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012297
12298 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012299
12300 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000012301do :
12302 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Pablo Galindo53e55292021-04-05 17:38:40 +010012303if test "x$ac_cv_func_pthread_sigmask" = xyes
12304then :
12305 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012306 case $ac_sys_system in
12307 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012308
Pablo Galindo53e55292021-04-05 17:38:40 +010012309printf "%s\n" "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012310
12311 ;;
12312 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012313fi
Christian Heimes32eba612021-03-19 10:29:25 +010012314
Pablo Galindo53e55292021-04-05 17:38:40 +010012315done
12316 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
12317if test "x$ac_cv_func_pthread_getcpuclockid" = xyes
12318then :
12319 printf "%s\n" "#define HAVE_PTHREAD_GETCPUCLOCKID 1" >>confdefs.h
pdoxe14679c2017-10-05 00:01:56 -070012320
12321fi
pdoxe14679c2017-10-05 00:01:56 -070012322
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012323fi
12324
12325
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012326# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
Pablo Galindo53e55292021-04-05 17:38:40 +010012328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
12329printf %s "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330# Check whether --enable-ipv6 was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010012331if test ${enable_ipv6+y}
12332then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012334 no)
Pablo Galindo53e55292021-04-05 17:38:40 +010012335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012337 ipv6=no
12338 ;;
Pablo Galindo53e55292021-04-05 17:38:40 +010012339 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12340printf "%s\n" "yes" >&6; }
12341 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012342
12343 ipv6=yes
12344 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 esac
Pablo Galindo53e55292021-04-05 17:38:40 +010012346else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012349/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012350 /* AF_INET6 available check */
12351#include <sys/types.h>
12352#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012353int
Pablo Galindo53e55292021-04-05 17:38:40 +010012354main (void)
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012355{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012356int domain = AF_INET6;
12357 ;
12358 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012359}
Martin v. Löwis11437992002-04-12 09:54:03 +000012360_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012361if ac_fn_c_try_compile "$LINENO"
12362then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012363
Pablo Galindo53e55292021-04-05 17:38:40 +010012364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12365printf "%s\n" "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012366 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000012367
Pablo Galindo53e55292021-04-05 17:38:40 +010012368else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012369
Pablo Galindo53e55292021-04-05 17:38:40 +010012370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012372 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012373
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012374fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012375rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012377if test "$ipv6" = "yes"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010012378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
12379printf %s "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012382
12383 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012384#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012385int
Pablo Galindo53e55292021-04-05 17:38:40 +010012386main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012387{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012388struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000012389 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 ;
12391 return 0;
12392}
Matthias Kloseb159a552010-04-25 21:00:44 +000012393
Martin v. Löwis11437992002-04-12 09:54:03 +000012394_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012395if ac_fn_c_try_compile "$LINENO"
12396then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012397
Pablo Galindo53e55292021-04-05 17:38:40 +010012398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12399printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012400 ipv6=yes
12401
Pablo Galindo53e55292021-04-05 17:38:40 +010012402else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012403
Pablo Galindo53e55292021-04-05 17:38:40 +010012404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12405printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012406 ipv6=no
12407
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012408fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012409rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012410fi
12411
12412if test "$ipv6" = "yes"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010012413 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012414
12415fi
12416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417fi
12418
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012419
12420ipv6type=unknown
12421ipv6lib=none
12422ipv6trylibc=no
12423
12424if test "$ipv6" = "yes"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010012425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
12426printf %s "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000012427 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12428 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012429 case $i in
12430 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012433
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012434#include <netinet/in.h>
12435#ifdef IPV6_INRIA_VERSION
12436yes
12437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012438_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +010012440 $EGREP "yes" >/dev/null 2>&1
12441then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012442 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012443fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012444rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012445
12446 ;;
12447 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012450
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012451#include <netinet/in.h>
12452#ifdef __KAME__
12453yes
12454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012455_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +010012457 $EGREP "yes" >/dev/null 2>&1
12458then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012459 ipv6type=$i;
12460 ipv6lib=inet6
12461 ipv6libdir=/usr/local/v6/lib
12462 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012463fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012464rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012465
12466 ;;
12467 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012470
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012471#include <features.h>
12472#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12473yes
12474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012475_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +010012477 $EGREP "yes" >/dev/null 2>&1
12478then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012479 ipv6type=$i;
12480 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012481fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012482rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012483
12484 ;;
12485 linux-inet6)
12486 if test -d /usr/inet6; then
12487 ipv6type=$i
12488 ipv6lib=inet6
12489 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012490 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012491 fi
12492 ;;
12493 solaris)
12494 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000012495 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012496 ipv6type=$i
12497 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012498 fi
12499 fi
12500 ;;
12501 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012504
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012505#include <sys/param.h>
12506#ifdef _TOSHIBA_INET6
12507yes
12508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012509_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +010012511 $EGREP "yes" >/dev/null 2>&1
12512then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012513 ipv6type=$i;
12514 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012515 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012516fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012517rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012518
12519 ;;
12520 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012522/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012523
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012524#include </usr/local/v6/include/sys/v6config.h>
12525#ifdef __V6D__
12526yes
12527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012528_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +010012530 $EGREP "yes" >/dev/null 2>&1
12531then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012532 ipv6type=$i;
12533 ipv6lib=v6;
12534 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012535 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012536fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012537rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012538
12539 ;;
12540 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012543
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012544#include <sys/param.h>
12545#ifdef _ZETA_MINAMI_INET6
12546yes
12547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012548_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindo53e55292021-04-05 17:38:40 +010012550 $EGREP "yes" >/dev/null 2>&1
12551then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012552 ipv6type=$i;
12553 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012554 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012555fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012556rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012557
12558 ;;
12559 esac
12560 if test "$ipv6type" != "unknown"; then
12561 break
12562 fi
12563 done
Pablo Galindo53e55292021-04-05 17:38:40 +010012564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
12565printf "%s\n" "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012566fi
12567
12568if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12569 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12570 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12571 echo "using lib$ipv6lib"
12572 else
12573 if test $ipv6trylibc = "yes"; then
12574 echo "using libc"
12575 else
12576 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12577 echo "You need to fetch lib$ipv6lib.a from appropriate"
12578 echo 'ipv6 kit and compile beforehand.'
12579 exit 1
12580 fi
12581 fi
12582fi
12583
Pablo Galindo53e55292021-04-05 17:38:40 +010012584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
12585printf %s "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12587/* end confdefs.h. */
12588 /* CAN_RAW_FD_FRAMES available check */
12589#include <linux/can/raw.h>
12590int
Pablo Galindo53e55292021-04-05 17:38:40 +010012591main (void)
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012592{
12593int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
12594 ;
12595 return 0;
12596}
12597_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012598if ac_fn_c_try_compile "$LINENO"
12599then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012600
12601
Pablo Galindo53e55292021-04-05 17:38:40 +010012602printf "%s\n" "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012603
Pablo Galindo53e55292021-04-05 17:38:40 +010012604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12605printf "%s\n" "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012606
Pablo Galindo53e55292021-04-05 17:38:40 +010012607else $as_nop
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012608
Pablo Galindo53e55292021-04-05 17:38:40 +010012609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12610printf "%s\n" "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012611
12612fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012613rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012614
Pablo Galindo53e55292021-04-05 17:38:40 +010012615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
12616printf %s "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12618/* end confdefs.h. */
12619
12620#include <linux/can/raw.h>
12621int
Pablo Galindo53e55292021-04-05 17:38:40 +010012622main (void)
Zackery Spytz97e0de02020-04-09 06:03:49 -060012623{
12624int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
12625 ;
12626 return 0;
12627}
12628_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010012629if ac_fn_c_try_compile "$LINENO"
12630then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060012631
12632
Pablo Galindo53e55292021-04-05 17:38:40 +010012633printf "%s\n" "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060012634
Pablo Galindo53e55292021-04-05 17:38:40 +010012635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12636printf "%s\n" "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012637
Pablo Galindo53e55292021-04-05 17:38:40 +010012638else $as_nop
Zackery Spytz97e0de02020-04-09 06:03:49 -060012639
Pablo Galindo53e55292021-04-05 17:38:40 +010012640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12641printf "%s\n" "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012642
12643fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012644rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060012645
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012646# Check for --with-doc-strings
Pablo Galindo53e55292021-04-05 17:38:40 +010012647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
12648printf %s "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650# Check whether --with-doc-strings was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010012651if test ${with_doc_strings+y}
12652then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653 withval=$with_doc_strings;
12654fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012655
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012656
12657if test -z "$with_doc_strings"
12658then with_doc_strings="yes"
12659fi
12660if test "$with_doc_strings" != "no"
12661then
12662
Pablo Galindo53e55292021-04-05 17:38:40 +010012663printf "%s\n" "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012664
12665fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
12667printf "%s\n" "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012668
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000012669# Check for Python-specific malloc support
Pablo Galindo53e55292021-04-05 17:38:40 +010012670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
12671printf %s "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673# Check whether --with-pymalloc was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010012674if test ${with_pymalloc+y}
12675then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012676 withval=$with_pymalloc;
12677fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012678
Neil Schemenauera35c6882001-02-27 04:45:05 +000012679
Neil Schemenauer16c22972002-03-22 15:34:49 +000012680if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012681then
12682 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000012683fi
12684if test "$with_pymalloc" != "no"
12685then
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Pablo Galindo53e55292021-04-05 17:38:40 +010012687printf "%s\n" "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000012688
12689fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
12691printf "%s\n" "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000012692
Nick Coghlan6ea41862017-06-11 13:16:15 +100012693# Check for --with-c-locale-coercion
Pablo Galindo53e55292021-04-05 17:38:40 +010012694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
12695printf %s "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012696
12697# Check whether --with-c-locale-coercion was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010012698if test ${with_c_locale_coercion+y}
12699then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100012700 withval=$with_c_locale_coercion;
12701fi
12702
12703
12704if test -z "$with_c_locale_coercion"
12705then
12706 with_c_locale_coercion="yes"
12707fi
12708if test "$with_c_locale_coercion" != "no"
12709then
12710
Pablo Galindo53e55292021-04-05 17:38:40 +010012711printf "%s\n" "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100012712
12713fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
12715printf "%s\n" "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012716
Benjamin Peterson05159c42009-12-03 03:01:27 +000012717# Check for Valgrind support
Pablo Galindo53e55292021-04-05 17:38:40 +010012718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
12719printf %s "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012720
12721# Check whether --with-valgrind was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010012722if test ${with_valgrind+y}
12723then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012724 withval=$with_valgrind;
Pablo Galindo53e55292021-04-05 17:38:40 +010012725else $as_nop
Benjamin Peterson05159c42009-12-03 03:01:27 +000012726 with_valgrind=no
12727fi
12728
Pablo Galindo53e55292021-04-05 17:38:40 +010012729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
12730printf "%s\n" "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012731if test "$with_valgrind" != no; then
Pablo Galindo53e55292021-04-05 17:38:40 +010012732 ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
12733if test "x$ac_cv_header_valgrind_valgrind_h" = xyes
12734then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012735
Pablo Galindo53e55292021-04-05 17:38:40 +010012736printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000012737
Pablo Galindo53e55292021-04-05 17:38:40 +010012738else $as_nop
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012739 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000012740
12741fi
12742
Jeffrey Yasskin39370832010-05-03 19:29:34 +000012743 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000012744fi
12745
Łukasz Langaa785c872016-09-09 17:37:37 -070012746# Check for DTrace support
Pablo Galindo53e55292021-04-05 17:38:40 +010012747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
12748printf %s "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012749
12750# Check whether --with-dtrace was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010012751if test ${with_dtrace+y}
12752then :
Łukasz Langaa785c872016-09-09 17:37:37 -070012753 withval=$with_dtrace;
Pablo Galindo53e55292021-04-05 17:38:40 +010012754else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012755 with_dtrace=no
12756fi
12757
Pablo Galindo53e55292021-04-05 17:38:40 +010012758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
12759printf "%s\n" "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012760
12761
12762
12763
12764
12765DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070012766DTRACE_HEADERS=
12767DTRACE_OBJS=
12768
12769if test "$with_dtrace" = "yes"
12770then
12771 # Extract the first word of "dtrace", so it can be a program name with args.
12772set dummy dtrace; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +010012773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774printf %s "checking for $ac_word... " >&6; }
12775if test ${ac_cv_path_DTRACE+y}
12776then :
12777 printf %s "(cached) " >&6
12778else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012779 case $DTRACE in
12780 [\\/]* | ?:[\\/]*)
12781 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
12782 ;;
12783 *)
12784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12785for as_dir in $PATH
12786do
12787 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +010012788 case $as_dir in #(((
12789 '') as_dir=./ ;;
12790 */) ;;
12791 *) as_dir=$as_dir/ ;;
12792 esac
Łukasz Langaa785c872016-09-09 17:37:37 -070012793 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +010012794 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
12795 ac_cv_path_DTRACE="$as_dir$ac_word$ac_exec_ext"
12796 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070012797 break 2
12798 fi
12799done
12800 done
12801IFS=$as_save_IFS
12802
12803 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
12804 ;;
12805esac
12806fi
12807DTRACE=$ac_cv_path_DTRACE
12808if test -n "$DTRACE"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010012809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
12810printf "%s\n" "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012811else
Pablo Galindo53e55292021-04-05 17:38:40 +010012812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12813printf "%s\n" "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012814fi
12815
12816
12817 if test "$DTRACE" = "not found"; then
12818 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
12819 fi
12820
Pablo Galindo53e55292021-04-05 17:38:40 +010012821printf "%s\n" "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070012822
12823 DTRACE_HEADERS="Include/pydtrace_probes.h"
12824
12825 # On OS X, DTrace providers do not need to be explicitly compiled and
12826 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
12827 # generation flag '-G'. We check for presence of this flag, rather than
12828 # hardcoding support by OS, in the interest of robustness.
Pablo Galindo53e55292021-04-05 17:38:40 +010012829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
12830printf %s "checking whether DTrace probes require linking... " >&6; }
12831if test ${ac_cv_dtrace_link+y}
12832then :
12833 printf %s "(cached) " >&6
12834else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012835 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010012836 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010012837 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070012838 ac_cv_dtrace_link=yes
12839
12840fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
12842printf "%s\n" "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012843 if test "$ac_cv_dtrace_link" = "yes"; then
12844 DTRACE_OBJS="Python/pydtrace.o"
12845 fi
12846fi
12847
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012848# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012849
Guido van Rossum98935bf2001-09-05 19:13:16 +000012850DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012851
Guido van Rossume97ee181999-12-20 21:27:22 +000012852# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060012853# platforms have dlopen(), but don't want to use it.
Pablo Galindo53e55292021-04-05 17:38:40 +010012854ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12855if test "x$ac_cv_func_dlopen" = xyes
12856then :
12857 printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012858
Guido van Rossume97ee181999-12-20 21:27:22 +000012859fi
12860
Michael W. Hudson54241132001-12-07 15:38:26 +000012861
Guido van Rossume97ee181999-12-20 21:27:22 +000012862# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12863# loading of modules.
12864
Pablo Galindo53e55292021-04-05 17:38:40 +010012865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
12866printf %s "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012867if test -z "$DYNLOADFILE"
12868then
12869 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000012870 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012871 *)
12872 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12873 # out any dynamic loading
12874 if test "$ac_cv_func_dlopen" = yes
12875 then DYNLOADFILE="dynload_shlib.o"
12876 else DYNLOADFILE="dynload_stub.o"
12877 fi
12878 ;;
12879 esac
12880fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
12882printf "%s\n" "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012883if test "$DYNLOADFILE" != "dynload_stub.o"
12884then
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Pablo Galindo53e55292021-04-05 17:38:40 +010012886printf "%s\n" "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012887
12888fi
12889
Neil Schemenauer4e425612001-06-19 15:44:15 +000012890# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12891
Michael W. Hudson54241132001-12-07 15:38:26 +000012892
Pablo Galindo53e55292021-04-05 17:38:40 +010012893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
12894printf %s "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000012895if test -z "$MACHDEP_OBJS"
12896then
Jack Jansene578a632001-08-15 01:27:14 +000012897 MACHDEP_OBJS=$extra_machdep_objs
12898else
12899 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012900fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012901if test -z "$MACHDEP_OBJS"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010012902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
12903printf "%s\n" "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012904else
Pablo Galindo53e55292021-04-05 17:38:40 +010012905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
12906printf "%s\n" "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012907fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000012908
Guido van Rossum627b2d71993-12-24 10:39:16 +000012909# checks for library functions
Pablo Galindo53e55292021-04-05 17:38:40 +010012910ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm"
12911if test "x$ac_cv_func_alarm" = xyes
12912then :
12913 printf "%s\n" "#define HAVE_ALARM 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012914
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012915fi
Pablo Galindo53e55292021-04-05 17:38:40 +010012916ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
12917if test "x$ac_cv_func_accept4" = xyes
12918then :
12919 printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
12920
12921fi
12922ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
12923if test "x$ac_cv_func_setitimer" = xyes
12924then :
12925 printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
12926
12927fi
12928ac_fn_c_check_func "$LINENO" "getitimer" "ac_cv_func_getitimer"
12929if test "x$ac_cv_func_getitimer" = xyes
12930then :
12931 printf "%s\n" "#define HAVE_GETITIMER 1" >>confdefs.h
12932
12933fi
12934ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12935if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
12936then :
12937 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
12938
12939fi
12940ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
12941if test "x$ac_cv_func_chown" = xyes
12942then :
12943 printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
12944
12945fi
12946ac_fn_c_check_func "$LINENO" "clock" "ac_cv_func_clock"
12947if test "x$ac_cv_func_clock" = xyes
12948then :
12949 printf "%s\n" "#define HAVE_CLOCK 1" >>confdefs.h
12950
12951fi
12952ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
12953if test "x$ac_cv_func_confstr" = xyes
12954then :
12955 printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
12956
12957fi
12958ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range"
12959if test "x$ac_cv_func_close_range" = xyes
12960then :
12961 printf "%s\n" "#define HAVE_CLOSE_RANGE 1" >>confdefs.h
12962
12963fi
12964ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range"
12965if test "x$ac_cv_func_copy_file_range" = xyes
12966then :
12967 printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h
12968
12969fi
12970ac_fn_c_check_func "$LINENO" "ctermid" "ac_cv_func_ctermid"
12971if test "x$ac_cv_func_ctermid" = xyes
12972then :
12973 printf "%s\n" "#define HAVE_CTERMID 1" >>confdefs.h
12974
12975fi
12976ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
12977if test "x$ac_cv_func_dup3" = xyes
12978then :
12979 printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
12980
12981fi
12982ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
12983if test "x$ac_cv_func_execv" = xyes
12984then :
12985 printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h
12986
12987fi
12988ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
12989if test "x$ac_cv_func_explicit_bzero" = xyes
12990then :
12991 printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
12992
12993fi
12994ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
12995if test "x$ac_cv_func_explicit_memset" = xyes
12996then :
12997 printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h
12998
12999fi
13000ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
13001if test "x$ac_cv_func_faccessat" = xyes
13002then :
13003 printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h
13004
13005fi
13006ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13007if test "x$ac_cv_func_fchmod" = xyes
13008then :
13009 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13010
13011fi
13012ac_fn_c_check_func "$LINENO" "fchmodat" "ac_cv_func_fchmodat"
13013if test "x$ac_cv_func_fchmodat" = xyes
13014then :
13015 printf "%s\n" "#define HAVE_FCHMODAT 1" >>confdefs.h
13016
13017fi
13018ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13019if test "x$ac_cv_func_fchown" = xyes
13020then :
13021 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
13022
13023fi
13024ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
13025if test "x$ac_cv_func_fchownat" = xyes
13026then :
13027 printf "%s\n" "#define HAVE_FCHOWNAT 1" >>confdefs.h
13028
13029fi
13030ac_fn_c_check_func "$LINENO" "fdwalk" "ac_cv_func_fdwalk"
13031if test "x$ac_cv_func_fdwalk" = xyes
13032then :
13033 printf "%s\n" "#define HAVE_FDWALK 1" >>confdefs.h
13034
13035fi
13036ac_fn_c_check_func "$LINENO" "fexecve" "ac_cv_func_fexecve"
13037if test "x$ac_cv_func_fexecve" = xyes
13038then :
13039 printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h
13040
13041fi
13042ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir"
13043if test "x$ac_cv_func_fdopendir" = xyes
13044then :
13045 printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h
13046
13047fi
13048ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
13049if test "x$ac_cv_func_fork" = xyes
13050then :
13051 printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h
13052
13053fi
13054ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf"
13055if test "x$ac_cv_func_fpathconf" = xyes
13056then :
13057 printf "%s\n" "#define HAVE_FPATHCONF 1" >>confdefs.h
13058
13059fi
13060ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
13061if test "x$ac_cv_func_fstatat" = xyes
13062then :
13063 printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
13064
13065fi
13066ac_fn_c_check_func "$LINENO" "ftime" "ac_cv_func_ftime"
13067if test "x$ac_cv_func_ftime" = xyes
13068then :
13069 printf "%s\n" "#define HAVE_FTIME 1" >>confdefs.h
13070
13071fi
13072ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13073if test "x$ac_cv_func_ftruncate" = xyes
13074then :
13075 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13076
13077fi
13078ac_fn_c_check_func "$LINENO" "futimesat" "ac_cv_func_futimesat"
13079if test "x$ac_cv_func_futimesat" = xyes
13080then :
13081 printf "%s\n" "#define HAVE_FUTIMESAT 1" >>confdefs.h
13082
13083fi
13084ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
13085if test "x$ac_cv_func_futimens" = xyes
13086then :
13087 printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h
13088
13089fi
13090ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes"
13091if test "x$ac_cv_func_futimes" = xyes
13092then :
13093 printf "%s\n" "#define HAVE_FUTIMES 1" >>confdefs.h
13094
13095fi
13096ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
13097if test "x$ac_cv_func_gai_strerror" = xyes
13098then :
13099 printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h
13100
13101fi
13102ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
13103if test "x$ac_cv_func_getentropy" = xyes
13104then :
13105 printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
13106
13107fi
13108ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r"
13109if test "x$ac_cv_func_getgrgid_r" = xyes
13110then :
13111 printf "%s\n" "#define HAVE_GETGRGID_R 1" >>confdefs.h
13112
13113fi
13114ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r"
13115if test "x$ac_cv_func_getgrnam_r" = xyes
13116then :
13117 printf "%s\n" "#define HAVE_GETGRNAM_R 1" >>confdefs.h
13118
13119fi
13120ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
13121if test "x$ac_cv_func_getgrouplist" = xyes
13122then :
13123 printf "%s\n" "#define HAVE_GETGROUPLIST 1" >>confdefs.h
13124
13125fi
13126ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
13127if test "x$ac_cv_func_getgroups" = xyes
13128then :
13129 printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h
13130
13131fi
13132ac_fn_c_check_func "$LINENO" "getlogin" "ac_cv_func_getlogin"
13133if test "x$ac_cv_func_getlogin" = xyes
13134then :
13135 printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h
13136
13137fi
13138ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
13139if test "x$ac_cv_func_getloadavg" = xyes
13140then :
13141 printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h
13142
13143fi
13144ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername"
13145if test "x$ac_cv_func_getpeername" = xyes
13146then :
13147 printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h
13148
13149fi
13150ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13151if test "x$ac_cv_func_getpgid" = xyes
13152then :
13153 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13154
13155fi
13156ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
13157if test "x$ac_cv_func_getpid" = xyes
13158then :
13159 printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h
13160
13161fi
13162ac_fn_c_check_func "$LINENO" "getpriority" "ac_cv_func_getpriority"
13163if test "x$ac_cv_func_getpriority" = xyes
13164then :
13165 printf "%s\n" "#define HAVE_GETPRIORITY 1" >>confdefs.h
13166
13167fi
13168ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid"
13169if test "x$ac_cv_func_getresuid" = xyes
13170then :
13171 printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h
13172
13173fi
13174ac_fn_c_check_func "$LINENO" "getresgid" "ac_cv_func_getresgid"
13175if test "x$ac_cv_func_getresgid" = xyes
13176then :
13177 printf "%s\n" "#define HAVE_GETRESGID 1" >>confdefs.h
13178
13179fi
13180ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13181if test "x$ac_cv_func_getpwent" = xyes
13182then :
13183 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13184
13185fi
13186ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r"
13187if test "x$ac_cv_func_getpwnam_r" = xyes
13188then :
13189 printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h
13190
13191fi
13192ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r"
13193if test "x$ac_cv_func_getpwuid_r" = xyes
13194then :
13195 printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h
13196
13197fi
13198ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
13199if test "x$ac_cv_func_getspnam" = xyes
13200then :
13201 printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h
13202
13203fi
13204ac_fn_c_check_func "$LINENO" "getspent" "ac_cv_func_getspent"
13205if test "x$ac_cv_func_getspent" = xyes
13206then :
13207 printf "%s\n" "#define HAVE_GETSPENT 1" >>confdefs.h
13208
13209fi
13210ac_fn_c_check_func "$LINENO" "getsid" "ac_cv_func_getsid"
13211if test "x$ac_cv_func_getsid" = xyes
13212then :
13213 printf "%s\n" "#define HAVE_GETSID 1" >>confdefs.h
13214
13215fi
13216ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13217if test "x$ac_cv_func_getwd" = xyes
13218then :
13219 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
13220
13221fi
13222ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex"
13223if test "x$ac_cv_func_if_nameindex" = xyes
13224then :
13225 printf "%s\n" "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
13226
13227fi
13228ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
13229if test "x$ac_cv_func_initgroups" = xyes
13230then :
13231 printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
13232
13233fi
13234ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
13235if test "x$ac_cv_func_kill" = xyes
13236then :
13237 printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
13238
13239fi
13240ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg"
13241if test "x$ac_cv_func_killpg" = xyes
13242then :
13243 printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h
13244
13245fi
13246ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
13247if test "x$ac_cv_func_lchown" = xyes
13248then :
13249 printf "%s\n" "#define HAVE_LCHOWN 1" >>confdefs.h
13250
13251fi
13252ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf"
13253if test "x$ac_cv_func_lockf" = xyes
13254then :
13255 printf "%s\n" "#define HAVE_LOCKF 1" >>confdefs.h
13256
13257fi
13258ac_fn_c_check_func "$LINENO" "linkat" "ac_cv_func_linkat"
13259if test "x$ac_cv_func_linkat" = xyes
13260then :
13261 printf "%s\n" "#define HAVE_LINKAT 1" >>confdefs.h
13262
13263fi
13264ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13265if test "x$ac_cv_func_lstat" = xyes
13266then :
13267 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13268
13269fi
13270ac_fn_c_check_func "$LINENO" "lutimes" "ac_cv_func_lutimes"
13271if test "x$ac_cv_func_lutimes" = xyes
13272then :
13273 printf "%s\n" "#define HAVE_LUTIMES 1" >>confdefs.h
13274
13275fi
13276ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
13277if test "x$ac_cv_func_mmap" = xyes
13278then :
13279 printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
13280
13281fi
13282ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
13283if test "x$ac_cv_func_memrchr" = xyes
13284then :
13285 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
13286
13287fi
13288ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
13289if test "x$ac_cv_func_mbrtowc" = xyes
13290then :
13291 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
13292
13293fi
13294ac_fn_c_check_func "$LINENO" "mkdirat" "ac_cv_func_mkdirat"
13295if test "x$ac_cv_func_mkdirat" = xyes
13296then :
13297 printf "%s\n" "#define HAVE_MKDIRAT 1" >>confdefs.h
13298
13299fi
13300ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
13301if test "x$ac_cv_func_mkfifo" = xyes
13302then :
13303 printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h
13304
13305fi
13306ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise"
13307if test "x$ac_cv_func_madvise" = xyes
13308then :
13309 printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h
13310
13311fi
13312ac_fn_c_check_func "$LINENO" "mkfifoat" "ac_cv_func_mkfifoat"
13313if test "x$ac_cv_func_mkfifoat" = xyes
13314then :
13315 printf "%s\n" "#define HAVE_MKFIFOAT 1" >>confdefs.h
13316
13317fi
13318ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod"
13319if test "x$ac_cv_func_mknod" = xyes
13320then :
13321 printf "%s\n" "#define HAVE_MKNOD 1" >>confdefs.h
13322
13323fi
13324ac_fn_c_check_func "$LINENO" "mknodat" "ac_cv_func_mknodat"
13325if test "x$ac_cv_func_mknodat" = xyes
13326then :
13327 printf "%s\n" "#define HAVE_MKNODAT 1" >>confdefs.h
13328
13329fi
13330ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
13331if test "x$ac_cv_func_mktime" = xyes
13332then :
13333 printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h
13334
13335fi
13336ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap"
13337if test "x$ac_cv_func_mremap" = xyes
13338then :
13339 printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h
13340
13341fi
13342ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
13343if test "x$ac_cv_func_nice" = xyes
13344then :
13345 printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
13346
13347fi
13348ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
13349if test "x$ac_cv_func_openat" = xyes
13350then :
13351 printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h
13352
13353fi
13354ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
13355if test "x$ac_cv_func_pathconf" = xyes
13356then :
13357 printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h
13358
13359fi
13360ac_fn_c_check_func "$LINENO" "pause" "ac_cv_func_pause"
13361if test "x$ac_cv_func_pause" = xyes
13362then :
13363 printf "%s\n" "#define HAVE_PAUSE 1" >>confdefs.h
13364
13365fi
13366ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
13367if test "x$ac_cv_func_pipe2" = xyes
13368then :
13369 printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
13370
13371fi
13372ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
13373if test "x$ac_cv_func_plock" = xyes
13374then :
13375 printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h
13376
13377fi
13378ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
13379if test "x$ac_cv_func_poll" = xyes
13380then :
13381 printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
13382
13383fi
13384ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate"
13385if test "x$ac_cv_func_posix_fallocate" = xyes
13386then :
13387 printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h
13388
13389fi
13390ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13391if test "x$ac_cv_func_posix_fadvise" = xyes
13392then :
13393 printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
13394
13395fi
13396ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
13397if test "x$ac_cv_func_posix_spawn" = xyes
13398then :
13399 printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
13400
13401fi
13402ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
13403if test "x$ac_cv_func_posix_spawnp" = xyes
13404then :
13405 printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
13406
13407fi
13408ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
13409if test "x$ac_cv_func_pread" = xyes
13410then :
13411 printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h
13412
13413fi
13414ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv"
13415if test "x$ac_cv_func_preadv" = xyes
13416then :
13417 printf "%s\n" "#define HAVE_PREADV 1" >>confdefs.h
13418
13419fi
13420ac_fn_c_check_func "$LINENO" "preadv2" "ac_cv_func_preadv2"
13421if test "x$ac_cv_func_preadv2" = xyes
13422then :
13423 printf "%s\n" "#define HAVE_PREADV2 1" >>confdefs.h
13424
13425fi
13426ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock"
13427if test "x$ac_cv_func_pthread_condattr_setclock" = xyes
13428then :
13429 printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
13430
13431fi
13432ac_fn_c_check_func "$LINENO" "pthread_init" "ac_cv_func_pthread_init"
13433if test "x$ac_cv_func_pthread_init" = xyes
13434then :
13435 printf "%s\n" "#define HAVE_PTHREAD_INIT 1" >>confdefs.h
13436
13437fi
13438ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13439if test "x$ac_cv_func_pthread_kill" = xyes
13440then :
13441 printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
13442
13443fi
13444ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
13445if test "x$ac_cv_func_pwrite" = xyes
13446then :
13447 printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h
13448
13449fi
13450ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev"
13451if test "x$ac_cv_func_pwritev" = xyes
13452then :
13453 printf "%s\n" "#define HAVE_PWRITEV 1" >>confdefs.h
13454
13455fi
13456ac_fn_c_check_func "$LINENO" "pwritev2" "ac_cv_func_pwritev2"
13457if test "x$ac_cv_func_pwritev2" = xyes
13458then :
13459 printf "%s\n" "#define HAVE_PWRITEV2 1" >>confdefs.h
13460
13461fi
13462ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13463if test "x$ac_cv_func_readlink" = xyes
13464then :
13465 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13466
13467fi
13468ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
13469if test "x$ac_cv_func_readlinkat" = xyes
13470then :
13471 printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h
13472
13473fi
13474ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv"
13475if test "x$ac_cv_func_readv" = xyes
13476then :
13477 printf "%s\n" "#define HAVE_READV 1" >>confdefs.h
13478
13479fi
13480ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
13481if test "x$ac_cv_func_realpath" = xyes
13482then :
13483 printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
13484
13485fi
13486ac_fn_c_check_func "$LINENO" "renameat" "ac_cv_func_renameat"
13487if test "x$ac_cv_func_renameat" = xyes
13488then :
13489 printf "%s\n" "#define HAVE_RENAMEAT 1" >>confdefs.h
13490
13491fi
13492ac_fn_c_check_func "$LINENO" "sem_open" "ac_cv_func_sem_open"
13493if test "x$ac_cv_func_sem_open" = xyes
13494then :
13495 printf "%s\n" "#define HAVE_SEM_OPEN 1" >>confdefs.h
13496
13497fi
13498ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
13499if test "x$ac_cv_func_sem_timedwait" = xyes
13500then :
13501 printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
13502
13503fi
13504ac_fn_c_check_func "$LINENO" "sem_getvalue" "ac_cv_func_sem_getvalue"
13505if test "x$ac_cv_func_sem_getvalue" = xyes
13506then :
13507 printf "%s\n" "#define HAVE_SEM_GETVALUE 1" >>confdefs.h
13508
13509fi
13510ac_fn_c_check_func "$LINENO" "sem_unlink" "ac_cv_func_sem_unlink"
13511if test "x$ac_cv_func_sem_unlink" = xyes
13512then :
13513 printf "%s\n" "#define HAVE_SEM_UNLINK 1" >>confdefs.h
13514
13515fi
13516ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile"
13517if test "x$ac_cv_func_sendfile" = xyes
13518then :
13519 printf "%s\n" "#define HAVE_SENDFILE 1" >>confdefs.h
13520
13521fi
13522ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
13523if test "x$ac_cv_func_setegid" = xyes
13524then :
13525 printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
13526
13527fi
13528ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
13529if test "x$ac_cv_func_seteuid" = xyes
13530then :
13531 printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
13532
13533fi
13534ac_fn_c_check_func "$LINENO" "setgid" "ac_cv_func_setgid"
13535if test "x$ac_cv_func_setgid" = xyes
13536then :
13537 printf "%s\n" "#define HAVE_SETGID 1" >>confdefs.h
13538
13539fi
13540ac_fn_c_check_func "$LINENO" "sethostname" "ac_cv_func_sethostname"
13541if test "x$ac_cv_func_sethostname" = xyes
13542then :
13543 printf "%s\n" "#define HAVE_SETHOSTNAME 1" >>confdefs.h
13544
13545fi
13546ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
13547if test "x$ac_cv_func_setlocale" = xyes
13548then :
13549 printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
13550
13551fi
13552ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
13553if test "x$ac_cv_func_setregid" = xyes
13554then :
13555 printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
13556
13557fi
13558ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
13559if test "x$ac_cv_func_setreuid" = xyes
13560then :
13561 printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
13562
13563fi
13564ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
13565if test "x$ac_cv_func_setresuid" = xyes
13566then :
13567 printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
13568
13569fi
13570ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
13571if test "x$ac_cv_func_setresgid" = xyes
13572then :
13573 printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
13574
13575fi
13576ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13577if test "x$ac_cv_func_setsid" = xyes
13578then :
13579 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13580
13581fi
13582ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13583if test "x$ac_cv_func_setpgid" = xyes
13584then :
13585 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13586
13587fi
13588ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
13589if test "x$ac_cv_func_setpgrp" = xyes
13590then :
13591 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
13592
13593fi
13594ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
13595if test "x$ac_cv_func_setpriority" = xyes
13596then :
13597 printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
13598
13599fi
13600ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid"
13601if test "x$ac_cv_func_setuid" = xyes
13602then :
13603 printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h
13604
13605fi
13606ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
13607if test "x$ac_cv_func_setvbuf" = xyes
13608then :
13609 printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
13610
13611fi
13612ac_fn_c_check_func "$LINENO" "sched_get_priority_max" "ac_cv_func_sched_get_priority_max"
13613if test "x$ac_cv_func_sched_get_priority_max" = xyes
13614then :
13615 printf "%s\n" "#define HAVE_SCHED_GET_PRIORITY_MAX 1" >>confdefs.h
13616
13617fi
13618ac_fn_c_check_func "$LINENO" "sched_setaffinity" "ac_cv_func_sched_setaffinity"
13619if test "x$ac_cv_func_sched_setaffinity" = xyes
13620then :
13621 printf "%s\n" "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
13622
13623fi
13624ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
13625if test "x$ac_cv_func_sched_setscheduler" = xyes
13626then :
13627 printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
13628
13629fi
13630ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
13631if test "x$ac_cv_func_sched_setparam" = xyes
13632then :
13633 printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
13634
13635fi
13636ac_fn_c_check_func "$LINENO" "sched_rr_get_interval" "ac_cv_func_sched_rr_get_interval"
13637if test "x$ac_cv_func_sched_rr_get_interval" = xyes
13638then :
13639 printf "%s\n" "#define HAVE_SCHED_RR_GET_INTERVAL 1" >>confdefs.h
13640
13641fi
13642ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13643if test "x$ac_cv_func_sigaction" = xyes
13644then :
13645 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13646
13647fi
13648ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13649if test "x$ac_cv_func_sigaltstack" = xyes
13650then :
13651 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13652
13653fi
13654ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset"
13655if test "x$ac_cv_func_sigfillset" = xyes
13656then :
13657 printf "%s\n" "#define HAVE_SIGFILLSET 1" >>confdefs.h
13658
13659fi
13660ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt"
13661if test "x$ac_cv_func_siginterrupt" = xyes
13662then :
13663 printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h
13664
13665fi
13666ac_fn_c_check_func "$LINENO" "sigpending" "ac_cv_func_sigpending"
13667if test "x$ac_cv_func_sigpending" = xyes
13668then :
13669 printf "%s\n" "#define HAVE_SIGPENDING 1" >>confdefs.h
13670
13671fi
13672ac_fn_c_check_func "$LINENO" "sigrelse" "ac_cv_func_sigrelse"
13673if test "x$ac_cv_func_sigrelse" = xyes
13674then :
13675 printf "%s\n" "#define HAVE_SIGRELSE 1" >>confdefs.h
13676
13677fi
13678ac_fn_c_check_func "$LINENO" "sigtimedwait" "ac_cv_func_sigtimedwait"
13679if test "x$ac_cv_func_sigtimedwait" = xyes
13680then :
13681 printf "%s\n" "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
13682
13683fi
13684ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
13685if test "x$ac_cv_func_sigwait" = xyes
13686then :
13687 printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
13688
13689fi
13690ac_fn_c_check_func "$LINENO" "sigwaitinfo" "ac_cv_func_sigwaitinfo"
13691if test "x$ac_cv_func_sigwaitinfo" = xyes
13692then :
13693 printf "%s\n" "#define HAVE_SIGWAITINFO 1" >>confdefs.h
13694
13695fi
13696ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13697if test "x$ac_cv_func_snprintf" = xyes
13698then :
13699 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
13700
13701fi
13702ac_fn_c_check_func "$LINENO" "splice" "ac_cv_func_splice"
13703if test "x$ac_cv_func_splice" = xyes
13704then :
13705 printf "%s\n" "#define HAVE_SPLICE 1" >>confdefs.h
13706
13707fi
13708ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13709if test "x$ac_cv_func_strftime" = xyes
13710then :
13711 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13712
13713fi
13714ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13715if test "x$ac_cv_func_strlcpy" = xyes
13716then :
13717 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
13718
13719fi
13720ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
13721if test "x$ac_cv_func_strsignal" = xyes
13722then :
13723 printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
13724
13725fi
13726ac_fn_c_check_func "$LINENO" "symlinkat" "ac_cv_func_symlinkat"
13727if test "x$ac_cv_func_symlinkat" = xyes
13728then :
13729 printf "%s\n" "#define HAVE_SYMLINKAT 1" >>confdefs.h
13730
13731fi
13732ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
13733if test "x$ac_cv_func_sync" = xyes
13734then :
13735 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
13736
13737fi
13738ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
13739if test "x$ac_cv_func_sysconf" = xyes
13740then :
13741 printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
13742
13743fi
13744ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp"
13745if test "x$ac_cv_func_tcgetpgrp" = xyes
13746then :
13747 printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h
13748
13749fi
13750ac_fn_c_check_func "$LINENO" "tcsetpgrp" "ac_cv_func_tcsetpgrp"
13751if test "x$ac_cv_func_tcsetpgrp" = xyes
13752then :
13753 printf "%s\n" "#define HAVE_TCSETPGRP 1" >>confdefs.h
13754
13755fi
13756ac_fn_c_check_func "$LINENO" "tempnam" "ac_cv_func_tempnam"
13757if test "x$ac_cv_func_tempnam" = xyes
13758then :
13759 printf "%s\n" "#define HAVE_TEMPNAM 1" >>confdefs.h
13760
13761fi
13762ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
13763if test "x$ac_cv_func_timegm" = xyes
13764then :
13765 printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
13766
13767fi
13768ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
13769if test "x$ac_cv_func_times" = xyes
13770then :
13771 printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h
13772
13773fi
13774ac_fn_c_check_func "$LINENO" "tmpfile" "ac_cv_func_tmpfile"
13775if test "x$ac_cv_func_tmpfile" = xyes
13776then :
13777 printf "%s\n" "#define HAVE_TMPFILE 1" >>confdefs.h
13778
13779fi
13780ac_fn_c_check_func "$LINENO" "tmpnam" "ac_cv_func_tmpnam"
13781if test "x$ac_cv_func_tmpnam" = xyes
13782then :
13783 printf "%s\n" "#define HAVE_TMPNAM 1" >>confdefs.h
13784
13785fi
13786ac_fn_c_check_func "$LINENO" "tmpnam_r" "ac_cv_func_tmpnam_r"
13787if test "x$ac_cv_func_tmpnam_r" = xyes
13788then :
13789 printf "%s\n" "#define HAVE_TMPNAM_R 1" >>confdefs.h
13790
13791fi
13792ac_fn_c_check_func "$LINENO" "truncate" "ac_cv_func_truncate"
13793if test "x$ac_cv_func_truncate" = xyes
13794then :
13795 printf "%s\n" "#define HAVE_TRUNCATE 1" >>confdefs.h
13796
13797fi
13798ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
13799if test "x$ac_cv_func_uname" = xyes
13800then :
13801 printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
13802
13803fi
13804ac_fn_c_check_func "$LINENO" "unlinkat" "ac_cv_func_unlinkat"
13805if test "x$ac_cv_func_unlinkat" = xyes
13806then :
13807 printf "%s\n" "#define HAVE_UNLINKAT 1" >>confdefs.h
13808
13809fi
13810ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
13811if test "x$ac_cv_func_utimensat" = xyes
13812then :
13813 printf "%s\n" "#define HAVE_UTIMENSAT 1" >>confdefs.h
13814
13815fi
13816ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13817if test "x$ac_cv_func_utimes" = xyes
13818then :
13819 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13820
13821fi
13822ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
13823if test "x$ac_cv_func_vfork" = xyes
13824then :
13825 printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
13826
13827fi
13828ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
13829if test "x$ac_cv_func_waitid" = xyes
13830then :
13831 printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
13832
13833fi
13834ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
13835if test "x$ac_cv_func_waitpid" = xyes
13836then :
13837 printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
13838
13839fi
13840ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
13841if test "x$ac_cv_func_wait3" = xyes
13842then :
13843 printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h
13844
13845fi
13846ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4"
13847if test "x$ac_cv_func_wait4" = xyes
13848then :
13849 printf "%s\n" "#define HAVE_WAIT4 1" >>confdefs.h
13850
13851fi
13852ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
13853if test "x$ac_cv_func_wcscoll" = xyes
13854then :
13855 printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h
13856
13857fi
13858ac_fn_c_check_func "$LINENO" "wcsftime" "ac_cv_func_wcsftime"
13859if test "x$ac_cv_func_wcsftime" = xyes
13860then :
13861 printf "%s\n" "#define HAVE_WCSFTIME 1" >>confdefs.h
13862
13863fi
13864ac_fn_c_check_func "$LINENO" "wcsxfrm" "ac_cv_func_wcsxfrm"
13865if test "x$ac_cv_func_wcsxfrm" = xyes
13866then :
13867 printf "%s\n" "#define HAVE_WCSXFRM 1" >>confdefs.h
13868
13869fi
13870ac_fn_c_check_func "$LINENO" "wmemcmp" "ac_cv_func_wmemcmp"
13871if test "x$ac_cv_func_wmemcmp" = xyes
13872then :
13873 printf "%s\n" "#define HAVE_WMEMCMP 1" >>confdefs.h
13874
13875fi
13876ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
13877if test "x$ac_cv_func_writev" = xyes
13878then :
13879 printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
13880
13881fi
13882ac_fn_c_check_func "$LINENO" "_getpty" "ac_cv_func__getpty"
13883if test "x$ac_cv_func__getpty" = xyes
13884then :
13885 printf "%s\n" "#define HAVE__GETPTY 1" >>confdefs.h
13886
13887fi
13888ac_fn_c_check_func "$LINENO" "rtpSpawn" "ac_cv_func_rtpSpawn"
13889if test "x$ac_cv_func_rtpSpawn" = xyes
13890then :
13891 printf "%s\n" "#define HAVE_RTPSPAWN 1" >>confdefs.h
13892
13893fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013894
Michael W. Hudson54241132001-12-07 15:38:26 +000013895
Benjamin Peterson40caa052018-09-12 15:52:40 -070013896# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
13897# links. Some libc implementations have a stub lchmod implementation that always
13898# returns an error.
13899if test "$MACHDEP" != linux; then
13900 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Pablo Galindo53e55292021-04-05 17:38:40 +010013901if test "x$ac_cv_func_lchmod" = xyes
13902then :
13903 printf "%s\n" "#define HAVE_LCHMOD 1" >>confdefs.h
13904
13905fi
13906
13907fi
13908
13909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
13910printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
13911if test ${ac_cv_c_undeclared_builtin_options+y}
13912then :
13913 printf %s "(cached) " >&6
13914else $as_nop
13915 ac_save_CFLAGS=$CFLAGS
13916 ac_cv_c_undeclared_builtin_options='cannot detect'
13917 for ac_arg in '' -fno-builtin; do
13918 CFLAGS="$ac_save_CFLAGS $ac_arg"
13919 # This test program should *not* compile successfully.
13920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13921/* end confdefs.h. */
13922
13923int
13924main (void)
13925{
13926(void) strchr;
13927 ;
13928 return 0;
13929}
Benjamin Petersoned709d52018-09-12 17:22:11 -070013930_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010013931if ac_fn_c_try_compile "$LINENO"
13932then :
13933
13934else $as_nop
13935 # This test program should compile successfully.
13936 # No library function is consistently available on
13937 # freestanding implementations, so test against a dummy
13938 # declaration. Include always-available headers on the
13939 # off chance that they somehow elicit warnings.
13940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13941/* end confdefs.h. */
13942#include <float.h>
13943#include <limits.h>
13944#include <stdarg.h>
13945#include <stddef.h>
13946extern void ac_decl (int, char *);
13947
13948int
13949main (void)
13950{
13951(void) ac_decl (0, (char *) 0);
13952 (void) ac_decl;
13953
13954 ;
13955 return 0;
13956}
13957_ACEOF
13958if ac_fn_c_try_compile "$LINENO"
13959then :
13960 if test x"$ac_arg" = x
13961then :
13962 ac_cv_c_undeclared_builtin_options='none needed'
13963else $as_nop
13964 ac_cv_c_undeclared_builtin_options=$ac_arg
13965fi
13966 break
13967fi
13968rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13969fi
13970rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13971 done
13972 CFLAGS=$ac_save_CFLAGS
Benjamin Peterson40caa052018-09-12 15:52:40 -070013973
13974fi
Pablo Galindo53e55292021-04-05 17:38:40 +010013975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
13976printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
13977 case $ac_cv_c_undeclared_builtin_options in #(
13978 'cannot detect') :
13979 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13980printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13981as_fn_error $? "cannot make $CC report undeclared builtins
13982See \`config.log' for more details" "$LINENO" 5; } ;; #(
13983 'none needed') :
13984 ac_c_undeclared_builtin_options='' ;; #(
13985 *) :
13986 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
13987esac
Benjamin Peterson40caa052018-09-12 15:52:40 -070013988
Pablo Galindo53e55292021-04-05 17:38:40 +010013989ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013990 #include <dirent.h>
Pablo Galindo53e55292021-04-05 17:38:40 +010013991" "$ac_c_undeclared_builtin_options" "CFLAGS"
13992if test "x$ac_cv_have_decl_dirfd" = xyes
13993then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013994
Pablo Galindo53e55292021-04-05 17:38:40 +010013995printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013996
13997fi
13998
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013999# For some functions, having a definition is not sufficient, since
14000# we want to take their address.
Pablo Galindo53e55292021-04-05 17:38:40 +010014001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
14002printf %s "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014004/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014005#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014006int
Pablo Galindo53e55292021-04-05 17:38:40 +010014007main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014008{
14009void *x=chroot
14010 ;
14011 return 0;
14012}
14013_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014014if ac_fn_c_try_compile "$LINENO"
14015then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014016
Pablo Galindo53e55292021-04-05 17:38:40 +010014017printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014018
Pablo Galindo53e55292021-04-05 17:38:40 +010014019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14020printf "%s\n" "yes" >&6; }
14021else $as_nop
14022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14023printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014024
14025fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014026rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for link" >&5
14028printf %s "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014031#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014032int
Pablo Galindo53e55292021-04-05 17:38:40 +010014033main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014034{
14035void *x=link
14036 ;
14037 return 0;
14038}
14039_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014040if ac_fn_c_try_compile "$LINENO"
14041then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014042
Pablo Galindo53e55292021-04-05 17:38:40 +010014043printf "%s\n" "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014044
Pablo Galindo53e55292021-04-05 17:38:40 +010014045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14046printf "%s\n" "yes" >&6; }
14047else $as_nop
14048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14049printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014050
14051fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014052rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
14054printf %s "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014056/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014057#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014058int
Pablo Galindo53e55292021-04-05 17:38:40 +010014059main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014060{
14061void *x=symlink
14062 ;
14063 return 0;
14064}
14065_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014066if ac_fn_c_try_compile "$LINENO"
14067then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014068
Pablo Galindo53e55292021-04-05 17:38:40 +010014069printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014070
Pablo Galindo53e55292021-04-05 17:38:40 +010014071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14072printf "%s\n" "yes" >&6; }
14073else $as_nop
14074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14075printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014076
14077fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014078rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
14080printf %s "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014082/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014083#include <unistd.h>
14084int
Pablo Galindo53e55292021-04-05 17:38:40 +010014085main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014086{
14087void *x=fchdir
14088 ;
14089 return 0;
14090}
14091_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014092if ac_fn_c_try_compile "$LINENO"
14093then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014094
Pablo Galindo53e55292021-04-05 17:38:40 +010014095printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014096
Pablo Galindo53e55292021-04-05 17:38:40 +010014097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14098printf "%s\n" "yes" >&6; }
14099else $as_nop
14100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14101printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014102
14103fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014104rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
14106printf %s "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014108/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014109#include <unistd.h>
14110int
Pablo Galindo53e55292021-04-05 17:38:40 +010014111main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014112{
14113void *x=fsync
14114 ;
14115 return 0;
14116}
14117_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014118if ac_fn_c_try_compile "$LINENO"
14119then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014120
Pablo Galindo53e55292021-04-05 17:38:40 +010014121printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014122
Pablo Galindo53e55292021-04-05 17:38:40 +010014123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14124printf "%s\n" "yes" >&6; }
14125else $as_nop
14126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14127printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014128
14129fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014130rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
14132printf %s "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014134/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014135#include <unistd.h>
14136int
Pablo Galindo53e55292021-04-05 17:38:40 +010014137main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014138{
14139void *x=fdatasync
14140 ;
14141 return 0;
14142}
14143_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014144if ac_fn_c_try_compile "$LINENO"
14145then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014146
Pablo Galindo53e55292021-04-05 17:38:40 +010014147printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014148
Pablo Galindo53e55292021-04-05 17:38:40 +010014149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14150printf "%s\n" "yes" >&6; }
14151else $as_nop
14152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14153printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014154
14155fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014156rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
14158printf %s "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014160/* end confdefs.h. */
14161#include <sys/epoll.h>
14162int
Pablo Galindo53e55292021-04-05 17:38:40 +010014163main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014164{
14165void *x=epoll_create
14166 ;
14167 return 0;
14168}
14169_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014170if ac_fn_c_try_compile "$LINENO"
14171then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014172
Pablo Galindo53e55292021-04-05 17:38:40 +010014173printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014174
Pablo Galindo53e55292021-04-05 17:38:40 +010014175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14176printf "%s\n" "yes" >&6; }
14177else $as_nop
14178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14179printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014180
14181fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014182rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
14184printf %s "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14186/* end confdefs.h. */
14187#include <sys/epoll.h>
14188int
Pablo Galindo53e55292021-04-05 17:38:40 +010014189main (void)
Benjamin Peterson95c16622011-12-27 15:36:32 -060014190{
14191void *x=epoll_create1
14192 ;
14193 return 0;
14194}
14195_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014196if ac_fn_c_try_compile "$LINENO"
14197then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060014198
Pablo Galindo53e55292021-04-05 17:38:40 +010014199printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060014200
Pablo Galindo53e55292021-04-05 17:38:40 +010014201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14202printf "%s\n" "yes" >&6; }
14203else $as_nop
14204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14205printf "%s\n" "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014206
14207fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014208rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
14210printf %s "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014212/* end confdefs.h. */
14213
14214#include <sys/types.h>
14215#include <sys/event.h>
14216
14217int
Pablo Galindo53e55292021-04-05 17:38:40 +010014218main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014219{
14220int x=kqueue()
14221 ;
14222 return 0;
14223}
14224_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014225if ac_fn_c_try_compile "$LINENO"
14226then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014227
Pablo Galindo53e55292021-04-05 17:38:40 +010014228printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014229
Pablo Galindo53e55292021-04-05 17:38:40 +010014230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14231printf "%s\n" "yes" >&6; }
14232else $as_nop
14233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14234printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014235
14236fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014237rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
14239printf %s "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241/* end confdefs.h. */
14242
14243#include <sys/time.h>
14244#include <sys/resource.h>
14245
14246int
Pablo Galindo53e55292021-04-05 17:38:40 +010014247main (void)
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014248{
14249void *x=prlimit
14250 ;
14251 return 0;
14252}
14253_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014254if ac_fn_c_try_compile "$LINENO"
14255then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014256
Pablo Galindo53e55292021-04-05 17:38:40 +010014257printf "%s\n" "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014258
Pablo Galindo53e55292021-04-05 17:38:40 +010014259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14260printf "%s\n" "yes" >&6; }
14261else $as_nop
14262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14263printf "%s\n" "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014264
14265fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014266rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
14268printf %s "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14270/* end confdefs.h. */
14271#include <mach-o/dyld.h>
14272int
Pablo Galindo53e55292021-04-05 17:38:40 +010014273main (void)
Ronald Oussoren41761932020-11-08 10:05:27 +010014274{
14275void *x=_dyld_shared_cache_contains_path
14276 ;
14277 return 0;
14278}
14279_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014280if ac_fn_c_try_compile "$LINENO"
14281then :
Ronald Oussoren41761932020-11-08 10:05:27 +010014282
Pablo Galindo53e55292021-04-05 17:38:40 +010014283printf "%s\n" "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010014284
Pablo Galindo53e55292021-04-05 17:38:40 +010014285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14286printf "%s\n" "yes" >&6; }
14287else $as_nop
14288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14289printf "%s\n" "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014290
14291fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014292rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014293
Pablo Galindo53e55292021-04-05 17:38:40 +010014294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
14295printf %s "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14297/* end confdefs.h. */
14298
14299#ifdef HAVE_SYS_MMAN_H
14300#include <sys/mman.h>
14301#endif
14302#ifdef HAVE_SYS_MEMFD_H
14303#include <sys/memfd.h>
14304#endif
14305
14306int
Pablo Galindo53e55292021-04-05 17:38:40 +010014307main (void)
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014308{
14309void *x=memfd_create
14310 ;
14311 return 0;
14312}
14313_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014314if ac_fn_c_try_compile "$LINENO"
14315then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014316
Pablo Galindo53e55292021-04-05 17:38:40 +010014317printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014318
Pablo Galindo53e55292021-04-05 17:38:40 +010014319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14320printf "%s\n" "yes" >&6; }
14321else $as_nop
14322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14323printf "%s\n" "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014324
14325fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014326rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014327
Pablo Galindo53e55292021-04-05 17:38:40 +010014328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
14329printf %s "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14331/* end confdefs.h. */
14332
14333#ifdef HAVE_SYS_EVENTFD_H
14334#include <sys/eventfd.h>
14335#endif
14336
14337int
Pablo Galindo53e55292021-04-05 17:38:40 +010014338main (void)
Christian Heimescd9fed62020-11-13 19:48:52 +010014339{
14340int x = eventfd(0, EFD_CLOEXEC)
14341 ;
14342 return 0;
14343}
14344_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014345if ac_fn_c_try_compile "$LINENO"
14346then :
Christian Heimescd9fed62020-11-13 19:48:52 +010014347
Pablo Galindo53e55292021-04-05 17:38:40 +010014348printf "%s\n" "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010014349
Pablo Galindo53e55292021-04-05 17:38:40 +010014350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14351printf "%s\n" "yes" >&6; }
14352else $as_nop
14353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14354printf "%s\n" "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014355
14356fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014357rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010014358
Martin v. Löwisd5843682002-11-21 20:41:28 +000014359# On some systems (eg. FreeBSD 5), we would find a definition of the
14360# functions ctermid_r, setgroups in the library, but no prototype
14361# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14362# address to avoid compiler warnings and potential miscompilations
14363# because of the missing prototypes.
14364
Pablo Galindo53e55292021-04-05 17:38:40 +010014365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
14366printf %s "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014368/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014369
Martin v. Löwisd5843682002-11-21 20:41:28 +000014370#include <stdio.h>
14371
Martin v. Löwisd5843682002-11-21 20:41:28 +000014372int
Pablo Galindo53e55292021-04-05 17:38:40 +010014373main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014374{
14375void* p = ctermid_r
14376 ;
14377 return 0;
14378}
14379_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014380if ac_fn_c_try_compile "$LINENO"
14381then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014382
Pablo Galindo53e55292021-04-05 17:38:40 +010014383printf "%s\n" "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014384
Pablo Galindo53e55292021-04-05 17:38:40 +010014385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14386printf "%s\n" "yes" >&6; }
14387else $as_nop
14388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014390
14391fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014392rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014393
Pablo Galindo53e55292021-04-05 17:38:40 +010014394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
14395printf %s "checking for flock declaration... " >&6; }
14396if test ${ac_cv_flock_decl+y}
14397then :
14398 printf %s "(cached) " >&6
14399else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014401/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014402#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014403int
Pablo Galindo53e55292021-04-05 17:38:40 +010014404main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014405{
14406void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014407
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014408 ;
14409 return 0;
14410}
14411_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014412if ac_fn_c_try_compile "$LINENO"
14413then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014414 ac_cv_flock_decl=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010014415else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014416 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014417
14418fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014419rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000014420
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014421fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
14423printf "%s\n" "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014424if test "x${ac_cv_flock_decl}" = xyes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010014425
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014426 for ac_func in flock
14427do :
14428 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Pablo Galindo53e55292021-04-05 17:38:40 +010014429if test "x$ac_cv_func_flock" = xyes
14430then :
14431 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014432
Pablo Galindo53e55292021-04-05 17:38:40 +010014433else $as_nop
14434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
14435printf %s "checking for flock in -lbsd... " >&6; }
14436if test ${ac_cv_lib_bsd_flock+y}
14437then :
14438 printf %s "(cached) " >&6
14439else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014440 ac_check_lib_save_LIBS=$LIBS
14441LIBS="-lbsd $LIBS"
14442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14443/* end confdefs.h. */
14444
14445/* Override any GCC internal prototype to avoid an error.
14446 Use char because int might match the return type of a GCC
14447 builtin and then its argument prototype would still apply. */
Antoine Pitroua3000072010-09-07 14:52:42 +000014448char flock ();
14449int
Pablo Galindo53e55292021-04-05 17:38:40 +010014450main (void)
Antoine Pitroua3000072010-09-07 14:52:42 +000014451{
14452return flock ();
14453 ;
14454 return 0;
14455}
14456_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014457if ac_fn_c_try_link "$LINENO"
14458then :
Antoine Pitroua3000072010-09-07 14:52:42 +000014459 ac_cv_lib_bsd_flock=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010014460else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014461 ac_cv_lib_bsd_flock=no
14462fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014463rm -f core conftest.err conftest.$ac_objext conftest.beam \
Antoine Pitroua3000072010-09-07 14:52:42 +000014464 conftest$ac_exeext conftest.$ac_ext
14465LIBS=$ac_check_lib_save_LIBS
14466fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014467{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
14468printf "%s\n" "$ac_cv_lib_bsd_flock" >&6; }
14469if test "x$ac_cv_lib_bsd_flock" = xyes
14470then :
14471 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014472
14473
Pablo Galindo53e55292021-04-05 17:38:40 +010014474printf "%s\n" "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014475
14476
14477fi
14478
14479
14480fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014481
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014482done
Antoine Pitroua3000072010-09-07 14:52:42 +000014483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484
Pablo Galindo53e55292021-04-05 17:38:40 +010014485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
14486printf %s "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014488/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014489
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014490#include <unistd.h>
14491
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014492int
Pablo Galindo53e55292021-04-05 17:38:40 +010014493main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014494{
14495void* p = getpagesize
14496 ;
14497 return 0;
14498}
14499_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014500if ac_fn_c_try_compile "$LINENO"
14501then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014502
Pablo Galindo53e55292021-04-05 17:38:40 +010014503printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014504
Pablo Galindo53e55292021-04-05 17:38:40 +010014505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14506printf "%s\n" "yes" >&6; }
14507else $as_nop
14508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14509printf "%s\n" "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014510
14511fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014512rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014513
Pablo Galindo53e55292021-04-05 17:38:40 +010014514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
14515printf %s "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14517/* end confdefs.h. */
14518
14519#include <stdlib.h>
14520
14521int
Pablo Galindo53e55292021-04-05 17:38:40 +010014522main (void)
Victor Stinner984890f2011-11-24 13:53:38 +010014523{
14524int res = unsetenv("DUMMY")
14525 ;
14526 return 0;
14527}
14528_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014529if ac_fn_c_try_compile "$LINENO"
14530then :
14531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14532printf "%s\n" "no" >&6; }
14533else $as_nop
Victor Stinner984890f2011-11-24 13:53:38 +010014534
Pablo Galindo53e55292021-04-05 17:38:40 +010014535printf "%s\n" "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010014536
Pablo Galindo53e55292021-04-05 17:38:40 +010014537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14538printf "%s\n" "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014539
14540fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014541rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010014542
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014543for ac_prog in true
14544do
14545 # Extract the first word of "$ac_prog", so it can be a program name with args.
14546set dummy $ac_prog; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +010014547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14548printf %s "checking for $ac_word... " >&6; }
14549if test ${ac_cv_prog_TRUE+y}
14550then :
14551 printf %s "(cached) " >&6
14552else $as_nop
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014553 if test -n "$TRUE"; then
14554 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14555else
14556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14557for as_dir in $PATH
14558do
14559 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +010014560 case $as_dir in #(((
14561 '') as_dir=./ ;;
14562 */) ;;
14563 *) as_dir=$as_dir/ ;;
14564 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +010014566 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014567 ac_cv_prog_TRUE="$ac_prog"
Pablo Galindo53e55292021-04-05 17:38:40 +010014568 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 +000014569 break 2
14570 fi
14571done
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014574
14575fi
14576fi
14577TRUE=$ac_cv_prog_TRUE
14578if test -n "$TRUE"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010014579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
14580printf "%s\n" "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014581else
Pablo Galindo53e55292021-04-05 17:38:40 +010014582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14583printf "%s\n" "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014584fi
14585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014586
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014587 test -n "$TRUE" && break
14588done
14589test -n "$TRUE" || TRUE="/bin/true"
14590
14591
Pablo Galindo53e55292021-04-05 17:38:40 +010014592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
14593printf %s "checking for inet_aton in -lc... " >&6; }
14594if test ${ac_cv_lib_c_inet_aton+y}
14595then :
14596 printf %s "(cached) " >&6
14597else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014598 ac_check_lib_save_LIBS=$LIBS
14599LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014601/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603/* Override any GCC internal prototype to avoid an error.
14604 Use char because int might match the return type of a GCC
14605 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014606char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014607int
Pablo Galindo53e55292021-04-05 17:38:40 +010014608main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014611 ;
14612 return 0;
14613}
14614_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014615if ac_fn_c_try_link "$LINENO"
14616then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014617 ac_cv_lib_c_inet_aton=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010014618else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014620fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014621rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014623LIBS=$ac_check_lib_save_LIBS
14624fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014625{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
14626printf "%s\n" "$ac_cv_lib_c_inet_aton" >&6; }
14627if test "x$ac_cv_lib_c_inet_aton" = xyes
14628then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014629 $ac_cv_prog_TRUE
Pablo Galindo53e55292021-04-05 17:38:40 +010014630else $as_nop
14631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
14632printf %s "checking for inet_aton in -lresolv... " >&6; }
14633if test ${ac_cv_lib_resolv_inet_aton+y}
14634then :
14635 printf %s "(cached) " >&6
14636else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014637 ac_check_lib_save_LIBS=$LIBS
14638LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014640/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642/* Override any GCC internal prototype to avoid an error.
14643 Use char because int might match the return type of a GCC
14644 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014645char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014646int
Pablo Galindo53e55292021-04-05 17:38:40 +010014647main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014650 ;
14651 return 0;
14652}
14653_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014654if ac_fn_c_try_link "$LINENO"
14655then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014656 ac_cv_lib_resolv_inet_aton=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010014657else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014659fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014660rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014662LIBS=$ac_check_lib_save_LIBS
14663fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014664{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
14665printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; }
14666if test "x$ac_cv_lib_resolv_inet_aton" = xyes
14667then :
14668 printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014669
14670 LIBS="-lresolv $LIBS"
14671
14672fi
14673
14674
14675fi
14676
14677
Christian Heimesd0764e22007-12-04 15:00:33 +000014678# On Tru64, chflags seems to be present, but calling it will
14679# exit Python
Pablo Galindo53e55292021-04-05 17:38:40 +010014680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
14681printf %s "checking for chflags... " >&6; }
14682if test ${ac_cv_have_chflags+y}
14683then :
14684 printf %s "(cached) " >&6
14685else $as_nop
14686 if test "$cross_compiling" = yes
14687then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014688 ac_cv_have_chflags=cross
Pablo Galindo53e55292021-04-05 17:38:40 +010014689else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014691/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014692
Christian Heimesd0764e22007-12-04 15:00:33 +000014693#include <sys/stat.h>
14694#include <unistd.h>
14695int main(int argc, char*argv[])
14696{
14697 if(chflags(argv[0], 0) != 0)
14698 return 1;
14699 return 0;
14700}
Ned Deily3eb67d52011-06-28 00:00:28 -070014701
Christian Heimesd0764e22007-12-04 15:00:33 +000014702_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014703if ac_fn_c_try_run "$LINENO"
14704then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014705 ac_cv_have_chflags=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010014706else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014711fi
14712
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014713
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014714fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014715{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
14716printf "%s\n" "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014717if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Pablo Galindo53e55292021-04-05 17:38:40 +010014719if test "x$ac_cv_func_chflags" = xyes
14720then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014721 ac_cv_have_chflags="yes"
Pablo Galindo53e55292021-04-05 17:38:40 +010014722else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014723 ac_cv_have_chflags="no"
14724fi
14725
14726fi
14727if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014728
Pablo Galindo53e55292021-04-05 17:38:40 +010014729printf "%s\n" "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014730
14731fi
14732
Pablo Galindo53e55292021-04-05 17:38:40 +010014733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
14734printf %s "checking for lchflags... " >&6; }
14735if test ${ac_cv_have_lchflags+y}
14736then :
14737 printf %s "(cached) " >&6
14738else $as_nop
14739 if test "$cross_compiling" = yes
14740then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014741 ac_cv_have_lchflags=cross
Pablo Galindo53e55292021-04-05 17:38:40 +010014742else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014744/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014745
Christian Heimesd0764e22007-12-04 15:00:33 +000014746#include <sys/stat.h>
14747#include <unistd.h>
14748int main(int argc, char*argv[])
14749{
14750 if(lchflags(argv[0], 0) != 0)
14751 return 1;
14752 return 0;
14753}
Ned Deily3eb67d52011-06-28 00:00:28 -070014754
Christian Heimesd0764e22007-12-04 15:00:33 +000014755_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014756if ac_fn_c_try_run "$LINENO"
14757then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014758 ac_cv_have_lchflags=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010014759else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000014761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014764fi
14765
14766
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014767fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014768{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
14769printf "%s\n" "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014770if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Pablo Galindo53e55292021-04-05 17:38:40 +010014772if test "x$ac_cv_func_lchflags" = xyes
14773then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014774 ac_cv_have_lchflags="yes"
Pablo Galindo53e55292021-04-05 17:38:40 +010014775else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014776 ac_cv_have_lchflags="no"
14777fi
14778
14779fi
14780if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014781
Pablo Galindo53e55292021-04-05 17:38:40 +010014782printf "%s\n" "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014783
14784fi
14785
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014786case $ac_sys_system/$ac_sys_release in
14787Darwin/*)
14788 _CUR_CFLAGS="${CFLAGS}"
14789 _CUR_LDFLAGS="${LDFLAGS}"
14790 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
14791 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
14792 ;;
14793esac
14794
Pablo Galindo53e55292021-04-05 17:38:40 +010014795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
14796printf %s "checking for inflateCopy in -lz... " >&6; }
14797if test ${ac_cv_lib_z_inflateCopy+y}
14798then :
14799 printf %s "(cached) " >&6
14800else $as_nop
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014801 ac_check_lib_save_LIBS=$LIBS
14802LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014804/* end confdefs.h. */
14805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806/* Override any GCC internal prototype to avoid an error.
14807 Use char because int might match the return type of a GCC
14808 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014809char inflateCopy ();
14810int
Pablo Galindo53e55292021-04-05 17:38:40 +010014811main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014814 ;
14815 return 0;
14816}
14817_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014818if ac_fn_c_try_link "$LINENO"
14819then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014820 ac_cv_lib_z_inflateCopy=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010014821else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014823fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014824rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014826LIBS=$ac_check_lib_save_LIBS
14827fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
14829printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; }
14830if test "x$ac_cv_lib_z_inflateCopy" = xyes
14831then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014832
Pablo Galindo53e55292021-04-05 17:38:40 +010014833printf "%s\n" "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014834
14835fi
14836
14837
14838case $ac_sys_system/$ac_sys_release in
14839Darwin/*)
14840 CFLAGS="${_CUR_CFLAGS}"
14841 LDFLAGS="${_CUR_LDFLAGS}"
14842 ;;
14843esac
14844
Pablo Galindo53e55292021-04-05 17:38:40 +010014845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
14846printf %s "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014848/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014849
Martin v. Löwise9416172003-05-03 10:12:45 +000014850#include <netdb.h>
14851
Martin v. Löwise9416172003-05-03 10:12:45 +000014852int
Pablo Galindo53e55292021-04-05 17:38:40 +010014853main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014854{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014855void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014856 ;
14857 return 0;
14858}
14859_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014860if ac_fn_c_try_link "$LINENO"
14861then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014862
Pablo Galindo53e55292021-04-05 17:38:40 +010014863printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014864
Pablo Galindo53e55292021-04-05 17:38:40 +010014865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14866printf "%s\n" "yes" >&6; }
14867else $as_nop
14868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14869printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014870
14871fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014872rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874
Pablo Galindo53e55292021-04-05 17:38:40 +010014875{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
14876printf %s "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014878/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014879
Martin v. Löwis86d66262006-02-17 08:40:11 +000014880#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014881#include <sys/socket.h>
14882#include <netinet/in.h>
14883#include <arpa/inet.h>
14884
Martin v. Löwise9416172003-05-03 10:12:45 +000014885int
Pablo Galindo53e55292021-04-05 17:38:40 +010014886main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014887{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014888void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014889 ;
14890 return 0;
14891}
14892_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014893if ac_fn_c_try_link "$LINENO"
14894then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014895
Pablo Galindo53e55292021-04-05 17:38:40 +010014896printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014897
Pablo Galindo53e55292021-04-05 17:38:40 +010014898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14899printf "%s\n" "yes" >&6; }
14900else $as_nop
14901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14902printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014903
14904fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014905rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907
Pablo Galindo53e55292021-04-05 17:38:40 +010014908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
14909printf %s "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014911/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014912
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014913#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014914#include <sys/socket.h>
14915#include <netinet/in.h>
14916#include <arpa/inet.h>
14917
Martin v. Löwise9416172003-05-03 10:12:45 +000014918int
Pablo Galindo53e55292021-04-05 17:38:40 +010014919main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014920{
14921void* p = inet_pton
14922 ;
14923 return 0;
14924}
14925_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014926if ac_fn_c_try_compile "$LINENO"
14927then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014928
Pablo Galindo53e55292021-04-05 17:38:40 +010014929printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014930
Pablo Galindo53e55292021-04-05 17:38:40 +010014931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14932printf "%s\n" "yes" >&6; }
14933else $as_nop
14934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14935printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014936
14937fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014938rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014939
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014940# On some systems, setgroups is in unistd.h, on others, in grp.h
Pablo Galindo53e55292021-04-05 17:38:40 +010014941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
14942printf %s "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014944/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014945
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014946#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014947#ifdef HAVE_GRP_H
14948#include <grp.h>
14949#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014950
Martin v. Löwisd5843682002-11-21 20:41:28 +000014951int
Pablo Galindo53e55292021-04-05 17:38:40 +010014952main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014953{
14954void* p = setgroups
14955 ;
14956 return 0;
14957}
14958_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010014959if ac_fn_c_try_compile "$LINENO"
14960then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014961
Pablo Galindo53e55292021-04-05 17:38:40 +010014962printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014963
Pablo Galindo53e55292021-04-05 17:38:40 +010014964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14965printf "%s\n" "yes" >&6; }
14966else $as_nop
14967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14968printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014969
14970fi
Pablo Galindo53e55292021-04-05 17:38:40 +010014971rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014972
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014973# check for openpty and forkpty
14974
Pablo Galindo53e55292021-04-05 17:38:40 +010014975
14976 for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000014977do :
14978 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Pablo Galindo53e55292021-04-05 17:38:40 +010014979if test "x$ac_cv_func_openpty" = xyes
14980then :
14981 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014982
Pablo Galindo53e55292021-04-05 17:38:40 +010014983else $as_nop
14984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
14985printf %s "checking for openpty in -lutil... " >&6; }
14986if test ${ac_cv_lib_util_openpty+y}
14987then :
14988 printf %s "(cached) " >&6
14989else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014991LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995/* Override any GCC internal prototype to avoid an error.
14996 Use char because int might match the return type of a GCC
14997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014998char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014999int
Pablo Galindo53e55292021-04-05 17:38:40 +010015000main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ;
15004 return 0;
15005}
15006_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015007if ac_fn_c_try_link "$LINENO"
15008then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ac_cv_lib_util_openpty=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015010else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015012fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015013rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015015LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015016fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
15018printf "%s\n" "$ac_cv_lib_util_openpty" >&6; }
15019if test "x$ac_cv_lib_util_openpty" = xyes
15020then :
15021 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015022 LIBS="$LIBS -lutil"
Pablo Galindo53e55292021-04-05 17:38:40 +010015023else $as_nop
15024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
15025printf %s "checking for openpty in -lbsd... " >&6; }
15026if test ${ac_cv_lib_bsd_openpty+y}
15027then :
15028 printf %s "(cached) " >&6
15029else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015030 ac_check_lib_save_LIBS=$LIBS
15031LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015033/* end confdefs.h. */
15034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035/* Override any GCC internal prototype to avoid an error.
15036 Use char because int might match the return type of a GCC
15037 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015038char openpty ();
15039int
Pablo Galindo53e55292021-04-05 17:38:40 +010015040main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015043 ;
15044 return 0;
15045}
15046_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015047if ac_fn_c_try_link "$LINENO"
15048then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015049 ac_cv_lib_bsd_openpty=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015050else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015052fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015053rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015055LIBS=$ac_check_lib_save_LIBS
15056fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
15058printf "%s\n" "$ac_cv_lib_bsd_openpty" >&6; }
15059if test "x$ac_cv_lib_bsd_openpty" = xyes
15060then :
15061 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015062 LIBS="$LIBS -lbsd"
15063fi
15064
15065
15066fi
15067
Fred Drake8cef4cf2000-06-28 16:40:38 +000015068
15069fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015070
Fred Drake8cef4cf2000-06-28 16:40:38 +000015071done
15072
Pablo Galindo53e55292021-04-05 17:38:40 +010015073 for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000015074do :
15075 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Pablo Galindo53e55292021-04-05 17:38:40 +010015076if test "x$ac_cv_func_forkpty" = xyes
15077then :
15078 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015079
Pablo Galindo53e55292021-04-05 17:38:40 +010015080else $as_nop
15081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
15082printf %s "checking for forkpty in -lutil... " >&6; }
15083if test ${ac_cv_lib_util_forkpty+y}
15084then :
15085 printf %s "(cached) " >&6
15086else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015088LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092/* Override any GCC internal prototype to avoid an error.
15093 Use char because int might match the return type of a GCC
15094 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015095char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015096int
Pablo Galindo53e55292021-04-05 17:38:40 +010015097main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015100 ;
15101 return 0;
15102}
15103_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015104if ac_fn_c_try_link "$LINENO"
15105then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 ac_cv_lib_util_forkpty=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015107else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015109fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015110rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015112LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015113fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
15115printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; }
15116if test "x$ac_cv_lib_util_forkpty" = xyes
15117then :
15118 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015119 LIBS="$LIBS -lutil"
Pablo Galindo53e55292021-04-05 17:38:40 +010015120else $as_nop
15121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
15122printf %s "checking for forkpty in -lbsd... " >&6; }
15123if test ${ac_cv_lib_bsd_forkpty+y}
15124then :
15125 printf %s "(cached) " >&6
15126else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015127 ac_check_lib_save_LIBS=$LIBS
15128LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015130/* end confdefs.h. */
15131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132/* Override any GCC internal prototype to avoid an error.
15133 Use char because int might match the return type of a GCC
15134 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015135char forkpty ();
15136int
Pablo Galindo53e55292021-04-05 17:38:40 +010015137main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015140 ;
15141 return 0;
15142}
15143_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015144if ac_fn_c_try_link "$LINENO"
15145then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015146 ac_cv_lib_bsd_forkpty=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015147else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015149fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015150rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015152LIBS=$ac_check_lib_save_LIBS
15153fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
15155printf "%s\n" "$ac_cv_lib_bsd_forkpty" >&6; }
15156if test "x$ac_cv_lib_bsd_forkpty" = xyes
15157then :
15158 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015159 LIBS="$LIBS -lbsd"
15160fi
15161
15162
15163fi
15164
Fred Drake8cef4cf2000-06-28 16:40:38 +000015165
15166fi
Jack Jansendd19cf82001-12-06 22:36:17 +000015167
Pablo Galindo53e55292021-04-05 17:38:40 +010015168done
Christian Heimes32eba612021-03-19 10:29:25 +010015169
Michael W. Hudson54241132001-12-07 15:38:26 +000015170# check for long file support functions
Pablo Galindo53e55292021-04-05 17:38:40 +010015171ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64"
15172if test "x$ac_cv_func_fseek64" = xyes
15173then :
15174 printf "%s\n" "#define HAVE_FSEEK64 1" >>confdefs.h
Michael W. Hudson54241132001-12-07 15:38:26 +000015175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015176fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015177ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15178if test "x$ac_cv_func_fseeko" = xyes
15179then :
15180 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
15181
15182fi
15183ac_fn_c_check_func "$LINENO" "fstatvfs" "ac_cv_func_fstatvfs"
15184if test "x$ac_cv_func_fstatvfs" = xyes
15185then :
15186 printf "%s\n" "#define HAVE_FSTATVFS 1" >>confdefs.h
15187
15188fi
15189ac_fn_c_check_func "$LINENO" "ftell64" "ac_cv_func_ftell64"
15190if test "x$ac_cv_func_ftell64" = xyes
15191then :
15192 printf "%s\n" "#define HAVE_FTELL64 1" >>confdefs.h
15193
15194fi
15195ac_fn_c_check_func "$LINENO" "ftello" "ac_cv_func_ftello"
15196if test "x$ac_cv_func_ftello" = xyes
15197then :
15198 printf "%s\n" "#define HAVE_FTELLO 1" >>confdefs.h
15199
15200fi
15201ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
15202if test "x$ac_cv_func_statvfs" = xyes
15203then :
15204 printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h
15205
15206fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015207
Michael W. Hudson54241132001-12-07 15:38:26 +000015208
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015209ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Pablo Galindo53e55292021-04-05 17:38:40 +010015210if test "x$ac_cv_func_dup2" = xyes
15211then :
15212 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000015213
Pablo Galindo53e55292021-04-05 17:38:40 +010015214else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015216 *" dup2.$ac_objext "* ) ;;
15217 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015219esac
15220
Martin v. Löwis1142de32002-03-29 16:28:31 +000015221fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015222
Martin v. Löwis1142de32002-03-29 16:28:31 +000015223
Pablo Galindo53e55292021-04-05 17:38:40 +010015224 for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015225do :
15226 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Pablo Galindo53e55292021-04-05 17:38:40 +010015227if test "x$ac_cv_func_getpgrp" = xyes
15228then :
15229 printf "%s\n" "#define HAVE_GETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015231/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015232#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015233int
Pablo Galindo53e55292021-04-05 17:38:40 +010015234main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015235{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 ;
15238 return 0;
15239}
15240_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015241if ac_fn_c_try_compile "$LINENO"
15242then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015243
Pablo Galindo53e55292021-04-05 17:38:40 +010015244printf "%s\n" "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015245
Guido van Rossum627b2d71993-12-24 10:39:16 +000015246fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015247rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015248
Guido van Rossum627b2d71993-12-24 10:39:16 +000015249fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015250
Thomas Wouters3a584202000-08-05 23:28:51 +000015251done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015252
Pablo Galindo53e55292021-04-05 17:38:40 +010015253 for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015254do :
15255 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Pablo Galindo53e55292021-04-05 17:38:40 +010015256if test "x$ac_cv_func_setpgrp" = xyes
15257then :
15258 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015260/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015261#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015262int
Pablo Galindo53e55292021-04-05 17:38:40 +010015263main (void)
Jack Jansen150753c2003-03-29 22:07:47 +000015264{
15265setpgrp(0,0);
15266 ;
15267 return 0;
15268}
15269_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015270if ac_fn_c_try_compile "$LINENO"
15271then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015272
Pablo Galindo53e55292021-04-05 17:38:40 +010015273printf "%s\n" "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015274
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015275fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015276rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015277
15278fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015279
Jack Jansen150753c2003-03-29 22:07:47 +000015280done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015281
Gregory P. Smith387512c2018-12-30 15:42:32 -080015282# We search for both crypt and crypt_r as one or the other may be defined
15283# This gets us our -lcrypt in LIBS when required on the target platform.
Pablo Galindo53e55292021-04-05 17:38:40 +010015284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
15285printf %s "checking for library containing crypt... " >&6; }
15286if test ${ac_cv_search_crypt+y}
15287then :
15288 printf %s "(cached) " >&6
15289else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015290 ac_func_search_save_LIBS=$LIBS
15291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15292/* end confdefs.h. */
15293
15294/* Override any GCC internal prototype to avoid an error.
15295 Use char because int might match the return type of a GCC
15296 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015297char crypt ();
15298int
Pablo Galindo53e55292021-04-05 17:38:40 +010015299main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015300{
15301return crypt ();
15302 ;
15303 return 0;
15304}
15305_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015306for ac_lib in '' crypt
15307do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015308 if test -z "$ac_lib"; then
15309 ac_res="none required"
15310 else
15311 ac_res=-l$ac_lib
15312 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15313 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015314 if ac_fn_c_try_link "$LINENO"
15315then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015316 ac_cv_search_crypt=$ac_res
15317fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015318rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015319 conftest$ac_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +010015320 if test ${ac_cv_search_crypt+y}
15321then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015322 break
15323fi
15324done
Pablo Galindo53e55292021-04-05 17:38:40 +010015325if test ${ac_cv_search_crypt+y}
15326then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015327
Pablo Galindo53e55292021-04-05 17:38:40 +010015328else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015329 ac_cv_search_crypt=no
15330fi
15331rm conftest.$ac_ext
15332LIBS=$ac_func_search_save_LIBS
15333fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
15335printf "%s\n" "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015336ac_res=$ac_cv_search_crypt
Pablo Galindo53e55292021-04-05 17:38:40 +010015337if test "$ac_res" != no
15338then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015339 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15340
15341fi
15342
Pablo Galindo53e55292021-04-05 17:38:40 +010015343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15344printf %s "checking for library containing crypt_r... " >&6; }
15345if test ${ac_cv_search_crypt_r+y}
15346then :
15347 printf %s "(cached) " >&6
15348else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015349 ac_func_search_save_LIBS=$LIBS
15350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15351/* end confdefs.h. */
15352
15353/* Override any GCC internal prototype to avoid an error.
15354 Use char because int might match the return type of a GCC
15355 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015356char crypt_r ();
15357int
Pablo Galindo53e55292021-04-05 17:38:40 +010015358main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015359{
15360return crypt_r ();
15361 ;
15362 return 0;
15363}
15364_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015365for ac_lib in '' crypt
15366do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015367 if test -z "$ac_lib"; then
15368 ac_res="none required"
15369 else
15370 ac_res=-l$ac_lib
15371 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15372 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015373 if ac_fn_c_try_link "$LINENO"
15374then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015375 ac_cv_search_crypt_r=$ac_res
15376fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015377rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015378 conftest$ac_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +010015379 if test ${ac_cv_search_crypt_r+y}
15380then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015381 break
15382fi
15383done
Pablo Galindo53e55292021-04-05 17:38:40 +010015384if test ${ac_cv_search_crypt_r+y}
15385then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015386
Pablo Galindo53e55292021-04-05 17:38:40 +010015387else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015388 ac_cv_search_crypt_r=no
15389fi
15390rm conftest.$ac_ext
15391LIBS=$ac_func_search_save_LIBS
15392fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
15394printf "%s\n" "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015395ac_res=$ac_cv_search_crypt_r
Pablo Galindo53e55292021-04-05 17:38:40 +010015396if test "$ac_res" != no
15397then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015398 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15399
15400fi
15401
15402
15403ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Pablo Galindo53e55292021-04-05 17:38:40 +010015404if test "x$ac_cv_func_crypt_r" = xyes
15405then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15407/* end confdefs.h. */
15408
15409#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
15410#include <crypt.h>
15411
15412int
Pablo Galindo53e55292021-04-05 17:38:40 +010015413main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015414{
15415
15416struct crypt_data d;
15417char *r = crypt_r("", "", &d);
15418
15419 ;
15420 return 0;
15421}
15422_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015423if ac_fn_c_try_compile "$LINENO"
15424then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015425
Pablo Galindo53e55292021-04-05 17:38:40 +010015426printf "%s\n" "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080015427
15428fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015429rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080015430
15431fi
15432
15433
Pablo Galindo53e55292021-04-05 17:38:40 +010015434
15435 for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020015436do :
15437 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Pablo Galindo53e55292021-04-05 17:38:40 +010015438if test "x$ac_cv_func_clock_gettime" = xyes
15439then :
15440 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015441
Pablo Galindo53e55292021-04-05 17:38:40 +010015442else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015443
Pablo Galindo53e55292021-04-05 17:38:40 +010015444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
15445printf %s "checking for clock_gettime in -lrt... " >&6; }
15446if test ${ac_cv_lib_rt_clock_gettime+y}
15447then :
15448 printf %s "(cached) " >&6
15449else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015450 ac_check_lib_save_LIBS=$LIBS
15451LIBS="-lrt $LIBS"
15452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15453/* end confdefs.h. */
15454
15455/* Override any GCC internal prototype to avoid an error.
15456 Use char because int might match the return type of a GCC
15457 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015458char clock_gettime ();
15459int
Pablo Galindo53e55292021-04-05 17:38:40 +010015460main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015461{
15462return clock_gettime ();
15463 ;
15464 return 0;
15465}
15466_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015467if ac_fn_c_try_link "$LINENO"
15468then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015469 ac_cv_lib_rt_clock_gettime=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015470else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015471 ac_cv_lib_rt_clock_gettime=no
15472fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015473rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015474 conftest$ac_exeext conftest.$ac_ext
15475LIBS=$ac_check_lib_save_LIBS
15476fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
15478printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
15479if test "x$ac_cv_lib_rt_clock_gettime" = xyes
15480then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015481
Victor Stinner7efb8332014-08-29 15:41:08 +020015482 LIBS="$LIBS -lrt"
Pablo Galindo53e55292021-04-05 17:38:40 +010015483 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015484
15485
Pablo Galindo53e55292021-04-05 17:38:40 +010015486printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015487
15488
15489fi
15490
15491
15492fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015493
Victor Stinnere0be4232011-10-25 13:06:09 +020015494done
15495
15496
Pablo Galindo53e55292021-04-05 17:38:40 +010015497 for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020015498do :
15499 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Pablo Galindo53e55292021-04-05 17:38:40 +010015500if test "x$ac_cv_func_clock_getres" = xyes
15501then :
15502 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015503
Pablo Galindo53e55292021-04-05 17:38:40 +010015504else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015505
Pablo Galindo53e55292021-04-05 17:38:40 +010015506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
15507printf %s "checking for clock_getres in -lrt... " >&6; }
15508if test ${ac_cv_lib_rt_clock_getres+y}
15509then :
15510 printf %s "(cached) " >&6
15511else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015512 ac_check_lib_save_LIBS=$LIBS
15513LIBS="-lrt $LIBS"
15514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15515/* end confdefs.h. */
15516
15517/* Override any GCC internal prototype to avoid an error.
15518 Use char because int might match the return type of a GCC
15519 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015520char clock_getres ();
15521int
Pablo Galindo53e55292021-04-05 17:38:40 +010015522main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015523{
15524return clock_getres ();
15525 ;
15526 return 0;
15527}
15528_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015529if ac_fn_c_try_link "$LINENO"
15530then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015531 ac_cv_lib_rt_clock_getres=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015532else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015533 ac_cv_lib_rt_clock_getres=no
15534fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015535rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015536 conftest$ac_exeext conftest.$ac_ext
15537LIBS=$ac_check_lib_save_LIBS
15538fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
15540printf "%s\n" "$ac_cv_lib_rt_clock_getres" >&6; }
15541if test "x$ac_cv_lib_rt_clock_getres" = xyes
15542then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015543
Pablo Galindo53e55292021-04-05 17:38:40 +010015544 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015545
15546
15547fi
15548
15549
15550fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015551
Victor Stinnere0be4232011-10-25 13:06:09 +020015552done
15553
15554
Pablo Galindo53e55292021-04-05 17:38:40 +010015555 for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015556do :
15557 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Pablo Galindo53e55292021-04-05 17:38:40 +010015558if test "x$ac_cv_func_clock_settime" = xyes
15559then :
15560 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015561
Pablo Galindo53e55292021-04-05 17:38:40 +010015562else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015563
Pablo Galindo53e55292021-04-05 17:38:40 +010015564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
15565printf %s "checking for clock_settime in -lrt... " >&6; }
15566if test ${ac_cv_lib_rt_clock_settime+y}
15567then :
15568 printf %s "(cached) " >&6
15569else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015570 ac_check_lib_save_LIBS=$LIBS
15571LIBS="-lrt $LIBS"
15572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15573/* end confdefs.h. */
15574
15575/* Override any GCC internal prototype to avoid an error.
15576 Use char because int might match the return type of a GCC
15577 builtin and then its argument prototype would still apply. */
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015578char clock_settime ();
15579int
Pablo Galindo53e55292021-04-05 17:38:40 +010015580main (void)
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015581{
15582return clock_settime ();
15583 ;
15584 return 0;
15585}
15586_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015587if ac_fn_c_try_link "$LINENO"
15588then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015589 ac_cv_lib_rt_clock_settime=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015590else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015591 ac_cv_lib_rt_clock_settime=no
15592fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015593rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015594 conftest$ac_exeext conftest.$ac_ext
15595LIBS=$ac_check_lib_save_LIBS
15596fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
15598printf "%s\n" "$ac_cv_lib_rt_clock_settime" >&6; }
15599if test "x$ac_cv_lib_rt_clock_settime" = xyes
15600then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015601
Pablo Galindo53e55292021-04-05 17:38:40 +010015602 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015603
15604
15605fi
15606
15607
15608fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015609
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015610done
15611
Pablo Galindo53e55292021-04-05 17:38:40 +010015612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for major" >&5
15613printf %s "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015616
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015617#if defined(MAJOR_IN_MKDEV)
15618#include <sys/mkdev.h>
15619#elif defined(MAJOR_IN_SYSMACROS)
15620#include <sys/sysmacros.h>
15621#else
15622#include <sys/types.h>
15623#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015624
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015625int
Pablo Galindo53e55292021-04-05 17:38:40 +010015626main (void)
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015627{
15628
15629 makedev(major(0),minor(0));
15630
15631 ;
15632 return 0;
15633}
15634_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015635if ac_fn_c_try_link "$LINENO"
15636then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015637
15638
Pablo Galindo53e55292021-04-05 17:38:40 +010015639printf "%s\n" "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015640
Pablo Galindo53e55292021-04-05 17:38:40 +010015641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15642printf "%s\n" "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015643
Pablo Galindo53e55292021-04-05 17:38:40 +010015644else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000015645
Pablo Galindo53e55292021-04-05 17:38:40 +010015646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15647printf "%s\n" "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015648
15649fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015650rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015652
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015653# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015654# for [no]getaddrinfo in netdb.h.
Pablo Galindo53e55292021-04-05 17:38:40 +010015655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
15656printf %s "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015658/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015659
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015660#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015661#include <sys/socket.h>
15662#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015663#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665int
Pablo Galindo53e55292021-04-05 17:38:40 +010015666main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015667{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015668getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 ;
15670 return 0;
15671}
15672_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015673if ac_fn_c_try_link "$LINENO"
15674then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015675 have_getaddrinfo=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015676else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015677 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015678fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015679rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010015681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
15682printf "%s\n" "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015683if test $have_getaddrinfo = yes
15684then
Pablo Galindo53e55292021-04-05 17:38:40 +010015685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
15686printf %s "checking getaddrinfo bug... " >&6; }
15687 if test ${ac_cv_buggy_getaddrinfo+y}
15688then :
15689 printf %s "(cached) " >&6
15690else $as_nop
15691 if test "$cross_compiling" = yes
15692then :
Matthias Klose96350132012-03-15 20:42:23 +010015693
15694if test "${enable_ipv6+set}" = set; then
15695 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
15696else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015697 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010015698fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015699else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015701/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015702
Stefan Krah19c21392012-11-22 23:47:32 +010015703#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015704#include <sys/types.h>
15705#include <netdb.h>
15706#include <string.h>
15707#include <sys/socket.h>
15708#include <netinet/in.h>
15709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015710int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015711{
15712 int passive, gaierr, inet4 = 0, inet6 = 0;
15713 struct addrinfo hints, *ai, *aitop;
15714 char straddr[INET6_ADDRSTRLEN], strport[16];
15715
15716 for (passive = 0; passive <= 1; passive++) {
15717 memset(&hints, 0, sizeof(hints));
15718 hints.ai_family = AF_UNSPEC;
15719 hints.ai_flags = passive ? AI_PASSIVE : 0;
15720 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015721 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015722 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15723 (void)gai_strerror(gaierr);
15724 goto bad;
15725 }
15726 for (ai = aitop; ai; ai = ai->ai_next) {
15727 if (ai->ai_addr == NULL ||
15728 ai->ai_addrlen == 0 ||
15729 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15730 straddr, sizeof(straddr), strport, sizeof(strport),
15731 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15732 goto bad;
15733 }
15734 switch (ai->ai_family) {
15735 case AF_INET:
15736 if (strcmp(strport, "54321") != 0) {
15737 goto bad;
15738 }
15739 if (passive) {
15740 if (strcmp(straddr, "0.0.0.0") != 0) {
15741 goto bad;
15742 }
15743 } else {
15744 if (strcmp(straddr, "127.0.0.1") != 0) {
15745 goto bad;
15746 }
15747 }
15748 inet4++;
15749 break;
15750 case AF_INET6:
15751 if (strcmp(strport, "54321") != 0) {
15752 goto bad;
15753 }
15754 if (passive) {
15755 if (strcmp(straddr, "::") != 0) {
15756 goto bad;
15757 }
15758 } else {
15759 if (strcmp(straddr, "::1") != 0) {
15760 goto bad;
15761 }
15762 }
15763 inet6++;
15764 break;
15765 case AF_UNSPEC:
15766 goto bad;
15767 break;
15768 default:
15769 /* another family support? */
15770 break;
15771 }
15772 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070015773 freeaddrinfo(aitop);
15774 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015775 }
15776
15777 if (!(inet4 == 0 || inet4 == 2))
15778 goto bad;
15779 if (!(inet6 == 0 || inet6 == 2))
15780 goto bad;
15781
15782 if (aitop)
15783 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015784 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015785
15786 bad:
15787 if (aitop)
15788 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015789 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015790}
15791
Martin v. Löwis11437992002-04-12 09:54:03 +000015792_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015793if ac_fn_c_try_run "$LINENO"
15794then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015795 ac_cv_buggy_getaddrinfo=no
Pablo Galindo53e55292021-04-05 17:38:40 +010015796else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015797 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015803fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015804
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806
Pablo Galindo53e55292021-04-05 17:38:40 +010015807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
15808printf "%s\n" "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015809
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020015810if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015811then
15812 if test $ipv6 = yes
15813 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015814 echo 'Fatal: You must get working getaddrinfo() function.'
15815 echo ' or you can specify "--disable-ipv6"'.
15816 exit 1
15817 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015818else
Martin v. Löwis11437992002-04-12 09:54:03 +000015819
Pablo Galindo53e55292021-04-05 17:38:40 +010015820printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015821
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015822fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015823
Pablo Galindo53e55292021-04-05 17:38:40 +010015824ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
15825if test "x$ac_cv_func_getnameinfo" = xyes
15826then :
15827 printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015828
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015829fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015830
Michael W. Hudson54241132001-12-07 15:38:26 +000015831
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015832# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015833
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
Pablo Galindo53e55292021-04-05 17:38:40 +010015835# Obsolete code to be removed.
15836if test $ac_cv_header_sys_time_h = yes; then
15837
15838printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015839
15840fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015841# End of obsolete code.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015842
Pablo Galindo53e55292021-04-05 17:38:40 +010015843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
15844printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15845if test ${ac_cv_struct_tm+y}
15846then :
15847 printf %s "(cached) " >&6
15848else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015850/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015851#include <sys/types.h>
15852#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
Martin v. Löwis11437992002-04-12 09:54:03 +000015854int
Pablo Galindo53e55292021-04-05 17:38:40 +010015855main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857struct tm tm;
15858 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 ;
15861 return 0;
15862}
15863_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015864if ac_fn_c_try_compile "$LINENO"
15865then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015866 ac_cv_struct_tm=time.h
Pablo Galindo53e55292021-04-05 17:38:40 +010015867else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015869fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015870rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015871fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015872{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
15873printf "%s\n" "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015874if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015875
Pablo Galindo53e55292021-04-05 17:38:40 +010015876printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015877
15878fi
15879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880ac_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 +000015881#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015882
Matthias Kloseb9621712010-04-24 17:59:49 +000015883"
Pablo Galindo53e55292021-04-05 17:38:40 +010015884if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
15885then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
Pablo Galindo53e55292021-04-05 17:38:40 +010015887printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
15889
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015890fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15893
Pablo Galindo53e55292021-04-05 17:38:40 +010015894printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015895
15896else
Pablo Galindo53e55292021-04-05 17:38:40 +010015897 ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15898" "$ac_c_undeclared_builtin_options" "CFLAGS"
15899if test "x$ac_cv_have_decl_tzname" = xyes
15900then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010015902else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015903 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015904fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015905printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906
Pablo Galindo53e55292021-04-05 17:38:40 +010015907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15908printf %s "checking for tzname... " >&6; }
15909if test ${ac_cv_var_tzname+y}
15910then :
15911 printf %s "(cached) " >&6
15912else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015914/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015915#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916#if !HAVE_DECL_TZNAME
15917extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000015918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920int
Pablo Galindo53e55292021-04-05 17:38:40 +010015921main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000015924 ;
15925 return 0;
15926}
15927_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010015928if ac_fn_c_try_link "$LINENO"
15929then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015930 ac_cv_var_tzname=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010015931else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015932 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015933fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015934rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015935 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015936fi
Pablo Galindo53e55292021-04-05 17:38:40 +010015937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15938printf "%s\n" "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015939 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015940
Pablo Galindo53e55292021-04-05 17:38:40 +010015941printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000015942
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015943 fi
15944fi
15945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +010015947if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
15948then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015949
Pablo Galindo53e55292021-04-05 17:38:40 +010015950printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015951
15952
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015953fi
15954
Matthias Kloseb9621712010-04-24 17:59:49 +000015955ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +010015956if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
15957then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015958
Pablo Galindo53e55292021-04-05 17:38:40 +010015959printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015960
15961
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015962fi
15963
Matthias Kloseb9621712010-04-24 17:59:49 +000015964ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +010015965if test "x$ac_cv_member_struct_stat_st_flags" = xyes
15966then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015967
Pablo Galindo53e55292021-04-05 17:38:40 +010015968printf "%s\n" "#define HAVE_STRUCT_STAT_ST_FLAGS 1" >>confdefs.h
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015969
15970
15971fi
15972
Matthias Kloseb9621712010-04-24 17:59:49 +000015973ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +010015974if test "x$ac_cv_member_struct_stat_st_gen" = xyes
15975then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015976
Pablo Galindo53e55292021-04-05 17:38:40 +010015977printf "%s\n" "#define HAVE_STRUCT_STAT_ST_GEN 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015978
15979
15980fi
15981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +010015983if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes
15984then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015985
Pablo Galindo53e55292021-04-05 17:38:40 +010015986printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015987
15988
15989fi
15990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +010015992if test "x$ac_cv_member_struct_stat_st_blocks" = xyes
15993then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015994
Pablo Galindo53e55292021-04-05 17:38:40 +010015995printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015996
15997
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015998fi
15999
Stefan Krah267b6392016-04-26 01:09:18 +020016000ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
16001 #include <sys/types.h>
16002 #include <pwd.h>
16003
16004"
Pablo Galindo53e55292021-04-05 17:38:40 +010016005if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes
16006then :
Stefan Krah267b6392016-04-26 01:09:18 +020016007
Pablo Galindo53e55292021-04-05 17:38:40 +010016008printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_GECOS 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020016009
16010
16011fi
16012ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
16013 #include <sys/types.h>
16014 #include <pwd.h>
16015
16016"
Pablo Galindo53e55292021-04-05 17:38:40 +010016017if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes
16018then :
Stefan Krah267b6392016-04-26 01:09:18 +020016019
Pablo Galindo53e55292021-04-05 17:38:40 +010016020printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_PASSWD 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020016021
16022
16023fi
16024
Zachary Ware6a6967e2016-10-01 00:47:27 -050016025# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
16026ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
16027"
Pablo Galindo53e55292021-04-05 17:38:40 +010016028if test "x$ac_cv_member_siginfo_t_si_band" = xyes
16029then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050016030
Pablo Galindo53e55292021-04-05 17:38:40 +010016031printf "%s\n" "#define HAVE_SIGINFO_T_SI_BAND 1" >>confdefs.h
Zachary Ware6a6967e2016-10-01 00:47:27 -050016032
16033
16034fi
16035
Michael W. Hudson54241132001-12-07 15:38:26 +000016036
Pablo Galindo53e55292021-04-05 17:38:40 +010016037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
16038printf %s "checking for time.h that defines altzone... " >&6; }
16039if test ${ac_cv_header_time_altzone+y}
16040then :
16041 printf %s "(cached) " >&6
16042else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000016043
Matthias Kloseb9621712010-04-24 17:59:49 +000016044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016045/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016046#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016047int
Pablo Galindo53e55292021-04-05 17:38:40 +010016048main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016049{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016050return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 ;
16052 return 0;
16053}
16054_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016055if ac_fn_c_try_compile "$LINENO"
16056then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016057 ac_cv_header_time_altzone=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016058else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016059 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016060fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016061rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000016062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063fi
16064
Pablo Galindo53e55292021-04-05 17:38:40 +010016065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
16066printf "%s\n" "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016067if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016068
Pablo Galindo53e55292021-04-05 17:38:40 +010016069printf "%s\n" "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016070
16071fi
16072
Guido van Rossumda88dad1995-01-26 00:46:29 +000016073was_it_defined=no
Pablo Galindo53e55292021-04-05 17:38:40 +010016074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
16075printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016077/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016078
16079#include <sys/types.h>
16080#include <sys/select.h>
16081#include <sys/time.h>
16082
Martin v. Löwis11437992002-04-12 09:54:03 +000016083int
Pablo Galindo53e55292021-04-05 17:38:40 +010016084main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016085{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016086;
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 ;
16088 return 0;
16089}
16090_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016091if ac_fn_c_try_compile "$LINENO"
16092then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016093
16094
Pablo Galindo53e55292021-04-05 17:38:40 +010016095printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016097 was_it_defined=yes
16098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016100rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
16102printf "%s\n" "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103
Pablo Galindo53e55292021-04-05 17:38:40 +010016104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
16105printf %s "checking for addrinfo... " >&6; }
16106if test ${ac_cv_struct_addrinfo+y}
16107then :
16108 printf %s "(cached) " >&6
16109else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016111/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000016112#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016113int
Pablo Galindo53e55292021-04-05 17:38:40 +010016114main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016115{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016116struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 ;
16118 return 0;
16119}
16120_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016121if ac_fn_c_try_compile "$LINENO"
16122then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016123 ac_cv_struct_addrinfo=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016124else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016125 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016126fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128fi
16129
Pablo Galindo53e55292021-04-05 17:38:40 +010016130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
16131printf "%s\n" "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016132if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016133
Pablo Galindo53e55292021-04-05 17:38:40 +010016134printf "%s\n" "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016135
16136fi
16137
Pablo Galindo53e55292021-04-05 17:38:40 +010016138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
16139printf %s "checking for sockaddr_storage... " >&6; }
16140if test ${ac_cv_struct_sockaddr_storage+y}
16141then :
16142 printf %s "(cached) " >&6
16143else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016145/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016146
16147# include <sys/types.h>
16148# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016149int
Pablo Galindo53e55292021-04-05 17:38:40 +010016150main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016151{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016152struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016153 ;
16154 return 0;
16155}
16156_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016157if ac_fn_c_try_compile "$LINENO"
16158then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016159 ac_cv_struct_sockaddr_storage=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016160else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016162fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016163rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164fi
16165
Pablo Galindo53e55292021-04-05 17:38:40 +010016166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
16167printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016168if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016169
Pablo Galindo53e55292021-04-05 17:38:40 +010016170printf "%s\n" "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016171
16172fi
16173
Pablo Galindo53e55292021-04-05 17:38:40 +010016174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
16175printf %s "checking for sockaddr_alg... " >&6; }
16176if test ${ac_cv_struct_sockaddr_alg+y}
16177then :
16178 printf %s "(cached) " >&6
16179else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16181/* end confdefs.h. */
16182
16183# include <sys/types.h>
16184# include <sys/socket.h>
16185# include <linux/if_alg.h>
16186int
Pablo Galindo53e55292021-04-05 17:38:40 +010016187main (void)
Christian Heimesdffa3942016-09-05 23:54:41 +020016188{
16189struct sockaddr_alg s
16190 ;
16191 return 0;
16192}
16193_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016194if ac_fn_c_try_compile "$LINENO"
16195then :
Christian Heimesdffa3942016-09-05 23:54:41 +020016196 ac_cv_struct_sockaddr_alg=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016197else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016198 ac_cv_struct_sockaddr_alg=no
16199fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016200rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020016201fi
16202
Pablo Galindo53e55292021-04-05 17:38:40 +010016203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
16204printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020016205if test $ac_cv_struct_sockaddr_alg = yes; then
16206
Pablo Galindo53e55292021-04-05 17:38:40 +010016207printf "%s\n" "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020016208
16209fi
16210
Guido van Rossum627b2d71993-12-24 10:39:16 +000016211# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016212
Pablo Galindo53e55292021-04-05 17:38:40 +010016213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
16214printf %s "checking whether char is unsigned... " >&6; }
16215if test ${ac_cv_c_char_unsigned+y}
16216then :
16217 printf %s "(cached) " >&6
16218else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016221$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016222int
Pablo Galindo53e55292021-04-05 17:38:40 +010016223main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016224{
16225static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016226test_array [0] = 0;
16227return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000016228
16229 ;
16230 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016231}
Martin v. Löwis11437992002-04-12 09:54:03 +000016232_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016233if ac_fn_c_try_compile "$LINENO"
16234then :
Michael W. Hudson54241132001-12-07 15:38:26 +000016235 ac_cv_c_char_unsigned=no
Pablo Galindo53e55292021-04-05 17:38:40 +010016236else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016237 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016238fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016239rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016240fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
16242printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
16243if test $ac_cv_c_char_unsigned = yes; then
16244 printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016245
16246fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016247
Pablo Galindo53e55292021-04-05 17:38:40 +010016248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
16249printf %s "checking for an ANSI C-conforming const... " >&6; }
16250if test ${ac_cv_c_const+y}
16251then :
16252 printf %s "(cached) " >&6
16253else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016255/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016256
Martin v. Löwis11437992002-04-12 09:54:03 +000016257int
Pablo Galindo53e55292021-04-05 17:38:40 +010016258main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016259{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016260
Martin v. Löwis11437992002-04-12 09:54:03 +000016261#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016262 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016264 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266 char const *const *pcpcc;
16267 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 /* NEC SVR4.0.2 mips cc rejects this. */
16269 struct point {int x, y;};
16270 static struct point const zero = {0,0};
Pablo Galindo53e55292021-04-05 17:38:40 +010016271 /* IBM XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 It does not let you subtract one const X* pointer from another in
16273 an arm of an if-expression whose if-part is not a constant
16274 expression */
16275 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278 ++pcpcc;
16279 ppc = (char**) pcpcc;
16280 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016281 { /* SCO 3.2v4 cc rejects this sort of thing. */
16282 char tx;
16283 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 }
16289 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16290 int x[] = {25, 17};
16291 const int *foo = &x[0];
16292 ++foo;
16293 }
16294 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16295 typedef const int *iptr;
16296 iptr p = 0;
16297 ++p;
16298 }
Pablo Galindo53e55292021-04-05 17:38:40 +010016299 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016301 struct s { int j; const int *ap[3]; } bx;
16302 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 }
16304 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16305 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016307 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000016309#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016310
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 ;
16312 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016313}
Martin v. Löwis11437992002-04-12 09:54:03 +000016314_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016315if ac_fn_c_try_compile "$LINENO"
16316then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016317 ac_cv_c_const=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016318else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016319 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016320fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016321rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016322fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
16324printf "%s\n" "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016325if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016326
Pablo Galindo53e55292021-04-05 17:38:40 +010016327printf "%s\n" "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016328
16329fi
16330
Michael W. Hudson54241132001-12-07 15:38:26 +000016331
Guido van Rossumda88dad1995-01-26 00:46:29 +000016332works=no
Pablo Galindo53e55292021-04-05 17:38:40 +010016333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
16334printf %s "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016336/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016337
Martin v. Löwis11437992002-04-12 09:54:03 +000016338int
Pablo Galindo53e55292021-04-05 17:38:40 +010016339main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016340{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016341signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 ;
16343 return 0;
16344}
16345_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016346if ac_fn_c_try_compile "$LINENO"
16347then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000016348 works=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016349else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016350
Pablo Galindo53e55292021-04-05 17:38:40 +010016351printf "%s\n" "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016352
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016353
Guido van Rossum7f43da71994-08-01 12:15:30 +000016354fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016355rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16357printf "%s\n" "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016358
Guido van Rossumda88dad1995-01-26 00:46:29 +000016359have_prototypes=no
Pablo Galindo53e55292021-04-05 17:38:40 +010016360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
16361printf %s "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016363/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016364int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016365int
Pablo Galindo53e55292021-04-05 17:38:40 +010016366main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016368return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ;
16370 return 0;
16371}
16372_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016373if ac_fn_c_try_compile "$LINENO"
16374then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016375
Pablo Galindo53e55292021-04-05 17:38:40 +010016376printf "%s\n" "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
Matthias Kloseb159a552010-04-25 21:00:44 +000016378 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016379fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016380rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
16382printf "%s\n" "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016383
Guido van Rossumda88dad1995-01-26 00:46:29 +000016384works=no
Pablo Galindo53e55292021-04-05 17:38:40 +010016385{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
16386printf %s "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016388/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016389
16390#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016391int foo(int x, ...) {
16392 va_list va;
16393 va_start(va, x);
16394 va_arg(va, int);
16395 va_arg(va, char *);
16396 va_arg(va, double);
16397 return 0;
16398}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016399
Martin v. Löwis11437992002-04-12 09:54:03 +000016400int
Pablo Galindo53e55292021-04-05 17:38:40 +010016401main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016402{
Guido van Rossum90eea071996-08-30 20:58:57 +000016403return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 ;
16405 return 0;
16406}
16407_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016408if ac_fn_c_try_compile "$LINENO"
16409then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016410
16411
Pablo Galindo53e55292021-04-05 17:38:40 +010016412printf "%s\n" "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016413
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016414 works=yes
16415
Guido van Rossum627b2d71993-12-24 10:39:16 +000016416fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016417rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16419printf "%s\n" "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016420
Martin v. Löwisd6320502004-08-12 13:45:08 +000016421# check for socketpair
Pablo Galindo53e55292021-04-05 17:38:40 +010016422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
16423printf %s "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016425/* end confdefs.h. */
16426
16427#include <sys/types.h>
16428#include <sys/socket.h>
16429
16430int
Pablo Galindo53e55292021-04-05 17:38:40 +010016431main (void)
Martin v. Löwisd6320502004-08-12 13:45:08 +000016432{
16433void *x=socketpair
16434 ;
16435 return 0;
16436}
16437_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016438if ac_fn_c_try_compile "$LINENO"
16439then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000016440
Pablo Galindo53e55292021-04-05 17:38:40 +010016441printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000016442
Pablo Galindo53e55292021-04-05 17:38:40 +010016443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16444printf "%s\n" "yes" >&6; }
16445else $as_nop
16446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16447printf "%s\n" "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000016448
16449fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016450rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016451
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016452# check if sockaddr has sa_len member
Pablo Galindo53e55292021-04-05 17:38:40 +010016453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
16454printf %s "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016456/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016457#include <sys/types.h>
16458#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016459int
Pablo Galindo53e55292021-04-05 17:38:40 +010016460main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016461{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016462struct sockaddr x;
16463x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016464 ;
16465 return 0;
16466}
16467_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016468if ac_fn_c_try_compile "$LINENO"
16469then :
16470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16471printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016472
Pablo Galindo53e55292021-04-05 17:38:40 +010016473printf "%s\n" "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016474
Pablo Galindo53e55292021-04-05 17:38:40 +010016475else $as_nop
16476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016478
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016479fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016480rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016481
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016482# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016483
16484
Matthias Kloseb9621712010-04-24 17:59:49 +000016485ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Pablo Galindo53e55292021-04-05 17:38:40 +010016486if test "x$ac_cv_func_gethostbyname_r" = xyes
16487then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016488
Pablo Galindo53e55292021-04-05 17:38:40 +010016489 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016490
Pablo Galindo53e55292021-04-05 17:38:40 +010016491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
16492printf %s "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016493 OLD_CFLAGS=$CFLAGS
16494 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016496/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016497
16498# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016499
Martin v. Löwis11437992002-04-12 09:54:03 +000016500int
Pablo Galindo53e55292021-04-05 17:38:40 +010016501main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016502{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016503
16504 char *name;
16505 struct hostent *he, *res;
16506 char buffer[2048];
16507 int buflen = 2048;
16508 int h_errnop;
16509
16510 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016511
16512 ;
16513 return 0;
16514}
16515_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016516if ac_fn_c_try_compile "$LINENO"
16517then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016518
Pablo Galindo53e55292021-04-05 17:38:40 +010016519 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016520
Martin v. Löwis11437992002-04-12 09:54:03 +000016521
Pablo Galindo53e55292021-04-05 17:38:40 +010016522printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016523
Pablo Galindo53e55292021-04-05 17:38:40 +010016524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16525printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016526
Pablo Galindo53e55292021-04-05 17:38:40 +010016527else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016528
Pablo Galindo53e55292021-04-05 17:38:40 +010016529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16530printf "%s\n" "no" >&6; }
16531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
16532printf %s "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016534/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016536# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016537
Martin v. Löwis11437992002-04-12 09:54:03 +000016538int
Pablo Galindo53e55292021-04-05 17:38:40 +010016539main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016540{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016541
16542 char *name;
16543 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000016544 char buffer[2048];
16545 int buflen = 2048;
16546 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016547
Matthias Kloseb159a552010-04-25 21:00:44 +000016548 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016549
16550 ;
16551 return 0;
16552}
16553_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016554if ac_fn_c_try_compile "$LINENO"
16555then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016556
Pablo Galindo53e55292021-04-05 17:38:40 +010016557 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016558
Martin v. Löwis11437992002-04-12 09:54:03 +000016559
Pablo Galindo53e55292021-04-05 17:38:40 +010016560printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016561
Pablo Galindo53e55292021-04-05 17:38:40 +010016562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16563printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016564
Pablo Galindo53e55292021-04-05 17:38:40 +010016565else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016566
Pablo Galindo53e55292021-04-05 17:38:40 +010016567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16568printf "%s\n" "no" >&6; }
16569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
16570printf %s "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16572/* end confdefs.h. */
16573
16574# include <netdb.h>
16575
16576int
Pablo Galindo53e55292021-04-05 17:38:40 +010016577main (void)
Matthias Kloseb159a552010-04-25 21:00:44 +000016578{
16579
16580 char *name;
16581 struct hostent *he;
16582 struct hostent_data data;
16583
16584 (void) gethostbyname_r(name, he, &data);
16585
16586 ;
16587 return 0;
16588}
16589_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016590if ac_fn_c_try_compile "$LINENO"
16591then :
Matthias Kloseb159a552010-04-25 21:00:44 +000016592
Pablo Galindo53e55292021-04-05 17:38:40 +010016593 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016594
16595
Pablo Galindo53e55292021-04-05 17:38:40 +010016596printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016597
Pablo Galindo53e55292021-04-05 17:38:40 +010016598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16599printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016600
Pablo Galindo53e55292021-04-05 17:38:40 +010016601else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000016602
Pablo Galindo53e55292021-04-05 17:38:40 +010016603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16604printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016606fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016607rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016609fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016610rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016612fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016613rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016614 CFLAGS=$OLD_CFLAGS
16615
Pablo Galindo53e55292021-04-05 17:38:40 +010016616else $as_nop
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016617
Matthias Kloseb9621712010-04-24 17:59:49 +000016618 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Pablo Galindo53e55292021-04-05 17:38:40 +010016619if test "x$ac_cv_func_gethostbyname" = xyes
16620then :
16621 printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016623fi
16624
Michael W. Hudson54241132001-12-07 15:38:26 +000016625
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016626fi
16627
Michael W. Hudson54241132001-12-07 15:38:26 +000016628
16629
16630
16631
16632
16633
Guido van Rossum627b2d71993-12-24 10:39:16 +000016634# checks for system services
16635# (none yet)
16636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016637# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000016638ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Pablo Galindo53e55292021-04-05 17:38:40 +010016639if test "x$ac_cv_func___fpu_control" = xyes
16640then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016641
Pablo Galindo53e55292021-04-05 17:38:40 +010016642else $as_nop
16643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
16644printf %s "checking for __fpu_control in -lieee... " >&6; }
16645if test ${ac_cv_lib_ieee___fpu_control+y}
16646then :
16647 printf %s "(cached) " >&6
16648else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016650LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654/* Override any GCC internal prototype to avoid an error.
16655 Use char because int might match the return type of a GCC
16656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016657char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016658int
Pablo Galindo53e55292021-04-05 17:38:40 +010016659main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016660{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016662 ;
16663 return 0;
16664}
16665_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016666if ac_fn_c_try_link "$LINENO"
16667then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 ac_cv_lib_ieee___fpu_control=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016669else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016671fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016672rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016675fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
16677printf "%s\n" "$ac_cv_lib_ieee___fpu_control" >&6; }
16678if test "x$ac_cv_lib_ieee___fpu_control" = xyes
16679then :
16680 printf "%s\n" "#define HAVE_LIBIEEE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016682 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016683
Guido van Rossum627b2d71993-12-24 10:39:16 +000016684fi
16685
Michael W. Hudson54241132001-12-07 15:38:26 +000016686
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016687fi
16688
Michael W. Hudson54241132001-12-07 15:38:26 +000016689
Guido van Rossum7f43da71994-08-01 12:15:30 +000016690# check for --with-libm=...
16691
Guido van Rossum563e7081996-09-10 18:20:48 +000016692case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016693Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016694*) LIBM=-lm
16695esac
Pablo Galindo53e55292021-04-05 17:38:40 +010016696{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
16697printf %s "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699# Check whether --with-libm was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010016700if test ${with_libm+y}
16701then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000016703if test "$withval" = no
16704then LIBM=
Pablo Galindo53e55292021-04-05 17:38:40 +010016705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
16706printf "%s\n" "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016707elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016708then LIBM=$withval
Pablo Galindo53e55292021-04-05 17:38:40 +010016709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
16710printf "%s\n" "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016711else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016712fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016713else $as_nop
16714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
16715printf "%s\n" "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716fi
16717
Guido van Rossum7f43da71994-08-01 12:15:30 +000016718
16719# check for --with-libc=...
16720
Pablo Galindo53e55292021-04-05 17:38:40 +010016721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
16722printf %s "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016724# Check whether --with-libc was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010016725if test ${with_libc+y}
16726then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000016728if test "$withval" = no
16729then LIBC=
Pablo Galindo53e55292021-04-05 17:38:40 +010016730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
16731printf "%s\n" "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016732elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016733then LIBC=$withval
Pablo Galindo53e55292021-04-05 17:38:40 +010016734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
16735printf "%s\n" "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016736else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016737fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016738else $as_nop
16739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
16740printf "%s\n" "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741fi
16742
Guido van Rossum7f43da71994-08-01 12:15:30 +000016743
Stefan Krah1919b7e2012-03-21 18:25:23 +010016744# **************************************
16745# * Check for gcc x64 inline assembler *
16746# **************************************
16747
Pablo Galindo53e55292021-04-05 17:38:40 +010016748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
16749printf %s "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16751/* end confdefs.h. */
16752
16753int
Pablo Galindo53e55292021-04-05 17:38:40 +010016754main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010016755{
16756
16757 __asm__ __volatile__ ("movq %rcx, %rax");
16758
16759 ;
16760 return 0;
16761}
16762_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016763if ac_fn_c_try_link "$LINENO"
16764then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010016765 have_gcc_asm_for_x64=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016766else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010016767 have_gcc_asm_for_x64=no
16768fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016769rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016770 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010016771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
16772printf "%s\n" "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016773if test "$have_gcc_asm_for_x64" = yes
16774then
16775
Pablo Galindo53e55292021-04-05 17:38:40 +010016776printf "%s\n" "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010016777
16778fi
16779
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016780# **************************************************
16781# * Check for various properties of floating point *
16782# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016783
Pablo Galindo53e55292021-04-05 17:38:40 +010016784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
16785printf %s "checking whether float word ordering is bigendian... " >&6; }
16786if test ${ax_cv_c_float_words_bigendian+y}
16787then :
16788 printf %s "(cached) " >&6
16789else $as_nop
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016790
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016791
16792ax_cv_c_float_words_bigendian=unknown
16793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016794/* end confdefs.h. */
16795
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016796
16797double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
16798
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016799
16800_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016801if ac_fn_c_try_compile "$LINENO"
16802then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016803
16804
Christian Heimes5d6e8c12021-03-27 14:44:04 +010016805if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016806 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016807fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010016808if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016809 if test "$ax_cv_c_float_words_bigendian" = unknown; then
16810 ax_cv_c_float_words_bigendian=no
16811 else
16812 ax_cv_c_float_words_bigendian=unknown
16813 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016814fi
16815
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016816
16817fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016818rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016819fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
16821printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016822
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016823case $ax_cv_c_float_words_bigendian in
16824 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016825
Pablo Galindo53e55292021-04-05 17:38:40 +010016826printf "%s\n" "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016827 ;;
16828 no)
16829 ;;
16830 *)
16831 as_fn_error $? "
16832
16833Unknown float word ordering. You need to manually preset
16834ax_cv_c_float_words_bigendian=no (or yes) according to your system.
16835
16836 " "$LINENO" 5 ;;
16837esac
16838
16839
16840if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016841then
16842
Pablo Galindo53e55292021-04-05 17:38:40 +010016843printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016844
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016845elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016846then
16847
Pablo Galindo53e55292021-04-05 17:38:40 +010016848printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016849
16850else
16851 # Some ARM platforms use a mixed-endian representation for doubles.
16852 # While Python doesn't currently have full support for these platforms
16853 # (see e.g., issue 1762561), we can at least make sure that float <-> string
16854 # conversions work.
16855 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
16856 # or little, then it must be this?
16857
Pablo Galindo53e55292021-04-05 17:38:40 +010016858printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016859
16860fi
16861
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016862# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000016863# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016864# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000016865# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016866# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000016867# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016868
16869# This inline assembler syntax may also work for suncc and icc,
16870# so we try it on all platforms.
16871
Pablo Galindo53e55292021-04-05 17:38:40 +010016872{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
16873printf %s "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016875/* end confdefs.h. */
16876
16877int
Pablo Galindo53e55292021-04-05 17:38:40 +010016878main (void)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016879{
16880
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016881 unsigned short cw;
16882 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
16883 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016884
16885 ;
16886 return 0;
16887}
16888_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016889if ac_fn_c_try_link "$LINENO"
16890then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016891 have_gcc_asm_for_x87=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016892else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016893 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016894fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016895rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016896 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010016897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
16898printf "%s\n" "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016899if test "$have_gcc_asm_for_x87" = yes
16900then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016901
Pablo Galindo53e55292021-04-05 17:38:40 +010016902printf "%s\n" "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016903
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016905
Pablo Galindo53e55292021-04-05 17:38:40 +010016906{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
16907printf %s "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16909/* end confdefs.h. */
16910
16911int
Pablo Galindo53e55292021-04-05 17:38:40 +010016912main (void)
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016913{
16914
16915 unsigned int fpcr;
16916 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
16917 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
16918
16919 ;
16920 return 0;
16921}
16922_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016923if ac_fn_c_try_link "$LINENO"
16924then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016925 have_gcc_asm_for_mc68881=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010016926else $as_nop
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016927 have_gcc_asm_for_mc68881=no
16928fi
Pablo Galindo53e55292021-04-05 17:38:40 +010016929rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016930 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010016931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
16932printf "%s\n" "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016933if test "$have_gcc_asm_for_mc68881" = yes
16934then
16935
Pablo Galindo53e55292021-04-05 17:38:40 +010016936printf "%s\n" "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016937
16938fi
16939
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016940# Detect whether system arithmetic is subject to x87-style double
16941# rounding issues. The result of this test has little meaning on non
16942# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
16943# mode is round-to-nearest and double rounding issues are present, and
16944# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Pablo Galindo53e55292021-04-05 17:38:40 +010016945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
16946printf %s "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016947# $BASECFLAGS may affect the result
16948ac_save_cc="$CC"
16949CC="$CC $BASECFLAGS"
Pablo Galindo53e55292021-04-05 17:38:40 +010016950if test "$cross_compiling" = yes
16951then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016952 ac_cv_x87_double_rounding=no
Pablo Galindo53e55292021-04-05 17:38:40 +010016953else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016955/* end confdefs.h. */
16956
16957#include <stdlib.h>
16958#include <math.h>
16959int main() {
16960 volatile double x, y, z;
16961 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
16962 x = 0.99999999999999989; /* 1-2**-53 */
16963 y = 1./x;
16964 if (y != 1.)
16965 exit(0);
16966 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
16967 x = 1e16;
16968 y = 2.99999;
16969 z = x + y;
16970 if (z != 1e16+4.)
16971 exit(0);
16972 /* both tests show evidence of double rounding */
16973 exit(1);
16974}
16975
16976_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010016977if ac_fn_c_try_run "$LINENO"
16978then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016979 ac_cv_x87_double_rounding=no
Pablo Galindo53e55292021-04-05 17:38:40 +010016980else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016981 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016985fi
16986
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016987CC="$ac_save_cc"
Pablo Galindo53e55292021-04-05 17:38:40 +010016988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
16989printf "%s\n" "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016990if test "$ac_cv_x87_double_rounding" = yes
16991then
16992
Pablo Galindo53e55292021-04-05 17:38:40 +010016993printf "%s\n" "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016994
16995fi
16996
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016997# ************************************
16998# * Check for mathematical functions *
16999# ************************************
17000
17001LIBS_SAVE=$LIBS
17002LIBS="$LIBS $LIBM"
17003
Pablo Galindo53e55292021-04-05 17:38:40 +010017004ac_fn_c_check_func "$LINENO" "acosh" "ac_cv_func_acosh"
17005if test "x$ac_cv_func_acosh" = xyes
17006then :
17007 printf "%s\n" "#define HAVE_ACOSH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017008
17009fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017010ac_fn_c_check_func "$LINENO" "asinh" "ac_cv_func_asinh"
17011if test "x$ac_cv_func_asinh" = xyes
17012then :
17013 printf "%s\n" "#define HAVE_ASINH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017014
17015fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017016ac_fn_c_check_func "$LINENO" "atanh" "ac_cv_func_atanh"
17017if test "x$ac_cv_func_atanh" = xyes
17018then :
17019 printf "%s\n" "#define HAVE_ATANH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017020
Pablo Galindo53e55292021-04-05 17:38:40 +010017021fi
17022ac_fn_c_check_func "$LINENO" "copysign" "ac_cv_func_copysign"
17023if test "x$ac_cv_func_copysign" = xyes
17024then :
17025 printf "%s\n" "#define HAVE_COPYSIGN 1" >>confdefs.h
17026
17027fi
17028ac_fn_c_check_func "$LINENO" "erf" "ac_cv_func_erf"
17029if test "x$ac_cv_func_erf" = xyes
17030then :
17031 printf "%s\n" "#define HAVE_ERF 1" >>confdefs.h
17032
17033fi
17034ac_fn_c_check_func "$LINENO" "erfc" "ac_cv_func_erfc"
17035if test "x$ac_cv_func_erfc" = xyes
17036then :
17037 printf "%s\n" "#define HAVE_ERFC 1" >>confdefs.h
17038
17039fi
17040ac_fn_c_check_func "$LINENO" "expm1" "ac_cv_func_expm1"
17041if test "x$ac_cv_func_expm1" = xyes
17042then :
17043 printf "%s\n" "#define HAVE_EXPM1 1" >>confdefs.h
17044
17045fi
17046ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
17047if test "x$ac_cv_func_finite" = xyes
17048then :
17049 printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h
17050
17051fi
17052ac_fn_c_check_func "$LINENO" "gamma" "ac_cv_func_gamma"
17053if test "x$ac_cv_func_gamma" = xyes
17054then :
17055 printf "%s\n" "#define HAVE_GAMMA 1" >>confdefs.h
17056
17057fi
17058
17059ac_fn_c_check_func "$LINENO" "hypot" "ac_cv_func_hypot"
17060if test "x$ac_cv_func_hypot" = xyes
17061then :
17062 printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h
17063
17064fi
17065ac_fn_c_check_func "$LINENO" "lgamma" "ac_cv_func_lgamma"
17066if test "x$ac_cv_func_lgamma" = xyes
17067then :
17068 printf "%s\n" "#define HAVE_LGAMMA 1" >>confdefs.h
17069
17070fi
17071ac_fn_c_check_func "$LINENO" "log1p" "ac_cv_func_log1p"
17072if test "x$ac_cv_func_log1p" = xyes
17073then :
17074 printf "%s\n" "#define HAVE_LOG1P 1" >>confdefs.h
17075
17076fi
17077ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2"
17078if test "x$ac_cv_func_log2" = xyes
17079then :
17080 printf "%s\n" "#define HAVE_LOG2 1" >>confdefs.h
17081
17082fi
17083ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round"
17084if test "x$ac_cv_func_round" = xyes
17085then :
17086 printf "%s\n" "#define HAVE_ROUND 1" >>confdefs.h
17087
17088fi
17089ac_fn_c_check_func "$LINENO" "tgamma" "ac_cv_func_tgamma"
17090if test "x$ac_cv_func_tgamma" = xyes
17091then :
17092 printf "%s\n" "#define HAVE_TGAMMA 1" >>confdefs.h
17093
17094fi
17095
17096ac_fn_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
17097" "$ac_c_undeclared_builtin_options" "CFLAGS"
17098if test "x$ac_cv_have_decl_isinf" = xyes
17099then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017100 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017101else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017102 ac_have_decl=0
17103fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017104printf "%s\n" "#define HAVE_DECL_ISINF $ac_have_decl" >>confdefs.h
17105ac_fn_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
17106" "$ac_c_undeclared_builtin_options" "CFLAGS"
17107if test "x$ac_cv_have_decl_isnan" = xyes
17108then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017109 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017110else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017111 ac_have_decl=0
17112fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017113printf "%s\n" "#define HAVE_DECL_ISNAN $ac_have_decl" >>confdefs.h
17114ac_fn_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
17115" "$ac_c_undeclared_builtin_options" "CFLAGS"
17116if test "x$ac_cv_have_decl_isfinite" = xyes
17117then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017118 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017119else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017120 ac_have_decl=0
17121fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017122printf "%s\n" "#define HAVE_DECL_ISFINITE $ac_have_decl" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017123
17124
Mark Dickinsona614f042009-11-28 12:48:43 +000017125# For multiprocessing module, check that sem_open
17126# actually works. For FreeBSD versions <= 7.2,
17127# the kernel module that provides POSIX semaphores
17128# isn't loaded by default, so an attempt to call
17129# sem_open results in a 'Signal 12' error.
Pablo Galindo53e55292021-04-05 17:38:40 +010017130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
17131printf %s "checking whether POSIX semaphores are enabled... " >&6; }
17132if test ${ac_cv_posix_semaphores_enabled+y}
17133then :
17134 printf %s "(cached) " >&6
17135else $as_nop
17136 if test "$cross_compiling" = yes
17137then :
Mark Dickinsona614f042009-11-28 12:48:43 +000017138 ac_cv_posix_semaphores_enabled=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017139else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000017141/* end confdefs.h. */
17142
17143#include <unistd.h>
17144#include <fcntl.h>
17145#include <stdio.h>
17146#include <semaphore.h>
17147#include <sys/stat.h>
17148
17149int main(void) {
17150 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
17151 if (a == SEM_FAILED) {
17152 perror("sem_open");
17153 return 1;
17154 }
17155 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017156 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000017157 return 0;
17158}
17159
17160_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017161if ac_fn_c_try_run "$LINENO"
17162then :
Mark Dickinsona614f042009-11-28 12:48:43 +000017163 ac_cv_posix_semaphores_enabled=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017164else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017165 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000017166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000017169fi
17170
17171
Mark Dickinsona614f042009-11-28 12:48:43 +000017172fi
17173
Pablo Galindo53e55292021-04-05 17:38:40 +010017174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
17175printf "%s\n" "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000017176if test $ac_cv_posix_semaphores_enabled = no
17177then
17178
Pablo Galindo53e55292021-04-05 17:38:40 +010017179printf "%s\n" "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000017180
17181fi
17182
Mark Dickinson10683072009-04-18 21:18:19 +000017183# Multiprocessing check for broken sem_getvalue
Pablo Galindo53e55292021-04-05 17:38:40 +010017184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
17185printf %s "checking for broken sem_getvalue... " >&6; }
17186if test ${ac_cv_broken_sem_getvalue+y}
17187then :
17188 printf %s "(cached) " >&6
17189else $as_nop
17190 if test "$cross_compiling" = yes
17191then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017192 ac_cv_broken_sem_getvalue=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017193else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000017195/* end confdefs.h. */
17196
17197#include <unistd.h>
17198#include <fcntl.h>
17199#include <stdio.h>
17200#include <semaphore.h>
17201#include <sys/stat.h>
17202
17203int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000017204 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000017205 int count;
17206 int res;
17207 if(a==SEM_FAILED){
17208 perror("sem_open");
17209 return 1;
17210
17211 }
17212 res = sem_getvalue(a, &count);
17213 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017214 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000017215 return res==-1 ? 1 : 0;
17216}
17217
Mark Dickinson10683072009-04-18 21:18:19 +000017218_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017219if ac_fn_c_try_run "$LINENO"
17220then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017221 ac_cv_broken_sem_getvalue=no
Pablo Galindo53e55292021-04-05 17:38:40 +010017222else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17226 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017227fi
17228
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017229
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017230fi
17231
Pablo Galindo53e55292021-04-05 17:38:40 +010017232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
17233printf "%s\n" "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017234if test $ac_cv_broken_sem_getvalue = yes
17235then
17236
Pablo Galindo53e55292021-04-05 17:38:40 +010017237printf "%s\n" "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017238
17239fi
17240
Pablo Galindo53e55292021-04-05 17:38:40 +010017241ac_fn_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
17242" "$ac_c_undeclared_builtin_options" "CFLAGS"
17243if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes
17244then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017245 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017246else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017247 ac_have_decl=0
17248fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017249printf "%s\n" "#define HAVE_DECL_RTLD_LAZY $ac_have_decl" >>confdefs.h
17250ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
17251" "$ac_c_undeclared_builtin_options" "CFLAGS"
17252if test "x$ac_cv_have_decl_RTLD_NOW" = xyes
17253then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017254 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017255else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017256 ac_have_decl=0
17257fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017258printf "%s\n" "#define HAVE_DECL_RTLD_NOW $ac_have_decl" >>confdefs.h
17259ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
17260" "$ac_c_undeclared_builtin_options" "CFLAGS"
17261if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes
17262then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017263 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017264else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017265 ac_have_decl=0
17266fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017267printf "%s\n" "#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl" >>confdefs.h
17268ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
17269" "$ac_c_undeclared_builtin_options" "CFLAGS"
17270if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes
17271then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017272 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017273else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017274 ac_have_decl=0
17275fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017276printf "%s\n" "#define HAVE_DECL_RTLD_LOCAL $ac_have_decl" >>confdefs.h
17277ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
17278" "$ac_c_undeclared_builtin_options" "CFLAGS"
17279if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes
17280then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017281 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017282else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017283 ac_have_decl=0
17284fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017285printf "%s\n" "#define HAVE_DECL_RTLD_NODELETE $ac_have_decl" >>confdefs.h
17286ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
17287" "$ac_c_undeclared_builtin_options" "CFLAGS"
17288if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes
17289then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017290 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017291else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017292 ac_have_decl=0
17293fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017294printf "%s\n" "#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl" >>confdefs.h
17295ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
17296" "$ac_c_undeclared_builtin_options" "CFLAGS"
17297if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes
17298then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017299 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017300else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017301 ac_have_decl=0
17302fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017303printf "%s\n" "#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl" >>confdefs.h
17304ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
17305" "$ac_c_undeclared_builtin_options" "CFLAGS"
17306if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes
17307then :
Michael Feltc5ae1692017-12-19 13:58:49 +010017308 ac_have_decl=1
Pablo Galindo53e55292021-04-05 17:38:40 +010017309else $as_nop
Michael Feltc5ae1692017-12-19 13:58:49 +010017310 ac_have_decl=0
17311fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017312printf "%s\n" "#define HAVE_DECL_RTLD_MEMBER $ac_have_decl" >>confdefs.h
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017313
17314
Mark Dickinsonbd792642009-03-18 20:06:12 +000017315# determine what size digit to use for Python's longs
Pablo Galindo53e55292021-04-05 17:38:40 +010017316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
17317printf %s "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017318# Check whether --enable-big-digits was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010017319if test ${enable_big_digits+y}
17320then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000017321 enableval=$enable_big_digits; case $enable_big_digits in
17322yes)
17323 enable_big_digits=30 ;;
17324no)
17325 enable_big_digits=15 ;;
1732615|30)
17327 ;;
17328*)
Victor Stinnere0be4232011-10-25 13:06:09 +020017329 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 +000017330esac
Pablo Galindo53e55292021-04-05 17:38:40 +010017331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
17332printf "%s\n" "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017333
Pablo Galindo53e55292021-04-05 17:38:40 +010017334printf "%s\n" "#define PYLONG_BITS_IN_DIGIT $enable_big_digits" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +000017335
17336
Pablo Galindo53e55292021-04-05 17:38:40 +010017337else $as_nop
17338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
17339printf "%s\n" "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017340fi
17341
17342
Guido van Rossumef2255b2000-03-10 22:30:29 +000017343# check for wchar.h
Pablo Galindo53e55292021-04-05 17:38:40 +010017344ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
17345if test "x$ac_cv_header_wchar_h" = xyes
17346then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017347
17348
Pablo Galindo53e55292021-04-05 17:38:40 +010017349printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017350
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017351 wchar_h="yes"
17352
Pablo Galindo53e55292021-04-05 17:38:40 +010017353else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017354 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017355
17356fi
17357
Michael W. Hudson54241132001-12-07 15:38:26 +000017358
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017359# determine wchar_t size
17360if test "$wchar_h" = yes
17361then
Matthias Kloseb9621712010-04-24 17:59:49 +000017362 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17364# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17365# This bug is HP SR number 8606223364.
Pablo Galindo53e55292021-04-05 17:38:40 +010017366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
17367printf %s "checking size of wchar_t... " >&6; }
17368if test ${ac_cv_sizeof_wchar_t+y}
17369then :
17370 printf %s "(cached) " >&6
17371else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
Pablo Galindo53e55292021-04-05 17:38:40 +010017373"
17374then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017375
Pablo Galindo53e55292021-04-05 17:38:40 +010017376else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017377 if test "$ac_cv_type_wchar_t" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010017378 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17379printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017380as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020017381See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 else
17383 ac_cv_sizeof_wchar_t=0
17384 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017386
Martin v. Löwis11437992002-04-12 09:54:03 +000017387fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
17389printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390
17391
17392
Pablo Galindo53e55292021-04-05 17:38:40 +010017393printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017394
Michael W. Hudson54241132001-12-07 15:38:26 +000017395
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017396fi
17397
Pablo Galindo53e55292021-04-05 17:38:40 +010017398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
17399printf %s "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017400have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000017401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017402/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017403
17404#include <tcl.h>
17405#if TCL_UTF_MAX != 6
17406# error "NOT UCS4_TCL"
17407#endif
17408int
Pablo Galindo53e55292021-04-05 17:38:40 +010017409main (void)
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017410{
17411
17412 ;
17413 return 0;
17414}
17415_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017416if ac_fn_c_try_compile "$LINENO"
17417then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017418
17419
Pablo Galindo53e55292021-04-05 17:38:40 +010017420printf "%s\n" "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017421
17422 have_ucs4_tcl=yes
17423
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017424fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017425rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
17427printf "%s\n" "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017428
Skip Montanaro6dead952003-09-25 14:50:04 +000017429# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017430if test "$wchar_h" = yes
17431then
17432 # check whether wchar_t is signed or not
Pablo Galindo53e55292021-04-05 17:38:40 +010017433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
17434printf %s "checking whether wchar_t is signed... " >&6; }
17435 if test ${ac_cv_wchar_t_signed+y}
17436then :
17437 printf %s "(cached) " >&6
17438else $as_nop
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017439
Pablo Galindo53e55292021-04-05 17:38:40 +010017440 if test "$cross_compiling" = yes
17441then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017442 ac_cv_wchar_t_signed=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017443else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017445/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017446
17447 #include <wchar.h>
17448 int main()
17449 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017450 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110017451 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017452 }
17453
17454_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017455if ac_fn_c_try_run "$LINENO"
17456then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017457 ac_cv_wchar_t_signed=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017458else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17462 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017463fi
17464
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017465fi
17466
Pablo Galindo53e55292021-04-05 17:38:40 +010017467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
17468printf "%s\n" "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469fi
17470
Pablo Galindo53e55292021-04-05 17:38:40 +010017471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
17472printf %s "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017473# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020017474if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000017475 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000017476then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017477
Pablo Galindo53e55292021-04-05 17:38:40 +010017478printf "%s\n" "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017479
Pablo Galindo53e55292021-04-05 17:38:40 +010017480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17481printf "%s\n" "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017482else
Pablo Galindo53e55292021-04-05 17:38:40 +010017483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17484printf "%s\n" "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017485fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017486
17487# check for endianness
Pablo Galindo53e55292021-04-05 17:38:40 +010017488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17489printf %s "checking whether byte ordering is bigendian... " >&6; }
17490if test ${ac_cv_c_bigendian+y}
17491then :
17492 printf %s "(cached) " >&6
17493else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017494 ac_cv_c_bigendian=unknown
17495 # See if we're dealing with a universal compiler.
17496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17497/* end confdefs.h. */
17498#ifndef __APPLE_CC__
17499 not a universal capable compiler
17500 #endif
17501 typedef int dummy;
17502
Skip Montanaro6dead952003-09-25 14:50:04 +000017503_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017504if ac_fn_c_try_compile "$LINENO"
17505then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017506
17507 # Check for potential -arch flags. It is not universal unless
17508 # there are at least two -arch flags with different values.
17509 ac_arch=
17510 ac_prev=
17511 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17512 if test -n "$ac_prev"; then
17513 case $ac_word in
17514 i?86 | x86_64 | ppc | ppc64)
17515 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17516 ac_arch=$ac_word
17517 else
17518 ac_cv_c_bigendian=universal
17519 break
17520 fi
17521 ;;
17522 esac
17523 ac_prev=
17524 elif test "x$ac_word" = "x-arch"; then
17525 ac_prev=arch
17526 fi
17527 done
17528fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017529rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017530 if test $ac_cv_c_bigendian = unknown; then
17531 # See if sys/param.h defines the BYTE_ORDER macro.
17532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017533/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017534#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017535 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017536
Martin v. Löwis11437992002-04-12 09:54:03 +000017537int
Pablo Galindo53e55292021-04-05 17:38:40 +010017538main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017539{
Matthias Kloseb9621712010-04-24 17:59:49 +000017540#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17541 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17542 && LITTLE_ENDIAN)
17543 bogus endian macros
17544 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017545
17546 ;
17547 return 0;
17548}
17549_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017550if ac_fn_c_try_compile "$LINENO"
17551then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017552 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000017553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017554/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017555#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017556 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017557
Martin v. Löwis11437992002-04-12 09:54:03 +000017558int
Pablo Galindo53e55292021-04-05 17:38:40 +010017559main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017560{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017561#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000017562 not big endian
17563 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017564
17565 ;
17566 return 0;
17567}
17568_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017569if ac_fn_c_try_compile "$LINENO"
17570then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017571 ac_cv_c_bigendian=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017572else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017573 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017574fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017575rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017576fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017577rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 fi
17579 if test $ac_cv_c_bigendian = unknown; then
17580 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017582/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017583#include <limits.h>
17584
Martin v. Löwis11437992002-04-12 09:54:03 +000017585int
Pablo Galindo53e55292021-04-05 17:38:40 +010017586main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017587{
Matthias Kloseb9621712010-04-24 17:59:49 +000017588#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17589 bogus endian macros
17590 #endif
17591
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 ;
17593 return 0;
17594}
17595_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017596if ac_fn_c_try_compile "$LINENO"
17597then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017598 # It does; now see whether it defined to _BIG_ENDIAN or not.
17599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17600/* end confdefs.h. */
17601#include <limits.h>
17602
17603int
Pablo Galindo53e55292021-04-05 17:38:40 +010017604main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017605{
17606#ifndef _BIG_ENDIAN
17607 not big endian
17608 #endif
17609
17610 ;
17611 return 0;
17612}
17613_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017614if ac_fn_c_try_compile "$LINENO"
17615then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017616 ac_cv_c_bigendian=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017617else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017619fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017620rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017621fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017622rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017623 fi
17624 if test $ac_cv_c_bigendian = unknown; then
17625 # Compile a test program.
Pablo Galindo53e55292021-04-05 17:38:40 +010017626 if test "$cross_compiling" = yes
17627then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017628 # Try to guess by grepping values from an object file.
17629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17630/* end confdefs.h. */
Pablo Galindo53e55292021-04-05 17:38:40 +010017631unsigned short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Pablo Galindo53e55292021-04-05 17:38:40 +010017633 unsigned short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017634 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17635 int use_ascii (int i) {
17636 return ascii_mm[i] + ascii_ii[i];
17637 }
Pablo Galindo53e55292021-04-05 17:38:40 +010017638 unsigned short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017639 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Pablo Galindo53e55292021-04-05 17:38:40 +010017640 unsigned short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17642 int use_ebcdic (int i) {
17643 return ebcdic_mm[i] + ebcdic_ii[i];
17644 }
17645 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646
Matthias Kloseb9621712010-04-24 17:59:49 +000017647int
Pablo Galindo53e55292021-04-05 17:38:40 +010017648main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017649{
17650return use_ascii (foo) == use_ebcdic (foo);
17651 ;
17652 return 0;
17653}
17654_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017655if ac_fn_c_try_compile "$LINENO"
17656then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017657 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17658 ac_cv_c_bigendian=yes
17659 fi
17660 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17661 if test "$ac_cv_c_bigendian" = unknown; then
17662 ac_cv_c_bigendian=no
17663 else
17664 # finding both strings is unlikely to happen, but who knows?
17665 ac_cv_c_bigendian=unknown
17666 fi
17667 fi
17668fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017669rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17670else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017672/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017674int
Pablo Galindo53e55292021-04-05 17:38:40 +010017675main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677
Matthias Kloseb9621712010-04-24 17:59:49 +000017678 /* Are we little or big endian? From Harbison&Steele. */
17679 union
17680 {
17681 long int l;
17682 char c[sizeof (long int)];
17683 } u;
17684 u.l = 1;
17685 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686
17687 ;
17688 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017689}
Martin v. Löwis11437992002-04-12 09:54:03 +000017690_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017691if ac_fn_c_try_run "$LINENO"
17692then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017693 ac_cv_c_bigendian=no
Pablo Galindo53e55292021-04-05 17:38:40 +010017694else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017695 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17698 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700
Matthias Kloseb9621712010-04-24 17:59:49 +000017701 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017702fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17704printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000017705 case $ac_cv_c_bigendian in #(
17706 yes)
Pablo Galindo53e55292021-04-05 17:38:40 +010017707 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000017708;; #(
17709 no)
17710 ;; #(
17711 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017712
Pablo Galindo53e55292021-04-05 17:38:40 +010017713printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017714
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 ;; #(
17716 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017717 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017719 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017720
Michael W. Hudson54241132001-12-07 15:38:26 +000017721
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017722# ABI version string for Python extension modules. This appears between the
17723# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
17724# from the following attributes which affect the ABI of this Python build (in
17725# this order):
17726#
17727# * The Python implementation (always 'cpython-' for us)
17728# * The major and minor version numbers
17729# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017730#
17731# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000017732# would get a shared library ABI version tag of 'cpython-32dmu' and shared
17733# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020017734#
17735# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
17736# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017737
Pablo Galindo53e55292021-04-05 17:38:40 +010017738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
17739printf %s "checking ABIFLAGS... " >&6; }
17740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
17741printf "%s\n" "$ABIFLAGS" >&6; }
17742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
17743printf %s "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020017744SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Pablo Galindo53e55292021-04-05 17:38:40 +010017745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
17746printf "%s\n" "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017747
Victor Stinner6d13e5b2019-04-26 18:56:19 +020017748# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
17749if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020017750 # Similar to SOABI but remove "d" flag from ABIFLAGS
17751
17752 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
17753
Pablo Galindo53e55292021-04-05 17:38:40 +010017754printf "%s\n" "#define ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h
Victor Stinner5422e3c2019-04-26 01:40:00 +020017755
17756fi
17757
Victor Stinner52a327c2020-12-23 03:41:08 +010017758
Matti Picusa44ce6c2020-12-20 04:56:57 +020017759EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070017760
Pablo Galindo53e55292021-04-05 17:38:40 +010017761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
17762printf %s "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017763LDVERSION='$(VERSION)$(ABIFLAGS)'
Pablo Galindo53e55292021-04-05 17:38:40 +010017764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
17765printf "%s\n" "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017766
E. M. Brayc994c8f2019-05-24 17:33:47 +020017767# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020017768
E. M. Brayb1fc4172019-05-24 18:39:39 +020017769if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020017770 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020017771else
17772 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020017773fi
17774
doko@python.org87421192013-01-26 11:39:31 +010017775
Victor Stinner51ae31e2020-06-09 15:32:43 +020017776
17777BINLIBDEST='$(LIBDIR)/python$(VERSION)'
17778
17779
17780# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010017781# /usr/$LIDIRNAME/python$VERSION
17782
17783PLATLIBDIR="lib"
Pablo Galindo53e55292021-04-05 17:38:40 +010017784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
17785printf %s "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017786
17787# Check whether --with-platlibdir was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010017788if test ${with_platlibdir+y}
17789then :
Victor Stinner8510f432020-03-10 09:53:09 +010017790 withval=$with_platlibdir;
17791# ignore 3 options:
17792# --with-platlibdir
17793# --with-platlibdir=
17794# --without-platlibdir
17795if test -n "$withval" -a "$withval" != yes -a "$withval" != no
17796then
Pablo Galindo53e55292021-04-05 17:38:40 +010017797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17798printf "%s\n" "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017799 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020017800 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020017801else
Pablo Galindo53e55292021-04-05 17:38:40 +010017802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17803printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017804fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017805else $as_nop
17806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17807printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017808fi
17809
17810
17811
17812
17813if test x$PLATFORM_TRIPLET = x; then
17814 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
17815else
17816 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020017817fi
doko@python.org87421192013-01-26 11:39:31 +010017818
17819
Victor Stinner75e59a92021-01-20 17:07:21 +010017820# Check for --with-wheel-pkg-dir=PATH
17821
17822WHEEL_PKG_DIR=""
Pablo Galindo53e55292021-04-05 17:38:40 +010017823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
17824printf %s "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017825
17826# Check whether --with-wheel-pkg-dir was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010017827if test ${with_wheel_pkg_dir+y}
17828then :
Victor Stinner75e59a92021-01-20 17:07:21 +010017829 withval=$with_wheel_pkg_dir;
17830if test -n "$withval"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010017831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17832printf "%s\n" "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017833 WHEEL_PKG_DIR="$withval"
17834else
Pablo Galindo53e55292021-04-05 17:38:40 +010017835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17836printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017837fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017838else $as_nop
17839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17840printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017841fi
17842
17843
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017844# Check whether right shifting a negative integer extends the sign bit
17845# or fills with zeros (like the Cray J90, according to Tim Peters).
Pablo Galindo53e55292021-04-05 17:38:40 +010017846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
17847printf %s "checking whether right shift extends the sign bit... " >&6; }
17848if test ${ac_cv_rshift_extends_sign+y}
17849then :
17850 printf %s "(cached) " >&6
17851else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017852
Pablo Galindo53e55292021-04-05 17:38:40 +010017853if test "$cross_compiling" = yes
17854then :
Guido van Rossum3065c942001-09-17 04:03:14 +000017855 ac_cv_rshift_extends_sign=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017856else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017858/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017859
17860int main()
17861{
Joshua Root674fa0a2020-12-14 07:56:34 +110017862 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017863}
17864
Martin v. Löwis11437992002-04-12 09:54:03 +000017865_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017866if ac_fn_c_try_run "$LINENO"
17867then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000017868 ac_cv_rshift_extends_sign=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017869else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017870 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000017874fi
17875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876fi
17877
Pablo Galindo53e55292021-04-05 17:38:40 +010017878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
17879printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000017880if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017881then
Martin v. Löwis11437992002-04-12 09:54:03 +000017882
Pablo Galindo53e55292021-04-05 17:38:40 +010017883printf "%s\n" "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017884
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017885fi
17886
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017887# check for getc_unlocked and related locking functions
Pablo Galindo53e55292021-04-05 17:38:40 +010017888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
17889printf %s "checking for getc_unlocked() and friends... " >&6; }
17890if test ${ac_cv_have_getc_unlocked+y}
17891then :
17892 printf %s "(cached) " >&6
17893else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017894
Matthias Kloseb9621712010-04-24 17:59:49 +000017895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017896/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017897#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017898int
Pablo Galindo53e55292021-04-05 17:38:40 +010017899main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017900{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017901
17902 FILE *f = fopen("/dev/null", "r");
17903 flockfile(f);
17904 getc_unlocked(f);
17905 funlockfile(f);
17906
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 ;
17908 return 0;
17909}
17910_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017911if ac_fn_c_try_link "$LINENO"
17912then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017913 ac_cv_have_getc_unlocked=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010017914else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 ac_cv_have_getc_unlocked=no
17916fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017917rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017918 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017920
Pablo Galindo53e55292021-04-05 17:38:40 +010017921{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
17922printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017923if test "$ac_cv_have_getc_unlocked" = yes
17924then
Martin v. Löwis11437992002-04-12 09:54:03 +000017925
Pablo Galindo53e55292021-04-05 17:38:40 +010017926printf "%s\n" "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017927
17928fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017929
Roland Hiebere1f77692021-02-09 02:05:25 +010017930
17931# Check whether --with-readline was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010017932if test ${with_readline+y}
17933then :
Roland Hiebere1f77692021-02-09 02:05:25 +010017934 withval=$with_readline;
Pablo Galindo53e55292021-04-05 17:38:40 +010017935else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010017936 with_readline=yes
17937fi
17938
17939
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017940# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010017941py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000017942# save the value of LIBS so we don't actually link Python with readline
17943LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017944
Roland Hiebere1f77692021-02-09 02:05:25 +010017945if test "$with_readline" != no; then
17946 case "$with_readline" in
17947 editline|edit)
17948 LIBREADLINE=edit
17949
Pablo Galindo53e55292021-04-05 17:38:40 +010017950printf "%s\n" "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010017951
17952 ;;
17953 yes|readline)
17954 LIBREADLINE=readline
17955 ;;
17956 *)
17957 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
17958 ;;
17959 esac
17960
17961 # On some systems we need to link readline to a termcap compatible
17962 # library. NOTE: Keep the precedence of listed libraries synchronised
17963 # with setup.py.
Pablo Galindo53e55292021-04-05 17:38:40 +010017964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
17965printf %s "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010017966 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
17967 if test -z "$py_libtermcap"; then
17968 READLINE_LIBS="-l$LIBREADLINE"
17969 else
17970 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
17971 fi
17972 LIBS="$READLINE_LIBS $LIBS_no_readline"
17973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017974/* end confdefs.h. */
17975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976/* Override any GCC internal prototype to avoid an error.
17977 Use char because int might match the return type of a GCC
17978 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017979char readline ();
17980int
Pablo Galindo53e55292021-04-05 17:38:40 +010017981main (void)
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017983return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017984 ;
17985 return 0;
17986}
17987_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010017988if ac_fn_c_try_link "$LINENO"
17989then :
Gregory P. Smith18820942008-09-07 06:24:49 +000017990 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017991fi
Pablo Galindo53e55292021-04-05 17:38:40 +010017992rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017993 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010017994 if test $py_cv_lib_readline = yes; then
17995 break
17996 fi
17997 done
17998
17999 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
18000 #AC_SUBST([READLINE_LIBS])
18001 if test $py_cv_lib_readline = no; then
Pablo Galindo53e55292021-04-05 17:38:40 +010018002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
18003printf "%s\n" "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010018004 else
Pablo Galindo53e55292021-04-05 17:38:40 +010018005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
18006printf "%s\n" "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000018007
Pablo Galindo53e55292021-04-05 17:38:40 +010018008printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000018009
Roland Hiebere1f77692021-02-09 02:05:25 +010018010 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000018011fi
18012
Roland Hiebere1f77692021-02-09 02:05:25 +010018013if test "$py_cv_lib_readline" = yes; then
18014 # check for readline 2.2
Pablo Galindo53e55292021-04-05 17:38:40 +010018015 ac_fn_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018016#include <stdio.h> /* Must be first for Gnu Readline */
18017#ifdef WITH_EDITLINE
18018# include <editline/readline.h>
18019#else
18020# include <readline/readline.h>
18021#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000018022
Pablo Galindo53e55292021-04-05 17:38:40 +010018023" "$ac_c_undeclared_builtin_options" "CFLAGS"
18024if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes
18025then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018026
Pablo Galindo53e55292021-04-05 17:38:40 +010018027printf "%s\n" "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000018028
18029fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018030 ac_fn_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018031#include <stdio.h> /* Must be first for Gnu Readline */
18032#ifdef WITH_EDITLINE
18033# include <editline/readline.h>
18034#else
18035# include <readline/readline.h>
18036#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000018037
Pablo Galindo53e55292021-04-05 17:38:40 +010018038" "$ac_c_undeclared_builtin_options" "CFLAGS"
18039if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes
18040then :
Antoine Pitroud5131772009-10-26 19:22:14 +000018041
Pablo Galindo53e55292021-04-05 17:38:40 +010018042printf "%s\n" "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000018043
18044fi
Antoine Pitroud5131772009-10-26 19:22:14 +000018045
Roland Hiebere1f77692021-02-09 02:05:25 +010018046 # check for readline 4.0
Pablo Galindo53e55292021-04-05 17:38:40 +010018047 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_pre_input_hook" | $as_tr_sh`
18048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
18049printf %s "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
18050if eval test \${$as_ac_Lib+y}
18051then :
18052 printf %s "(cached) " >&6
18053else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018054 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018055LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059/* Override any GCC internal prototype to avoid an error.
18060 Use char because int might match the return type of a GCC
18061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018062char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018063int
Pablo Galindo53e55292021-04-05 17:38:40 +010018064main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018067 ;
18068 return 0;
18069}
18070_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018071if ac_fn_c_try_link "$LINENO"
18072then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018073 eval "$as_ac_Lib=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +010018074else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018075 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000018076fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018077rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018079LIBS=$ac_check_lib_save_LIBS
18080fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018081eval ac_res=\$$as_ac_Lib
Pablo Galindo53e55292021-04-05 17:38:40 +010018082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18083printf "%s\n" "$ac_res" >&6; }
18084if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18085then :
Michael W. Hudson54241132001-12-07 15:38:26 +000018086
Pablo Galindo53e55292021-04-05 17:38:40 +010018087printf "%s\n" "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000018088
Martin v. Löwis0daad592001-09-30 21:09:59 +000018089fi
18090
Michael W. Hudson54241132001-12-07 15:38:26 +000018091
Roland Hiebere1f77692021-02-09 02:05:25 +010018092 # also in 4.0
Pablo Galindo53e55292021-04-05 17:38:40 +010018093 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_display_matches_hook" | $as_tr_sh`
18094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
18095printf %s "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
18096if eval test \${$as_ac_Lib+y}
18097then :
18098 printf %s "(cached) " >&6
18099else $as_nop
Thomas Wouters89d996e2007-09-08 17:39:28 +000018100 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018101LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000018103/* end confdefs.h. */
18104
18105/* Override any GCC internal prototype to avoid an error.
18106 Use char because int might match the return type of a GCC
18107 builtin and then its argument prototype would still apply. */
Thomas Wouters89d996e2007-09-08 17:39:28 +000018108char rl_completion_display_matches_hook ();
18109int
Pablo Galindo53e55292021-04-05 17:38:40 +010018110main (void)
Thomas Wouters89d996e2007-09-08 17:39:28 +000018111{
18112return rl_completion_display_matches_hook ();
18113 ;
18114 return 0;
18115}
18116_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018117if ac_fn_c_try_link "$LINENO"
18118then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018119 eval "$as_ac_Lib=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +010018120else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018121 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000018122fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018123rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018124 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000018125LIBS=$ac_check_lib_save_LIBS
18126fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018127eval ac_res=\$$as_ac_Lib
Pablo Galindo53e55292021-04-05 17:38:40 +010018128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18129printf "%s\n" "$ac_res" >&6; }
18130if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18131then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000018132
Pablo Galindo53e55292021-04-05 17:38:40 +010018133printf "%s\n" "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000018134
18135fi
18136
18137
Roland Hiebere1f77692021-02-09 02:05:25 +010018138 # also in 4.0, but not in editline
Pablo Galindo53e55292021-04-05 17:38:40 +010018139 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_resize_terminal" | $as_tr_sh`
18140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
18141printf %s "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
18142if eval test \${$as_ac_Lib+y}
18143then :
18144 printf %s "(cached) " >&6
18145else $as_nop
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018146 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018147LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18149/* end confdefs.h. */
18150
18151/* Override any GCC internal prototype to avoid an error.
18152 Use char because int might match the return type of a GCC
18153 builtin and then its argument prototype would still apply. */
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018154char rl_resize_terminal ();
18155int
Pablo Galindo53e55292021-04-05 17:38:40 +010018156main (void)
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018157{
18158return rl_resize_terminal ();
18159 ;
18160 return 0;
18161}
18162_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018163if ac_fn_c_try_link "$LINENO"
18164then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018165 eval "$as_ac_Lib=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +010018166else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018167 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018168fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018169rm -f core conftest.err conftest.$ac_objext conftest.beam \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018170 conftest$ac_exeext conftest.$ac_ext
18171LIBS=$ac_check_lib_save_LIBS
18172fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018173eval ac_res=\$$as_ac_Lib
Pablo Galindo53e55292021-04-05 17:38:40 +010018174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18175printf "%s\n" "$ac_res" >&6; }
18176if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18177then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018178
Pablo Galindo53e55292021-04-05 17:38:40 +010018179printf "%s\n" "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018180
18181fi
18182
18183
Roland Hiebere1f77692021-02-09 02:05:25 +010018184 # check for readline 4.2
Pablo Galindo53e55292021-04-05 17:38:40 +010018185 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_matches" | $as_tr_sh`
18186{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
18187printf %s "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
18188if eval test \${$as_ac_Lib+y}
18189then :
18190 printf %s "(cached) " >&6
18191else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018192 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018193LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197/* Override any GCC internal prototype to avoid an error.
18198 Use char because int might match the return type of a GCC
18199 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018200char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018201int
Pablo Galindo53e55292021-04-05 17:38:40 +010018202main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018205 ;
18206 return 0;
18207}
18208_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018209if ac_fn_c_try_link "$LINENO"
18210then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018211 eval "$as_ac_Lib=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +010018212else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018213 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000018214fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018215rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018217LIBS=$ac_check_lib_save_LIBS
18218fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018219eval ac_res=\$$as_ac_Lib
Pablo Galindo53e55292021-04-05 17:38:40 +010018220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18221printf "%s\n" "$ac_res" >&6; }
18222if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18223then :
Michael W. Hudson54241132001-12-07 15:38:26 +000018224
Pablo Galindo53e55292021-04-05 17:38:40 +010018225printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000018226
Guido van Rossum353ae582001-07-10 16:45:32 +000018227fi
18228
Jack Jansendd19cf82001-12-06 22:36:17 +000018229
Roland Hiebere1f77692021-02-09 02:05:25 +010018230 # also in readline 4.2
Pablo Galindo53e55292021-04-05 17:38:40 +010018231 ac_fn_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018232#include <stdio.h> /* Must be first for Gnu Readline */
18233#ifdef WITH_EDITLINE
18234# include <editline/readline.h>
18235#else
18236# include <readline/readline.h>
18237#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000018238
Pablo Galindo53e55292021-04-05 17:38:40 +010018239" "$ac_c_undeclared_builtin_options" "CFLAGS"
18240if test "x$ac_cv_have_decl_rl_catch_signals" = xyes
18241then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018242
Pablo Galindo53e55292021-04-05 17:38:40 +010018243printf "%s\n" "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018244
18245fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018246
Pablo Galindo53e55292021-04-05 17:38:40 +010018247 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_append_history" | $as_tr_sh`
18248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
18249printf %s "checking for append_history in -l$LIBREADLINE... " >&6; }
18250if eval test \${$as_ac_Lib+y}
18251then :
18252 printf %s "(cached) " >&6
18253else $as_nop
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018254 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018255LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18257/* end confdefs.h. */
18258
18259/* Override any GCC internal prototype to avoid an error.
18260 Use char because int might match the return type of a GCC
18261 builtin and then its argument prototype would still apply. */
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018262char append_history ();
18263int
Pablo Galindo53e55292021-04-05 17:38:40 +010018264main (void)
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018265{
18266return append_history ();
18267 ;
18268 return 0;
18269}
18270_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018271if ac_fn_c_try_link "$LINENO"
18272then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018273 eval "$as_ac_Lib=yes"
Pablo Galindo53e55292021-04-05 17:38:40 +010018274else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018275 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018276fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018277rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018278 conftest$ac_exeext conftest.$ac_ext
18279LIBS=$ac_check_lib_save_LIBS
18280fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018281eval ac_res=\$$as_ac_Lib
Pablo Galindo53e55292021-04-05 17:38:40 +010018282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18283printf "%s\n" "$ac_res" >&6; }
18284if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18285then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018286
Pablo Galindo53e55292021-04-05 17:38:40 +010018287printf "%s\n" "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018288
18289fi
18290
Roland Hiebere1f77692021-02-09 02:05:25 +010018291fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018292
Martin v. Löwis82bca632006-02-10 20:49:30 +000018293# End of readline checks: restore LIBS
18294LIBS=$LIBS_no_readline
18295
Pablo Galindo53e55292021-04-05 17:38:40 +010018296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
18297printf %s "checking for broken nice()... " >&6; }
18298if test ${ac_cv_broken_nice+y}
18299then :
18300 printf %s "(cached) " >&6
18301else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018302
Pablo Galindo53e55292021-04-05 17:38:40 +010018303if test "$cross_compiling" = yes
18304then :
Guido van Rossum3065c942001-09-17 04:03:14 +000018305 ac_cv_broken_nice=no
Pablo Galindo53e55292021-04-05 17:38:40 +010018306else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018308/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018309
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080018310#include <stdlib.h>
18311#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018312int main()
18313{
18314 int val1 = nice(1);
18315 if (val1 != -1 && val1 == nice(2))
18316 exit(0);
18317 exit(1);
18318}
18319
Martin v. Löwis11437992002-04-12 09:54:03 +000018320_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018321if ac_fn_c_try_run "$LINENO"
18322then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018323 ac_cv_broken_nice=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010018324else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018325 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018329fi
18330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018331fi
18332
Pablo Galindo53e55292021-04-05 17:38:40 +010018333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
18334printf "%s\n" "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018335if test "$ac_cv_broken_nice" = yes
18336then
Martin v. Löwis11437992002-04-12 09:54:03 +000018337
Pablo Galindo53e55292021-04-05 17:38:40 +010018338printf "%s\n" "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018339
18340fi
18341
Pablo Galindo53e55292021-04-05 17:38:40 +010018342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
18343printf %s "checking for broken poll()... " >&6; }
18344if test ${ac_cv_broken_poll+y}
18345then :
18346 printf %s "(cached) " >&6
18347else $as_nop
18348 if test "$cross_compiling" = yes
18349then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018350 ac_cv_broken_poll=no
Pablo Galindo53e55292021-04-05 17:38:40 +010018351else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018353/* end confdefs.h. */
18354
18355#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110018356#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018357
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018358int main()
18359{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018360 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018361 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018362
18363 close (42);
18364
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018365 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018366 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018367 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018368 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018369 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018370 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018371 return 1;
18372}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018373
18374_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018375if ac_fn_c_try_run "$LINENO"
18376then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018377 ac_cv_broken_poll=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010018378else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018379 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18382 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018385fi
18386
Pablo Galindo53e55292021-04-05 17:38:40 +010018387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
18388printf "%s\n" "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018389if test "$ac_cv_broken_poll" = yes
18390then
18391
Pablo Galindo53e55292021-04-05 17:38:40 +010018392printf "%s\n" "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018393
18394fi
18395
Martin v. Löwis1d459062005-03-14 21:23:33 +000018396# check tzset(3) exists and works like we expect it to
Pablo Galindo53e55292021-04-05 17:38:40 +010018397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
18398printf %s "checking for working tzset()... " >&6; }
18399if test ${ac_cv_working_tzset+y}
18400then :
18401 printf %s "(cached) " >&6
18402else $as_nop
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018403
Pablo Galindo53e55292021-04-05 17:38:40 +010018404if test "$cross_compiling" = yes
18405then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018406 ac_cv_working_tzset=no
Pablo Galindo53e55292021-04-05 17:38:40 +010018407else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018409/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018410
18411#include <stdlib.h>
18412#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018413#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000018414
18415#if HAVE_TZNAME
18416extern char *tzname[];
18417#endif
18418
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018419int main()
18420{
Brett Cannon18367812003-09-19 00:59:16 +000018421 /* Note that we need to ensure that not only does tzset(3)
18422 do 'something' with localtime, but it works as documented
18423 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000018424 This includes making sure that tzname is set properly if
18425 tm->tm_zone does not exist since it is the alternative way
18426 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000018427
18428 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000018429 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000018430 */
18431
Martin v. Löwis1d459062005-03-14 21:23:33 +000018432 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000018433 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18434
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018435 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018436 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018437 if (localtime(&groundhogday)->tm_hour != 0)
18438 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018439#if HAVE_TZNAME
18440 /* For UTC, tzname[1] is sometimes "", sometimes " " */
18441 if (strcmp(tzname[0], "UTC") ||
18442 (tzname[1][0] != 0 && tzname[1][0] != ' '))
18443 exit(1);
18444#endif
Brett Cannon18367812003-09-19 00:59:16 +000018445
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018446 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018447 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018448 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018449 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018450#if HAVE_TZNAME
18451 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
18452 exit(1);
18453#endif
Brett Cannon18367812003-09-19 00:59:16 +000018454
18455 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18456 tzset();
18457 if (localtime(&groundhogday)->tm_hour != 11)
18458 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018459#if HAVE_TZNAME
18460 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
18461 exit(1);
18462#endif
18463
18464#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000018465 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18466 exit(1);
18467 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18468 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018469#endif
Brett Cannon18367812003-09-19 00:59:16 +000018470
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018471 exit(0);
18472}
18473
18474_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018475if ac_fn_c_try_run "$LINENO"
18476then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018477 ac_cv_working_tzset=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010018478else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018479 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18482 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018483fi
18484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485fi
18486
Pablo Galindo53e55292021-04-05 17:38:40 +010018487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
18488printf "%s\n" "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018489if test "$ac_cv_working_tzset" = yes
18490then
18491
Pablo Galindo53e55292021-04-05 17:38:40 +010018492printf "%s\n" "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018493
18494fi
18495
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018496# Look for subsecond timestamps in struct stat
Pablo Galindo53e55292021-04-05 17:38:40 +010018497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
18498printf %s "checking for tv_nsec in struct stat... " >&6; }
18499if test ${ac_cv_stat_tv_nsec+y}
18500then :
18501 printf %s "(cached) " >&6
18502else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018504/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018505#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018506int
Pablo Galindo53e55292021-04-05 17:38:40 +010018507main (void)
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018508{
18509
18510struct stat st;
18511st.st_mtim.tv_nsec = 1;
18512
18513 ;
18514 return 0;
18515}
18516_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018517if ac_fn_c_try_compile "$LINENO"
18518then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018519 ac_cv_stat_tv_nsec=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010018520else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018521 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018522fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018523rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524fi
18525
Pablo Galindo53e55292021-04-05 17:38:40 +010018526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
18527printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018528if test "$ac_cv_stat_tv_nsec" = yes
18529then
18530
Pablo Galindo53e55292021-04-05 17:38:40 +010018531printf "%s\n" "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018532
18533fi
18534
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018535# Look for BSD style subsecond timestamps in struct stat
Pablo Galindo53e55292021-04-05 17:38:40 +010018536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
18537printf %s "checking for tv_nsec2 in struct stat... " >&6; }
18538if test ${ac_cv_stat_tv_nsec2+y}
18539then :
18540 printf %s "(cached) " >&6
18541else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018543/* end confdefs.h. */
18544#include <sys/stat.h>
18545int
Pablo Galindo53e55292021-04-05 17:38:40 +010018546main (void)
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018547{
18548
18549struct stat st;
18550st.st_mtimespec.tv_nsec = 1;
18551
18552 ;
18553 return 0;
18554}
18555_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018556if ac_fn_c_try_compile "$LINENO"
18557then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018558 ac_cv_stat_tv_nsec2=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010018559else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018560 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018561fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018562rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018563fi
18564
Pablo Galindo53e55292021-04-05 17:38:40 +010018565{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
18566printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018567if test "$ac_cv_stat_tv_nsec2" = yes
18568then
18569
Pablo Galindo53e55292021-04-05 17:38:40 +010018570printf "%s\n" "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018571
18572fi
18573
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018574# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020018575ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010018576if test "$cross_compiling" = no; then
18577 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
18578fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018579
Pablo Galindo53e55292021-04-05 17:38:40 +010018580ac_fn_c_check_header_compile "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
18581if test "x$ac_cv_header_curses_h" = xyes
18582then :
18583 printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h
18584
18585fi
18586ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default"
18587if test "x$ac_cv_header_ncurses_h" = xyes
18588then :
18589 printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h
Pablo Galindocc128882021-03-01 16:47:53 +000018590
18591fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018592
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018593
18594# On Solaris, term.h requires curses.h
Pablo Galindo53e55292021-04-05 17:38:40 +010018595ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018596#ifdef HAVE_CURSES_H
18597#include <curses.h>
18598#endif
18599
18600"
Pablo Galindo53e55292021-04-05 17:38:40 +010018601if test "x$ac_cv_header_term_h" = xyes
18602then :
18603 printf "%s\n" "#define HAVE_TERM_H 1" >>confdefs.h
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018604
18605fi
18606
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018607
Jack Jansen666b1e72001-10-31 12:11:48 +000018608# On HP/UX 11.0, mvwdelch is a block with a return statement
Pablo Galindo53e55292021-04-05 17:38:40 +010018609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
18610printf %s "checking whether mvwdelch is an expression... " >&6; }
18611if test ${ac_cv_mvwdelch_is_expression+y}
18612then :
18613 printf %s "(cached) " >&6
18614else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018616/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018617#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018618int
Pablo Galindo53e55292021-04-05 17:38:40 +010018619main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018620{
Jack Jansen666b1e72001-10-31 12:11:48 +000018621
18622 int rtn;
18623 rtn = mvwdelch(0,0,0);
18624
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 ;
18626 return 0;
18627}
18628_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018629if ac_fn_c_try_compile "$LINENO"
18630then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018631 ac_cv_mvwdelch_is_expression=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010018632else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018633 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018634fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018635rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018636fi
18637
Pablo Galindo53e55292021-04-05 17:38:40 +010018638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
18639printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000018640
18641if test "$ac_cv_mvwdelch_is_expression" = yes
18642then
Martin v. Löwis11437992002-04-12 09:54:03 +000018643
Pablo Galindo53e55292021-04-05 17:38:40 +010018644printf "%s\n" "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018645
18646fi
18647
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018648# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
18649# structs since version 5.7. If the macro is defined as zero before including
18650# [n]curses.h, ncurses will expose fields of the structs regardless of the
18651# configuration.
Pablo Galindo53e55292021-04-05 17:38:40 +010018652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
18653printf %s "checking whether WINDOW has _flags... " >&6; }
18654if test ${ac_cv_window_has_flags+y}
18655then :
18656 printf %s "(cached) " >&6
18657else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018659/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018660
18661 #define NCURSES_OPAQUE 0
18662 #include <curses.h>
18663
Martin v. Löwis11437992002-04-12 09:54:03 +000018664int
Pablo Galindo53e55292021-04-05 17:38:40 +010018665main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018666{
Jack Jansen666b1e72001-10-31 12:11:48 +000018667
18668 WINDOW *w;
18669 w->_flags = 0;
18670
Martin v. Löwis11437992002-04-12 09:54:03 +000018671 ;
18672 return 0;
18673}
18674_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018675if ac_fn_c_try_compile "$LINENO"
18676then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018677 ac_cv_window_has_flags=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010018678else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018679 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018680fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018681rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018682fi
18683
Pablo Galindo53e55292021-04-05 17:38:40 +010018684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
18685printf "%s\n" "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018686
Jack Jansen666b1e72001-10-31 12:11:48 +000018687
18688if test "$ac_cv_window_has_flags" = yes
18689then
Martin v. Löwis11437992002-04-12 09:54:03 +000018690
Pablo Galindo53e55292021-04-05 17:38:40 +010018691printf "%s\n" "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018692
18693fi
18694
Pablo Galindo53e55292021-04-05 17:38:40 +010018695{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
18696printf %s "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18698/* end confdefs.h. */
18699#include <curses.h>
18700int
Pablo Galindo53e55292021-04-05 17:38:40 +010018701main (void)
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018702{
18703
18704#ifndef is_pad
18705void *x=is_pad
18706#endif
18707
18708 ;
18709 return 0;
18710}
18711_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018712if ac_fn_c_try_compile "$LINENO"
18713then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018714
Pablo Galindo53e55292021-04-05 17:38:40 +010018715printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018716
Pablo Galindo53e55292021-04-05 17:38:40 +010018717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18718printf "%s\n" "yes" >&6; }
18719else $as_nop
18720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18721printf "%s\n" "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018722
18723fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018724rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018725
Pablo Galindo53e55292021-04-05 17:38:40 +010018726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
18727printf %s "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018729/* end confdefs.h. */
18730#include <curses.h>
18731int
Pablo Galindo53e55292021-04-05 17:38:40 +010018732main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018733{
18734void *x=is_term_resized
18735 ;
18736 return 0;
18737}
18738_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018739if ac_fn_c_try_compile "$LINENO"
18740then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018741
Pablo Galindo53e55292021-04-05 17:38:40 +010018742printf "%s\n" "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018743
Pablo Galindo53e55292021-04-05 17:38:40 +010018744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18745printf "%s\n" "yes" >&6; }
18746else $as_nop
18747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18748printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018749
18750fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018751rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752
Pablo Galindo53e55292021-04-05 17:38:40 +010018753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
18754printf %s "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018756/* end confdefs.h. */
18757#include <curses.h>
18758int
Pablo Galindo53e55292021-04-05 17:38:40 +010018759main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018760{
18761void *x=resize_term
18762 ;
18763 return 0;
18764}
18765_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018766if ac_fn_c_try_compile "$LINENO"
18767then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018768
Pablo Galindo53e55292021-04-05 17:38:40 +010018769printf "%s\n" "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018770
Pablo Galindo53e55292021-04-05 17:38:40 +010018771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18772printf "%s\n" "yes" >&6; }
18773else $as_nop
18774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18775printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018776
18777fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018778rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018779
Pablo Galindo53e55292021-04-05 17:38:40 +010018780{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
18781printf %s "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018783/* end confdefs.h. */
18784#include <curses.h>
18785int
Pablo Galindo53e55292021-04-05 17:38:40 +010018786main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018787{
18788void *x=resizeterm
18789 ;
18790 return 0;
18791}
18792_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018793if ac_fn_c_try_compile "$LINENO"
18794then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018795
Pablo Galindo53e55292021-04-05 17:38:40 +010018796printf "%s\n" "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018797
Pablo Galindo53e55292021-04-05 17:38:40 +010018798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18799printf "%s\n" "yes" >&6; }
18800else $as_nop
18801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18802printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018803
18804fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018805rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018806
Pablo Galindo53e55292021-04-05 17:38:40 +010018807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
18808printf %s "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18810/* end confdefs.h. */
18811#include <curses.h>
18812int
Pablo Galindo53e55292021-04-05 17:38:40 +010018813main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018814{
18815
18816#ifndef immedok
18817void *x=immedok
18818#endif
18819
18820 ;
18821 return 0;
18822}
18823_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018824if ac_fn_c_try_compile "$LINENO"
18825then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018826
Pablo Galindo53e55292021-04-05 17:38:40 +010018827printf "%s\n" "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018828
Pablo Galindo53e55292021-04-05 17:38:40 +010018829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18830printf "%s\n" "yes" >&6; }
18831else $as_nop
18832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18833printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018834
18835fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018836rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018837
Pablo Galindo53e55292021-04-05 17:38:40 +010018838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
18839printf %s "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18841/* end confdefs.h. */
18842#include <curses.h>
18843int
Pablo Galindo53e55292021-04-05 17:38:40 +010018844main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018845{
18846
18847#ifndef syncok
18848void *x=syncok
18849#endif
18850
18851 ;
18852 return 0;
18853}
18854_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018855if ac_fn_c_try_compile "$LINENO"
18856then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018857
Pablo Galindo53e55292021-04-05 17:38:40 +010018858printf "%s\n" "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018859
Pablo Galindo53e55292021-04-05 17:38:40 +010018860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18861printf "%s\n" "yes" >&6; }
18862else $as_nop
18863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18864printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018865
18866fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018867rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018868
Pablo Galindo53e55292021-04-05 17:38:40 +010018869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
18870printf %s "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18872/* end confdefs.h. */
18873#include <curses.h>
18874int
Pablo Galindo53e55292021-04-05 17:38:40 +010018875main (void)
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018876{
18877
18878#ifndef wchgat
18879void *x=wchgat
18880#endif
18881
18882 ;
18883 return 0;
18884}
18885_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018886if ac_fn_c_try_compile "$LINENO"
18887then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018888
Pablo Galindo53e55292021-04-05 17:38:40 +010018889printf "%s\n" "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018890
Pablo Galindo53e55292021-04-05 17:38:40 +010018891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18892printf "%s\n" "yes" >&6; }
18893else $as_nop
18894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18895printf "%s\n" "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018896
18897fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018898rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018899
Pablo Galindo53e55292021-04-05 17:38:40 +010018900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
18901printf %s "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18903/* end confdefs.h. */
18904#include <curses.h>
18905int
Pablo Galindo53e55292021-04-05 17:38:40 +010018906main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018907{
18908
18909#ifndef filter
18910void *x=filter
18911#endif
18912
18913 ;
18914 return 0;
18915}
18916_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018917if ac_fn_c_try_compile "$LINENO"
18918then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018919
Pablo Galindo53e55292021-04-05 17:38:40 +010018920printf "%s\n" "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018921
Pablo Galindo53e55292021-04-05 17:38:40 +010018922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18923printf "%s\n" "yes" >&6; }
18924else $as_nop
18925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18926printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018927
18928fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018929rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018930
Pablo Galindo53e55292021-04-05 17:38:40 +010018931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
18932printf %s "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18934/* end confdefs.h. */
18935#include <curses.h>
18936int
Pablo Galindo53e55292021-04-05 17:38:40 +010018937main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018938{
18939
18940#ifndef has_key
18941void *x=has_key
18942#endif
18943
18944 ;
18945 return 0;
18946}
18947_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018948if ac_fn_c_try_compile "$LINENO"
18949then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018950
Pablo Galindo53e55292021-04-05 17:38:40 +010018951printf "%s\n" "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018952
Pablo Galindo53e55292021-04-05 17:38:40 +010018953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18954printf "%s\n" "yes" >&6; }
18955else $as_nop
18956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18957printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018958
18959fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018960rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018961
Pablo Galindo53e55292021-04-05 17:38:40 +010018962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
18963printf %s "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18965/* end confdefs.h. */
18966#include <curses.h>
18967int
Pablo Galindo53e55292021-04-05 17:38:40 +010018968main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018969{
18970
18971#ifndef typeahead
18972void *x=typeahead
18973#endif
18974
18975 ;
18976 return 0;
18977}
18978_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010018979if ac_fn_c_try_compile "$LINENO"
18980then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018981
Pablo Galindo53e55292021-04-05 17:38:40 +010018982printf "%s\n" "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018983
Pablo Galindo53e55292021-04-05 17:38:40 +010018984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18985printf "%s\n" "yes" >&6; }
18986else $as_nop
18987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18988printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018989
18990fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018991rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018992
Pablo Galindo53e55292021-04-05 17:38:40 +010018993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
18994printf %s "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18996/* end confdefs.h. */
18997#include <curses.h>
18998int
Pablo Galindo53e55292021-04-05 17:38:40 +010018999main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019000{
19001
19002#ifndef use_env
19003void *x=use_env
19004#endif
19005
19006 ;
19007 return 0;
19008}
19009_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019010if ac_fn_c_try_compile "$LINENO"
19011then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019012
Pablo Galindo53e55292021-04-05 17:38:40 +010019013printf "%s\n" "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019014
Pablo Galindo53e55292021-04-05 17:38:40 +010019015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19016printf "%s\n" "yes" >&6; }
19017else $as_nop
19018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19019printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020019020
19021fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019022rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020019023# last curses configure check
19024CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025
Pablo Galindo53e55292021-04-05 17:38:40 +010019026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
19027printf "%s\n" "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019028
19029if test "x$cross_compiling" = xyes; then
19030 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Pablo Galindo53e55292021-04-05 17:38:40 +010019031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
19032printf %s "checking for /dev/ptmx... " >&6; }
19033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
19034printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019035 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
19036 fi
19037 if test "${ac_cv_file__dev_ptc+set}" != set; then
Pablo Galindo53e55292021-04-05 17:38:40 +010019038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
19039printf %s "checking for /dev/ptc... " >&6; }
19040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
19041printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019042 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
19043 fi
19044fi
19045
Pablo Galindo53e55292021-04-05 17:38:40 +010019046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
19047printf %s "checking for /dev/ptmx... " >&6; }
19048if test ${ac_cv_file__dev_ptmx+y}
19049then :
19050 printf %s "(cached) " >&6
19051else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019052 test "$cross_compiling" = yes &&
19053 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19054if test -r "/dev/ptmx"; then
19055 ac_cv_file__dev_ptmx=yes
19056else
19057 ac_cv_file__dev_ptmx=no
19058fi
19059fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
19061printf "%s\n" "$ac_cv_file__dev_ptmx" >&6; }
19062if test "x$ac_cv_file__dev_ptmx" = xyes
19063then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000019064
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019065fi
19066
19067if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019068
Pablo Galindo53e55292021-04-05 17:38:40 +010019069printf "%s\n" "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019070
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019071fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
19073printf %s "checking for /dev/ptc... " >&6; }
19074if test ${ac_cv_file__dev_ptc+y}
19075then :
19076 printf %s "(cached) " >&6
19077else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019078 test "$cross_compiling" = yes &&
19079 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19080if test -r "/dev/ptc"; then
19081 ac_cv_file__dev_ptc=yes
19082else
19083 ac_cv_file__dev_ptc=no
19084fi
19085fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
19087printf "%s\n" "$ac_cv_file__dev_ptc" >&6; }
19088if test "x$ac_cv_file__dev_ptc" = xyes
19089then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000019090
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019091fi
19092
19093if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000019094
Pablo Galindo53e55292021-04-05 17:38:40 +010019095printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000019096
Neal Norwitz865400f2003-03-21 01:42:58 +000019097fi
19098
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000019099if test $ac_sys_system = Darwin
19100then
19101 LIBS="$LIBS -framework CoreFoundation"
19102fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000019103
Pablo Galindo53e55292021-04-05 17:38:40 +010019104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
19105printf %s "checking for %zd printf() format support... " >&6; }
19106if test ${ac_cv_have_size_t_format+y}
19107then :
19108 printf %s "(cached) " >&6
19109else $as_nop
19110 if test "$cross_compiling" = yes
19111then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000019112 ac_cv_have_size_t_format="cross -- assuming yes"
19113
Pablo Galindo53e55292021-04-05 17:38:40 +010019114else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019116/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019117
Thomas Wouters477c8d52006-05-27 19:21:47 +000019118#include <stdio.h>
19119#include <stddef.h>
19120#include <string.h>
19121
Christian Heimes2c181612007-12-17 20:04:13 +000019122#ifdef HAVE_SYS_TYPES_H
19123#include <sys/types.h>
19124#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000019125
19126#ifdef HAVE_SSIZE_T
19127typedef ssize_t Py_ssize_t;
19128#elif SIZEOF_VOID_P == SIZEOF_LONG
19129typedef long Py_ssize_t;
19130#else
19131typedef int Py_ssize_t;
19132#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000019133
Christian Heimes2c181612007-12-17 20:04:13 +000019134int main()
19135{
19136 char buffer[256];
19137
Thomas Wouters477c8d52006-05-27 19:21:47 +000019138 if(sprintf(buffer, "%zd", (size_t)123) < 0)
19139 return 1;
19140
Thomas Wouters89f507f2006-12-13 04:49:30 +000019141 if (strcmp(buffer, "123"))
19142 return 1;
19143
19144 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
19145 return 1;
19146
19147 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000019148 return 1;
19149
19150 return 0;
19151}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019152
Thomas Wouters477c8d52006-05-27 19:21:47 +000019153_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019154if ac_fn_c_try_run "$LINENO"
19155then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019156 ac_cv_have_size_t_format=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019157else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019158 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19161 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019162fi
19163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019164fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
19166printf "%s\n" "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000019167if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019168
Pablo Galindo53e55292021-04-05 17:38:40 +010019169printf "%s\n" "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019170
19171fi
19172
Matthias Kloseb9621712010-04-24 17:59:49 +000019173ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000019174#ifdef HAVE_SYS_TYPES_H
19175#include <sys/types.h>
19176#endif
19177#ifdef HAVE_SYS_SOCKET_H
19178#include <sys/socket.h>
19179#endif
19180
Matthias Kloseb9621712010-04-24 17:59:49 +000019181"
Pablo Galindo53e55292021-04-05 17:38:40 +010019182if test "x$ac_cv_type_socklen_t" = xyes
19183then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000019184
Pablo Galindo53e55292021-04-05 17:38:40 +010019185else $as_nop
Guido van Rossum95713eb2000-05-18 20:53:31 +000019186
Pablo Galindo53e55292021-04-05 17:38:40 +010019187printf "%s\n" "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000019188
19189fi
19190
Michael W. Hudson54241132001-12-07 15:38:26 +000019191
Pablo Galindo53e55292021-04-05 17:38:40 +010019192{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
19193printf %s "checking for broken mbstowcs... " >&6; }
19194if test ${ac_cv_broken_mbstowcs+y}
19195then :
19196 printf %s "(cached) " >&6
19197else $as_nop
19198 if test "$cross_compiling" = yes
19199then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019200 ac_cv_broken_mbstowcs=no
Pablo Galindo53e55292021-04-05 17:38:40 +010019201else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019203/* end confdefs.h. */
19204
Stefan Krah19c21392012-11-22 23:47:32 +010019205#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000019206#include<stdlib.h>
19207int main() {
19208 size_t len = -1;
19209 const char *str = "text";
19210 len = mbstowcs(NULL, str, 0);
19211 return (len != 4);
19212}
19213
19214_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019215if ac_fn_c_try_run "$LINENO"
19216then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019217 ac_cv_broken_mbstowcs=no
Pablo Galindo53e55292021-04-05 17:38:40 +010019218else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019219 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000019220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19222 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019223fi
19224
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019225fi
19226
Pablo Galindo53e55292021-04-05 17:38:40 +010019227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
19228printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000019229if test "$ac_cv_broken_mbstowcs" = yes
19230then
19231
Pablo Galindo53e55292021-04-05 17:38:40 +010019232printf "%s\n" "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000019233
19234fi
19235
Antoine Pitroub52ec782009-01-25 16:34:23 +000019236# Check for --with-computed-gotos
Pablo Galindo53e55292021-04-05 17:38:40 +010019237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
19238printf %s "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019239
19240# Check whether --with-computed-gotos was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010019241if test ${with_computed_gotos+y}
19242then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000019243 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000019244if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000019245then
19246
Pablo Galindo53e55292021-04-05 17:38:40 +010019247printf "%s\n" "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000019248
Pablo Galindo53e55292021-04-05 17:38:40 +010019249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19250printf "%s\n" "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019251fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000019252if test "$withval" = no
19253then
19254
Pablo Galindo53e55292021-04-05 17:38:40 +010019255printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000019256
Pablo Galindo53e55292021-04-05 17:38:40 +010019257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19258printf "%s\n" "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019259fi
19260
Pablo Galindo53e55292021-04-05 17:38:40 +010019261else $as_nop
19262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
19263printf "%s\n" "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000019264fi
19265
Antoine Pitroub52ec782009-01-25 16:34:23 +000019266
Pablo Galindo53e55292021-04-05 17:38:40 +010019267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
19268printf %s "checking whether $CC supports computed gotos... " >&6; }
19269if test ${ac_cv_computed_gotos+y}
19270then :
19271 printf %s "(cached) " >&6
19272else $as_nop
19273 if test "$cross_compiling" = yes
19274then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019275 if test "${with_computed_gotos+set}" = set; then
19276 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
19277 else
19278 ac_cv_computed_gotos=no
19279 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019280else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19282/* end confdefs.h. */
19283
19284int main(int argc, char **argv)
19285{
19286 static void *targets[1] = { &&LABEL1 };
19287 goto LABEL2;
19288LABEL1:
19289 return 0;
19290LABEL2:
19291 goto *targets[0];
19292 return 1;
19293}
19294
19295_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019296if ac_fn_c_try_run "$LINENO"
19297then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019298 ac_cv_computed_gotos=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019299else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019300 ac_cv_computed_gotos=no
19301fi
19302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19303 conftest.$ac_objext conftest.beam conftest.$ac_ext
19304fi
19305
19306fi
19307
Pablo Galindo53e55292021-04-05 17:38:40 +010019308{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
19309printf "%s\n" "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010019310case "$ac_cv_computed_gotos" in yes*)
19311
Pablo Galindo53e55292021-04-05 17:38:40 +010019312printf "%s\n" "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010019313
19314esac
19315
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019316case $ac_sys_system in
19317AIX*)
19318
Pablo Galindo53e55292021-04-05 17:38:40 +010019319printf "%s\n" "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019320 ;;
19321esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019322
Michael W. Hudson54241132001-12-07 15:38:26 +000019323
Mark Dickinsonb2153e92010-05-05 22:31:36 +000019324
19325
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000019326for h in `(cd $srcdir;echo Python/thread_*.h)`
19327do
19328 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
19329done
19330
Michael W. Hudson54241132001-12-07 15:38:26 +000019331
Ned Deily8d02f912020-06-25 10:46:44 -040019332SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Pablo Galindo53e55292021-04-05 17:38:40 +010019333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
19334printf %s "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019335for dir in $SRCDIRS; do
19336 if test ! -d $dir; then
19337 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000019338 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019339done
Pablo Galindo53e55292021-04-05 17:38:40 +010019340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
19341printf "%s\n" "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000019342
Stefan Krah1919b7e2012-03-21 18:25:23 +010019343# Availability of -O2:
Pablo Galindo53e55292021-04-05 17:38:40 +010019344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
19345printf %s "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019346saved_cflags="$CFLAGS"
19347CFLAGS="-O2"
19348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19349/* end confdefs.h. */
19350
19351int
Pablo Galindo53e55292021-04-05 17:38:40 +010019352main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010019353{
19354
19355
19356 ;
19357 return 0;
19358}
19359_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019360if ac_fn_c_try_compile "$LINENO"
19361then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019362 have_O2=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019363else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019364 have_O2=no
19365fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019366rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19367{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
19368printf "%s\n" "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019369CFLAGS="$saved_cflags"
19370
19371# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
19372# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Pablo Galindo53e55292021-04-05 17:38:40 +010019373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
19374printf %s "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019375saved_cflags="$CFLAGS"
19376CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
19377if test "$have_O2" = no; then
19378 CFLAGS=""
19379fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019380if test "$cross_compiling" = yes
19381then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019382 have_glibc_memmove_bug=undefined
Pablo Galindo53e55292021-04-05 17:38:40 +010019383else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19385/* end confdefs.h. */
19386
19387#include <stdio.h>
19388#include <stdlib.h>
19389#include <string.h>
19390void foo(void *p, void *q) { memmove(p, q, 19); }
19391int main() {
19392 char a[32] = "123456789000000000";
19393 foo(&a[9], a);
19394 if (strcmp(a, "123456789123456789000000000") != 0)
19395 return 1;
19396 foo(a, &a[9]);
19397 if (strcmp(a, "123456789000000000") != 0)
19398 return 1;
19399 return 0;
19400}
19401
19402_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019403if ac_fn_c_try_run "$LINENO"
19404then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019405 have_glibc_memmove_bug=no
Pablo Galindo53e55292021-04-05 17:38:40 +010019406else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019407 have_glibc_memmove_bug=yes
19408fi
19409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19410 conftest.$ac_objext conftest.beam conftest.$ac_ext
19411fi
19412
19413CFLAGS="$saved_cflags"
Pablo Galindo53e55292021-04-05 17:38:40 +010019414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
19415printf "%s\n" "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019416if test "$have_glibc_memmove_bug" = yes; then
19417
Pablo Galindo53e55292021-04-05 17:38:40 +010019418printf "%s\n" "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019419
19420fi
19421
19422if test "$have_gcc_asm_for_x87" = yes; then
19423 # Some versions of gcc miscompile inline asm:
19424 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
19425 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
19426 case $CC in
19427 *gcc*)
Pablo Galindo53e55292021-04-05 17:38:40 +010019428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
19429printf %s "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019430 saved_cflags="$CFLAGS"
19431 CFLAGS="-O2"
Pablo Galindo53e55292021-04-05 17:38:40 +010019432 if test "$cross_compiling" = yes
19433then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019434 have_ipa_pure_const_bug=undefined
Pablo Galindo53e55292021-04-05 17:38:40 +010019435else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19437/* end confdefs.h. */
19438
19439 __attribute__((noinline)) int
19440 foo(int *p) {
19441 int r;
19442 asm ( "movl \$6, (%1)\n\t"
19443 "xorl %0, %0\n\t"
19444 : "=r" (r) : "r" (p) : "memory"
19445 );
19446 return r;
19447 }
19448 int main() {
19449 int p = 8;
19450 if ((foo(&p) ? : p) != 6)
19451 return 1;
19452 return 0;
19453 }
19454
19455_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019456if ac_fn_c_try_run "$LINENO"
19457then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019458 have_ipa_pure_const_bug=no
Pablo Galindo53e55292021-04-05 17:38:40 +010019459else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019460 have_ipa_pure_const_bug=yes
19461fi
19462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19463 conftest.$ac_objext conftest.beam conftest.$ac_ext
19464fi
19465
19466 CFLAGS="$saved_cflags"
Pablo Galindo53e55292021-04-05 17:38:40 +010019467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
19468printf "%s\n" "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019469 if test "$have_ipa_pure_const_bug" = yes; then
19470
Pablo Galindo53e55292021-04-05 17:38:40 +010019471printf "%s\n" "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019472
19473 fi
19474 ;;
19475 esac
19476fi
19477
Victor Stinner4f5366e2015-01-09 02:13:19 +010019478# Check for stdatomic.h
Pablo Galindo53e55292021-04-05 17:38:40 +010019479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
19480printf %s "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19482/* end confdefs.h. */
19483
19484
19485 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020019486 atomic_int int_var;
19487 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019488 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020019489 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
19490 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
19491 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019492 return 0;
19493 }
19494
19495
19496_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019497if ac_fn_c_try_link "$LINENO"
19498then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019499 have_stdatomic_h=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019500else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019501 have_stdatomic_h=no
19502fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019503rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019504 conftest$ac_exeext conftest.$ac_ext
19505
Pablo Galindo53e55292021-04-05 17:38:40 +010019506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
19507printf "%s\n" "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019508
19509if test "$have_stdatomic_h" = yes; then
19510
Pablo Galindo53e55292021-04-05 17:38:40 +010019511printf "%s\n" "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019512
19513fi
19514
Victor Stinner52a327c2020-12-23 03:41:08 +010019515# Check for GCC >= 4.7 and clang __atomic builtin functions
Pablo Galindo53e55292021-04-05 17:38:40 +010019516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
19517printf %s "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19519/* end confdefs.h. */
19520
19521
Victor Stinner52a327c2020-12-23 03:41:08 +010019522 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019523 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010019524 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
19525 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019526 return 0;
19527 }
19528
19529
19530_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019531if ac_fn_c_try_link "$LINENO"
19532then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019533 have_builtin_atomic=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019534else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019535 have_builtin_atomic=no
19536fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019537rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019538 conftest$ac_exeext conftest.$ac_ext
19539
Pablo Galindo53e55292021-04-05 17:38:40 +010019540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
19541printf "%s\n" "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019542
19543if test "$have_builtin_atomic" = yes; then
19544
Pablo Galindo53e55292021-04-05 17:38:40 +010019545printf "%s\n" "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019546
19547fi
19548
Ned Deily322f5ba2013-11-21 23:01:59 -080019549# ensurepip option
Pablo Galindo53e55292021-04-05 17:38:40 +010019550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
19551printf %s "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019552
19553# Check whether --with-ensurepip was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010019554if test ${with_ensurepip+y}
19555then :
Ned Deily322f5ba2013-11-21 23:01:59 -080019556 withval=$with_ensurepip;
Pablo Galindo53e55292021-04-05 17:38:40 +010019557else $as_nop
Ned Deily322f5ba2013-11-21 23:01:59 -080019558 with_ensurepip=upgrade
19559fi
19560
19561case $with_ensurepip in #(
19562 yes|upgrade) :
19563 ENSUREPIP=upgrade ;; #(
19564 install) :
19565 ENSUREPIP=install ;; #(
19566 no) :
19567 ENSUREPIP=no ;; #(
19568 *) :
19569 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
19570esac
Pablo Galindo53e55292021-04-05 17:38:40 +010019571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
19572printf "%s\n" "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019573
19574
Victor Stinner35a97c02015-03-08 02:59:09 +010019575# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Pablo Galindo53e55292021-04-05 17:38:40 +010019576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
19577printf %s "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19579/* end confdefs.h. */
19580
19581
19582 #include <dirent.h>
19583
19584 int main() {
19585 struct dirent entry;
19586 return entry.d_type == DT_UNKNOWN;
19587 }
19588
19589
19590_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019591if ac_fn_c_try_link "$LINENO"
19592then :
Victor Stinner35a97c02015-03-08 02:59:09 +010019593 have_dirent_d_type=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019594else $as_nop
Victor Stinner35a97c02015-03-08 02:59:09 +010019595 have_dirent_d_type=no
19596fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019597rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner35a97c02015-03-08 02:59:09 +010019598 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010019599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
19600printf "%s\n" "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019601
19602if test "$have_dirent_d_type" = yes; then
19603
Pablo Galindo53e55292021-04-05 17:38:40 +010019604printf "%s\n" "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010019605
19606fi
19607
Victor Stinner9eb57c52015-03-19 22:21:49 +010019608# check if the Linux getrandom() syscall is available
Pablo Galindo53e55292021-04-05 17:38:40 +010019609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
19610printf %s "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19612/* end confdefs.h. */
19613
19614
Victor Stinner1b80b242016-04-12 22:34:58 +020019615 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019616 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020019617 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019618
19619 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010019620 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020019621 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020019622 const int flags = GRND_NONBLOCK;
19623 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020019624 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010019625 return 0;
19626 }
19627
19628
19629_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019630if ac_fn_c_try_link "$LINENO"
19631then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010019632 have_getrandom_syscall=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019633else $as_nop
Victor Stinner9eb57c52015-03-19 22:21:49 +010019634 have_getrandom_syscall=no
19635fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019636rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner9eb57c52015-03-19 22:21:49 +010019637 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010019638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
19639printf "%s\n" "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019640
19641if test "$have_getrandom_syscall" = yes; then
19642
Pablo Galindo53e55292021-04-05 17:38:40 +010019643printf "%s\n" "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010019644
19645fi
19646
Victor Stinner3abf44e2015-09-18 15:38:37 +020019647# check if the getrandom() function is available
19648# the test was written for the Solaris function of <sys/random.h>
Pablo Galindo53e55292021-04-05 17:38:40 +010019649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
19650printf %s "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19652/* end confdefs.h. */
19653
19654
19655 #include <sys/random.h>
19656
19657 int main() {
19658 char buffer[1];
19659 const size_t buflen = sizeof(buffer);
19660 const int flags = 0;
19661 /* ignore the result, Python checks for ENOSYS at runtime */
19662 (void)getrandom(buffer, buflen, flags);
19663 return 0;
19664 }
19665
19666
19667_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019668if ac_fn_c_try_link "$LINENO"
19669then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020019670 have_getrandom=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010019671else $as_nop
Victor Stinner3abf44e2015-09-18 15:38:37 +020019672 have_getrandom=no
19673fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019674rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner3abf44e2015-09-18 15:38:37 +020019675 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010019676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
19677printf "%s\n" "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019678
19679if test "$have_getrandom" = yes; then
19680
Pablo Galindo53e55292021-04-05 17:38:40 +010019681printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020019682
19683fi
19684
Neil Schemenauer5741c452019-02-08 10:48:46 -080019685# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
19686# shm_* may only be available if linking against librt
19687save_LIBS="$LIBS"
19688save_includes_default="$ac_includes_default"
Pablo Galindo53e55292021-04-05 17:38:40 +010019689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
19690printf %s "checking for library containing shm_open... " >&6; }
19691if test ${ac_cv_search_shm_open+y}
19692then :
19693 printf %s "(cached) " >&6
19694else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019695 ac_func_search_save_LIBS=$LIBS
19696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19697/* end confdefs.h. */
19698
19699/* Override any GCC internal prototype to avoid an error.
19700 Use char because int might match the return type of a GCC
19701 builtin and then its argument prototype would still apply. */
Neil Schemenauer5741c452019-02-08 10:48:46 -080019702char shm_open ();
19703int
Pablo Galindo53e55292021-04-05 17:38:40 +010019704main (void)
Neil Schemenauer5741c452019-02-08 10:48:46 -080019705{
19706return shm_open ();
19707 ;
19708 return 0;
19709}
19710_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019711for ac_lib in '' rt
19712do
Neil Schemenauer5741c452019-02-08 10:48:46 -080019713 if test -z "$ac_lib"; then
19714 ac_res="none required"
19715 else
19716 ac_res=-l$ac_lib
19717 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19718 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019719 if ac_fn_c_try_link "$LINENO"
19720then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019721 ac_cv_search_shm_open=$ac_res
19722fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019723rm -f core conftest.err conftest.$ac_objext conftest.beam \
Neil Schemenauer5741c452019-02-08 10:48:46 -080019724 conftest$ac_exeext
Pablo Galindo53e55292021-04-05 17:38:40 +010019725 if test ${ac_cv_search_shm_open+y}
19726then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019727 break
19728fi
19729done
Pablo Galindo53e55292021-04-05 17:38:40 +010019730if test ${ac_cv_search_shm_open+y}
19731then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019732
Pablo Galindo53e55292021-04-05 17:38:40 +010019733else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019734 ac_cv_search_shm_open=no
19735fi
19736rm conftest.$ac_ext
19737LIBS=$ac_func_search_save_LIBS
19738fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
19740printf "%s\n" "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080019741ac_res=$ac_cv_search_shm_open
Pablo Galindo53e55292021-04-05 17:38:40 +010019742if test "$ac_res" != no
19743then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019744 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19745
19746fi
19747
19748if test "$ac_cv_search_shm_open" = "-lrt"; then
19749
Pablo Galindo53e55292021-04-05 17:38:40 +010019750printf "%s\n" "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019751
19752fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019753ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
19754if test "x$ac_cv_header_sys_mman_h" = xyes
19755then :
19756 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019757
19758fi
19759
Neil Schemenauer5741c452019-02-08 10:48:46 -080019760# temporarily override ac_includes_default for AC_CHECK_FUNCS below
19761ac_includes_default="\
19762${ac_includes_default}
19763#ifndef __cplusplus
19764# ifdef HAVE_SYS_MMAN_H
19765# include <sys/mman.h>
19766# endif
19767#endif
19768"
Pablo Galindo53e55292021-04-05 17:38:40 +010019769ac_fn_c_check_func "$LINENO" "shm_open" "ac_cv_func_shm_open"
19770if test "x$ac_cv_func_shm_open" = xyes
19771then :
19772 printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019773
19774fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019775ac_fn_c_check_func "$LINENO" "shm_unlink" "ac_cv_func_shm_unlink"
19776if test "x$ac_cv_func_shm_unlink" = xyes
19777then :
19778 printf "%s\n" "#define HAVE_SHM_UNLINK 1" >>confdefs.h
19779
19780fi
Neil Schemenauer5741c452019-02-08 10:48:46 -080019781
19782# we don't want to link with librt always, restore LIBS
19783LIBS="$save_LIBS"
19784ac_includes_default="$save_includes_default"
19785
Christian Heimesff5be6e2018-01-20 13:19:21 +010019786# Check for usable OpenSSL
19787
19788 found=false
19789
19790# Check whether --with-openssl was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010019791if test ${with_openssl+y}
19792then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019793 withval=$with_openssl;
19794 case "$withval" in
19795 "" | y | ye | yes | n | no)
19796 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
19797 ;;
19798 *) ssldirs="$withval"
19799 ;;
19800 esac
19801
Pablo Galindo53e55292021-04-05 17:38:40 +010019802else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019803
19804 # if pkg-config is installed and openssl has installed a .pc file,
19805 # then use that information and don't search ssldirs
19806 if test -n "$ac_tool_prefix"; then
19807 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19808set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +010019809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19810printf %s "checking for $ac_word... " >&6; }
19811if test ${ac_cv_prog_PKG_CONFIG+y}
19812then :
19813 printf %s "(cached) " >&6
19814else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019815 if test -n "$PKG_CONFIG"; then
19816 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
19817else
19818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19819for as_dir in $PATH
19820do
19821 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +010019822 case $as_dir in #(((
19823 '') as_dir=./ ;;
19824 */) ;;
19825 *) as_dir=$as_dir/ ;;
19826 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019827 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +010019828 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019829 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Pablo Galindo53e55292021-04-05 17:38:40 +010019830 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019831 break 2
19832 fi
19833done
19834 done
19835IFS=$as_save_IFS
19836
19837fi
19838fi
19839PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
19840if test -n "$PKG_CONFIG"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010019841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19842printf "%s\n" "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019843else
Pablo Galindo53e55292021-04-05 17:38:40 +010019844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19845printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019846fi
19847
19848
19849fi
19850if test -z "$ac_cv_prog_PKG_CONFIG"; then
19851 ac_ct_PKG_CONFIG=$PKG_CONFIG
19852 # Extract the first word of "pkg-config", so it can be a program name with args.
19853set dummy pkg-config; ac_word=$2
Pablo Galindo53e55292021-04-05 17:38:40 +010019854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19855printf %s "checking for $ac_word... " >&6; }
19856if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y}
19857then :
19858 printf %s "(cached) " >&6
19859else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019860 if test -n "$ac_ct_PKG_CONFIG"; then
19861 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
19862else
19863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19864for as_dir in $PATH
19865do
19866 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +010019867 case $as_dir in #(((
19868 '') as_dir=./ ;;
19869 */) ;;
19870 *) as_dir=$as_dir/ ;;
19871 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019872 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindo53e55292021-04-05 17:38:40 +010019873 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019874 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Pablo Galindo53e55292021-04-05 17:38:40 +010019875 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019876 break 2
19877 fi
19878done
19879 done
19880IFS=$as_save_IFS
19881
19882fi
19883fi
19884ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
19885if test -n "$ac_ct_PKG_CONFIG"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010019886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
19887printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019888else
Pablo Galindo53e55292021-04-05 17:38:40 +010019889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19890printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019891fi
19892
19893 if test "x$ac_ct_PKG_CONFIG" = x; then
19894 PKG_CONFIG=""
19895 else
19896 case $cross_compiling:$ac_tool_warned in
19897yes:)
Pablo Galindo53e55292021-04-05 17:38:40 +010019898{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19899printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010019900ac_tool_warned=yes ;;
19901esac
19902 PKG_CONFIG=$ac_ct_PKG_CONFIG
19903 fi
19904else
19905 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
19906fi
19907
19908 if test x"$PKG_CONFIG" != x""; then
19909 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
19910 if test $? = 0; then
19911 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
19912 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
19913 found=true
19914 fi
19915 fi
19916
19917 # no such luck; use some default ssldirs
19918 if ! $found; then
19919 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
19920 fi
19921
19922
19923fi
19924
19925
19926
19927 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
19928 # an 'openssl' subdirectory
19929
19930 if ! $found; then
19931 OPENSSL_INCLUDES=
19932 for ssldir in $ssldirs; do
Pablo Galindo53e55292021-04-05 17:38:40 +010019933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
19934printf %s "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019935 if test -f "$ssldir/include/openssl/ssl.h"; then
19936 OPENSSL_INCLUDES="-I$ssldir/include"
19937 OPENSSL_LDFLAGS="-L$ssldir/lib"
19938 OPENSSL_LIBS="-lssl -lcrypto"
19939 found=true
Pablo Galindo53e55292021-04-05 17:38:40 +010019940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19941printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019942 break
19943 else
Pablo Galindo53e55292021-04-05 17:38:40 +010019944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19945printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019946 fi
19947 done
19948
19949 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
19950 # it will just work!
19951 fi
19952
19953 # try the preprocessor and linker with our new flags,
19954 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
19955
Pablo Galindo53e55292021-04-05 17:38:40 +010019956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
19957printf %s "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019958 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
19959 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
19960
19961 save_LIBS="$LIBS"
19962 save_LDFLAGS="$LDFLAGS"
19963 save_CPPFLAGS="$CPPFLAGS"
19964 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
19965 LIBS="$OPENSSL_LIBS $LIBS"
19966 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
19967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19968/* end confdefs.h. */
19969#include <openssl/ssl.h>
19970int
Pablo Galindo53e55292021-04-05 17:38:40 +010019971main (void)
Christian Heimesff5be6e2018-01-20 13:19:21 +010019972{
19973SSL_new(NULL)
19974 ;
19975 return 0;
19976}
19977_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010019978if ac_fn_c_try_link "$LINENO"
19979then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019980
Pablo Galindo53e55292021-04-05 17:38:40 +010019981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19982printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019983 have_openssl=yes
19984
Pablo Galindo53e55292021-04-05 17:38:40 +010019985else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019986
Pablo Galindo53e55292021-04-05 17:38:40 +010019987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19988printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019989 have_openssl=no
19990
19991fi
Pablo Galindo53e55292021-04-05 17:38:40 +010019992rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimesff5be6e2018-01-20 13:19:21 +010019993 conftest$ac_exeext conftest.$ac_ext
19994 CPPFLAGS="$save_CPPFLAGS"
19995 LDFLAGS="$save_LDFLAGS"
19996 LIBS="$save_LIBS"
19997
19998
19999
20000
20001
20002
20003if test "$have_openssl" = yes; then
Pablo Galindo53e55292021-04-05 17:38:40 +010020004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
20005printf %s "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010020006
20007 save_LIBS="$LIBS"
20008 save_LDFLAGS="$LDFLAGS"
20009 save_CPPFLAGS="$CPPFLAGS"
20010 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
20011 LIBS="$OPENSSL_LIBS $LIBS"
20012 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
20013
20014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20015/* end confdefs.h. */
20016
20017 #include <openssl/x509_vfy.h>
20018
20019int
Pablo Galindo53e55292021-04-05 17:38:40 +010020020main (void)
Christian Heimesff5be6e2018-01-20 13:19:21 +010020021{
20022
20023 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
20024 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
20025 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
20026 X509_VERIFY_PARAM_set_hostflags(p, 0);
20027
20028 ;
20029 return 0;
20030}
20031
20032_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010020033if ac_fn_c_try_link "$LINENO"
20034then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010020035
20036 ac_cv_has_x509_verify_param_set1_host=yes
20037
Pablo Galindo53e55292021-04-05 17:38:40 +010020038else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010020039
20040 ac_cv_has_x509_verify_param_set1_host=no
20041
20042fi
Pablo Galindo53e55292021-04-05 17:38:40 +010020043rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimesff5be6e2018-01-20 13:19:21 +010020044 conftest$ac_exeext conftest.$ac_ext
Pablo Galindo53e55292021-04-05 17:38:40 +010020045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
20046printf "%s\n" "$ac_cv_has_x509_verify_param_set1_host" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010020047 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
20048
Pablo Galindo53e55292021-04-05 17:38:40 +010020049printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
Christian Heimesff5be6e2018-01-20 13:19:21 +010020050
20051 fi
20052
20053 CPPFLAGS="$save_CPPFLAGS"
20054 LDFLAGS="$save_LDFLAGS"
20055 LIBS="$save_LIBS"
20056fi
20057
Christian Heimes32eba612021-03-19 10:29:25 +010020058# rpath to libssl and libcrypto
Pablo Galindo53e55292021-04-05 17:38:40 +010020059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
20060printf %s "checking for --with-openssl-rpath... " >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010020061
20062# Check whether --with-openssl-rpath was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010020063if test ${with_openssl_rpath+y}
20064then :
Christian Heimes32eba612021-03-19 10:29:25 +010020065 withval=$with_openssl_rpath;
Pablo Galindo53e55292021-04-05 17:38:40 +010020066else $as_nop
Christian Heimes32eba612021-03-19 10:29:25 +010020067 with_openssl_rpath=no
20068
20069fi
20070
20071case $with_openssl_rpath in #(
20072 auto|yes) :
20073 OPENSSL_RPATH=auto ;; #(
20074 no) :
20075 OPENSSL_RPATH= ;; #(
20076 *) :
Pablo Galindo53e55292021-04-05 17:38:40 +010020077 if test -d "$with_openssl_rpath"
20078then :
Christian Heimes32eba612021-03-19 10:29:25 +010020079 OPENSSL_RPATH="$with_openssl_rpath"
Pablo Galindo53e55292021-04-05 17:38:40 +010020080else $as_nop
Christian Heimes32eba612021-03-19 10:29:25 +010020081 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
20082fi
20083
20084 ;;
20085esac
Pablo Galindo53e55292021-04-05 17:38:40 +010020086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
20087printf "%s\n" "$OPENSSL_RPATH" >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010020088
20089
Christian Heimes892d66e2018-01-29 14:10:18 +010020090# ssl module default cipher suite string
20091
20092
20093
Pablo Galindo53e55292021-04-05 17:38:40 +010020094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
20095printf %s "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010020096
20097# Check whether --with-ssl-default-suites was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010020098if test ${with_ssl_default_suites+y}
20099then :
Christian Heimes892d66e2018-01-29 14:10:18 +010020100 withval=$with_ssl_default_suites;
Pablo Galindo53e55292021-04-05 17:38:40 +010020101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
20102printf "%s\n" "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010020103case "$withval" in
20104 python)
Pablo Galindo53e55292021-04-05 17:38:40 +010020105 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020106
20107 ;;
20108 openssl)
Pablo Galindo53e55292021-04-05 17:38:40 +010020109 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020110
20111 ;;
20112 *)
Pablo Galindo53e55292021-04-05 17:38:40 +010020113 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020114
Pablo Galindo53e55292021-04-05 17:38:40 +010020115 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHER_STRING \"$withval\"" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020116
20117 ;;
20118esac
20119
Pablo Galindo53e55292021-04-05 17:38:40 +010020120else $as_nop
Christian Heimes892d66e2018-01-29 14:10:18 +010020121
Pablo Galindo53e55292021-04-05 17:38:40 +010020122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: python" >&5
20123printf "%s\n" "python" >&6; }
20124printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020125
20126
20127fi
20128
20129
Christian Heimes9b60e552020-05-15 23:54:53 +020020130# builtin hash modules
20131default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
20132
Pablo Galindo53e55292021-04-05 17:38:40 +010020133printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020134
Pablo Galindo53e55292021-04-05 17:38:40 +010020135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
20136printf %s "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020020137
20138# Check whether --with-builtin-hashlib-hashes was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010020139if test ${with_builtin_hashlib_hashes+y}
20140then :
Christian Heimes9b60e552020-05-15 23:54:53 +020020141 withval=$with_builtin_hashlib_hashes;
20142case "$withval" in
20143 yes)
20144 withval=$default_hashlib_hashes
20145 ;;
20146 no)
20147 withval=""
20148 ;;
20149esac
Pablo Galindo53e55292021-04-05 17:38:40 +010020150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
20151printf "%s\n" "$withval" >&6; }
20152printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$withval\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020153
20154
Pablo Galindo53e55292021-04-05 17:38:40 +010020155else $as_nop
Christian Heimes9b60e552020-05-15 23:54:53 +020020156
Pablo Galindo53e55292021-04-05 17:38:40 +010020157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
20158printf "%s\n" "$default_hashlib_hashes" >&6; };
20159printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$default_hashlib_hashes\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020160
20161
20162fi
20163
20164
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020165# --with-experimental-isolated-subinterpreters
20166
Pablo Galindo53e55292021-04-05 17:38:40 +010020167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
20168printf %s "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020169
20170# Check whether --with-experimental-isolated-subinterpreters was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010020171if test ${with_experimental_isolated_subinterpreters+y}
20172then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020173 withval=$with_experimental_isolated_subinterpreters;
20174if test "$withval" != no
20175then
Pablo Galindo53e55292021-04-05 17:38:40 +010020176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20177printf "%s\n" "yes" >&6; };
20178 printf "%s\n" "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020179
20180else
Pablo Galindo53e55292021-04-05 17:38:40 +010020181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20182printf "%s\n" "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020183fi
Pablo Galindo53e55292021-04-05 17:38:40 +010020184else $as_nop
20185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20186printf "%s\n" "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020187fi
20188
20189
Victor Stinner801bb0b2021-02-17 11:14:42 +010020190# --with-static-libpython
20191STATIC_LIBPYTHON=1
Pablo Galindo53e55292021-04-05 17:38:40 +010020192{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
20193printf %s "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020194
20195# Check whether --with-static-libpython was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010020196if test ${with_static_libpython+y}
20197then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010020198 withval=$with_static_libpython;
20199if test "$withval" = no
20200then
Pablo Galindo53e55292021-04-05 17:38:40 +010020201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20202printf "%s\n" "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020203 STATIC_LIBPYTHON=0
20204else
Pablo Galindo53e55292021-04-05 17:38:40 +010020205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20206printf "%s\n" "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020207fi
Pablo Galindo53e55292021-04-05 17:38:40 +010020208else $as_nop
20209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20210printf "%s\n" "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020211fi
20212
20213LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050020214if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010020215 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
20216 if test "$STATIC_LIBPYTHON" = 1; then
20217 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20218 fi
20219else
20220 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20221fi
20222
20223
20224
pxinwr277ce302020-12-30 20:50:39 +080020225# Check whether to disable test modules. Once set, setup.py will not build
20226# test extension modules and "make install" will not install test suites.
Pablo Galindo53e55292021-04-05 17:38:40 +010020227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
20228printf %s "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020229# Check whether --enable-test-modules was given.
Pablo Galindo53e55292021-04-05 17:38:40 +010020230if test ${enable_test_modules+y}
20231then :
pxinwr277ce302020-12-30 20:50:39 +080020232 enableval=$enable_test_modules;
20233fi
20234
20235if test "$enable_test_modules" = no; then
20236 TEST_MODULES=no
Pablo Galindo53e55292021-04-05 17:38:40 +010020237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20238printf "%s\n" "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020239else
20240 TEST_MODULES=yes
Pablo Galindo53e55292021-04-05 17:38:40 +010020241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20242printf "%s\n" "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020243fi
20244
20245
Christian Heimes892d66e2018-01-29 14:10:18 +010020246
Guido van Rossum627b2d71993-12-24 10:39:16 +000020247# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020020248ac_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 +000020249
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020250ac_config_files="$ac_config_files Modules/ld_so_aix"
20251
Martin v. Löwis11437992002-04-12 09:54:03 +000020252cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020253# This file is a shell script that caches the results of configure
20254# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020255# scripts and configure runs, see configure's option --config-cache.
20256# It is not useful on other systems. If it contains results you don't
20257# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020258#
Martin v. Löwis11437992002-04-12 09:54:03 +000020259# config.status only pays attention to the cache file if you give it
20260# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020261#
Skip Montanaro6dead952003-09-25 14:50:04 +000020262# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020263# loading this file, other *unset* `ac_cv_foo' will be assigned the
20264# following values.
20265
20266_ACEOF
20267
Guido van Rossumf78abae1997-01-21 22:02:36 +000020268# The following way of writing the cache mishandles newlines in values,
20269# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020270# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020271# Ultrix sh set writes to stderr and can't be redirected directly,
20272# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020273(
20274 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20275 eval ac_val=\$$ac_var
20276 case $ac_val in #(
20277 *${as_nl}*)
20278 case $ac_var in #(
Pablo Galindo53e55292021-04-05 17:38:40 +010020279 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20280printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020281 esac
20282 case $ac_var in #(
20283 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000020284 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20285 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020286 esac ;;
20287 esac
20288 done
20289
Martin v. Löwis11437992002-04-12 09:54:03 +000020290 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020291 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20292 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000020293 # `set' does not quote correctly, so add quotes: double-quote
20294 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000020295 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020296 "s/'/'\\\\''/g;
20297 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020298 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000020299 *)
20300 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020302 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020303 esac |
20304 sort
20305) |
Martin v. Löwis11437992002-04-12 09:54:03 +000020306 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020307 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000020308 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020309 :clear
Pablo Galindo53e55292021-04-05 17:38:40 +010020310 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000020311 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020312 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20313 :end' >>confcache
20314if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20315 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020020316 if test "x$cache_file" != "x/dev/null"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010020317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20318printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020020319 if test ! -f "$cache_file" || test -h "$cache_file"; then
20320 cat confcache >"$cache_file"
20321 else
20322 case $cache_file in #(
20323 */* | ?:*)
20324 mv -f confcache "$cache_file"$$ &&
20325 mv -f "$cache_file"$$ "$cache_file" ;; #(
20326 *)
20327 mv -f confcache "$cache_file" ;;
20328 esac
20329 fi
20330 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020331 else
Pablo Galindo53e55292021-04-05 17:38:40 +010020332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20333printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020334 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020335fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020336rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020337
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020338test "x$prefix" = xNONE && prefix=$ac_default_prefix
20339# Let make expand exec_prefix.
20340test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020341
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020342DEFS=-DHAVE_CONFIG_H
20343
Skip Montanaro6dead952003-09-25 14:50:04 +000020344ac_libobjs=
20345ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020346U=
Skip Montanaro6dead952003-09-25 14:50:04 +000020347for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20348 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Pablo Galindo53e55292021-04-05 17:38:40 +010020350 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020351 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20352 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000020353 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20354 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000020355done
20356LIBOBJS=$ac_libobjs
20357
20358LTLIBOBJS=$ac_ltlibobjs
20359
20360
Martin v. Löwis11437992002-04-12 09:54:03 +000020361
Matthias Kloseb9621712010-04-24 17:59:49 +000020362
Victor Stinnere0be4232011-10-25 13:06:09 +020020363: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000020364ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000020365ac_clean_files_save=$ac_clean_files
20366ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Pablo Galindo53e55292021-04-05 17:38:40 +010020367{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20368printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000020369as_write_fail=0
20370cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020371#! $SHELL
20372# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020373# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020374# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020375# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020376
Martin v. Löwis11437992002-04-12 09:54:03 +000020377debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020378ac_cs_recheck=false
20379ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000020380
Matthias Kloseb9621712010-04-24 17:59:49 +000020381SHELL=\${CONFIG_SHELL-$SHELL}
20382export SHELL
20383_ASEOF
20384cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20385## -------------------- ##
20386## M4sh Initialization. ##
20387## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020389# Be more Bourne compatible
20390DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindo53e55292021-04-05 17:38:40 +010020391as_nop=:
20392if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20393then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020394 emulate sh
20395 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000020396 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000020397 # is contrary to our usage. Disable this feature.
20398 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020399 setopt NO_GLOB_SUBST
Pablo Galindo53e55292021-04-05 17:38:40 +010020400else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020401 case `(set -o) 2>/dev/null` in #(
20402 *posix*) :
20403 set -o posix ;; #(
20404 *) :
20405 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020406esac
Michael W. Hudson54241132001-12-07 15:38:26 +000020407fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000020408
20409
Pablo Galindo53e55292021-04-05 17:38:40 +010020410
20411# Reset variables that may have inherited troublesome values from
20412# the environment.
20413
20414# IFS needs to be set, to space, tab, and newline, in precisely that order.
20415# (If _AS_PATH_WALK were called with IFS unset, it would have the
20416# side effect of setting IFS to empty, thus disabling word splitting.)
20417# Quoting is to prevent editors from complaining about space-tab.
Matthias Kloseb9621712010-04-24 17:59:49 +000020418as_nl='
20419'
20420export as_nl
Pablo Galindo53e55292021-04-05 17:38:40 +010020421IFS=" "" $as_nl"
20422
20423PS1='$ '
20424PS2='> '
20425PS4='+ '
20426
20427# Ensure predictable behavior from utilities with locale-dependent output.
20428LC_ALL=C
20429export LC_ALL
20430LANGUAGE=C
20431export LANGUAGE
20432
20433# We cannot yet rely on "unset" to work, but we need these variables
20434# to be unset--not just set to an empty or harmless value--now, to
20435# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
20436# also avoids known problems related to "unset" and subshell syntax
20437# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
20438for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
20439do eval test \${$as_var+y} \
20440 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20441done
20442
20443# Ensure that fds 0, 1, and 2 are open.
20444if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
20445if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
20446if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020447
20448# The user is always right.
Pablo Galindo53e55292021-04-05 17:38:40 +010020449if ${PATH_SEPARATOR+false} :; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020450 PATH_SEPARATOR=:
20451 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20452 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20453 PATH_SEPARATOR=';'
20454 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020458# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020020459as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000020460case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020461 *[\\/]* ) as_myself=$0 ;;
20462 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000020463for as_dir in $PATH
20464do
20465 IFS=$as_save_IFS
Pablo Galindo53e55292021-04-05 17:38:40 +010020466 case $as_dir in #(((
20467 '') as_dir=./ ;;
20468 */) ;;
20469 *) as_dir=$as_dir/ ;;
20470 esac
20471 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000020472 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020473IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000020474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020475 ;;
20476esac
20477# We did not find ourselves, most probably we were run as `sh COMMAND'
20478# in which case we are not to be found in the path.
20479if test "x$as_myself" = x; then
20480 as_myself=$0
20481fi
20482if test ! -f "$as_myself"; then
Pablo Galindo53e55292021-04-05 17:38:40 +010020483 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020484 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020485fi
20486
Matthias Kloseb9621712010-04-24 17:59:49 +000020487
20488
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020489# as_fn_error STATUS ERROR [LINENO LOG_FD]
20490# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000020491# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20492# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020493# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000020494as_fn_error ()
20495{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020496 as_status=$1; test $as_status -eq 0 && as_status=1
20497 if test "$4"; then
20498 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindo53e55292021-04-05 17:38:40 +010020499 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000020500 fi
Pablo Galindo53e55292021-04-05 17:38:40 +010020501 printf "%s\n" "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020502 as_fn_exit $as_status
20503} # as_fn_error
20504
20505
Pablo Galindo53e55292021-04-05 17:38:40 +010020506
Matthias Kloseb9621712010-04-24 17:59:49 +000020507# as_fn_set_status STATUS
20508# -----------------------
20509# Set $? to STATUS, without forking.
20510as_fn_set_status ()
20511{
20512 return $1
20513} # as_fn_set_status
20514
20515# as_fn_exit STATUS
20516# -----------------
20517# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20518as_fn_exit ()
20519{
20520 set +e
20521 as_fn_set_status $1
20522 exit $1
20523} # as_fn_exit
20524
20525# as_fn_unset VAR
20526# ---------------
20527# Portably unset VAR.
20528as_fn_unset ()
20529{
20530 { eval $1=; unset $1;}
20531}
20532as_unset=as_fn_unset
Pablo Galindo53e55292021-04-05 17:38:40 +010020533
Matthias Kloseb9621712010-04-24 17:59:49 +000020534# as_fn_append VAR VALUE
20535# ----------------------
20536# Append the text in VALUE to the end of the definition contained in VAR. Take
20537# advantage of any shell optimizations that allow amortized linear growth over
20538# repeated appends, instead of the typical quadratic growth present in naive
20539# implementations.
Pablo Galindo53e55292021-04-05 17:38:40 +010020540if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
20541then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020542 eval 'as_fn_append ()
20543 {
20544 eval $1+=\$2
20545 }'
Pablo Galindo53e55292021-04-05 17:38:40 +010020546else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020547 as_fn_append ()
20548 {
20549 eval $1=\$$1\$2
20550 }
20551fi # as_fn_append
20552
20553# as_fn_arith ARG...
20554# ------------------
20555# Perform arithmetic evaluation on the ARGs, and store the result in the
20556# global $as_val. Take advantage of shells that can avoid forks. The arguments
20557# must be portable across $(()) and expr.
Pablo Galindo53e55292021-04-05 17:38:40 +010020558if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
20559then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020560 eval 'as_fn_arith ()
20561 {
20562 as_val=$(( $* ))
20563 }'
Pablo Galindo53e55292021-04-05 17:38:40 +010020564else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020565 as_fn_arith ()
20566 {
20567 as_val=`expr "$@" || test $? -eq 1`
20568 }
20569fi # as_fn_arith
20570
20571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020572if expr a : '\(a\)' >/dev/null 2>&1 &&
20573 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20574 as_expr=expr
20575else
20576 as_expr=false
20577fi
20578
20579if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20580 as_basename=basename
20581else
20582 as_basename=false
20583fi
20584
Matthias Kloseb9621712010-04-24 17:59:49 +000020585if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20586 as_dirname=dirname
20587else
20588 as_dirname=false
20589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020591as_me=`$as_basename -- "$0" ||
20592$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20593 X"$0" : 'X\(//\)$' \| \
20594 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo53e55292021-04-05 17:38:40 +010020595printf "%s\n" X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020596 sed '/^.*\/\([^/][^/]*\)\/*$/{
20597 s//\1/
20598 q
20599 }
20600 /^X\/\(\/\/\)$/{
20601 s//\1/
20602 q
20603 }
20604 /^X\/\(\/\).*/{
20605 s//\1/
20606 q
20607 }
20608 s/.*/./; q'`
20609
Matthias Kloseb9621712010-04-24 17:59:49 +000020610# Avoid depending upon Character Ranges.
20611as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20612as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20613as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20614as_cr_digits='0123456789'
20615as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020616
Pablo Galindo53e55292021-04-05 17:38:40 +010020617
20618# Determine whether it's possible to make 'echo' print without a newline.
20619# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
20620# for compatibility with existing Makefiles.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020621ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000020622case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020623-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000020624 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000020626 xy) ECHO_C='\c';;
20627 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20628 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020629 esac;;
20630*)
20631 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000020632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020633
Pablo Galindo53e55292021-04-05 17:38:40 +010020634# For backward compatibility with old third-party macros, we provide
20635# the shell variables $as_echo and $as_echo_n. New code should use
20636# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
20637as_echo='printf %s\n'
20638as_echo_n='printf %s'
20639
Martin v. Löwis11437992002-04-12 09:54:03 +000020640rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020641if test -d conf$$.dir; then
20642 rm -f conf$$.dir/conf$$.file
20643else
20644 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000020645 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000020647if (echo >conf$$.file) 2>/dev/null; then
20648 if ln -s conf$$.file conf$$ 2>/dev/null; then
20649 as_ln_s='ln -s'
20650 # ... but there are two gotchas:
20651 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20652 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020653 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000020654 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020655 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020656 elif ln conf$$.file conf$$ 2>/dev/null; then
20657 as_ln_s=ln
20658 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020659 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020661else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020662 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000020663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020664rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20665rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000020666
Matthias Kloseb9621712010-04-24 17:59:49 +000020667
20668# as_fn_mkdir_p
20669# -------------
20670# Create "$as_dir" as a directory, including parents if necessary.
20671as_fn_mkdir_p ()
20672{
20673
20674 case $as_dir in #(
20675 -*) as_dir=./$as_dir;;
20676 esac
20677 test -d "$as_dir" || eval $as_mkdir_p || {
20678 as_dirs=
20679 while :; do
20680 case $as_dir in #(
Pablo Galindo53e55292021-04-05 17:38:40 +010020681 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000020682 *) as_qdir=$as_dir;;
20683 esac
20684 as_dirs="'$as_qdir' $as_dirs"
20685 as_dir=`$as_dirname -- "$as_dir" ||
20686$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20687 X"$as_dir" : 'X\(//\)[^/]' \| \
20688 X"$as_dir" : 'X\(//\)$' \| \
20689 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo53e55292021-04-05 17:38:40 +010020690printf "%s\n" X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000020691 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20692 s//\1/
20693 q
20694 }
20695 /^X\(\/\/\)[^/].*/{
20696 s//\1/
20697 q
20698 }
20699 /^X\(\/\/\)$/{
20700 s//\1/
20701 q
20702 }
20703 /^X\(\/\).*/{
20704 s//\1/
20705 q
20706 }
20707 s/.*/./; q'`
20708 test -d "$as_dir" && break
20709 done
20710 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020711 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000020712
20713
20714} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000020715if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020716 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000020717else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020718 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020719 as_mkdir_p=false
20720fi
20721
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020722
20723# as_fn_executable_p FILE
20724# -----------------------
20725# Test if FILE is an executable regular file.
20726as_fn_executable_p ()
20727{
20728 test -f "$1" && test -x "$1"
20729} # as_fn_executable_p
20730as_test_x='test -x'
20731as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000020732
20733# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020734as_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 +000020735
20736# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020737as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020738
20739
Martin v. Löwis11437992002-04-12 09:54:03 +000020740exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000020741## ----------------------------------- ##
20742## Main body of $CONFIG_STATUS script. ##
20743## ----------------------------------- ##
20744_ASEOF
20745test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020746
Matthias Kloseb9621712010-04-24 17:59:49 +000020747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20748# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000020749# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020750# values after options handling.
20751ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010020752This file was extended by python $as_me 3.10, which was
Pablo Galindo53e55292021-04-05 17:38:40 +010020753generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020754
20755 CONFIG_FILES = $CONFIG_FILES
20756 CONFIG_HEADERS = $CONFIG_HEADERS
20757 CONFIG_LINKS = $CONFIG_LINKS
20758 CONFIG_COMMANDS = $CONFIG_COMMANDS
20759 $ $0 $@
20760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020761on `(hostname || uname -n) 2>/dev/null | sed 1q`
20762"
20763
Martin v. Löwis11437992002-04-12 09:54:03 +000020764_ACEOF
20765
Matthias Kloseb9621712010-04-24 17:59:49 +000020766case $ac_config_files in *"
20767"*) set x $ac_config_files; shift; ac_config_files=$*;;
20768esac
20769
20770case $ac_config_headers in *"
20771"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20772esac
20773
20774
20775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020776# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010020777config_files="$ac_config_files"
20778config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000020779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020780_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020781
Matthias Kloseb9621712010-04-24 17:59:49 +000020782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020783ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000020784\`$as_me' instantiates files and other configuration actions
20785from templates according to the current configuration. Unless the files
20786and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000020787
Matthias Kloseb9621712010-04-24 17:59:49 +000020788Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000020789
20790 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020791 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000020792 --config print configuration, then exit
20793 -q, --quiet, --silent
20794 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 -d, --debug don't remove temporary files
20796 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000020797 --file=FILE[:TEMPLATE]
20798 instantiate the configuration file FILE
20799 --header=FILE[:TEMPLATE]
20800 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020801
20802Configuration files:
20803$config_files
20804
20805Configuration headers:
20806$config_headers
20807
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070020808Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020810_ACEOF
Pablo Galindo53e55292021-04-05 17:38:40 +010020811ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
20812ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Matthias Kloseb9621712010-04-24 17:59:49 +000020813cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Pablo Galindo53e55292021-04-05 17:38:40 +010020814ac_cs_config='$ac_cs_config_escaped'
Martin v. Löwis11437992002-04-12 09:54:03 +000020815ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010020816python config.status 3.10
Pablo Galindo53e55292021-04-05 17:38:40 +010020817configured by $0, generated by GNU Autoconf 2.71,
Matthias Kloseb9621712010-04-24 17:59:49 +000020818 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000020819
Pablo Galindo53e55292021-04-05 17:38:40 +010020820Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020821This config.status script is free software; the Free Software Foundation
20822gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020823
20824ac_pwd='$ac_pwd'
20825srcdir='$srcdir'
20826INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010020827MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000020828test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000020829_ACEOF
20830
Matthias Kloseb9621712010-04-24 17:59:49 +000020831cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20832# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000020833ac_need_defaults=:
20834while test $# != 0
20835do
20836 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020837 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020838 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20839 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020840 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020842 --*=)
20843 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20844 ac_optarg=
20845 ac_shift=:
20846 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020847 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020848 ac_option=$1
20849 ac_optarg=$2
20850 ac_shift=shift
20851 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020852 esac
20853
Skip Montanaro6dead952003-09-25 14:50:04 +000020854 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000020856 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20857 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Pablo Galindo53e55292021-04-05 17:38:40 +010020859 printf "%s\n" "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020860 --config | --confi | --conf | --con | --co | --c )
Pablo Galindo53e55292021-04-05 17:38:40 +010020861 printf "%s\n" "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020862 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 debug=: ;;
20864 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020865 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020866 case $ac_optarg in
Pablo Galindo53e55292021-04-05 17:38:40 +010020867 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020868 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020869 esac
20870 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020871 ac_need_defaults=false;;
20872 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020873 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020874 case $ac_optarg in
Pablo Galindo53e55292021-04-05 17:38:40 +010020875 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020876 esac
20877 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020879 --he | --h)
20880 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020881 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020882Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020883 --help | --hel | -h )
Pablo Galindo53e55292021-04-05 17:38:40 +010020884 printf "%s\n" "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020885 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20886 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20887 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020888
20889 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020890 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020891Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020892
Matthias Kloseb9621712010-04-24 17:59:49 +000020893 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020894 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020895
20896 esac
20897 shift
20898done
20899
Skip Montanaro6dead952003-09-25 14:50:04 +000020900ac_configure_extra_args=
20901
20902if $ac_cs_silent; then
20903 exec 6>/dev/null
20904 ac_configure_extra_args="$ac_configure_extra_args --silent"
20905fi
20906
20907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000020909if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020910 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000020911 shift
Pablo Galindo53e55292021-04-05 17:38:40 +010020912 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000020913 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000020915 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000020916fi
20917
Martin v. Löwis11437992002-04-12 09:54:03 +000020918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020919cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920exec 5>>config.log
20921{
20922 echo
20923 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20924## Running $as_me. ##
20925_ASBOX
Pablo Galindo53e55292021-04-05 17:38:40 +010020926 printf "%s\n" "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020927} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020931_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020932
Matthias Kloseb9621712010-04-24 17:59:49 +000020933cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020934
20935# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000020936for ac_config_target in $ac_config_targets
20937do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020938 case $ac_config_target in
20939 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20940 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
20941 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000020942 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
20943 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020944 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000020945 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020020946 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010020947 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020948 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020949
Victor Stinnere0be4232011-10-25 13:06:09 +020020950 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020951 esac
20952done
20953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020954
Martin v. Löwis11437992002-04-12 09:54:03 +000020955# If the user did not use the arguments to specify the items to instantiate,
20956# then the envvar interface is used. Set only those that are not.
20957# We use the long form for the default assignment because of an extremely
20958# bizarre bug on SunOS 4.1.3.
20959if $ac_need_defaults; then
Pablo Galindo53e55292021-04-05 17:38:40 +010020960 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
20961 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000020962fi
20963
Skip Montanaro6dead952003-09-25 14:50:04 +000020964# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020965# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000020966# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020967# Hook for its removal unless debugging.
20968# Note that there is a small window in which the directory will not be cleaned:
20969# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000020970$debug ||
20971{
Victor Stinnere0be4232011-10-25 13:06:09 +020020972 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020973 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020020974 : "${ac_tmp:=$tmp}"
20975 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020976' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000020977 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000020978}
Martin v. Löwis11437992002-04-12 09:54:03 +000020979# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020980
Martin v. Löwis11437992002-04-12 09:54:03 +000020981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020982 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020020983 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000020984} ||
20985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020986 tmp=./conf$$-$RANDOM
20987 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020988} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020020989ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000020990
Matthias Kloseb9621712010-04-24 17:59:49 +000020991# Set up the scripts for CONFIG_FILES section.
20992# No need to generate them if there are no CONFIG_FILES.
20993# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020995
Matthias Kloseb9621712010-04-24 17:59:49 +000020996
20997ac_cr=`echo X | tr X '\015'`
20998# On cygwin, bash can eat \r inside `` if the user requested igncr.
20999# But we know of no other shell where ac_cr would be empty at this
21000# point, so we can use a bashism as a fallback.
21001if test "x$ac_cr" = x; then
21002 eval ac_cr=\$\'\\r\'
21003fi
21004ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21005if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021006 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000021007else
21008 ac_cs_awk_cr=$ac_cr
21009fi
21010
Victor Stinnere0be4232011-10-25 13:06:09 +020021011echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000021012_ACEOF
21013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021014
Matthias Kloseb9621712010-04-24 17:59:49 +000021015{
21016 echo "cat >conf$$subs.awk <<_ACEOF" &&
21017 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21018 echo "_ACEOF"
21019} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021020 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21021ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022ac_delim='%!_!# '
21023for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000021024 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021025 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021026
Matthias Kloseb9621712010-04-24 17:59:49 +000021027 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21028 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021029 break
21030 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021031 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032 else
21033 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000021034 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021035done
Matthias Kloseb9621712010-04-24 17:59:49 +000021036rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021037
Matthias Kloseb9621712010-04-24 17:59:49 +000021038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020021039cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021041sed -n '
21042h
21043s/^/S["/; s/!.*/"]=/
21044p
21045g
21046s/^[^!]*!//
21047:repl
21048t repl
21049s/'"$ac_delim"'$//
21050t delim
21051:nl
21052h
21053s/\(.\{148\}\)..*/\1/
21054t more1
21055s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21056p
21057n
21058b repl
21059:more1
21060s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21061p
21062g
21063s/.\{148\}//
21064t nl
21065:delim
21066h
21067s/\(.\{148\}\)..*/\1/
21068t more2
21069s/["\\]/\\&/g; s/^/"/; s/$/"/
21070p
21071b
21072:more2
21073s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21074p
21075g
21076s/.\{148\}//
21077t delim
21078' <conf$$subs.awk | sed '
21079/^[^""]/{
21080 N
21081 s/\n//
21082}
21083' >>$CONFIG_STATUS || ac_write_fail=1
21084rm -f conf$$subs.awk
21085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21086_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020021087cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000021088 for (key in S) S_is_set[key] = 1
21089 FS = ""
21090
21091}
21092{
21093 line = $ 0
21094 nfields = split(line, field, "@")
21095 substed = 0
21096 len = length(field[1])
21097 for (i = 2; i < nfields; i++) {
21098 key = field[i]
21099 keylen = length(key)
21100 if (S_is_set[key]) {
21101 value = S[key]
21102 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21103 len += length(value) + length(field[++i])
21104 substed = 1
21105 } else
21106 len += 1 + keylen
21107 }
21108
21109 print line
21110}
21111
21112_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21115if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21116 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21117else
21118 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020021119fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021120 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021121_ACEOF
21122
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021123# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
21124# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021125# trailing colons and then remove the whole line if VPATH becomes empty
21126# (actually we leave an empty line to preserve line numbers).
21127if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021128 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
21129h
21130s///
21131s/^/:/
21132s/[ ]*$/:/
21133s/:\$(srcdir):/:/g
21134s/:\${srcdir}:/:/g
21135s/:@srcdir@:/:/g
21136s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021137s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021138x
21139s/\(=[ ]*\).*/\1/
21140G
21141s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021142s/^[^=]*=[ ]*$//
21143}'
21144fi
21145
Matthias Kloseb9621712010-04-24 17:59:49 +000021146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000021147fi # test -n "$CONFIG_FILES"
21148
Matthias Kloseb9621712010-04-24 17:59:49 +000021149# Set up the scripts for CONFIG_HEADERS section.
21150# No need to generate them if there are no CONFIG_HEADERS.
21151# This happens for instance with `./config.status Makefile'.
21152if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020021153cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000021154BEGIN {
21155_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021156
Matthias Kloseb9621712010-04-24 17:59:49 +000021157# Transform confdefs.h into an awk script `defines.awk', embedded as
21158# here-document in config.status, that substitutes the proper values into
21159# config.h.in to produce config.h.
21160
21161# Create a delimiter string that does not exist in confdefs.h, to ease
21162# handling of long lines.
21163ac_delim='%!_!# '
21164for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020021165 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
21166 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000021167 break
21168 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021169 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021170 else
21171 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21172 fi
21173done
21174
21175# For the awk script, D is an array of macro values keyed by name,
21176# likewise P contains macro parameters if any. Preserve backslash
21177# newline sequences.
21178
21179ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21180sed -n '
21181s/.\{148\}/&'"$ac_delim"'/g
21182t rset
21183:rset
21184s/^[ ]*#[ ]*define[ ][ ]*/ /
21185t def
21186d
21187:def
21188s/\\$//
21189t bsnl
21190s/["\\]/\\&/g
21191s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21192D["\1"]=" \3"/p
21193s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21194d
21195:bsnl
21196s/["\\]/\\&/g
21197s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21198D["\1"]=" \3\\\\\\n"\\/p
21199t cont
21200s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21201t cont
21202d
21203:cont
21204n
21205s/.\{148\}/&'"$ac_delim"'/g
21206t clear
21207:clear
21208s/\\$//
21209t bsnlc
21210s/["\\]/\\&/g; s/^/"/; s/$/"/p
21211d
21212:bsnlc
21213s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21214b cont
21215' <confdefs.h | sed '
21216s/'"$ac_delim"'/"\\\
21217"/g' >>$CONFIG_STATUS || ac_write_fail=1
21218
21219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21220 for (key in D) D_is_set[key] = 1
21221 FS = ""
21222}
21223/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21224 line = \$ 0
21225 split(line, arg, " ")
21226 if (arg[1] == "#") {
21227 defundef = arg[2]
21228 mac1 = arg[3]
21229 } else {
21230 defundef = substr(arg[1], 2)
21231 mac1 = arg[2]
21232 }
21233 split(mac1, mac2, "(") #)
21234 macro = mac2[1]
21235 prefix = substr(line, 1, index(line, defundef) - 1)
21236 if (D_is_set[macro]) {
21237 # Preserve the white space surrounding the "#".
21238 print prefix "define", macro P[macro] D[macro]
21239 next
21240 } else {
21241 # Replace #undef with comments. This is necessary, for example,
21242 # in the case of _POSIX_SOURCE, which is predefined and required
21243 # on some systems where configure will not decide to define it.
21244 if (defundef == "undef") {
21245 print "/*", prefix defundef, macro, "*/"
21246 next
21247 }
21248 }
21249}
21250{ print }
21251_ACAWK
21252_ACEOF
21253cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021254 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021255fi # test -n "$CONFIG_HEADERS"
21256
21257
21258eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
21259shift
21260for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261do
21262 case $ac_tag in
21263 :[FHLC]) ac_mode=$ac_tag; continue;;
21264 esac
21265 case $ac_mode$ac_tag in
21266 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020021267 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021268 :[FH]-) ac_tag=-:-;;
21269 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21270 esac
21271 ac_save_IFS=$IFS
21272 IFS=:
21273 set x $ac_tag
21274 IFS=$ac_save_IFS
21275 shift
21276 ac_file=$1
21277 shift
21278
21279 case $ac_mode in
21280 :L) ac_source=$1;;
21281 :[FH])
21282 ac_file_inputs=
21283 for ac_f
21284 do
21285 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020021286 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021287 *) # Look for the file first in the build tree, then in the source tree
21288 # (if the path is not absolute). The absolute path cannot be DOS-style,
21289 # because $ac_f cannot contain `:'.
21290 test -f "$ac_f" ||
21291 case $ac_f in
21292 [\\/$]*) false;;
21293 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21294 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020021295 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021296 esac
Pablo Galindo53e55292021-04-05 17:38:40 +010021297 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000021298 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021299 done
21300
21301 # Let's still pretend it is `configure' which instantiates (i.e., don't
21302 # use $as_me), people would be surprised to read:
21303 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000021304 configure_input='Generated from '`
Pablo Galindo53e55292021-04-05 17:38:40 +010021305 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000021306 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021307 if test x"$ac_file" != x-; then
21308 configure_input="$ac_file. $configure_input"
Pablo Galindo53e55292021-04-05 17:38:40 +010021309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21310printf "%s\n" "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021311 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000021312 # Neutralize special characters interpreted by sed in replacement strings.
21313 case $configure_input in #(
21314 *\&* | *\|* | *\\* )
Pablo Galindo53e55292021-04-05 17:38:40 +010021315 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000021316 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21317 *) ac_sed_conf_input=$configure_input;;
21318 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021319
21320 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020021321 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21322 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021323 esac
21324 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 esac
21326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021327 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021328$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021329 X"$ac_file" : 'X\(//\)[^/]' \| \
21330 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021331 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindo53e55292021-04-05 17:38:40 +010021332printf "%s\n" X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21334 s//\1/
21335 q
21336 }
21337 /^X\(\/\/\)[^/].*/{
21338 s//\1/
21339 q
21340 }
21341 /^X\(\/\/\)$/{
21342 s//\1/
21343 q
21344 }
21345 /^X\(\/\).*/{
21346 s//\1/
21347 q
21348 }
21349 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000021350 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000021351 ac_builddir=.
21352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021353case "$ac_dir" in
21354.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21355*)
Pablo Galindo53e55292021-04-05 17:38:40 +010021356 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021357 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindo53e55292021-04-05 17:38:40 +010021358 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021359 case $ac_top_builddir_sub in
21360 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21361 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21362 esac ;;
21363esac
21364ac_abs_top_builddir=$ac_pwd
21365ac_abs_builddir=$ac_pwd$ac_dir_suffix
21366# for backward compatibility:
21367ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000021368
21369case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021370 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021372 ac_top_srcdir=$ac_top_builddir_sub
21373 ac_abs_top_srcdir=$ac_pwd ;;
21374 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000021375 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376 ac_top_srcdir=$srcdir
21377 ac_abs_top_srcdir=$srcdir ;;
21378 *) # Relative name.
21379 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21380 ac_top_srcdir=$ac_top_build_prefix$srcdir
21381 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021382esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021383ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000021384
Martin v. Löwis11437992002-04-12 09:54:03 +000021385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021386 case $ac_mode in
21387 :F)
21388 #
21389 # CONFIG_FILE
21390 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021391
21392 case $INSTALL in
21393 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010021396 ac_MKDIR_P=$MKDIR_P
21397 case $MKDIR_P in
21398 [\\/$]* | ?:[\\/]* ) ;;
21399 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21400 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000021401_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021402
Matthias Kloseb9621712010-04-24 17:59:49 +000021403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021404# If the template does not know about datarootdir, expand it.
21405# FIXME: This hack should be removed a few years after 2.60.
21406ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000021407ac_sed_dataroot='
21408/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409 p
21410 q
21411}
21412/@datadir@/p
21413/@docdir@/p
21414/@infodir@/p
21415/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000021416/@mandir@/p'
21417case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418*datarootdir*) ac_datarootdir_seen=yes;;
21419*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Pablo Galindo53e55292021-04-05 17:38:40 +010021420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21421printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424 ac_datarootdir_hack='
21425 s&@datadir@&$datadir&g
21426 s&@docdir@&$docdir&g
21427 s&@infodir@&$infodir&g
21428 s&@localedir@&$localedir&g
21429 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000021430 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021431esac
21432_ACEOF
21433
21434# Neutralize VPATH when `$srcdir' = `.'.
21435# Shell code in configure.ac might set extrasub.
21436# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000021437cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21438ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000021439$extrasub
21440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000021442:t
21443/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000021444s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021445s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000021446s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021447s&@srcdir@&$ac_srcdir&;t t
21448s&@abs_srcdir@&$ac_abs_srcdir&;t t
21449s&@top_srcdir@&$ac_top_srcdir&;t t
21450s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21451s&@builddir@&$ac_builddir&;t t
21452s&@abs_builddir@&$ac_abs_builddir&;t t
21453s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21454s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010021455s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021456$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000021457"
Victor Stinnere0be4232011-10-25 13:06:09 +020021458eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21459 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021461test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020021462 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21463 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21464 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Pablo Galindo53e55292021-04-05 17:38:40 +010021465 { 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 +020021466which seems to be undefined. Please make sure it is defined" >&5
Pablo Galindo53e55292021-04-05 17:38:40 +010021467printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021468which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021469
Victor Stinnere0be4232011-10-25 13:06:09 +020021470 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000021471 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020021472 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21473 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000021474 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021475 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021476 ;;
21477 :H)
21478 #
21479 # CONFIG_HEADER
21480 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021481 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000021482 {
Pablo Galindo53e55292021-04-05 17:38:40 +010021483 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021484 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21485 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021486 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020021487 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Pablo Galindo53e55292021-04-05 17:38:40 +010021488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21489printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 else
Matthias Kloseb9621712010-04-24 17:59:49 +000021491 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020021492 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021493 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021494 fi
21495 else
Pablo Galindo53e55292021-04-05 17:38:40 +010021496 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021497 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021498 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021500 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000021501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021502
21503 esac
21504
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000021505
21506 case $ac_file$ac_mode in
21507 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
21508
21509 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021510done # for ac_tag
21511
Guido van Rossum627b2d71993-12-24 10:39:16 +000021512
Matthias Kloseb9621712010-04-24 17:59:49 +000021513as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000021514_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021515ac_clean_files=$ac_clean_files_save
21516
Matthias Kloseb9621712010-04-24 17:59:49 +000021517test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021518 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021519
Martin v. Löwis11437992002-04-12 09:54:03 +000021520
21521# configure is writing to config.log, and then calls config.status.
21522# config.status does its own redirection, appending to config.log.
21523# Unfortunately, on DOS this fails, as config.log is still kept open
21524# by configure, so config.status won't be able to write to it; its
21525# output is simply discarded. So we exec the FD to /dev/null,
21526# effectively closing config.log, so it can be properly (re)opened and
21527# appended to by config.status. When coming back to configure, we
21528# need to make the FD available again.
21529if test "$no_create" != yes; then
21530 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021531 ac_config_status_args=
21532 test "$silent" = yes &&
21533 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021534 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021535 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021536 exec 5>>config.log
21537 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21538 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021539 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000021540fi
21541if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Pablo Galindo53e55292021-04-05 17:38:40 +010021542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21543printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021544fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021545
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021546
Christian Heimes75ed8902013-11-20 01:11:18 +010021547echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021548if test ! -f Modules/Setup.local
21549then
21550 echo "# Edit this file for local setup changes" >Modules/Setup.local
21551fi
21552
Christian Heimes75ed8902013-11-20 01:11:18 +010021553echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021554$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020021555 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020021556 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021557mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070021558
21559if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
21560 echo "" >&6
21561 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070021562 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 +000021563 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070021564 echo "" >&6
21565 echo "" >&6
21566fi
Pablo Galindo53e55292021-04-05 17:38:40 +010021567