blob: 5ada8fc43e75d722dde5682f6c0d91b1adf0df46 [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 Galindocc128882021-03-01 16:47:53 +00003# 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 Galindocc128882021-03-01 16:47:53 +00008# 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 Galindocc128882021-03-01 16:47:53 +000020as_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 Galindocc128882021-03-01 16:47:53 +000029else $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 Galindocc128882021-03-01 16:47:53 +000039
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 Galindocc128882021-03-01 16:47:53 +000050IFS=" "" $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 Galindocc128882021-03-01 16:47:53 +000078if ${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 Galindocc128882021-03-01 16:47:53 +000095 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 Galindocc128882021-03-01 16:47:53 +0000112 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 Galindocc128882021-03-01 16:47:53 +0000137printf "%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 Galindocc128882021-03-01 16:47:53 +0000143 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 Galindocc128882021-03-01 16:47:53 +0000152else \$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 Galindocc128882021-03-01 16:47:53 +0000172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000174
Pablo Galindocc128882021-03-01 16:47:53 +0000175else \$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 Galindocc128882021-03-01 16:47:53 +0000179blah=\$(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 Galindocc128882021-03-01 16:47:53 +0000187 if (eval "$as_required") 2>/dev/null
188then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000189 as_have_required=yes
Pablo Galindocc128882021-03-01 16:47:53 +0000190else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000191 as_have_required=no
192fi
Pablo Galindocc128882021-03-01 16:47:53 +0000193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000195
Pablo Galindocc128882021-03-01 16:47:53 +0000196else $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 Galindocc128882021-03-01 16:47:53 +0000202 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 Galindocc128882021-03-01 16:47:53 +0000212 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 Galindocc128882021-03-01 16:47:53 +0000214 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 Galindocc128882021-03-01 16:47:53 +0000217 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
Matthias Kloseb9621712010-04-24 17:59:49 +0000226IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +0000227if $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 Galindocc128882021-03-01 16:47:53 +0000239 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 Galindocc128882021-03-01 16:47:53 +0000258printf "%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 Galindocc128882021-03-01 16:47:53 +0000262 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 Galindocc128882021-03-01 16:47:53 +0000270 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 Galindocc128882021-03-01 16:47:53 +0000298
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 Galindocc128882021-03-01 16:47:53 +0000316# 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 Galindocc128882021-03-01 16:47:53 +0000338 *\'*) 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 Galindocc128882021-03-01 16:47:53 +0000347printf "%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 Galindocc128882021-03-01 16:47:53 +0000386if (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 Galindocc128882021-03-01 16:47:53 +0000392else $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 Galindocc128882021-03-01 16:47:53 +0000404if (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 Galindocc128882021-03-01 16:47:53 +0000410else $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 Galindocc128882021-03-01 16:47:53 +0000417# 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 Galindocc128882021-03-01 16:47:53 +0000436 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000437 fi
Pablo Galindocc128882021-03-01 16:47:53 +0000438 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 Galindocc128882021-03-01 16:47:53 +0000465printf "%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 Galindocc128882021-03-01 16:47:53 +0000509 { 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 Galindocc128882021-03-01 16:47:53 +0000523
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 Galindocc128882021-03-01 16:47:53 +0000540# 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 Galindocc128882021-03-01 16:47:53 +0000622#include <stddef.h>
623#ifdef HAVE_STDIO_H
624# include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000625#endif
Pablo Galindocc128882021-03-01 16:47:53 +0000626#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 Galindocc128882021-03-01 16:47:53 +0000638#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 Galindocc128882021-03-01 16:47:53 +0000651ac_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 Heimesff5be6e2018-01-20 13:19:21 +0100656OPENSSL_LDFLAGS
657OPENSSL_LIBS
658OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800659ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000660SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000661THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100662WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100663LIBPL
664PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100665PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200666BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200667LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700668EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200669ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000670SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LIBC
672LIBM
673HAVE_GETHOSTBYNAME
674HAVE_GETHOSTBYNAME_R
675HAVE_GETHOSTBYNAME_R_3_ARG
676HAVE_GETHOSTBYNAME_R_5_ARG
677HAVE_GETHOSTBYNAME_R_6_ARG
678LIBOBJS
679TRUE
680MACHDEP_OBJS
681DYNLOADFILE
682DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700683DTRACE_OBJS
684DTRACE_HEADERS
685DFLAGS
686DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700687TCLTK_LIBS
688TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800690PKG_CONFIG_LIBDIR
691PKG_CONFIG_PATH
692PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400693TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000694SHLIBS
695CFLAGSFORSHARED
696LINKFORSHARED
697CCSHARED
698BLDSHARED
699LDCXXSHARED
700LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700701SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000702LIBTOOL_CRUFT
703OTHER_LIBTOOL_OPT
Pablo Galindocc128882021-03-01 16:47:53 +0000704EGREP
Matthias Kloseb9621712010-04-24 17:59:49 +0000705UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100706LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700707CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000708BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200709CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000710OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700711LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700712LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700713LLVM_PROF_ERR
714LLVM_PROF_FILE
715LLVM_PROF_MERGER
716PGO_PROF_USE_FLAG
717PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200718LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200719LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700720PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700721DEF_MAKE_RULE
722DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000723ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000724LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100725MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000726INSTALL_DATA
727INSTALL_SCRIPT
728INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200729ac_ct_READELF
730READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000731ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200732ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000733AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000734GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200735EXPORTSFROM
736EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000737LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000738LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000739RUNSHARED
740INSTSONAME
741LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000742PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000743BLDLIBRARY
744DLLLIBRARY
745LDLIBRARY
746LIBRARY
747BUILDEXEEXT
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200748NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200749MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200750PLATFORM_TRIPLET
751MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200752ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000753MAINCC
754CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700755SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200756GREP
757CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000758OBJEXT
759EXEEXT
760ac_ct_CC
761CPPFLAGS
762LDFLAGS
763CFLAGS
764CC
765EXPORT_MACOSX_DEPLOYMENT_TARGET
766CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200767_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000768MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000769FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000770FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800771FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000772FRAMEWORKALTINSTALLLAST
773FRAMEWORKALTINSTALLFIRST
774FRAMEWORKINSTALLLAST
775FRAMEWORKINSTALLFIRST
776PYTHONFRAMEWORKINSTALLDIR
777PYTHONFRAMEWORKPREFIX
778PYTHONFRAMEWORKDIR
779PYTHONFRAMEWORKIDENTIFIER
780PYTHONFRAMEWORK
781LIPO_32BIT_FLAGS
782ARCH_RUN_32BIT
783UNIVERSALSDK
784CONFIG_ARGS
785SOVERSION
786VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200787PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200788PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100789host_os
790host_vendor
791host_cpu
792host
793build_os
794build_vendor
795build_cpu
796build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500797HAS_GIT
798GITBRANCH
799GITTAG
800GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400801BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000802target_alias
803host_alias
804build_alias
805LIBS
806ECHO_T
807ECHO_N
808ECHO_C
809DEFS
810mandir
811localedir
812libdir
813psdir
814pdfdir
815dvidir
816htmldir
817infodir
818docdir
819oldincludedir
820includedir
Pablo Galindocc128882021-03-01 16:47:53 +0000821runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000822localstatedir
823sharedstatedir
824sysconfdir
825datadir
826datarootdir
827libexecdir
828sbindir
829bindir
830program_transform_name
831prefix
832exec_prefix
833PACKAGE_URL
834PACKAGE_BUGREPORT
835PACKAGE_STRING
836PACKAGE_VERSION
837PACKAGE_TARNAME
838PACKAGE_NAME
839PATH_SEPARATOR
840SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000841ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000842ac_user_opts='
843enable_option_checking
844enable_universalsdk
845with_universal_archs
846with_framework_name
847enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000848with_cxx_main
849with_suffix
850enable_shared
851enable_profiling
852with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200853with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200854with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000855enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700856with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100857with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400858with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100859with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800860with_memory_sanitizer
861with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000862with_libs
863with_system_expat
864with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100865with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100866with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000867enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700868with_tcltk_includes
869with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000870with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000871enable_ipv6
872with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000873with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000874with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000875with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700876with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000877with_libm
878with_libc
879enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100880with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100881with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100882with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000883with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800884with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100885with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100886with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200887with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200888with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100889with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800890enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000891'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 ac_precious_vars='build_alias
893host_alias
894target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100895MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896CC
897CFLAGS
898LDFLAGS
899LIBS
900CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800901CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700902PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800903PKG_CONFIG
904PKG_CONFIG_PATH
905PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000909ac_init_help=
910ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000911ac_unrecognized_opts=
912ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913# The variables have the same names as the options, with
914# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000915cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918no_recursion=
919prefix=NONE
920program_prefix=NONE
921program_suffix=NONE
922program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927x_includes=NONE
928x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000929
930# Installation directory options.
931# These are left unexpanded so users can "make install exec_prefix=/foo"
932# and all the variables that are supposed to be based on exec_prefix
933# by default will actually change.
934# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936bindir='${exec_prefix}/bin'
937sbindir='${exec_prefix}/sbin'
938libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939datarootdir='${prefix}/share'
940datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941sysconfdir='${prefix}/etc'
942sharedstatedir='${prefix}/com'
943localstatedir='${prefix}/var'
Pablo Galindocc128882021-03-01 16:47:53 +0000944runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945includedir='${prefix}/include'
946oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
948infodir='${datarootdir}/info'
949htmldir='${docdir}'
950dvidir='${docdir}'
951pdfdir='${docdir}'
952psdir='${docdir}'
953libdir='${exec_prefix}/lib'
954localedir='${datarootdir}/locale'
955mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000960do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 # If the previous option needs an argument, assign it.
962 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000963 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 ac_prev=
965 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000966 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
970 *=) ac_optarg= ;;
971 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 case $ac_dashdash$ac_option in
975 --)
976 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978 -bindir | --bindir | --bindi | --bind | --bin | --bi)
979 ac_prev=bindir ;;
980 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 -cache-file | --cache-file | --cache-fil | --cache-fi \
989 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
990 ac_prev=cache_file ;;
991 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
992 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 cache_file=$ac_optarg ;;
994
995 --config-cache | -C)
996 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000998 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001003 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1004 | --dataroo | --dataro | --datar)
1005 ac_prev=datarootdir ;;
1006 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1007 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1008 datarootdir=$ac_optarg ;;
1009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001011 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001013 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc128882021-03-01 16:47:53 +00001014 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001015 ac_useropt_orig=$ac_useropt
Pablo Galindocc128882021-03-01 16:47:53 +00001016 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001017 case $ac_user_opts in
1018 *"
1019"enable_$ac_useropt"
1020"*) ;;
1021 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1022 ac_unrecognized_sep=', ';;
1023 esac
1024 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001025
1026 -docdir | --docdir | --docdi | --doc | --do)
1027 ac_prev=docdir ;;
1028 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1029 docdir=$ac_optarg ;;
1030
1031 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1032 ac_prev=dvidir ;;
1033 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1034 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001037 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001039 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc128882021-03-01 16:47:53 +00001040 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001041 ac_useropt_orig=$ac_useropt
Pablo Galindocc128882021-03-01 16:47:53 +00001042 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001043 case $ac_user_opts in
1044 *"
1045"enable_$ac_useropt"
1046"*) ;;
1047 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1048 ac_unrecognized_sep=', ';;
1049 esac
1050 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1053 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1054 | --exec | --exe | --ex)
1055 ac_prev=exec_prefix ;;
1056 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1057 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1058 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 # Obsolete; use --with-gas.
1063 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -help | --help | --hel | --he | -h)
1066 ac_init_help=long ;;
1067 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1068 ac_init_help=recursive ;;
1069 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1070 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001077 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1078 ac_prev=htmldir ;;
1079 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1080 | --ht=*)
1081 htmldir=$ac_optarg ;;
1082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -includedir | --includedir | --includedi | --included | --include \
1084 | --includ | --inclu | --incl | --inc)
1085 ac_prev=includedir ;;
1086 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1087 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
1090 -infodir | --infodir | --infodi | --infod | --info | --inf)
1091 ac_prev=infodir ;;
1092 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
1095 -libdir | --libdir | --libdi | --libd)
1096 ac_prev=libdir ;;
1097 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
1100 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1101 | --libexe | --libex | --libe)
1102 ac_prev=libexecdir ;;
1103 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1104 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001107 -localedir | --localedir | --localedi | --localed | --locale)
1108 ac_prev=localedir ;;
1109 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1110 localedir=$ac_optarg ;;
1111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001113 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 ac_prev=localstatedir ;;
1115 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001116 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118
1119 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1120 ac_prev=mandir ;;
1121 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 # Obsolete; use --without-fp.
1126 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 no_create=yes ;;
1131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1133 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1134 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1137 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1138 | --oldin | --oldi | --old | --ol | --o)
1139 ac_prev=oldincludedir ;;
1140 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1141 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1142 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1146 ac_prev=prefix ;;
1147 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
1150 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1151 | --program-pre | --program-pr | --program-p)
1152 ac_prev=program_prefix ;;
1153 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1154 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
1157 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1158 | --program-suf | --program-su | --program-s)
1159 ac_prev=program_suffix ;;
1160 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1161 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
1164 -program-transform-name | --program-transform-name \
1165 | --program-transform-nam | --program-transform-na \
1166 | --program-transform-n | --program-transform- \
1167 | --program-transform | --program-transfor \
1168 | --program-transfo | --program-transf \
1169 | --program-trans | --program-tran \
1170 | --progr-tra | --program-tr | --program-t)
1171 ac_prev=program_transform_name ;;
1172 -program-transform-name=* | --program-transform-name=* \
1173 | --program-transform-nam=* | --program-transform-na=* \
1174 | --program-transform-n=* | --program-transform-=* \
1175 | --program-transform=* | --program-transfor=* \
1176 | --program-transfo=* | --program-transf=* \
1177 | --program-trans=* | --program-tran=* \
1178 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1182 ac_prev=pdfdir ;;
1183 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1184 pdfdir=$ac_optarg ;;
1185
1186 -psdir | --psdir | --psdi | --psd | --ps)
1187 ac_prev=psdir ;;
1188 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1189 psdir=$ac_optarg ;;
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1192 | -silent | --silent | --silen | --sile | --sil)
1193 silent=yes ;;
1194
Pablo Galindocc128882021-03-01 16:47:53 +00001195 -runstatedir | --runstatedir | --runstatedi | --runstated \
1196 | --runstate | --runstat | --runsta | --runst | --runs \
1197 | --run | --ru | --r)
1198 ac_prev=runstatedir ;;
1199 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1200 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1201 | --run=* | --ru=* | --r=*)
1202 runstatedir=$ac_optarg ;;
1203
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001204 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1205 ac_prev=sbindir ;;
1206 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1207 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001209
1210 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1211 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1212 | --sharedst | --shareds | --shared | --share | --shar \
1213 | --sha | --sh)
1214 ac_prev=sharedstatedir ;;
1215 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1216 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1217 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1218 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001220
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221 -site | --site | --sit)
1222 ac_prev=site ;;
1223 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1227 ac_prev=srcdir ;;
1228 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001231 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1232 | --syscon | --sysco | --sysc | --sys | --sy)
1233 ac_prev=sysconfdir ;;
1234 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1235 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001237
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1244 verbose=yes ;;
1245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 -version | --version | --versio | --versi | --vers | -V)
1247 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc128882021-03-01 16:47:53 +00001253 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 ac_useropt_orig=$ac_useropt
Pablo Galindocc128882021-03-01 16:47:53 +00001255 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 case $ac_user_opts in
1257 *"
1258"with_$ac_useropt"
1259"*) ;;
1260 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1261 ac_unrecognized_sep=', ';;
1262 esac
1263 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264
1265 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc128882021-03-01 16:47:53 +00001269 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 ac_useropt_orig=$ac_useropt
Pablo Galindocc128882021-03-01 16:47:53 +00001271 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 case $ac_user_opts in
1273 *"
1274"with_$ac_useropt"
1275"*) ;;
1276 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1277 ac_unrecognized_sep=', ';;
1278 esac
1279 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281 --x)
1282 # Obsolete; use --with-x.
1283 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284
1285 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1286 | --x-incl | --x-inc | --x-in | --x-i)
1287 ac_prev=x_includes ;;
1288 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1289 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001290 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291
1292 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1293 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1294 ac_prev=x_libraries ;;
1295 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1296 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001299 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1300Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 ;;
1302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303 *=*)
1304 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1305 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001306 case $ac_envvar in #(
1307 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001308 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001309 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 export $ac_envvar ;;
1312
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001313 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 # FIXME: should be removed in autoconf 3.0.
Pablo Galindocc128882021-03-01 16:47:53 +00001315 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc128882021-03-01 16:47:53 +00001317 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001318 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001319 ;;
1320
1321 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322done
1323
Guido van Rossum7f43da71994-08-01 12:15:30 +00001324if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001326 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327fi
1328
Matthias Kloseb9621712010-04-24 17:59:49 +00001329if test -n "$ac_unrecognized_opts"; then
1330 case $enable_option_checking in
1331 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Pablo Galindocc128882021-03-01 16:47:53 +00001333 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001334 esac
1335fi
1336
1337# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1339 datadir sysconfdir sharedstatedir localstatedir includedir \
1340 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindocc128882021-03-01 16:47:53 +00001341 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001342do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 # Remove trailing slashes.
1345 case $ac_val in
1346 */ )
1347 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1348 eval $ac_var=\$ac_val;;
1349 esac
1350 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001351 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 [\\/$]* | ?:[\\/]* ) continue;;
1353 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001354 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001355 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001356done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357
Martin v. Löwis11437992002-04-12 09:54:03 +00001358# There might be people who depend on the old broken behavior: `$host'
1359# used to hold the argument of --host etc.
1360# FIXME: To remove some day.
1361build=$build_alias
1362host=$host_alias
1363target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364
Martin v. Löwis11437992002-04-12 09:54:03 +00001365# FIXME: To remove some day.
1366if test "x$host_alias" != x; then
1367 if test "x$build_alias" = x; then
1368 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 elif test "x$build_alias" != "x$host_alias"; then
1370 cross_compiling=yes
1371 fi
1372fi
1373
1374ac_tool_prefix=
1375test -n "$host_alias" && ac_tool_prefix=$host_alias-
1376
1377test "$silent" = yes && exec 6>/dev/null
1378
Guido van Rossum627b2d71993-12-24 10:39:16 +00001379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380ac_pwd=`pwd` && test -n "$ac_pwd" &&
1381ac_ls_di=`ls -di .` &&
1382ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386
1387
Guido van Rossum627b2d71993-12-24 10:39:16 +00001388# Find the source files, if location was not specified.
1389if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001390 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001392 ac_confdir=`$as_dirname -- "$as_myself" ||
1393$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1394 X"$as_myself" : 'X\(//\)[^/]' \| \
1395 X"$as_myself" : 'X\(//\)$' \| \
1396 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc128882021-03-01 16:47:53 +00001397printf "%s\n" X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001398 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1399 s//\1/
1400 q
1401 }
1402 /^X\(\/\/\)[^/].*/{
1403 s//\1/
1404 q
1405 }
1406 /^X\(\/\/\)$/{
1407 s//\1/
1408 q
1409 }
1410 /^X\(\/\).*/{
1411 s//\1/
1412 q
1413 }
1414 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001415 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001416 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001417 srcdir=..
1418 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419else
1420 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001422if test ! -r "$srcdir/$ac_unique_file"; then
1423 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1427ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001428 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001429 pwd)`
1430# When building in place, set srcdir=.
1431if test "$ac_abs_confdir" = "$ac_pwd"; then
1432 srcdir=.
1433fi
1434# Remove unnecessary trailing slashes from srcdir.
1435# Double slashes in file names in object file debugging info
1436# mess up M-x gdb in Emacs.
1437case $srcdir in
1438*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1439esac
1440for ac_var in $ac_precious_vars; do
1441 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1442 eval ac_env_${ac_var}_value=\$${ac_var}
1443 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1444 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1445done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001446
Martin v. Löwis11437992002-04-12 09:54:03 +00001447#
1448# Report the --help message.
1449#
1450if test "$ac_init_help" = "long"; then
1451 # Omit some internal or obsolete options to make the list less imposing.
1452 # This message is too long to be a string in the A/UX 3.1 sh.
1453 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001454\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001455
1456Usage: $0 [OPTION]... [VAR=VALUE]...
1457
1458To assign environment variables (e.g., CC, CFLAGS...), specify them as
1459VAR=VALUE. See below for descriptions of some of the useful variables.
1460
1461Defaults for the options are specified in brackets.
1462
1463Configuration:
1464 -h, --help display this help and exit
1465 --help=short display options specific to this package
1466 --help=recursive display the short help of all the included packages
1467 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001468 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 --cache-file=FILE cache test results in FILE [disabled]
1470 -C, --config-cache alias for \`--cache-file=config.cache'
1471 -n, --no-create do not create output files
1472 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1473
Martin v. Löwis11437992002-04-12 09:54:03 +00001474Installation directories:
1475 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001479
1480By default, \`make install' will install all the files in
1481\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1482an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1483for instance \`--prefix=\$HOME'.
1484
1485For better control, use the options below.
1486
1487Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 --bindir=DIR user executables [EPREFIX/bin]
1489 --sbindir=DIR system admin executables [EPREFIX/sbin]
1490 --libexecdir=DIR program executables [EPREFIX/libexec]
1491 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1492 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1493 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Pablo Galindocc128882021-03-01 16:47:53 +00001494 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 --libdir=DIR object code libraries [EPREFIX/lib]
1496 --includedir=DIR C header files [PREFIX/include]
1497 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1498 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1499 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1500 --infodir=DIR info documentation [DATAROOTDIR/info]
1501 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1502 --mandir=DIR man documentation [DATAROOTDIR/man]
1503 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1504 --htmldir=DIR html documentation [DOCDIR]
1505 --dvidir=DIR dvi documentation [DOCDIR]
1506 --pdfdir=DIR pdf documentation [DOCDIR]
1507 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001508_ACEOF
1509
1510 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001511
1512System types:
1513 --build=BUILD configure for building on BUILD [guessed]
1514 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001515_ACEOF
1516fi
1517
1518if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001519 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001520 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001521 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 cat <<\_ACEOF
1523
1524Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001525 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1527 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001528 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001529 create a universal binary build. SDKDIR specifies
1530 which macOS SDK should be used to perform the build,
1531 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001533 create a Python.framework rather than a traditional
1534 Unix install. optional INSTALLDIR specifies the
1535 installation path. see Mac/README.rst (default is
1536 no)
1537 --enable-shared enable building a shared Python library (default is
1538 no)
1539 --enable-profiling enable C-level code profiling with gprof (default is
1540 no)
1541 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1542 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001543 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001544 support loadable extensions in _sqlite module, see
1545 Doc/library/sqlite3.rst (default is no)
1546 --enable-ipv6 enable ipv6 (with ipv4) support, see
1547 Doc/library/socket.rst (default is yes if supported)
1548 --enable-big-digits[=15|30]
1549 use big digits (30 or 15 bits) for Python longs
1550 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001551 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Optional Packages:
1554 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1555 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001556 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001557 specify the kind of universal binary that should be
1558 created. this option is only valid when
1559 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001560 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1561 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001562 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001563 specify the name for the python framework on macOS
1564 only valid when --enable-framework is set. see
1565 Mac/README.rst (default is 'Python')
1566 --with-cxx-main[=COMPILER]
1567 compile main() and link Python executable with C++
1568 compiler specified in COMPILER (default is $CXX)
1569 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1570 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001571 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001572 (default is no)
1573 --with-assertions build with C assertions enabled (default is no)
1574 --with-lto enable Link-Time-Optimization in any build (default
1575 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001576 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001577 select hash algorithm for use in Python/pyhash.c
1578 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001579 --with-tzpath=<list of absolute paths separated by pathsep>
1580 Select the default time zone search path for zoneinfo.TZPATH
1581
Charles-François Natalid30b0222014-05-08 23:08:51 +01001582 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001583 enable AddressSanitizer memory error detector,
1584 'asan' (default is no)
1585 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1586 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001587 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001588 enable UndefinedBehaviorSanitizer undefined
1589 behaviour detector, 'ubsan' (default is no)
1590 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001591 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001592 library, see Doc/library/pyexpat.rst (default is no)
1593 --with-system-ffi build _ctypes module using an installed ffi library,
1594 see Doc/library/ctypes.rst (default is
1595 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001596 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001597 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001598 --with-decimal-contextvar
1599 build _decimal module using a coroutine-local rather
1600 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001601 --with-tcltk-includes='-I...'
1602 override search for Tcl and Tk include files
1603 --with-tcltk-libs='-L...'
1604 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001605 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001606 override order to check db backends for dbm; a valid
1607 value is a colon separated string with the backend
1608 names `ndbm', `gdbm' and `bdb'.
1609 --with-doc-strings enable documentation strings (default is yes)
1610 --with-pymalloc enable specialized mallocs (default is yes)
1611 --with-c-locale-coercion
1612 enable C locale coercion to a UTF-8 based locale
1613 (default is yes)
1614 --with-valgrind enable Valgrind support (default is no)
1615 --with-dtrace enable DTrace support (default is no)
1616 --with-libm=STRING override libm math library to STRING (default is
1617 system-dependent)
1618 --with-libc=STRING override libc C library to STRING (default is
1619 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001620 --with-platlibdir=DIRNAME
1621 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001622 --with-wheel-pkg-dir=PATH
1623 Directory of wheel packages used by ensurepip
1624 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001625 --with(out)-readline[=editline]
1626 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001627 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001628 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001629 --with-ensurepip[=install|upgrade|no]
1630 "install" or "upgrade" using bundled pip (default is
1631 upgrade)
1632 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001633 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001634 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001635 Python's preferred selection (default), openssl:
1636 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001637 custom string, PROTOCOL_SSLv2 ignores the setting,
1638 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001639 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1640 builtin hash modules, md5, sha1, sha256, sha512,
1641 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001642 --with-experimental-isolated-subinterpreters
1643 better isolate subinterpreters, experimental build
1644 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001645 --without-static-libpython
1646 do not build libpythonMAJOR.MINOR.a and do not
1647 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001650 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 CC C compiler command
1652 CFLAGS C compiler flags
1653 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1654 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001656 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001659 PROFILE_TASK
1660 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001661 PKG_CONFIG path to pkg-config utility
1662 PKG_CONFIG_PATH
1663 directories to add to pkg-config's search path
1664 PKG_CONFIG_LIBDIR
1665 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001666
1667Use these variables to override the choices made by `configure' or to help
1668it to find libraries and programs with nonstandard names/locations.
1669
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001670Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001671_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001673fi
1674
1675if test "$ac_init_help" = "recursive"; then
1676 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001677 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 test -d "$ac_dir" ||
1679 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1680 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001681 ac_builddir=.
1682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001683case "$ac_dir" in
1684.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1685*)
Pablo Galindocc128882021-03-01 16:47:53 +00001686 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindocc128882021-03-01 16:47:53 +00001688 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001689 case $ac_top_builddir_sub in
1690 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1691 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1692 esac ;;
1693esac
1694ac_abs_top_builddir=$ac_pwd
1695ac_abs_builddir=$ac_pwd$ac_dir_suffix
1696# for backward compatibility:
1697ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001698
1699case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702 ac_top_srcdir=$ac_top_builddir_sub
1703 ac_abs_top_srcdir=$ac_pwd ;;
1704 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001706 ac_top_srcdir=$srcdir
1707 ac_abs_top_srcdir=$srcdir ;;
1708 *) # Relative name.
1709 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1710 ac_top_srcdir=$ac_top_build_prefix$srcdir
1711 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001712esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001713ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001715 cd "$ac_dir" || { ac_status=$?; continue; }
Pablo Galindocc128882021-03-01 16:47:53 +00001716 # Check for configure.gnu first; this name is used for a wrapper for
1717 # Metaconfig's "Configure" on case-insensitive file systems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 if test -f "$ac_srcdir/configure.gnu"; then
1719 echo &&
1720 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1721 elif test -f "$ac_srcdir/configure"; then
1722 echo &&
1723 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 else
Pablo Galindocc128882021-03-01 16:47:53 +00001725 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001726 fi || ac_status=$?
1727 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 done
1729fi
1730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001732if $ac_init_version; then
1733 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001734python configure 3.10
Pablo Galindocc128882021-03-01 16:47:53 +00001735generated by GNU Autoconf 2.71
Martin v. Löwis11437992002-04-12 09:54:03 +00001736
Pablo Galindocc128882021-03-01 16:47:53 +00001737Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001738This configure script is free software; the Free Software Foundation
1739gives unlimited permission to copy, distribute and modify it.
1740_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001741 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001743
1744## ------------------------ ##
1745## Autoconf initialization. ##
1746## ------------------------ ##
1747
1748# ac_fn_c_try_compile LINENO
1749# --------------------------
1750# Try to compile conftest.$ac_ext, and return whether this succeeded.
1751ac_fn_c_try_compile ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc128882021-03-01 16:47:53 +00001754 rm -f conftest.$ac_objext conftest.beam
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 if { { ac_try="$ac_compile"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00001761printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 (eval "$ac_compile") 2>conftest.err
1763 ac_status=$?
1764 if test -s conftest.err; then
1765 grep -v '^ *+' conftest.err >conftest.er1
1766 cat conftest.er1 >&5
1767 mv -f conftest.er1 conftest.err
1768 fi
Pablo Galindocc128882021-03-01 16:47:53 +00001769 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 test $ac_status = 0; } && {
1771 test -z "$ac_c_werror_flag" ||
1772 test ! -s conftest.err
Pablo Galindocc128882021-03-01 16:47:53 +00001773 } && test -s conftest.$ac_objext
1774then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 ac_retval=0
Pablo Galindocc128882021-03-01 16:47:53 +00001776else $as_nop
1777 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001778sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=1
1781fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001782 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001783 as_fn_set_status $ac_retval
1784
1785} # ac_fn_c_try_compile
1786
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001787# ac_fn_c_try_cpp LINENO
1788# ----------------------
1789# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1790ac_fn_c_try_cpp ()
1791{
1792 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1793 if { { ac_try="$ac_cpp conftest.$ac_ext"
1794case "(($ac_try" in
1795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1796 *) ac_try_echo=$ac_try;;
1797esac
1798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00001799printf "%s\n" "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001800 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1801 ac_status=$?
1802 if test -s conftest.err; then
1803 grep -v '^ *+' conftest.err >conftest.er1
1804 cat conftest.er1 >&5
1805 mv -f conftest.er1 conftest.err
1806 fi
Pablo Galindocc128882021-03-01 16:47:53 +00001807 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001808 test $ac_status = 0; } > conftest.i && {
1809 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1810 test ! -s conftest.err
Pablo Galindocc128882021-03-01 16:47:53 +00001811 }
1812then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001813 ac_retval=0
Pablo Galindocc128882021-03-01 16:47:53 +00001814else $as_nop
1815 printf "%s\n" "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001816sed 's/^/| /' conftest.$ac_ext >&5
1817
1818 ac_retval=1
1819fi
1820 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1821 as_fn_set_status $ac_retval
1822
1823} # ac_fn_c_try_cpp
1824
Matthias Kloseb9621712010-04-24 17:59:49 +00001825# ac_fn_c_try_link LINENO
1826# -----------------------
1827# Try to link conftest.$ac_ext, and return whether this succeeded.
1828ac_fn_c_try_link ()
1829{
1830 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc128882021-03-01 16:47:53 +00001831 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 if { { ac_try="$ac_link"
1833case "(($ac_try" in
1834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1835 *) ac_try_echo=$ac_try;;
1836esac
1837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00001838printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 (eval "$ac_link") 2>conftest.err
1840 ac_status=$?
1841 if test -s conftest.err; then
1842 grep -v '^ *+' conftest.err >conftest.er1
1843 cat conftest.er1 >&5
1844 mv -f conftest.er1 conftest.err
1845 fi
Pablo Galindocc128882021-03-01 16:47:53 +00001846 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 test $ac_status = 0; } && {
1848 test -z "$ac_c_werror_flag" ||
1849 test ! -s conftest.err
1850 } && test -s conftest$ac_exeext && {
1851 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001852 test -x conftest$ac_exeext
Pablo Galindocc128882021-03-01 16:47:53 +00001853 }
1854then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001855 ac_retval=0
Pablo Galindocc128882021-03-01 16:47:53 +00001856else $as_nop
1857 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001858sed 's/^/| /' conftest.$ac_ext >&5
1859
1860 ac_retval=1
1861fi
1862 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1863 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1864 # interfere with the next link command; also delete a directory that is
1865 # left behind by Apple's compiler. We do this before executing the actions.
1866 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001867 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001868 as_fn_set_status $ac_retval
1869
1870} # ac_fn_c_try_link
1871
Pablo Galindocc128882021-03-01 16:47:53 +00001872# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001873# -------------------------------------------------------
Pablo Galindocc128882021-03-01 16:47:53 +00001874# Tests whether HEADER exists and can be compiled using the include files in
1875# INCLUDES, setting the cache variable VAR accordingly.
1876ac_fn_c_check_header_compile ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001877{
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc128882021-03-01 16:47:53 +00001879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1880printf %s "checking for $2... " >&6; }
1881if eval test \${$3+y}
1882then :
1883 printf %s "(cached) " >&6
1884else $as_nop
1885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001886/* end confdefs.h. */
1887$4
1888#include <$2>
1889_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00001890if ac_fn_c_try_compile "$LINENO"
1891then :
1892 eval "$3=yes"
1893else $as_nop
1894 eval "$3=no"
Matthias Kloseb9621712010-04-24 17:59:49 +00001895fi
Pablo Galindocc128882021-03-01 16:47:53 +00001896rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001897fi
1898eval ac_res=\$$3
Pablo Galindocc128882021-03-01 16:47:53 +00001899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1900printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001902
Pablo Galindocc128882021-03-01 16:47:53 +00001903} # ac_fn_c_check_header_compile
Matthias Kloseb9621712010-04-24 17:59:49 +00001904
1905# ac_fn_c_try_run LINENO
1906# ----------------------
Pablo Galindocc128882021-03-01 16:47:53 +00001907# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1908# executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001909ac_fn_c_try_run ()
1910{
1911 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912 if { { ac_try="$ac_link"
1913case "(($ac_try" in
1914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915 *) ac_try_echo=$ac_try;;
1916esac
1917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00001918printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001919 (eval "$ac_link") 2>&5
1920 ac_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00001921 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001922 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1923 { { case "(($ac_try" in
1924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1925 *) ac_try_echo=$ac_try;;
1926esac
1927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00001928printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 (eval "$ac_try") 2>&5
1930 ac_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00001931 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932 test $ac_status = 0; }; }
1933then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001934 ac_retval=0
Pablo Galindocc128882021-03-01 16:47:53 +00001935else $as_nop
1936 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1937 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001938sed 's/^/| /' conftest.$ac_ext >&5
1939
1940 ac_retval=$ac_status
1941fi
1942 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001943 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 as_fn_set_status $ac_retval
1945
1946} # ac_fn_c_try_run
1947
Matthias Kloseb9621712010-04-24 17:59:49 +00001948# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1949# -------------------------------------------
1950# Tests whether TYPE exists after having included INCLUDES, setting cache
1951# variable VAR accordingly.
1952ac_fn_c_check_type ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc128882021-03-01 16:47:53 +00001955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1956printf %s "checking for $2... " >&6; }
1957if eval test \${$3+y}
1958then :
1959 printf %s "(cached) " >&6
1960else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00001961 eval "$3=no"
1962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$4
1965int
Pablo Galindocc128882021-03-01 16:47:53 +00001966main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001967{
1968if (sizeof ($2))
1969 return 0;
1970 ;
1971 return 0;
1972}
1973_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00001974if ac_fn_c_try_compile "$LINENO"
1975then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1977/* end confdefs.h. */
1978$4
1979int
Pablo Galindocc128882021-03-01 16:47:53 +00001980main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001981{
1982if (sizeof (($2)))
1983 return 0;
1984 ;
1985 return 0;
1986}
1987_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00001988if ac_fn_c_try_compile "$LINENO"
1989then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
Pablo Galindocc128882021-03-01 16:47:53 +00001991else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00001992 eval "$3=yes"
1993fi
Pablo Galindocc128882021-03-01 16:47:53 +00001994rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001995fi
Pablo Galindocc128882021-03-01 16:47:53 +00001996rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001997fi
1998eval ac_res=\$$3
Pablo Galindocc128882021-03-01 16:47:53 +00001999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2000printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002001 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003} # ac_fn_c_check_type
2004
Matthias Kloseb9621712010-04-24 17:59:49 +00002005# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2006# --------------------------------------------
2007# Tries to find the compile-time value of EXPR in a program that includes
2008# INCLUDES, setting VAR accordingly. Returns whether the value could be
2009# computed
2010ac_fn_c_compute_int ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 if test "$cross_compiling" = yes; then
2014 # Depending upon the size, compute the lo and hi bounds.
2015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
Pablo Galindocc128882021-03-01 16:47:53 +00002019main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002020{
2021static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002029if ac_fn_c_try_compile "$LINENO"
2030then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002031 ac_lo=0 ac_mid=0
2032 while :; do
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
Pablo Galindocc128882021-03-01 16:47:53 +00002037main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002038{
2039static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002040test_array [0] = 0;
2041return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002042
2043 ;
2044 return 0;
2045}
2046_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002047if ac_fn_c_try_compile "$LINENO"
2048then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002049 ac_hi=$ac_mid; break
Pablo Galindocc128882021-03-01 16:47:53 +00002050else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002051 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2052 if test $ac_lo -le $ac_mid; then
2053 ac_lo= ac_hi=
2054 break
2055 fi
2056 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2057fi
Pablo Galindocc128882021-03-01 16:47:53 +00002058rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002059 done
Pablo Galindocc128882021-03-01 16:47:53 +00002060else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
Pablo Galindocc128882021-03-01 16:47:53 +00002065main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002066{
2067static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002068test_array [0] = 0;
2069return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002070
2071 ;
2072 return 0;
2073}
2074_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002075if ac_fn_c_try_compile "$LINENO"
2076then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002077 ac_hi=-1 ac_mid=-1
2078 while :; do
2079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
2082int
Pablo Galindocc128882021-03-01 16:47:53 +00002083main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002084{
2085static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002086test_array [0] = 0;
2087return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002088
2089 ;
2090 return 0;
2091}
2092_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002093if ac_fn_c_try_compile "$LINENO"
2094then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002095 ac_lo=$ac_mid; break
Pablo Galindocc128882021-03-01 16:47:53 +00002096else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002097 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2098 if test $ac_mid -le $ac_hi; then
2099 ac_lo= ac_hi=
2100 break
2101 fi
2102 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2103fi
Pablo Galindocc128882021-03-01 16:47:53 +00002104rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002105 done
Pablo Galindocc128882021-03-01 16:47:53 +00002106else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002107 ac_lo= ac_hi=
2108fi
Pablo Galindocc128882021-03-01 16:47:53 +00002109rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002110fi
Pablo Galindocc128882021-03-01 16:47:53 +00002111rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002112# Binary search between lo and hi bounds.
2113while test "x$ac_lo" != "x$ac_hi"; do
2114 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
Pablo Galindocc128882021-03-01 16:47:53 +00002119main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002120{
2121static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002122test_array [0] = 0;
2123return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002129if ac_fn_c_try_compile "$LINENO"
2130then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002131 ac_hi=$ac_mid
Pablo Galindocc128882021-03-01 16:47:53 +00002132else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002133 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2134fi
Pablo Galindocc128882021-03-01 16:47:53 +00002135rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002136done
2137case $ac_lo in #((
2138?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2139'') ac_retval=1 ;;
2140esac
2141 else
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
Pablo Galindocc128882021-03-01 16:47:53 +00002145static long int longval (void) { return $2; }
2146static unsigned long int ulongval (void) { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002147#include <stdio.h>
2148#include <stdlib.h>
2149int
Pablo Galindocc128882021-03-01 16:47:53 +00002150main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002151{
2152
2153 FILE *f = fopen ("conftest.val", "w");
2154 if (! f)
2155 return 1;
2156 if (($2) < 0)
2157 {
2158 long int i = longval ();
2159 if (i != ($2))
2160 return 1;
2161 fprintf (f, "%ld", i);
2162 }
2163 else
2164 {
2165 unsigned long int i = ulongval ();
2166 if (i != ($2))
2167 return 1;
2168 fprintf (f, "%lu", i);
2169 }
2170 /* Do not output a trailing newline, as this causes \r\n confusion
2171 on some platforms. */
2172 return ferror (f) || fclose (f) != 0;
2173
2174 ;
2175 return 0;
2176}
2177_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002178if ac_fn_c_try_run "$LINENO"
2179then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Pablo Galindocc128882021-03-01 16:47:53 +00002181else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002182 ac_retval=1
2183fi
2184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2185 conftest.$ac_objext conftest.beam conftest.$ac_ext
2186rm -f conftest.val
2187
2188 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002189 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 as_fn_set_status $ac_retval
2191
2192} # ac_fn_c_compute_int
2193
2194# ac_fn_c_check_func LINENO FUNC VAR
2195# ----------------------------------
2196# Tests whether FUNC exists, setting the cache variable VAR accordingly
2197ac_fn_c_check_func ()
2198{
2199 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc128882021-03-01 16:47:53 +00002200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2201printf %s "checking for $2... " >&6; }
2202if eval test \${$3+y}
2203then :
2204 printf %s "(cached) " >&6
2205else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2207/* end confdefs.h. */
2208/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2209 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2210#define $2 innocuous_$2
2211
2212/* System header to define __stub macros and hopefully few prototypes,
Pablo Galindocc128882021-03-01 16:47:53 +00002213 which can conflict with char $2 (); below. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002214
Pablo Galindocc128882021-03-01 16:47:53 +00002215#include <limits.h>
Matthias Kloseb9621712010-04-24 17:59:49 +00002216#undef $2
2217
2218/* Override any GCC internal prototype to avoid an error.
2219 Use char because int might match the return type of a GCC
2220 builtin and then its argument prototype would still apply. */
2221#ifdef __cplusplus
2222extern "C"
2223#endif
2224char $2 ();
2225/* The GNU C library defines this for functions which it implements
2226 to always fail with ENOSYS. Some functions are actually named
2227 something starting with __ and the normal name is an alias. */
2228#if defined __stub_$2 || defined __stub___$2
2229choke me
2230#endif
2231
2232int
Pablo Galindocc128882021-03-01 16:47:53 +00002233main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002234{
2235return $2 ();
2236 ;
2237 return 0;
2238}
2239_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002240if ac_fn_c_try_link "$LINENO"
2241then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002242 eval "$3=yes"
Pablo Galindocc128882021-03-01 16:47:53 +00002243else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002244 eval "$3=no"
2245fi
Pablo Galindocc128882021-03-01 16:47:53 +00002246rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00002247 conftest$ac_exeext conftest.$ac_ext
2248fi
2249eval ac_res=\$$3
Pablo Galindocc128882021-03-01 16:47:53 +00002250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2251printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002252 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002253
2254} # ac_fn_c_check_func
2255
Pablo Galindocc128882021-03-01 16:47:53 +00002256# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2257# ------------------------------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002258# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Pablo Galindocc128882021-03-01 16:47:53 +00002259# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2260ac_fn_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002261{
2262 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2263 as_decl_name=`echo $2|sed 's/ *(.*//'`
Pablo Galindocc128882021-03-01 16:47:53 +00002264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2265printf %s "checking whether $as_decl_name is declared... " >&6; }
2266if eval test \${$3+y}
2267then :
2268 printf %s "(cached) " >&6
2269else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002270 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Pablo Galindocc128882021-03-01 16:47:53 +00002271 eval ac_save_FLAGS=\$$6
2272 as_fn_append $6 " $5"
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h. */
2275$4
2276int
Pablo Galindocc128882021-03-01 16:47:53 +00002277main (void)
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002278{
2279#ifndef $as_decl_name
2280#ifdef __cplusplus
2281 (void) $as_decl_use;
2282#else
2283 (void) $as_decl_name;
2284#endif
2285#endif
2286
2287 ;
2288 return 0;
2289}
2290_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002291if ac_fn_c_try_compile "$LINENO"
2292then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002293 eval "$3=yes"
Pablo Galindocc128882021-03-01 16:47:53 +00002294else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002295 eval "$3=no"
2296fi
Pablo Galindocc128882021-03-01 16:47:53 +00002297rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2298 eval $6=\$ac_save_FLAGS
2299
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002300fi
2301eval ac_res=\$$3
Pablo Galindocc128882021-03-01 16:47:53 +00002302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303printf "%s\n" "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002304 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2305
Pablo Galindocc128882021-03-01 16:47:53 +00002306} # ac_fn_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002307
Matthias Kloseb9621712010-04-24 17:59:49 +00002308# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2309# ----------------------------------------------------
2310# Tries to find if the field MEMBER exists in type AGGR, after including
2311# INCLUDES, setting cache variable VAR accordingly.
2312ac_fn_c_check_member ()
2313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc128882021-03-01 16:47:53 +00002315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2316printf %s "checking for $2.$3... " >&6; }
2317if eval test \${$4+y}
2318then :
2319 printf %s "(cached) " >&6
2320else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h. */
2323$5
2324int
Pablo Galindocc128882021-03-01 16:47:53 +00002325main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002326{
2327static $2 ac_aggr;
2328if (ac_aggr.$3)
2329return 0;
2330 ;
2331 return 0;
2332}
2333_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002334if ac_fn_c_try_compile "$LINENO"
2335then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002336 eval "$4=yes"
Pablo Galindocc128882021-03-01 16:47:53 +00002337else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h. */
2340$5
2341int
Pablo Galindocc128882021-03-01 16:47:53 +00002342main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002343{
2344static $2 ac_aggr;
2345if (sizeof ac_aggr.$3)
2346return 0;
2347 ;
2348 return 0;
2349}
2350_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00002351if ac_fn_c_try_compile "$LINENO"
2352then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002353 eval "$4=yes"
Pablo Galindocc128882021-03-01 16:47:53 +00002354else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002355 eval "$4=no"
2356fi
Pablo Galindocc128882021-03-01 16:47:53 +00002357rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002358fi
Pablo Galindocc128882021-03-01 16:47:53 +00002359rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002360fi
2361eval ac_res=\$$4
Pablo Galindocc128882021-03-01 16:47:53 +00002362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2363printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002364 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002365
2366} # ac_fn_c_check_member
Pablo Galindocc128882021-03-01 16:47:53 +00002367ac_configure_args_raw=
2368for ac_arg
2369do
2370 case $ac_arg in
2371 *\'*)
2372 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2373 esac
2374 as_fn_append ac_configure_args_raw " '$ac_arg'"
2375done
2376
2377case $ac_configure_args_raw in
2378 *$as_nl*)
2379 ac_safe_unquote= ;;
2380 *)
2381 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2382 ac_unsafe_a="$ac_unsafe_z#~"
2383 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2384 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2385esac
2386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002388This file contains any messages produced by compilers while
2389running configure, to aid debugging if configure makes a mistake.
2390
Pablo Galindod4fe0982020-05-19 03:33:01 +01002391It was created by python $as_me 3.10, which was
Pablo Galindocc128882021-03-01 16:47:53 +00002392generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
Pablo Galindocc128882021-03-01 16:47:53 +00002394 $ $0$ac_configure_args_raw
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002398{
2399cat <<_ASUNAME
2400## --------- ##
2401## Platform. ##
2402## --------- ##
2403
2404hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2405uname -m = `(uname -m) 2>/dev/null || echo unknown`
2406uname -r = `(uname -r) 2>/dev/null || echo unknown`
2407uname -s = `(uname -s) 2>/dev/null || echo unknown`
2408uname -v = `(uname -v) 2>/dev/null || echo unknown`
2409
2410/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2411/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2412
2413/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2414/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2415/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002417/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2418/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2419/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2420
2421_ASUNAME
2422
2423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2424for as_dir in $PATH
2425do
2426 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00002427 case $as_dir in #(((
2428 '') as_dir=./ ;;
2429 */) ;;
2430 *) as_dir=$as_dir/ ;;
2431 esac
2432 printf "%s\n" "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002435
2436} >&5
2437
2438cat >&5 <<_ACEOF
2439
2440
2441## ----------- ##
2442## Core tests. ##
2443## ----------- ##
2444
2445_ACEOF
2446
2447
2448# Keep a trace of the command line.
2449# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002450# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002451# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002452# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002453ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002454ac_configure_args0=
2455ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002456ac_must_keep_next=false
2457for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002458do
Skip Montanaro6dead952003-09-25 14:50:04 +00002459 for ac_arg
2460 do
2461 case $ac_arg in
2462 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2463 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2464 | -silent | --silent | --silen | --sile | --sil)
2465 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 *\'*)
Pablo Galindocc128882021-03-01 16:47:53 +00002467 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 esac
2469 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002471 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002474 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002475 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002476 case $ac_arg in
2477 *=* | --config-cache | -C | -disable-* | --disable-* \
2478 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2479 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2480 | -with-* | --with-* | -without-* | --without-* | --x)
2481 case "$ac_configure_args0 " in
2482 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2483 esac
2484 ;;
2485 -* ) ac_must_keep_next=true ;;
2486 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 ;;
2490 esac
2491 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002492done
Matthias Kloseb9621712010-04-24 17:59:49 +00002493{ ac_configure_args0=; unset ac_configure_args0;}
2494{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002495
2496# When interrupted or exit'd, cleanup temporary files, and complete
2497# config.log. We remove comments because anyway the quotes in there
2498# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499# WARNING: Use '\'' to represent an apostrophe within the trap.
2500# 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 +00002501trap 'exit_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00002502 # Sanitize IFS.
2503 IFS=" "" $as_nl"
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 # Save into config.log some information that might help in debugging.
2505 {
2506 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002507
Pablo Galindocc128882021-03-01 16:47:53 +00002508 printf "%s\n" "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002509## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 echo
2512 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513(
2514 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2515 eval ac_val=\$$ac_var
2516 case $ac_val in #(
2517 *${as_nl}*)
2518 case $ac_var in #(
Pablo Galindocc128882021-03-01 16:47:53 +00002519 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2520printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 esac
2522 case $ac_var in #(
2523 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2525 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 esac ;;
2527 esac
2528 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2531 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 "s/'\''/'\''\\\\'\'''\''/g;
2534 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2535 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002536 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002538 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 esac |
2540 sort
2541)
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002543
Pablo Galindocc128882021-03-01 16:47:53 +00002544 printf "%s\n" "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002545## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002546## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 echo
2548 for ac_var in $ac_subst_vars
2549 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 eval ac_val=\$$ac_var
2551 case $ac_val in
Pablo Galindocc128882021-03-01 16:47:53 +00002552 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 esac
Pablo Galindocc128882021-03-01 16:47:53 +00002554 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 done | sort
2556 echo
2557
2558 if test -n "$ac_subst_files"; then
Pablo Galindocc128882021-03-01 16:47:53 +00002559 printf "%s\n" "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 echo
2563 for ac_var in $ac_subst_files
2564 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 eval ac_val=\$$ac_var
2566 case $ac_val in
Pablo Galindocc128882021-03-01 16:47:53 +00002567 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac
Pablo Galindocc128882021-03-01 16:47:53 +00002569 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 done | sort
2571 echo
2572 fi
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 if test -s confdefs.h; then
Pablo Galindocc128882021-03-01 16:47:53 +00002575 printf "%s\n" "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002576## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 echo
2581 fi
2582 test "$ac_signal" != 0 &&
Pablo Galindocc128882021-03-01 16:47:53 +00002583 printf "%s\n" "$as_me: caught signal $ac_signal"
2584 printf "%s\n" "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 rm -f core *.core core.conftest.* &&
2587 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002590for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002592done
2593ac_signal=0
2594
2595# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597
Pablo Galindocc128882021-03-01 16:47:53 +00002598printf "%s\n" "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600# Predefined preprocessor variables.
2601
Pablo Galindocc128882021-03-01 16:47:53 +00002602printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002603
Pablo Galindocc128882021-03-01 16:47:53 +00002604printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
Pablo Galindocc128882021-03-01 16:47:53 +00002606printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002607
Pablo Galindocc128882021-03-01 16:47:53 +00002608printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002609
Pablo Galindocc128882021-03-01 16:47:53 +00002610printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002611
Pablo Galindocc128882021-03-01 16:47:53 +00002612printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
2615# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002616# Prefer an explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617if test -n "$CONFIG_SITE"; then
Pablo Galindocc128882021-03-01 16:47:53 +00002618 ac_site_files="$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619elif test "x$prefix" != xNONE; then
Pablo Galindocc128882021-03-01 16:47:53 +00002620 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621else
Pablo Galindocc128882021-03-01 16:47:53 +00002622 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002623fi
Pablo Galindocc128882021-03-01 16:47:53 +00002624
2625for ac_site_file in $ac_site_files
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626do
Pablo Galindocc128882021-03-01 16:47:53 +00002627 case $ac_site_file in #(
2628 */*) :
2629 ;; #(
2630 *) :
2631 ac_site_file=./$ac_site_file ;;
2632esac
2633 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2635printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002637 . "$ac_site_file" \
Pablo Galindocc128882021-03-01 16:47:53 +00002638 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2639printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002640as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002641See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002642 fi
2643done
2644
2645if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 # Some versions of bash will fail to source /dev/null (special files
2647 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2648 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Pablo Galindocc128882021-03-01 16:47:53 +00002649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2650printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2653 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 esac
2655 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002656else
Pablo Galindocc128882021-03-01 16:47:53 +00002657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2658printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 >$cache_file
2660fi
2661
Pablo Galindocc128882021-03-01 16:47:53 +00002662# Test code for whether the C compiler supports C89 (global declarations)
2663ac_c_conftest_c89_globals='
2664/* Does the compiler advertise C89 conformance?
2665 Do not test the value of __STDC__, because some compilers set it to 0
2666 while being otherwise adequately conformant. */
2667#if !defined __STDC__
2668# error "Compiler does not advertise C89 conformance"
2669#endif
2670
2671#include <stddef.h>
2672#include <stdarg.h>
2673struct stat;
2674/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2675struct buf { int x; };
2676struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2677static char *e (p, i)
2678 char **p;
2679 int i;
2680{
2681 return p[i];
2682}
2683static char *f (char * (*g) (char **, int), char **p, ...)
2684{
2685 char *s;
2686 va_list v;
2687 va_start (v,p);
2688 s = g (p, va_arg (v,int));
2689 va_end (v);
2690 return s;
2691}
2692
2693/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2694 function prototypes and stuff, but not \xHH hex character constants.
2695 These do not provoke an error unfortunately, instead are silently treated
2696 as an "x". The following induces an error, until -std is added to get
2697 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2698 array size at least. It is necessary to write \x00 == 0 to get something
2699 that is true only with -std. */
2700int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2701
2702/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2703 inside strings and character constants. */
2704#define FOO(x) '\''x'\''
2705int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2706
2707int test (int i, double x);
2708struct s1 {int (*f) (int a);};
2709struct s2 {int (*f) (double a);};
2710int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2711 int, int);'
2712
2713# Test code for whether the C compiler supports C89 (body of main).
2714ac_c_conftest_c89_main='
2715ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2716'
2717
2718# Test code for whether the C compiler supports C99 (global declarations)
2719ac_c_conftest_c99_globals='
2720// Does the compiler advertise C99 conformance?
2721#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2722# error "Compiler does not advertise C99 conformance"
2723#endif
2724
2725#include <stdbool.h>
2726extern int puts (const char *);
2727extern int printf (const char *, ...);
2728extern int dprintf (int, const char *, ...);
2729extern void *malloc (size_t);
2730
2731// Check varargs macros. These examples are taken from C99 6.10.3.5.
2732// dprintf is used instead of fprintf to avoid needing to declare
2733// FILE and stderr.
2734#define debug(...) dprintf (2, __VA_ARGS__)
2735#define showlist(...) puts (#__VA_ARGS__)
2736#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2737static void
2738test_varargs_macros (void)
2739{
2740 int x = 1234;
2741 int y = 5678;
2742 debug ("Flag");
2743 debug ("X = %d\n", x);
2744 showlist (The first, second, and third items.);
2745 report (x>y, "x is %d but y is %d", x, y);
2746}
2747
2748// Check long long types.
2749#define BIG64 18446744073709551615ull
2750#define BIG32 4294967295ul
2751#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2752#if !BIG_OK
2753 #error "your preprocessor is broken"
2754#endif
2755#if BIG_OK
2756#else
2757 #error "your preprocessor is broken"
2758#endif
2759static long long int bignum = -9223372036854775807LL;
2760static unsigned long long int ubignum = BIG64;
2761
2762struct incomplete_array
2763{
2764 int datasize;
2765 double data[];
2766};
2767
2768struct named_init {
2769 int number;
2770 const wchar_t *name;
2771 double average;
2772};
2773
2774typedef const char *ccp;
2775
2776static inline int
2777test_restrict (ccp restrict text)
2778{
2779 // See if C++-style comments work.
2780 // Iterate through items via the restricted pointer.
2781 // Also check for declarations in for loops.
2782 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2783 continue;
2784 return 0;
2785}
2786
2787// Check varargs and va_copy.
2788static bool
2789test_varargs (const char *format, ...)
2790{
2791 va_list args;
2792 va_start (args, format);
2793 va_list args_copy;
2794 va_copy (args_copy, args);
2795
2796 const char *str = "";
2797 int number = 0;
2798 float fnumber = 0;
2799
2800 while (*format)
2801 {
2802 switch (*format++)
2803 {
2804 case '\''s'\'': // string
2805 str = va_arg (args_copy, const char *);
2806 break;
2807 case '\''d'\'': // int
2808 number = va_arg (args_copy, int);
2809 break;
2810 case '\''f'\'': // float
2811 fnumber = va_arg (args_copy, double);
2812 break;
2813 default:
2814 break;
2815 }
2816 }
2817 va_end (args_copy);
2818 va_end (args);
2819
2820 return *str && number && fnumber;
2821}
2822'
2823
2824# Test code for whether the C compiler supports C99 (body of main).
2825ac_c_conftest_c99_main='
2826 // Check bool.
2827 _Bool success = false;
2828 success |= (argc != 0);
2829
2830 // Check restrict.
2831 if (test_restrict ("String literal") == 0)
2832 success = true;
2833 char *restrict newvar = "Another string";
2834
2835 // Check varargs.
2836 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2837 test_varargs_macros ();
2838
2839 // Check flexible array members.
2840 struct incomplete_array *ia =
2841 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2842 ia->datasize = 10;
2843 for (int i = 0; i < ia->datasize; ++i)
2844 ia->data[i] = i * 1.234;
2845
2846 // Check named initializers.
2847 struct named_init ni = {
2848 .number = 34,
2849 .name = L"Test wide string",
2850 .average = 543.34343,
2851 };
2852
2853 ni.number = 58;
2854
2855 int dynamic_array[ni.number];
2856 dynamic_array[0] = argv[0][0];
2857 dynamic_array[ni.number - 1] = 543;
2858
2859 // work around unused variable warnings
2860 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2861 || dynamic_array[ni.number - 1] != 543);
2862'
2863
2864# Test code for whether the C compiler supports C11 (global declarations)
2865ac_c_conftest_c11_globals='
2866// Does the compiler advertise C11 conformance?
2867#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2868# error "Compiler does not advertise C11 conformance"
2869#endif
2870
2871// Check _Alignas.
2872char _Alignas (double) aligned_as_double;
2873char _Alignas (0) no_special_alignment;
2874extern char aligned_as_int;
2875char _Alignas (0) _Alignas (int) aligned_as_int;
2876
2877// Check _Alignof.
2878enum
2879{
2880 int_alignment = _Alignof (int),
2881 int_array_alignment = _Alignof (int[100]),
2882 char_alignment = _Alignof (char)
2883};
2884_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2885
2886// Check _Noreturn.
2887int _Noreturn does_not_return (void) { for (;;) continue; }
2888
2889// Check _Static_assert.
2890struct test_static_assert
2891{
2892 int x;
2893 _Static_assert (sizeof (int) <= sizeof (long int),
2894 "_Static_assert does not work in struct");
2895 long int y;
2896};
2897
2898// Check UTF-8 literals.
2899#define u8 syntax error!
2900char const utf8_literal[] = u8"happens to be ASCII" "another string";
2901
2902// Check duplicate typedefs.
2903typedef long *long_ptr;
2904typedef long int *long_ptr;
2905typedef long_ptr long_ptr;
2906
2907// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2908struct anonymous
2909{
2910 union {
2911 struct { int i; int j; };
2912 struct { int k; long int l; } w;
2913 };
2914 int m;
2915} v1;
2916'
2917
2918# Test code for whether the C compiler supports C11 (body of main).
2919ac_c_conftest_c11_main='
2920 _Static_assert ((offsetof (struct anonymous, i)
2921 == offsetof (struct anonymous, w.k)),
2922 "Anonymous union alignment botch");
2923 v1.i = 2;
2924 v1.w.k = 5;
2925 ok |= v1.i != 5;
2926'
2927
2928# Test code for whether the C compiler supports C11 (complete).
2929ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2930${ac_c_conftest_c99_globals}
2931${ac_c_conftest_c11_globals}
2932
2933int
2934main (int argc, char **argv)
2935{
2936 int ok = 0;
2937 ${ac_c_conftest_c89_main}
2938 ${ac_c_conftest_c99_main}
2939 ${ac_c_conftest_c11_main}
2940 return ok;
2941}
2942"
2943
2944# Test code for whether the C compiler supports C99 (complete).
2945ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2946${ac_c_conftest_c99_globals}
2947
2948int
2949main (int argc, char **argv)
2950{
2951 int ok = 0;
2952 ${ac_c_conftest_c89_main}
2953 ${ac_c_conftest_c99_main}
2954 return ok;
2955}
2956"
2957
2958# Test code for whether the C compiler supports C89 (complete).
2959ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2960
2961int
2962main (int argc, char **argv)
2963{
2964 int ok = 0;
2965 ${ac_c_conftest_c89_main}
2966 return ok;
2967}
2968"
2969
2970as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2971as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2972as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2973as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2974as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2975as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2976as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2977as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2978as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2979as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
2980as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
2981as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2982
2983# Auxiliary files required by this configure script.
2984ac_aux_files="install-sh config.guess config.sub"
2985
2986# Locations in which to look for auxiliary files.
2987ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2988
2989# Search for a directory containing all of the required auxiliary files,
2990# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2991# If we don't find one directory that contains all the files we need,
2992# we report the set of missing files from the *first* directory in
2993# $ac_aux_dir_candidates and give up.
2994ac_missing_aux_files=""
2995ac_first_candidate=:
2996printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998as_found=false
2999for as_dir in $ac_aux_dir_candidates
3000do
3001 IFS=$as_save_IFS
3002 case $as_dir in #(((
3003 '') as_dir=./ ;;
3004 */) ;;
3005 *) as_dir=$as_dir/ ;;
3006 esac
3007 as_found=:
3008
3009 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
3010 ac_aux_dir_found=yes
3011 ac_install_sh=
3012 for ac_aux in $ac_aux_files
3013 do
3014 # As a special case, if "install-sh" is required, that requirement
3015 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3016 # and $ac_install_sh is set appropriately for whichever one is found.
3017 if test x"$ac_aux" = x"install-sh"
3018 then
3019 if test -f "${as_dir}install-sh"; then
3020 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
3021 ac_install_sh="${as_dir}install-sh -c"
3022 elif test -f "${as_dir}install.sh"; then
3023 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
3024 ac_install_sh="${as_dir}install.sh -c"
3025 elif test -f "${as_dir}shtool"; then
3026 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
3027 ac_install_sh="${as_dir}shtool install -c"
3028 else
3029 ac_aux_dir_found=no
3030 if $ac_first_candidate; then
3031 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3032 else
3033 break
3034 fi
3035 fi
3036 else
3037 if test -f "${as_dir}${ac_aux}"; then
3038 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3039 else
3040 ac_aux_dir_found=no
3041 if $ac_first_candidate; then
3042 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3043 else
3044 break
3045 fi
3046 fi
3047 fi
3048 done
3049 if test "$ac_aux_dir_found" = yes; then
3050 ac_aux_dir="$as_dir"
3051 break
3052 fi
3053 ac_first_candidate=false
3054
3055 as_found=false
3056done
3057IFS=$as_save_IFS
3058if $as_found
3059then :
3060
3061else $as_nop
3062 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3063fi
3064
3065
3066# These three variables are undocumented and unsupported,
3067# and are intended to be withdrawn in a future Autoconf release.
3068# They can cause serious problems if a builder's source tree is in a directory
3069# whose full name contains unusual characters.
3070if test -f "${ac_aux_dir}config.guess"; then
3071 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3072fi
3073if test -f "${ac_aux_dir}config.sub"; then
3074 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3075fi
3076if test -f "$ac_aux_dir/configure"; then
3077 ac_configure="$SHELL ${ac_aux_dir}configure"
3078fi
3079
Martin v. Löwis11437992002-04-12 09:54:03 +00003080# Check that the precious variables saved in the cache have kept the same
3081# value.
3082ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003083for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00003084 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3085 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003086 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3087 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00003088 case $ac_old_set,$ac_new_set in
3089 set,)
Pablo Galindocc128882021-03-01 16:47:53 +00003090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3091printf "%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 +00003092 ac_cache_corrupted=: ;;
3093 ,set)
Pablo Galindocc128882021-03-01 16:47:53 +00003094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3095printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003096 ac_cache_corrupted=: ;;
3097 ,);;
3098 *)
3099 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003100 # differences in whitespace do not lead to failure.
3101 ac_old_val_w=`echo x $ac_old_val`
3102 ac_new_val_w=`echo x $ac_new_val`
3103 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Pablo Galindocc128882021-03-01 16:47:53 +00003104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3105printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003106 ac_cache_corrupted=:
3107 else
Pablo Galindocc128882021-03-01 16:47:53 +00003108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3109printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003110 eval $ac_var=\$ac_old_val
3111 fi
Pablo Galindocc128882021-03-01 16:47:53 +00003112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3113printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3115printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003116 fi;;
3117 esac
3118 # Pass precious variables to config.status.
3119 if test "$ac_new_set" = set; then
3120 case $ac_new_val in
Pablo Galindocc128882021-03-01 16:47:53 +00003121 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003122 *) ac_arg=$ac_var=$ac_new_val ;;
3123 esac
3124 case " $ac_configure_args " in
3125 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00003126 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003127 esac
3128 fi
3129done
3130if $ac_cache_corrupted; then
Pablo Galindocc128882021-03-01 16:47:53 +00003131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3132printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3134printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3135 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3136 and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003138## -------------------- ##
3139## Main body of script. ##
3140## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141
Guido van Rossum7f43da71994-08-01 12:15:30 +00003142ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003143ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00003144ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3145ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3146ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147
Guido van Rossum627b2d71993-12-24 10:39:16 +00003148
Michael W. Hudson54241132001-12-07 15:38:26 +00003149
Trent Nelson4d4ec652012-10-16 08:51:24 -04003150
Christian Heimesff5be6e2018-01-20 13:19:21 +01003151
3152
Martin Panterc5ee3ca2016-09-12 01:32:03 +00003153if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04003154 # If we're building out-of-tree, we need to make sure the following
3155 # resources get picked up before their $srcdir counterparts.
3156 # Objects/ -> typeslots.inc
Lysandros Nikolaou314858e2020-06-20 21:07:25 +03003157 # Include/ -> Python-ast.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04003158 # Python/ -> importlib.h
3159 # (A side effect of this is that these resources will automatically be
3160 # regenerated when building out-of-tree, regardless of whether or not
3161 # the $srcdir counterpart is up-to-date. This is an acceptable trade
3162 # off.)
3163 BASECPPFLAGS="-IObjects -IInclude -IPython"
3164else
3165 BASECPPFLAGS=""
3166fi
3167
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003168
3169
3170
3171
Victor Stinner9ed34a82017-05-02 22:35:58 +02003172if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003173then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003174# Extract the first word of "git", so it can be a program name with args.
3175set dummy git; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00003176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3177printf %s "checking for $ac_word... " >&6; }
3178if test ${ac_cv_prog_HAS_GIT+y}
3179then :
3180 printf %s "(cached) " >&6
3181else $as_nop
Ned Deily5c4b0d02017-03-04 00:19:55 -05003182 if test -n "$HAS_GIT"; then
3183 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003184else
3185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00003189 case $as_dir in #(((
3190 '') as_dir=./ ;;
3191 */) ;;
3192 *) as_dir=$as_dir/ ;;
3193 esac
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003194 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00003195 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003196 ac_cv_prog_HAS_GIT="found"
Pablo Galindocc128882021-03-01 16:47:53 +00003197 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003198 break 2
3199 fi
3200done
3201 done
3202IFS=$as_save_IFS
3203
Ned Deily5c4b0d02017-03-04 00:19:55 -05003204 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003205fi
3206fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003207HAS_GIT=$ac_cv_prog_HAS_GIT
3208if test -n "$HAS_GIT"; then
Pablo Galindocc128882021-03-01 16:47:53 +00003209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
3210printf "%s\n" "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003211else
Pablo Galindocc128882021-03-01 16:47:53 +00003212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3213printf "%s\n" "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003214fi
3215
3216
3217else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003218HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003219fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003220if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003221then
Xiang Zhang4c855572018-08-20 22:36:19 +08003222 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
3223 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
3224 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003225else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003226 GITVERSION=""
3227 GITTAG=""
3228 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003229fi
3230
3231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003233
3234
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003235
3236
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003237
Pablo Galindocc128882021-03-01 16:47:53 +00003238 # Make sure we can run config.sub.
3239$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3240 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3241
3242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3243printf %s "checking build system type... " >&6; }
3244if test ${ac_cv_build+y}
3245then :
3246 printf %s "(cached) " >&6
3247else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003248 ac_build_alias=$build_alias
3249test "x$ac_build_alias" = x &&
Pablo Galindocc128882021-03-01 16:47:53 +00003250 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003251test "x$ac_build_alias" = x &&
3252 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Pablo Galindocc128882021-03-01 16:47:53 +00003253ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3254 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003255
3256fi
Pablo Galindocc128882021-03-01 16:47:53 +00003257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3258printf "%s\n" "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003259case $ac_cv_build in
3260*-*-*) ;;
3261*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3262esac
3263build=$ac_cv_build
3264ac_save_IFS=$IFS; IFS='-'
3265set x $ac_cv_build
3266shift
3267build_cpu=$1
3268build_vendor=$2
3269shift; shift
3270# Remember, the first character of IFS is used to create $*,
3271# except with old shells:
3272build_os=$*
3273IFS=$ac_save_IFS
3274case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3275
3276
Pablo Galindocc128882021-03-01 16:47:53 +00003277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3278printf %s "checking host system type... " >&6; }
3279if test ${ac_cv_host+y}
3280then :
3281 printf %s "(cached) " >&6
3282else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003283 if test "x$host_alias" = x; then
3284 ac_cv_host=$ac_cv_build
3285else
Pablo Galindocc128882021-03-01 16:47:53 +00003286 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3287 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003288fi
3289
3290fi
Pablo Galindocc128882021-03-01 16:47:53 +00003291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3292printf "%s\n" "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003293case $ac_cv_host in
3294*-*-*) ;;
3295*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3296esac
3297host=$ac_cv_host
3298ac_save_IFS=$IFS; IFS='-'
3299set x $ac_cv_host
3300shift
3301host_cpu=$1
3302host_vendor=$2
3303shift; shift
3304# Remember, the first character of IFS is used to create $*,
3305# except with old shells:
3306host_os=$*
3307IFS=$ac_save_IFS
3308case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3309
3310
3311
doko@python.orga10e4a92013-01-25 18:45:12 +01003312
3313
Ned Deilyfcbc2462014-08-22 13:32:49 -07003314# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
3315rm -f pybuilddir.txt
3316
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003317for ac_prog in python$PACKAGE_VERSION python3 python
3318do
3319 # Extract the first word of "$ac_prog", so it can be a program name with args.
3320set dummy $ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00003321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3322printf %s "checking for $ac_word... " >&6; }
3323if test ${ac_cv_prog_PYTHON_FOR_REGEN+y}
3324then :
3325 printf %s "(cached) " >&6
3326else $as_nop
Victor Stinnera5c62a82017-05-03 18:21:48 +02003327 if test -n "$PYTHON_FOR_REGEN"; then
3328 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003329else
3330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00003334 case $as_dir in #(((
3335 '') as_dir=./ ;;
3336 */) ;;
3337 *) as_dir=$as_dir/ ;;
3338 esac
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003339 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00003340 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02003341 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00003342 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 +02003343 break 2
3344 fi
3345done
3346 done
3347IFS=$as_save_IFS
3348
3349fi
3350fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02003351PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
3352if test -n "$PYTHON_FOR_REGEN"; then
Pablo Galindocc128882021-03-01 16:47:53 +00003353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
3354printf "%s\n" "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003355else
Pablo Galindocc128882021-03-01 16:47:53 +00003356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3357printf "%s\n" "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003358fi
3359
3360
Victor Stinnera5c62a82017-05-03 18:21:48 +02003361 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003362done
Victor Stinnera5c62a82017-05-03 18:21:48 +02003363test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003364
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003365
3366
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003367if test "$cross_compiling" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00003368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3369printf %s "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003370 if test -z "$PYTHON_FOR_BUILD"; then
3371 for interp in python$PACKAGE_VERSION python3 python; do
3372 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003373 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 +02003374 break
3375 fi
3376 interp=
3377 done
3378 if test x$interp = x; then
3379 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3380 fi
Pablo Galindocc128882021-03-01 16:47:53 +00003381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3382printf "%s\n" "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003383 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 +02003384 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003385elif test "$cross_compiling" = maybe; then
3386 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003387else
3388 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3389fi
3390
3391
Martin v. Löwis11437992002-04-12 09:54:03 +00003392
Benjamin Petersond23f8222009-04-05 19:13:16 +00003393if test "$prefix" != "/"; then
3394 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3395fi
3396
3397
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
3399
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003400# We don't use PACKAGE_ variables, and they cause conflicts
3401# with other autoconf-based packages that include Python.h
3402grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3403rm confdefs.h
3404mv confdefs.h.new confdefs.h
3405
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003406
Pablo Galindod4fe0982020-05-19 03:33:01 +01003407VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003408
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003409# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003410
3411SOVERSION=1.0
3412
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003413# The later defininition of _XOPEN_SOURCE disables certain features
3414# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3415
Pablo Galindocc128882021-03-01 16:47:53 +00003416printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003417
3418
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003419# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3420# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3421# them.
3422
Pablo Galindocc128882021-03-01 16:47:53 +00003423printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003424
3425
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003426# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3427# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3428# them.
3429
Pablo Galindocc128882021-03-01 16:47:53 +00003430printf "%s\n" "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003431
3432
Martin v. Löwisd6320502004-08-12 13:45:08 +00003433# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003434# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3435# them.
3436
Pablo Galindocc128882021-03-01 16:47:53 +00003437printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003438
3439
3440
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003441define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003442
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003443# Arguments passed to configure.
3444
3445CONFIG_ARGS="$ac_configure_args"
3446
Pablo Galindocc128882021-03-01 16:47:53 +00003447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3448printf %s "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449# Check whether --enable-universalsdk was given.
Pablo Galindocc128882021-03-01 16:47:53 +00003450if test ${enable_universalsdk+y}
3451then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003453 case $enableval in
3454 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003455 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003456 # information
3457 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003458 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003459 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003460 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3461 if test ! -d "${enableval}"
3462 then
3463 enableval=/
3464 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003465 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003466 ;;
3467 esac
3468 case $enableval in
3469 no)
3470 UNIVERSALSDK=
3471 enable_universalsdk=
3472 ;;
3473 *)
3474 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003475 if test ! -d "${UNIVERSALSDK}"
3476 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003477 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003478 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003479 ;;
3480 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003481
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003482
Pablo Galindocc128882021-03-01 16:47:53 +00003483else $as_nop
Thomas Wouters477c8d52006-05-27 19:21:47 +00003484
3485 UNIVERSALSDK=
3486 enable_universalsdk=
3487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003489
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003490if test -n "${UNIVERSALSDK}"
3491then
Pablo Galindocc128882021-03-01 16:47:53 +00003492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3493printf "%s\n" "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003494else
Pablo Galindocc128882021-03-01 16:47:53 +00003495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3496printf "%s\n" "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003497fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003499
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003500
Ned Deily87adb6e2013-10-18 21:09:56 -07003501ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003502
Ned Deilycbfb9a52012-06-23 16:02:19 -07003503# For backward compatibility reasons we prefer to select '32-bit' if available,
3504# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003505UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003506if test "`uname -s`" = "Darwin"
3507then
3508 if test -n "${UNIVERSALSDK}"
3509 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003510 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003511 then
3512 UNIVERSAL_ARCHS="intel"
3513 fi
3514 fi
3515fi
3516
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003517
Pablo Galindocc128882021-03-01 16:47:53 +00003518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3519printf %s "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003520
3521# Check whether --with-universal-archs was given.
Pablo Galindocc128882021-03-01 16:47:53 +00003522if test ${with_universal_archs+y}
3523then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003524 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003525 UNIVERSAL_ARCHS="$withval"
3526
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003527fi
3528
Ned Deily87adb6e2013-10-18 21:09:56 -07003529if test -n "${UNIVERSALSDK}"
3530then
Pablo Galindocc128882021-03-01 16:47:53 +00003531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3532printf "%s\n" "${UNIVERSAL_ARCHS}" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003533else
Pablo Galindocc128882021-03-01 16:47:53 +00003534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3535printf "%s\n" "no" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07003536fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003537
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003538
3539# Check whether --with-framework-name was given.
Pablo Galindocc128882021-03-01 16:47:53 +00003540if test ${with_framework_name+y}
3541then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003542 withval=$with_framework_name;
3543 PYTHONFRAMEWORK=${withval}
3544 PYTHONFRAMEWORKDIR=${withval}.framework
3545 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3546
Pablo Galindocc128882021-03-01 16:47:53 +00003547else $as_nop
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003548
3549 PYTHONFRAMEWORK=Python
3550 PYTHONFRAMEWORKDIR=Python.framework
3551 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3552
3553fi
3554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555# Check whether --enable-framework was given.
Pablo Galindocc128882021-03-01 16:47:53 +00003556if test ${enable_framework+y}
3557then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003559 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003561 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003562 esac
3563 case $enableval in
3564 no)
3565 PYTHONFRAMEWORK=
3566 PYTHONFRAMEWORKDIR=no-framework
3567 PYTHONFRAMEWORKPREFIX=
3568 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003569 FRAMEWORKINSTALLFIRST=
3570 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003571 FRAMEWORKALTINSTALLFIRST=
3572 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003573 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003574 if test "x${prefix}" = "xNONE"; then
3575 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3576 else
3577 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3578 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003579 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003580 ;;
3581 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003582 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003583 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003584 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003585 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003586 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3587 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003588 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003589 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003590
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003591 if test "x${prefix}" = "xNONE" ; then
3592 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003593
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003594 else
3595 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3596 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003597
3598 case "${enableval}" in
3599 /System*)
3600 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3601 if test "${prefix}" = "NONE" ; then
3602 # See below
3603 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3604 fi
3605 ;;
3606
3607 /Library*)
3608 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3609 ;;
3610
3611 */Library/Frameworks)
3612 MDIR="`dirname "${enableval}"`"
3613 MDIR="`dirname "${MDIR}"`"
3614 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3615
3616 if test "${prefix}" = "NONE"; then
3617 # User hasn't specified the
3618 # --prefix option, but wants to install
3619 # the framework in a non-default location,
3620 # ensure that the compatibility links get
3621 # installed relative to that prefix as well
3622 # instead of in /usr/local.
3623 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3624 fi
3625 ;;
3626
3627 *)
3628 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3629 ;;
3630 esac
3631
Jack Jansen127e56e2001-09-11 14:41:54 +00003632 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003633
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003634 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003635 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003639
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003640 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3641
3642 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3643
Jack Jansene578a632001-08-15 01:27:14 +00003644 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003645
Pablo Galindocc128882021-03-01 16:47:53 +00003646else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00003647
Jack Jansene578a632001-08-15 01:27:14 +00003648 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003649 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003650 PYTHONFRAMEWORKPREFIX=
3651 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003652 FRAMEWORKINSTALLFIRST=
3653 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003654 FRAMEWORKALTINSTALLFIRST=
3655 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003656 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003657 if test "x${prefix}" = "xNONE" ; then
3658 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3659 else
3660 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3661 fi
Jack Jansene578a632001-08-15 01:27:14 +00003662 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003663
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665fi
3666
Thomas Wouters477c8d52006-05-27 19:21:47 +00003667
3668
Michael W. Hudson54241132001-12-07 15:38:26 +00003669
3670
3671
3672
Jack Jansene578a632001-08-15 01:27:14 +00003673
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003674
3675
3676
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003677
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003678
Ned Deilyb8f944f2013-11-21 22:42:25 -08003679
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003680
Pablo Galindocc128882021-03-01 16:47:53 +00003681printf "%s\n" "#define _PYTHONFRAMEWORK \"${PYTHONFRAMEWORK}\"" >>confdefs.h
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003682
3683
Jack Jansene578a632001-08-15 01:27:14 +00003684##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003685## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003686## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003687##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003688# Set name for machine-dependent library files
3689
Pablo Galindocc128882021-03-01 16:47:53 +00003690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3691printf %s "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003692if test -z "$MACHDEP"
3693then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003694 # avoid using uname for cross builds
3695 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003696 # ac_sys_system and ac_sys_release are used for setting
3697 # a lot of different things including 'define_xopen_source'
3698 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003699 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003700 *-*-linux-android*)
3701 ac_sys_system=Linux-android
3702 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003703 *-*-linux*)
3704 ac_sys_system=Linux
3705 ;;
3706 *-*-cygwin*)
3707 ac_sys_system=Cygwin
3708 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003709 *-*-vxworks*)
3710 ac_sys_system=VxWorks
3711 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003712 *)
3713 # for now, limit cross builds to known configurations
3714 MACHDEP="unknown"
3715 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3716 esac
3717 ac_sys_release=
3718 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003719 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003720 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003721 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003722 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003723 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003724 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003725 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003726 fi
3727 ac_md_system=`echo $ac_sys_system |
3728 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3729 ac_md_release=`echo $ac_sys_release |
3730 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3731 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003732
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003733 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003734 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003735 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003736 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003737 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003738 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003739 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003740fi
Pablo Galindocc128882021-03-01 16:47:53 +00003741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3742printf "%s\n" "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003743
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003744
3745if test "$cross_compiling" = yes; then
3746 case "$host" in
3747 *-*-linux*)
3748 case "$host_cpu" in
3749 arm*)
3750 _host_cpu=arm
3751 ;;
3752 *)
3753 _host_cpu=$host_cpu
3754 esac
3755 ;;
3756 *-*-cygwin*)
3757 _host_cpu=
3758 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003759 *-*-vxworks*)
3760 _host_cpu=$host_cpu
3761 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003762 *)
3763 # for now, limit cross builds to known configurations
3764 MACHDEP="unknown"
3765 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3766 esac
3767 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3768fi
3769
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003770# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3771# disable features if it is defined, without any means to access these
3772# features as extensions. For these systems, we skip the definition of
3773# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3774# some feature, make sure there is no alternative way to access this
3775# feature. Also, when using wildcards, make sure you have verified the
3776# need for not defining _XOPEN_SOURCE on all systems matching the
3777# wildcard, and that the wildcard does not include future systems
3778# (which may remove their limitations).
3779case $ac_sys_system/$ac_sys_release in
3780 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3781 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003782 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003783 # In addition, Stefan Krah confirms that issue #1244610 exists through
3784 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003785 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003786 define_xopen_source=no
3787 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3788 # also defined. This can be overridden by defining _BSD_SOURCE
3789 # As this has a different meaning on Linux, only define it on OpenBSD
3790
Pablo Galindocc128882021-03-01 16:47:53 +00003791printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003792
3793 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003794 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003795 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3796 # also defined. This can be overridden by defining _BSD_SOURCE
3797 # As this has a different meaning on Linux, only define it on OpenBSD
3798
Pablo Galindocc128882021-03-01 16:47:53 +00003799printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003800
3801 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003802 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3803 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3804 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003805 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 +00003806 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003807 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3808 # request to enable features supported by the standard as a request
3809 # to disable features not supported by the standard. The best way
3810 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3811 # entirely and define __EXTENSIONS__ instead.
3812 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003813 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003814 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3815 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003816 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003817 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003818 define_xopen_source=no;;
3819 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003820 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003821 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003822 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003823 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3824 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3825 # identifies itself as Darwin/7.*
3826 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3827 # disables platform specific features beyond repair.
3828 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3829 # has no effect, don't bother defining them
3830 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003831 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003832 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003833 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003834 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3835 # defining NI_NUMERICHOST.
3836 QNX/6.3.2)
3837 define_xopen_source=no
3838 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003839 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3840 # in network headers still using system V types.
3841 VxWorks/*)
3842 define_xopen_source=no
3843 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003844
Ian Nortona9edf442020-02-14 03:09:11 +00003845 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3846 # chroot() and other functions
3847 hp*|HP*)
3848 define_xopen_source=no
3849 ;;
3850
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003851esac
3852
3853if test $define_xopen_source = yes
3854then
Victor Stinner14d098d2011-09-07 22:29:43 +02003855 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003856
Pablo Galindocc128882021-03-01 16:47:53 +00003857printf "%s\n" "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003858
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003859
3860 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3861 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3862 # several APIs are not declared. Since this is also needed in some
3863 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003864
Pablo Galindocc128882021-03-01 16:47:53 +00003865printf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003866
3867
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003868
Pablo Galindocc128882021-03-01 16:47:53 +00003869printf "%s\n" "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003870
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003871fi
3872
Christian Heimes647cd872013-12-07 23:39:33 +01003873# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3874case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003875 hp*|HP*)
3876 define_stdc_a1=yes;;
3877 *)
3878 define_stdc_a1=no;;
3879esac
3880
3881if test $define_stdc_a1 = yes
3882then
Christian Heimes647cd872013-12-07 23:39:33 +01003883
Pablo Galindocc128882021-03-01 16:47:53 +00003884printf "%s\n" "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
Christian Heimes647cd872013-12-07 23:39:33 +01003885
Christian Heimesb02bcae2013-12-08 15:21:08 +01003886fi
Christian Heimes647cd872013-12-07 23:39:33 +01003887
Jack Jansen6b08a402004-06-03 12:41:45 +00003888# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3889# it may influence the way we can build extensions, so distutils
3890# needs to check it
3891
Thomas Wouters477c8d52006-05-27 19:21:47 +00003892
Jack Jansen6b08a402004-06-03 12:41:45 +00003893CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003894EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003895
Guido van Rossum627b2d71993-12-24 10:39:16 +00003896# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003897
3898# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3899# for debug/optimization stuff. BASECFLAGS is for flags that are required
3900# just to get things to compile and link. Users are free to override OPT
3901# when running configure or make. The build should not break if they do.
3902# BASECFLAGS should generally not be messed with, however.
3903
Guido van Rossum8b131c51995-03-09 14:10:13 +00003904# If the user switches compilers, we can't believe the cache
3905if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3906then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003907 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003908(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003909fi
3910
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003911# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3912# when the compiler supports them, but we don't always want -O2, and
3913# we set -g later.
3914if test -z "$CFLAGS"; then
3915 CFLAGS=
3916fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003917
3918if test "$ac_sys_system" = "Darwin"
3919then
3920 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003921 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003922 # information
3923 if test -z "${CC}"
3924 then
3925 found_gcc=
3926 found_clang=
3927 as_save_IFS=$IFS; IFS=:
3928 for as_dir in $PATH
3929 do
3930 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003931 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003932 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003933 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003934 fi
3935 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003936 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003937 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003938 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003939 fi
3940 fi
3941 done
3942 IFS=$as_save_IFS
3943
3944 if test -n "$found_gcc" -a -n "$found_clang"
3945 then
3946 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3947 then
Pablo Galindocc128882021-03-01 16:47:53 +00003948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3949printf "%s\n" "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003950 CC="$found_clang"
3951 CXX="$found_clang++"
3952 fi
3953
3954
3955 elif test -z "$found_gcc" -a -n "$found_clang"
3956 then
Pablo Galindocc128882021-03-01 16:47:53 +00003957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3958printf "%s\n" "$as_me: No GCC found, use CLANG" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003959 CC="$found_clang"
3960 CXX="$found_clang++"
3961
3962 elif test -z "$found_gcc" -a -z "$found_clang"
3963 then
3964 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3965 if test -n "${found_clang}"
3966 then
Pablo Galindocc128882021-03-01 16:47:53 +00003967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3968printf "%s\n" "$as_me: Using clang from Xcode.app" >&6;}
Ned Deilycbfb9a52012-06-23 16:02:19 -07003969 CC="${found_clang}"
3970 CXX="`/usr/bin/xcrun -find clang++`"
3971
3972 # else: use default behaviour
3973 fi
3974 fi
3975 fi
3976fi
Pablo Galindocc128882021-03-01 16:47:53 +00003977
3978
3979
3980
3981
3982
3983
3984
3985
Martin v. Löwis11437992002-04-12 09:54:03 +00003986ac_ext=c
3987ac_cpp='$CPP $CPPFLAGS'
3988ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3989ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3990ac_compiler_gnu=$ac_cv_c_compiler_gnu
3991if test -n "$ac_tool_prefix"; then
3992 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3993set dummy ${ac_tool_prefix}gcc; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00003994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3995printf %s "checking for $ac_word... " >&6; }
3996if test ${ac_cv_prog_CC+y}
3997then :
3998 printf %s "(cached) " >&6
3999else $as_nop
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004000 if test -n "$CC"; then
4001 ac_cv_prog_CC="$CC" # Let the user override the test.
4002else
Martin v. Löwis11437992002-04-12 09:54:03 +00004003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4004for as_dir in $PATH
4005do
4006 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00004007 case $as_dir in #(((
4008 '') as_dir=./ ;;
4009 */) ;;
4010 *) as_dir=$as_dir/ ;;
4011 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00004013 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004014 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Pablo Galindocc128882021-03-01 16:47:53 +00004015 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 +00004016 break 2
4017 fi
4018done
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004021
Jack Jansendd19cf82001-12-06 22:36:17 +00004022fi
4023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004024CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00004025if test -n "$CC"; then
Pablo Galindocc128882021-03-01 16:47:53 +00004026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4027printf "%s\n" "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004028else
Pablo Galindocc128882021-03-01 16:47:53 +00004029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4030printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004031fi
4032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033
Martin v. Löwis11437992002-04-12 09:54:03 +00004034fi
4035if test -z "$ac_cv_prog_CC"; then
4036 ac_ct_CC=$CC
4037 # Extract the first word of "gcc", so it can be a program name with args.
4038set dummy gcc; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00004039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4040printf %s "checking for $ac_word... " >&6; }
4041if test ${ac_cv_prog_ac_ct_CC+y}
4042then :
4043 printf %s "(cached) " >&6
4044else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004045 if test -n "$ac_ct_CC"; then
4046 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4047else
4048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4049for as_dir in $PATH
4050do
4051 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00004052 case $as_dir in #(((
4053 '') as_dir=./ ;;
4054 */) ;;
4055 *) as_dir=$as_dir/ ;;
4056 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00004058 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 ac_cv_prog_ac_ct_CC="gcc"
Pablo Galindocc128882021-03-01 16:47:53 +00004060 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 +00004061 break 2
4062 fi
4063done
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004065IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004066
4067fi
4068fi
4069ac_ct_CC=$ac_cv_prog_ac_ct_CC
4070if test -n "$ac_ct_CC"; then
Pablo Galindocc128882021-03-01 16:47:53 +00004071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4072printf "%s\n" "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004073else
Pablo Galindocc128882021-03-01 16:47:53 +00004074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4075printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004076fi
4077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078 if test "x$ac_ct_CC" = x; then
4079 CC=""
4080 else
4081 case $cross_compiling:$ac_tool_warned in
4082yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00004083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4084printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085ac_tool_warned=yes ;;
4086esac
4087 CC=$ac_ct_CC
4088 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004089else
4090 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00004091fi
4092
Jack Jansendd19cf82001-12-06 22:36:17 +00004093if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 if test -n "$ac_tool_prefix"; then
4095 # 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 +00004096set dummy ${ac_tool_prefix}cc; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00004097{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4098printf %s "checking for $ac_word... " >&6; }
4099if test ${ac_cv_prog_CC+y}
4100then :
4101 printf %s "(cached) " >&6
4102else $as_nop
Jack Jansendd19cf82001-12-06 22:36:17 +00004103 if test -n "$CC"; then
4104 ac_cv_prog_CC="$CC" # Let the user override the test.
4105else
Martin v. Löwis11437992002-04-12 09:54:03 +00004106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4107for as_dir in $PATH
4108do
4109 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00004110 case $as_dir in #(((
4111 '') as_dir=./ ;;
4112 */) ;;
4113 *) as_dir=$as_dir/ ;;
4114 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00004116 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004117 ac_cv_prog_CC="${ac_tool_prefix}cc"
Pablo Galindocc128882021-03-01 16:47:53 +00004118 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 +00004119 break 2
4120 fi
4121done
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004124
4125fi
4126fi
4127CC=$ac_cv_prog_CC
4128if test -n "$CC"; then
Pablo Galindocc128882021-03-01 16:47:53 +00004129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4130printf "%s\n" "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004131else
Pablo Galindocc128882021-03-01 16:47:53 +00004132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
4135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004138fi
4139if test -z "$CC"; then
4140 # Extract the first word of "cc", so it can be a program name with args.
4141set dummy cc; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00004142{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4143printf %s "checking for $ac_word... " >&6; }
4144if test ${ac_cv_prog_CC+y}
4145then :
4146 printf %s "(cached) " >&6
4147else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 if test -n "$CC"; then
4149 ac_cv_prog_CC="$CC" # Let the user override the test.
4150else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004151 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4153for as_dir in $PATH
4154do
4155 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00004156 case $as_dir in #(((
4157 '') as_dir=./ ;;
4158 */) ;;
4159 *) as_dir=$as_dir/ ;;
4160 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00004162 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4163 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 ac_prog_rejected=yes
4165 continue
4166 fi
4167 ac_cv_prog_CC="cc"
Pablo Galindocc128882021-03-01 16:47:53 +00004168 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 +00004169 break 2
4170 fi
4171done
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004174
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004175if test $ac_prog_rejected = yes; then
4176 # We found a bogon in the path, so make sure we never use it.
4177 set dummy $ac_cv_prog_CC
4178 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004180 # We chose a different compiler from the bogus one.
4181 # However, it has the same basename, so the bogon will be chosen
4182 # first if we set CC to just the basename; use the full file name.
4183 shift
Pablo Galindocc128882021-03-01 16:47:53 +00004184 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004185 fi
4186fi
4187fi
4188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004189CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004190if test -n "$CC"; then
Pablo Galindocc128882021-03-01 16:47:53 +00004191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4192printf "%s\n" "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004193else
Pablo Galindocc128882021-03-01 16:47:53 +00004194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4195printf "%s\n" "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004196fi
4197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198
Martin v. Löwis11437992002-04-12 09:54:03 +00004199fi
4200if test -z "$CC"; then
4201 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 do
4204 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4205set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00004206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4207printf %s "checking for $ac_word... " >&6; }
4208if test ${ac_cv_prog_CC+y}
4209then :
4210 printf %s "(cached) " >&6
4211else $as_nop
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212 if test -n "$CC"; then
4213 ac_cv_prog_CC="$CC" # Let the user override the test.
4214else
Martin v. Löwis11437992002-04-12 09:54:03 +00004215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216for as_dir in $PATH
4217do
4218 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00004219 case $as_dir in #(((
4220 '') as_dir=./ ;;
4221 */) ;;
4222 *) as_dir=$as_dir/ ;;
4223 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00004225 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00004227 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 +00004228 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00004229 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004230done
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
4234fi
4235fi
4236CC=$ac_cv_prog_CC
4237if test -n "$CC"; then
Pablo Galindocc128882021-03-01 16:47:53 +00004238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4239printf "%s\n" "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004240else
Pablo Galindocc128882021-03-01 16:47:53 +00004241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242printf "%s\n" "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004243fi
4244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245
Martin v. Löwis11437992002-04-12 09:54:03 +00004246 test -n "$CC" && break
4247 done
4248fi
4249if test -z "$CC"; then
4250 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00004252do
4253 # Extract the first word of "$ac_prog", so it can be a program name with args.
4254set dummy $ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00004255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4256printf %s "checking for $ac_word... " >&6; }
4257if test ${ac_cv_prog_ac_ct_CC+y}
4258then :
4259 printf %s "(cached) " >&6
4260else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 if test -n "$ac_ct_CC"; then
4262 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4263else
4264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4265for as_dir in $PATH
4266do
4267 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00004268 case $as_dir in #(((
4269 '') as_dir=./ ;;
4270 */) ;;
4271 *) as_dir=$as_dir/ ;;
4272 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00004274 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 ac_cv_prog_ac_ct_CC="$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00004276 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 +00004277 break 2
4278 fi
4279done
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00004282
Martin v. Löwis11437992002-04-12 09:54:03 +00004283fi
4284fi
4285ac_ct_CC=$ac_cv_prog_ac_ct_CC
4286if test -n "$ac_ct_CC"; then
Pablo Galindocc128882021-03-01 16:47:53 +00004287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4288printf "%s\n" "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004289else
Pablo Galindocc128882021-03-01 16:47:53 +00004290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4291printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004292fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295 test -n "$ac_ct_CC" && break
4296done
Michael W. Hudson54241132001-12-07 15:38:26 +00004297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 if test "x$ac_ct_CC" = x; then
4299 CC=""
4300 else
4301 case $cross_compiling:$ac_tool_warned in
4302yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00004303{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4304printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305ac_tool_warned=yes ;;
4306esac
4307 CC=$ac_ct_CC
4308 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004309fi
4310
4311fi
Pablo Galindocc128882021-03-01 16:47:53 +00004312if test -z "$CC"; then
4313 if test -n "$ac_tool_prefix"; then
4314 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4315set dummy ${ac_tool_prefix}clang; ac_word=$2
4316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4317printf %s "checking for $ac_word... " >&6; }
4318if test ${ac_cv_prog_CC+y}
4319then :
4320 printf %s "(cached) " >&6
4321else $as_nop
4322 if test -n "$CC"; then
4323 ac_cv_prog_CC="$CC" # Let the user override the test.
4324else
4325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326for as_dir in $PATH
4327do
4328 IFS=$as_save_IFS
4329 case $as_dir in #(((
4330 '') as_dir=./ ;;
4331 */) ;;
4332 *) as_dir=$as_dir/ ;;
4333 esac
4334 for ac_exec_ext in '' $ac_executable_extensions; do
4335 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4336 ac_cv_prog_CC="${ac_tool_prefix}clang"
4337 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4338 break 2
4339 fi
4340done
4341 done
4342IFS=$as_save_IFS
4343
4344fi
4345fi
4346CC=$ac_cv_prog_CC
4347if test -n "$CC"; then
4348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4349printf "%s\n" "$CC" >&6; }
4350else
4351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4352printf "%s\n" "no" >&6; }
4353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004354
4355
Pablo Galindocc128882021-03-01 16:47:53 +00004356fi
4357if test -z "$ac_cv_prog_CC"; then
4358 ac_ct_CC=$CC
4359 # Extract the first word of "clang", so it can be a program name with args.
4360set dummy clang; ac_word=$2
4361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4362printf %s "checking for $ac_word... " >&6; }
4363if test ${ac_cv_prog_ac_ct_CC+y}
4364then :
4365 printf %s "(cached) " >&6
4366else $as_nop
4367 if test -n "$ac_ct_CC"; then
4368 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4369else
4370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373 IFS=$as_save_IFS
4374 case $as_dir in #(((
4375 '') as_dir=./ ;;
4376 */) ;;
4377 *) as_dir=$as_dir/ ;;
4378 esac
4379 for ac_exec_ext in '' $ac_executable_extensions; do
4380 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4381 ac_cv_prog_ac_ct_CC="clang"
4382 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4383 break 2
4384 fi
4385done
4386 done
4387IFS=$as_save_IFS
4388
4389fi
4390fi
4391ac_ct_CC=$ac_cv_prog_ac_ct_CC
4392if test -n "$ac_ct_CC"; then
4393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4394printf "%s\n" "$ac_ct_CC" >&6; }
4395else
4396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4397printf "%s\n" "no" >&6; }
4398fi
4399
4400 if test "x$ac_ct_CC" = x; then
4401 CC=""
4402 else
4403 case $cross_compiling:$ac_tool_warned in
4404yes:)
4405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4406printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4407ac_tool_warned=yes ;;
4408esac
4409 CC=$ac_ct_CC
4410 fi
4411else
4412 CC="$ac_cv_prog_CC"
4413fi
4414
4415fi
4416
4417
4418test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4419printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004420as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004421See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004422
4423# Provide some information about the compiler.
Pablo Galindocc128882021-03-01 16:47:53 +00004424printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004425set X $ac_compile
4426ac_compiler=$2
Pablo Galindocc128882021-03-01 16:47:53 +00004427for ac_option in --version -v -V -qversion -version; do
Matthias Kloseb9621712010-04-24 17:59:49 +00004428 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429case "(($ac_try" in
4430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4431 *) ac_try_echo=$ac_try;;
4432esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004433eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00004434printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004436 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004437 if test -s conftest.err; then
4438 sed '10a\
4439... rest of stderr output deleted ...
4440 10q' conftest.err >conftest.er1
4441 cat conftest.er1 >&5
4442 fi
4443 rm -f conftest.er1 conftest.err
Pablo Galindocc128882021-03-01 16:47:53 +00004444 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 test $ac_status = 0; }
4446done
Martin v. Löwis11437992002-04-12 09:54:03 +00004447
Matthias Kloseb9621712010-04-24 17:59:49 +00004448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004449/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004450
Martin v. Löwis11437992002-04-12 09:54:03 +00004451int
Pablo Galindocc128882021-03-01 16:47:53 +00004452main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004453{
4454
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004460ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004461# Try to create an executable without -o first, disregard a.out.
4462# It will help us diagnose broken compilers, and finding out an intuition
4463# of exeext.
Pablo Galindocc128882021-03-01 16:47:53 +00004464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4465printf %s "checking whether the C compiler works... " >&6; }
4466ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Matthias Kloseb9621712010-04-24 17:59:49 +00004467
4468# The possible output files:
4469ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471ac_rmfiles=
4472for ac_file in $ac_files
4473do
4474 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004476 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4477 esac
4478done
4479rm -f $ac_rmfiles
4480
Matthias Kloseb9621712010-04-24 17:59:49 +00004481if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482case "(($ac_try" in
4483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4484 *) ac_try_echo=$ac_try;;
4485esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004486eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00004487printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004488 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004489 ac_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00004490 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4491 test $ac_status = 0; }
4492then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004493 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4494# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4495# in a Makefile. We should not override ac_cv_exeext if it was cached,
4496# so that the user can short-circuit this test for compilers unknown to
4497# Autoconf.
4498for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004499do
4500 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004501 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004503 ;;
4504 [ab].out )
4505 # We found the default executable, but exeext='' is most
4506 # certainly right.
4507 break;;
4508 *.* )
Pablo Galindocc128882021-03-01 16:47:53 +00004509 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004510 then :; else
4511 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4512 fi
4513 # We set ac_cv_exeext here because the later test for it is not
4514 # safe: cross compilers may not add the suffix if given an `-o'
4515 # argument, so we may need to know it at that point already.
4516 # Even if this section looks crufty: it has the advantage of
4517 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004518 break;;
4519 * )
4520 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004521 esac
4522done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004523test "$ac_cv_exeext" = no && ac_cv_exeext=
4524
Pablo Galindocc128882021-03-01 16:47:53 +00004525else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004526 ac_file=''
4527fi
Pablo Galindocc128882021-03-01 16:47:53 +00004528if test -z "$ac_file"
4529then :
4530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4531printf "%s\n" "no" >&6; }
4532printf "%s\n" "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004533sed 's/^/| /' conftest.$ac_ext >&5
4534
Pablo Galindocc128882021-03-01 16:47:53 +00004535{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4536printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004537as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004538See \`config.log' for more details" "$LINENO" 5; }
Pablo Galindocc128882021-03-01 16:47:53 +00004539else $as_nop
4540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4541printf "%s\n" "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004542fi
Pablo Galindocc128882021-03-01 16:47:53 +00004543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4544printf %s "checking for C compiler default output file name... " >&6; }
4545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4546printf "%s\n" "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004547ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004548
Matthias Kloseb9621712010-04-24 17:59:49 +00004549rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004550ac_clean_files=$ac_clean_files_save
Pablo Galindocc128882021-03-01 16:47:53 +00004551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4552printf %s "checking for suffix of executables... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004553if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004554case "(($ac_try" in
4555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4556 *) ac_try_echo=$ac_try;;
4557esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00004559printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004560 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004561 ac_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00004562 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4563 test $ac_status = 0; }
4564then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004565 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4566# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4567# work properly (i.e., refer to `conftest.exe'), while it won't with
4568# `rm'.
4569for ac_file in conftest.exe conftest conftest.*; do
4570 test -f "$ac_file" || continue
4571 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4574 break;;
4575 * ) break;;
4576 esac
4577done
Pablo Galindocc128882021-03-01 16:47:53 +00004578else $as_nop
4579 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4580printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004581as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004582See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004584rm -f conftest conftest$ac_cv_exeext
Pablo Galindocc128882021-03-01 16:47:53 +00004585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4586printf "%s\n" "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004587
4588rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004589EXEEXT=$ac_cv_exeext
4590ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592/* end confdefs.h. */
4593#include <stdio.h>
4594int
Pablo Galindocc128882021-03-01 16:47:53 +00004595main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00004596{
4597FILE *f = fopen ("conftest.out", "w");
4598 return ferror (f) || fclose (f) != 0;
4599
4600 ;
4601 return 0;
4602}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004604ac_clean_files="$ac_clean_files conftest.out"
4605# Check that the compiler produces executables we can run. If not, either
4606# the compiler is broken, or we cross compile.
Pablo Galindocc128882021-03-01 16:47:53 +00004607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4608printf %s "checking whether we are cross compiling... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004609if test "$cross_compiling" != yes; then
4610 { { ac_try="$ac_link"
4611case "(($ac_try" in
4612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4613 *) ac_try_echo=$ac_try;;
4614esac
4615eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00004616printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004617 (eval "$ac_link") 2>&5
4618 ac_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00004619 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004620 test $ac_status = 0; }
4621 if { ac_try='./conftest$ac_cv_exeext'
4622 { { case "(($ac_try" in
4623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4624 *) ac_try_echo=$ac_try;;
4625esac
4626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00004627printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004628 (eval "$ac_try") 2>&5
4629 ac_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00004630 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004631 test $ac_status = 0; }; }; then
4632 cross_compiling=no
4633 else
4634 if test "$cross_compiling" = maybe; then
4635 cross_compiling=yes
4636 else
Pablo Galindocc128882021-03-01 16:47:53 +00004637 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4638printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4639as_fn_error 77 "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004640If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004641See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004642 fi
4643 fi
4644fi
Pablo Galindocc128882021-03-01 16:47:53 +00004645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4646printf "%s\n" "$cross_compiling" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004647
4648rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4649ac_clean_files=$ac_clean_files_save
Pablo Galindocc128882021-03-01 16:47:53 +00004650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4651printf %s "checking for suffix of object files... " >&6; }
4652if test ${ac_cv_objext+y}
4653then :
4654 printf %s "(cached) " >&6
4655else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004657/* end confdefs.h. */
4658
4659int
Pablo Galindocc128882021-03-01 16:47:53 +00004660main (void)
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004661{
4662
4663 ;
4664 return 0;
4665}
4666_ACEOF
4667rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004668if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669case "(($ac_try" in
4670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4671 *) ac_try_echo=$ac_try;;
4672esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc128882021-03-01 16:47:53 +00004674printf "%s\n" "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004675 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004676 ac_status=$?
Pablo Galindocc128882021-03-01 16:47:53 +00004677 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4678 test $ac_status = 0; }
4679then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004680 for ac_file in conftest.o conftest.obj conftest.*; do
4681 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004682 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004684 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4685 break;;
4686 esac
4687done
Pablo Galindocc128882021-03-01 16:47:53 +00004688else $as_nop
4689 printf "%s\n" "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004690sed 's/^/| /' conftest.$ac_ext >&5
4691
Pablo Galindocc128882021-03-01 16:47:53 +00004692{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4693printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004694as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004695See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004696fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004697rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004698fi
Pablo Galindocc128882021-03-01 16:47:53 +00004699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4700printf "%s\n" "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004701OBJEXT=$ac_cv_objext
4702ac_objext=$OBJEXT
Pablo Galindocc128882021-03-01 16:47:53 +00004703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4704printf %s "checking whether the compiler supports GNU C... " >&6; }
4705if test ${ac_cv_c_compiler_gnu+y}
4706then :
4707 printf %s "(cached) " >&6
4708else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004711
Martin v. Löwis11437992002-04-12 09:54:03 +00004712int
Pablo Galindocc128882021-03-01 16:47:53 +00004713main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004714{
4715#ifndef __GNUC__
4716 choke me
4717#endif
4718
4719 ;
4720 return 0;
4721}
4722_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00004723if ac_fn_c_try_compile "$LINENO"
4724then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 ac_compiler_gnu=yes
Pablo Galindocc128882021-03-01 16:47:53 +00004726else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004728fi
Pablo Galindocc128882021-03-01 16:47:53 +00004729rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004730ac_cv_c_compiler_gnu=$ac_compiler_gnu
4731
4732fi
Pablo Galindocc128882021-03-01 16:47:53 +00004733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4734printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4735ac_compiler_gnu=$ac_cv_c_compiler_gnu
4736
Matthias Kloseb9621712010-04-24 17:59:49 +00004737if test $ac_compiler_gnu = yes; then
4738 GCC=yes
4739else
4740 GCC=
4741fi
Pablo Galindocc128882021-03-01 16:47:53 +00004742ac_test_CFLAGS=${CFLAGS+y}
Martin v. Löwis11437992002-04-12 09:54:03 +00004743ac_save_CFLAGS=$CFLAGS
Pablo Galindocc128882021-03-01 16:47:53 +00004744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4745printf %s "checking whether $CC accepts -g... " >&6; }
4746if test ${ac_cv_prog_cc_g+y}
4747then :
4748 printf %s "(cached) " >&6
4749else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004750 ac_save_c_werror_flag=$ac_c_werror_flag
4751 ac_c_werror_flag=yes
4752 ac_cv_prog_cc_g=no
4753 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004756
Martin v. Löwis11437992002-04-12 09:54:03 +00004757int
Pablo Galindocc128882021-03-01 16:47:53 +00004758main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004759{
4760
4761 ;
4762 return 0;
4763}
4764_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00004765if ac_fn_c_try_compile "$LINENO"
4766then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004767 ac_cv_prog_cc_g=yes
Pablo Galindocc128882021-03-01 16:47:53 +00004768else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 CFLAGS=""
4770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004771/* end confdefs.h. */
4772
4773int
Pablo Galindocc128882021-03-01 16:47:53 +00004774main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004775{
4776
4777 ;
4778 return 0;
4779}
4780_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00004781if ac_fn_c_try_compile "$LINENO"
4782then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783
Pablo Galindocc128882021-03-01 16:47:53 +00004784else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004786 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004788/* end confdefs.h. */
4789
4790int
Pablo Galindocc128882021-03-01 16:47:53 +00004791main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792{
4793
4794 ;
4795 return 0;
4796}
4797_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00004798if ac_fn_c_try_compile "$LINENO"
4799then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004801fi
Pablo Galindocc128882021-03-01 16:47:53 +00004802rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004803fi
Pablo Galindocc128882021-03-01 16:47:53 +00004804rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805fi
Pablo Galindocc128882021-03-01 16:47:53 +00004806rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807 ac_c_werror_flag=$ac_save_c_werror_flag
4808fi
Pablo Galindocc128882021-03-01 16:47:53 +00004809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4810printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4811if test $ac_test_CFLAGS; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004813elif test $ac_cv_prog_cc_g = yes; then
4814 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004815 CFLAGS="-g -O2"
4816 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004817 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004818 fi
4819else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004820 if test "$GCC" = yes; then
4821 CFLAGS="-O2"
4822 else
4823 CFLAGS=
4824 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004825fi
Pablo Galindocc128882021-03-01 16:47:53 +00004826ac_prog_cc_stdc=no
4827if test x$ac_prog_cc_stdc = xno
4828then :
4829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4830printf %s "checking for $CC option to enable C11 features... " >&6; }
4831if test ${ac_cv_prog_cc_c11+y}
4832then :
4833 printf %s "(cached) " >&6
4834else $as_nop
4835 ac_cv_prog_cc_c11=no
4836ac_save_CC=$CC
4837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838/* end confdefs.h. */
4839$ac_c_conftest_c11_program
4840_ACEOF
4841for ac_arg in '' -std=gnu11
4842do
4843 CC="$ac_save_CC $ac_arg"
4844 if ac_fn_c_try_compile "$LINENO"
4845then :
4846 ac_cv_prog_cc_c11=$ac_arg
4847fi
4848rm -f core conftest.err conftest.$ac_objext conftest.beam
4849 test "x$ac_cv_prog_cc_c11" != "xno" && break
4850done
4851rm -f conftest.$ac_ext
4852CC=$ac_save_CC
4853fi
4854
4855if test "x$ac_cv_prog_cc_c11" = xno
4856then :
4857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4858printf "%s\n" "unsupported" >&6; }
4859else $as_nop
4860 if test "x$ac_cv_prog_cc_c11" = x
4861then :
4862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4863printf "%s\n" "none needed" >&6; }
4864else $as_nop
4865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4866printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4867 CC="$CC $ac_cv_prog_cc_c11"
4868fi
4869 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4870 ac_prog_cc_stdc=c11
4871fi
4872fi
4873if test x$ac_prog_cc_stdc = xno
4874then :
4875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4876printf %s "checking for $CC option to enable C99 features... " >&6; }
4877if test ${ac_cv_prog_cc_c99+y}
4878then :
4879 printf %s "(cached) " >&6
4880else $as_nop
4881 ac_cv_prog_cc_c99=no
4882ac_save_CC=$CC
4883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4884/* end confdefs.h. */
4885$ac_c_conftest_c99_program
4886_ACEOF
4887for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4888do
4889 CC="$ac_save_CC $ac_arg"
4890 if ac_fn_c_try_compile "$LINENO"
4891then :
4892 ac_cv_prog_cc_c99=$ac_arg
4893fi
4894rm -f core conftest.err conftest.$ac_objext conftest.beam
4895 test "x$ac_cv_prog_cc_c99" != "xno" && break
4896done
4897rm -f conftest.$ac_ext
4898CC=$ac_save_CC
4899fi
4900
4901if test "x$ac_cv_prog_cc_c99" = xno
4902then :
4903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4904printf "%s\n" "unsupported" >&6; }
4905else $as_nop
4906 if test "x$ac_cv_prog_cc_c99" = x
4907then :
4908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4909printf "%s\n" "none needed" >&6; }
4910else $as_nop
4911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4912printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4913 CC="$CC $ac_cv_prog_cc_c99"
4914fi
4915 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4916 ac_prog_cc_stdc=c99
4917fi
4918fi
4919if test x$ac_prog_cc_stdc = xno
4920then :
4921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4922printf %s "checking for $CC option to enable C89 features... " >&6; }
4923if test ${ac_cv_prog_cc_c89+y}
4924then :
4925 printf %s "(cached) " >&6
4926else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004927 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004928ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004930/* end confdefs.h. */
Pablo Galindocc128882021-03-01 16:47:53 +00004931$ac_c_conftest_c89_program
Skip Montanaro6dead952003-09-25 14:50:04 +00004932_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00004933for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004934do
4935 CC="$ac_save_CC $ac_arg"
Pablo Galindocc128882021-03-01 16:47:53 +00004936 if ac_fn_c_try_compile "$LINENO"
4937then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004938 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004939fi
Pablo Galindocc128882021-03-01 16:47:53 +00004940rm -f core conftest.err conftest.$ac_objext conftest.beam
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004941 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004942done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004943rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004944CC=$ac_save_CC
Skip Montanaro6dead952003-09-25 14:50:04 +00004945fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004946
Pablo Galindocc128882021-03-01 16:47:53 +00004947if test "x$ac_cv_prog_cc_c89" = xno
4948then :
4949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4950printf "%s\n" "unsupported" >&6; }
4951else $as_nop
4952 if test "x$ac_cv_prog_cc_c89" = x
4953then :
4954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4955printf "%s\n" "none needed" >&6; }
4956else $as_nop
4957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4958printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4959 CC="$CC $ac_cv_prog_cc_c89"
4960fi
4961 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4962 ac_prog_cc_stdc=c89
4963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004964fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004965
Martin v. Löwis11437992002-04-12 09:54:03 +00004966ac_ext=c
4967ac_cpp='$CPP $CPPFLAGS'
4968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4970ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004971
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004972ac_ext=c
4973ac_cpp='$CPP $CPPFLAGS'
4974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4976ac_compiler_gnu=$ac_cv_c_compiler_gnu
Pablo Galindocc128882021-03-01 16:47:53 +00004977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4978printf %s "checking how to run the C preprocessor... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004979# On Suns, sometimes $CPP names a directory.
4980if test -n "$CPP" && test -d "$CPP"; then
4981 CPP=
4982fi
4983if test -z "$CPP"; then
Pablo Galindocc128882021-03-01 16:47:53 +00004984 if test ${ac_cv_prog_CPP+y}
4985then :
4986 printf %s "(cached) " >&6
4987else $as_nop
4988 # Double quotes because $CC needs to be expanded
4989 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004990 do
4991 ac_preproc_ok=false
4992for ac_c_preproc_warn_flag in '' yes
4993do
4994 # Use a header file that comes with gcc, so configuring glibc
4995 # with a fresh cross-compiler works.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004996 # On the NeXT, cc -E runs the code through the compiler's parser,
4997 # not just through cpp. "Syntax error" is here to catch this case.
4998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4999/* end confdefs.h. */
Pablo Galindocc128882021-03-01 16:47:53 +00005000#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005001 Syntax error
5002_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00005003if ac_fn_c_try_cpp "$LINENO"
5004then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005005
Pablo Galindocc128882021-03-01 16:47:53 +00005006else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005007 # Broken: fails on valid input.
5008continue
5009fi
5010rm -f conftest.err conftest.i conftest.$ac_ext
5011
5012 # OK, works on sane cases. Now check whether nonexistent headers
5013 # can be detected and how.
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5015/* end confdefs.h. */
5016#include <ac_nonexistent.h>
5017_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00005018if ac_fn_c_try_cpp "$LINENO"
5019then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005020 # Broken: success on invalid input.
5021continue
Pablo Galindocc128882021-03-01 16:47:53 +00005022else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005023 # Passes both tests.
5024ac_preproc_ok=:
5025break
5026fi
5027rm -f conftest.err conftest.i conftest.$ac_ext
5028
5029done
5030# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5031rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00005032if $ac_preproc_ok
5033then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005034 break
5035fi
5036
5037 done
5038 ac_cv_prog_CPP=$CPP
5039
5040fi
5041 CPP=$ac_cv_prog_CPP
5042else
5043 ac_cv_prog_CPP=$CPP
5044fi
Pablo Galindocc128882021-03-01 16:47:53 +00005045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5046printf "%s\n" "$CPP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005047ac_preproc_ok=false
5048for ac_c_preproc_warn_flag in '' yes
5049do
5050 # Use a header file that comes with gcc, so configuring glibc
5051 # with a fresh cross-compiler works.
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005052 # On the NeXT, cc -E runs the code through the compiler's parser,
5053 # not just through cpp. "Syntax error" is here to catch this case.
5054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055/* end confdefs.h. */
Pablo Galindocc128882021-03-01 16:47:53 +00005056#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005057 Syntax error
5058_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00005059if ac_fn_c_try_cpp "$LINENO"
5060then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005061
Pablo Galindocc128882021-03-01 16:47:53 +00005062else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005063 # Broken: fails on valid input.
5064continue
5065fi
5066rm -f conftest.err conftest.i conftest.$ac_ext
5067
5068 # OK, works on sane cases. Now check whether nonexistent headers
5069 # can be detected and how.
5070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5071/* end confdefs.h. */
5072#include <ac_nonexistent.h>
5073_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00005074if ac_fn_c_try_cpp "$LINENO"
5075then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005076 # Broken: success on invalid input.
5077continue
Pablo Galindocc128882021-03-01 16:47:53 +00005078else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005079 # Passes both tests.
5080ac_preproc_ok=:
5081break
5082fi
5083rm -f conftest.err conftest.i conftest.$ac_ext
5084
5085done
5086# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5087rm -f conftest.i conftest.err conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00005088if $ac_preproc_ok
5089then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005090
Pablo Galindocc128882021-03-01 16:47:53 +00005091else $as_nop
5092 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5093printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005094as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5095See \`config.log' for more details" "$LINENO" 5; }
5096fi
5097
5098ac_ext=c
5099ac_cpp='$CPP $CPPFLAGS'
5100ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5101ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5102ac_compiler_gnu=$ac_cv_c_compiler_gnu
5103
Pablo Galindocc128882021-03-01 16:47:53 +00005104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5105printf %s "checking for grep that handles long lines and -e... " >&6; }
5106if test ${ac_cv_path_GREP+y}
5107then :
5108 printf %s "(cached) " >&6
5109else $as_nop
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005110 if test -z "$GREP"; then
5111 ac_path_GREP_found=false
5112 # Loop through the user's path and test for each of PROGNAME-LIST
5113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5115do
5116 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005117 case $as_dir in #(((
5118 '') as_dir=./ ;;
5119 */) ;;
5120 *) as_dir=$as_dir/ ;;
5121 esac
5122 for ac_prog in grep ggrep
5123 do
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005124 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005125 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005126 as_fn_executable_p "$ac_path_GREP" || continue
5127# Check for GNU ac_path_GREP and select it if it is found.
5128 # Check for GNU $ac_path_GREP
5129case `"$ac_path_GREP" --version 2>&1` in
5130*GNU*)
5131 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5132*)
5133 ac_count=0
Pablo Galindocc128882021-03-01 16:47:53 +00005134 printf %s 0123456789 >"conftest.in"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005135 while :
5136 do
5137 cat "conftest.in" "conftest.in" >"conftest.tmp"
5138 mv "conftest.tmp" "conftest.in"
5139 cp "conftest.in" "conftest.nl"
Pablo Galindocc128882021-03-01 16:47:53 +00005140 printf "%s\n" 'GREP' >> "conftest.nl"
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005141 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5142 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5143 as_fn_arith $ac_count + 1 && ac_count=$as_val
5144 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5145 # Best one so far, save it but keep looking for a better one
5146 ac_cv_path_GREP="$ac_path_GREP"
5147 ac_path_GREP_max=$ac_count
5148 fi
5149 # 10*(2^10) chars as input seems more than enough
5150 test $ac_count -gt 10 && break
5151 done
5152 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5153esac
5154
5155 $ac_path_GREP_found && break 3
5156 done
5157 done
5158 done
5159IFS=$as_save_IFS
5160 if test -z "$ac_cv_path_GREP"; then
5161 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5162 fi
5163else
5164 ac_cv_path_GREP=$GREP
5165fi
5166
5167fi
Pablo Galindocc128882021-03-01 16:47:53 +00005168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5169printf "%s\n" "$ac_cv_path_GREP" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005170 GREP="$ac_cv_path_GREP"
5171
5172
Pablo Galindocc128882021-03-01 16:47:53 +00005173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5174printf %s "checking for a sed that does not truncate output... " >&6; }
5175if test ${ac_cv_path_SED+y}
5176then :
5177 printf %s "(cached) " >&6
5178else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -07005179 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5180 for ac_i in 1 2 3 4 5 6 7; do
5181 ac_script="$ac_script$as_nl$ac_script"
5182 done
5183 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5184 { ac_script=; unset ac_script;}
5185 if test -z "$SED"; then
5186 ac_path_SED_found=false
5187 # Loop through the user's path and test for each of PROGNAME-LIST
5188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189for as_dir in $PATH
5190do
5191 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005192 case $as_dir in #(((
5193 '') as_dir=./ ;;
5194 */) ;;
5195 *) as_dir=$as_dir/ ;;
5196 esac
5197 for ac_prog in sed gsed
5198 do
Łukasz Langaa785c872016-09-09 17:37:37 -07005199 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005200 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
Łukasz Langaa785c872016-09-09 17:37:37 -07005201 as_fn_executable_p "$ac_path_SED" || continue
5202# Check for GNU ac_path_SED and select it if it is found.
5203 # Check for GNU $ac_path_SED
5204case `"$ac_path_SED" --version 2>&1` in
5205*GNU*)
5206 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5207*)
5208 ac_count=0
Pablo Galindocc128882021-03-01 16:47:53 +00005209 printf %s 0123456789 >"conftest.in"
Łukasz Langaa785c872016-09-09 17:37:37 -07005210 while :
5211 do
5212 cat "conftest.in" "conftest.in" >"conftest.tmp"
5213 mv "conftest.tmp" "conftest.in"
5214 cp "conftest.in" "conftest.nl"
Pablo Galindocc128882021-03-01 16:47:53 +00005215 printf "%s\n" '' >> "conftest.nl"
Łukasz Langaa785c872016-09-09 17:37:37 -07005216 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5217 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5218 as_fn_arith $ac_count + 1 && ac_count=$as_val
5219 if test $ac_count -gt ${ac_path_SED_max-0}; then
5220 # Best one so far, save it but keep looking for a better one
5221 ac_cv_path_SED="$ac_path_SED"
5222 ac_path_SED_max=$ac_count
5223 fi
5224 # 10*(2^10) chars as input seems more than enough
5225 test $ac_count -gt 10 && break
5226 done
5227 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5228esac
5229
5230 $ac_path_SED_found && break 3
5231 done
5232 done
5233 done
5234IFS=$as_save_IFS
5235 if test -z "$ac_cv_path_SED"; then
5236 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5237 fi
5238else
5239 ac_cv_path_SED=$SED
5240fi
5241
5242fi
Pablo Galindocc128882021-03-01 16:47:53 +00005243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5244printf "%s\n" "$ac_cv_path_SED" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -07005245 SED="$ac_cv_path_SED"
5246 rm -f conftest.sed
5247
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005248
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005249
5250
Pablo Galindocc128882021-03-01 16:47:53 +00005251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
5252printf %s "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005254# Check whether --with-cxx_main was given.
Pablo Galindocc128882021-03-01 16:47:53 +00005255if test ${with_cxx_main+y}
5256then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005257 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005258
5259 case $withval in
5260 no) with_cxx_main=no
5261 MAINCC='$(CC)';;
5262 yes) with_cxx_main=yes
5263 MAINCC='$(CXX)';;
5264 *) with_cxx_main=yes
5265 MAINCC=$withval
5266 if test -z "$CXX"
5267 then
5268 CXX=$withval
5269 fi;;
5270 esac
Pablo Galindocc128882021-03-01 16:47:53 +00005271else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005272
5273 with_cxx_main=no
5274 MAINCC='$(CC)'
5275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005276fi
5277
Pablo Galindocc128882021-03-01 16:47:53 +00005278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
5279printf "%s\n" "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005280
5281preset_cxx="$CXX"
5282if test -z "$CXX"
5283then
5284 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005285 gcc) if test -n "$ac_tool_prefix"; then
5286 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
5287set dummy ${ac_tool_prefix}g++; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289printf %s "checking for $ac_word... " >&6; }
5290if test ${ac_cv_path_CXX+y}
5291then :
5292 printf %s "(cached) " >&6
5293else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005294 case $CXX in
5295 [\\/]* | ?:[\\/]*)
5296 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5297 ;;
5298 *)
5299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5300for as_dir in notfound
5301do
5302 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005303 case $as_dir in #(((
5304 '') as_dir=./ ;;
5305 */) ;;
5306 *) as_dir=$as_dir/ ;;
5307 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005308 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005309 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5310 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5311 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 +02005312 break 2
5313 fi
5314done
5315 done
5316IFS=$as_save_IFS
5317
5318 ;;
5319esac
5320fi
5321CXX=$ac_cv_path_CXX
5322if test -n "$CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5324printf "%s\n" "$CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005325else
Pablo Galindocc128882021-03-01 16:47:53 +00005326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005328fi
5329
5330
5331fi
5332if test -z "$ac_cv_path_CXX"; then
5333 ac_pt_CXX=$CXX
5334 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005335set dummy g++; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337printf %s "checking for $ac_word... " >&6; }
5338if test ${ac_cv_path_ac_pt_CXX+y}
5339then :
5340 printf %s "(cached) " >&6
5341else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005342 case $ac_pt_CXX in
5343 [\\/]* | ?:[\\/]*)
5344 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5345 ;;
5346 *)
5347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5348for as_dir in notfound
5349do
5350 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005351 case $as_dir in #(((
5352 '') as_dir=./ ;;
5353 */) ;;
5354 *) as_dir=$as_dir/ ;;
5355 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005356 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005357 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5358 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5359 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 +02005360 break 2
5361 fi
5362done
5363 done
5364IFS=$as_save_IFS
5365
5366 ;;
5367esac
5368fi
5369ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5370if test -n "$ac_pt_CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5372printf "%s\n" "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005373else
Pablo Galindocc128882021-03-01 16:47:53 +00005374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005376fi
5377
5378 if test "x$ac_pt_CXX" = x; then
5379 CXX="g++"
5380 else
5381 case $cross_compiling:$ac_tool_warned in
5382yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00005383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5384printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005385ac_tool_warned=yes ;;
5386esac
5387 CXX=$ac_pt_CXX
5388 fi
5389else
5390 CXX="$ac_cv_path_CXX"
5391fi
5392 ;;
5393 cc) if test -n "$ac_tool_prefix"; then
5394 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
5395set dummy ${ac_tool_prefix}c++; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5397printf %s "checking for $ac_word... " >&6; }
5398if test ${ac_cv_path_CXX+y}
5399then :
5400 printf %s "(cached) " >&6
5401else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005402 case $CXX in
5403 [\\/]* | ?:[\\/]*)
5404 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5405 ;;
5406 *)
5407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408for as_dir in notfound
5409do
5410 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005411 case $as_dir in #(((
5412 '') as_dir=./ ;;
5413 */) ;;
5414 *) as_dir=$as_dir/ ;;
5415 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005417 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5418 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5419 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005420 break 2
5421 fi
5422done
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005425
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005426 ;;
5427esac
5428fi
5429CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005430if test -n "$CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5432printf "%s\n" "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005433else
Pablo Galindocc128882021-03-01 16:47:53 +00005434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5435printf "%s\n" "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005438
5439fi
5440if test -z "$ac_cv_path_CXX"; then
5441 ac_pt_CXX=$CXX
5442 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005443set dummy c++; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5445printf %s "checking for $ac_word... " >&6; }
5446if test ${ac_cv_path_ac_pt_CXX+y}
5447then :
5448 printf %s "(cached) " >&6
5449else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005450 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005451 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005452 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 +00005453 ;;
5454 *)
5455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5456for as_dir in notfound
5457do
5458 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005459 case $as_dir in #(((
5460 '') as_dir=./ ;;
5461 */) ;;
5462 *) as_dir=$as_dir/ ;;
5463 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005465 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5466 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5467 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005468 break 2
5469 fi
5470done
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005472IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005473
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005474 ;;
5475esac
5476fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005477ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5478if test -n "$ac_pt_CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5480printf "%s\n" "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005481else
Pablo Galindocc128882021-03-01 16:47:53 +00005482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5483printf "%s\n" "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005485
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005486 if test "x$ac_pt_CXX" = x; then
5487 CXX="c++"
5488 else
5489 case $cross_compiling:$ac_tool_warned in
5490yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00005491{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5492printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005493ac_tool_warned=yes ;;
5494esac
5495 CXX=$ac_pt_CXX
5496 fi
5497else
5498 CXX="$ac_cv_path_CXX"
5499fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005500 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005501 clang|*/clang) if test -n "$ac_tool_prefix"; then
5502 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
5503set dummy ${ac_tool_prefix}clang++; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5505printf %s "checking for $ac_word... " >&6; }
5506if test ${ac_cv_path_CXX+y}
5507then :
5508 printf %s "(cached) " >&6
5509else $as_nop
Ned Deilycbfb9a52012-06-23 16:02:19 -07005510 case $CXX in
5511 [\\/]* | ?:[\\/]*)
5512 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5513 ;;
5514 *)
5515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5516for as_dir in notfound
5517do
5518 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005519 case $as_dir in #(((
5520 '') as_dir=./ ;;
5521 */) ;;
5522 *) as_dir=$as_dir/ ;;
5523 esac
Ned Deilycbfb9a52012-06-23 16:02:19 -07005524 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005525 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5526 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5527 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Ned Deilycbfb9a52012-06-23 16:02:19 -07005528 break 2
5529 fi
5530done
5531 done
5532IFS=$as_save_IFS
5533
Ned Deilycbfb9a52012-06-23 16:02:19 -07005534 ;;
5535esac
5536fi
5537CXX=$ac_cv_path_CXX
5538if test -n "$CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5540printf "%s\n" "$CXX" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07005541else
Pablo Galindocc128882021-03-01 16:47:53 +00005542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543printf "%s\n" "no" >&6; }
Ned Deilycbfb9a52012-06-23 16:02:19 -07005544fi
5545
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005546
5547fi
5548if test -z "$ac_cv_path_CXX"; then
5549 ac_pt_CXX=$CXX
5550 # Extract the first word of "clang++", so it can be a program name with args.
5551set dummy clang++; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5553printf %s "checking for $ac_word... " >&6; }
5554if test ${ac_cv_path_ac_pt_CXX+y}
5555then :
5556 printf %s "(cached) " >&6
5557else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005558 case $ac_pt_CXX in
5559 [\\/]* | ?:[\\/]*)
5560 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5561 ;;
5562 *)
5563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5564for as_dir in notfound
5565do
5566 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005567 case $as_dir in #(((
5568 '') as_dir=./ ;;
5569 */) ;;
5570 *) as_dir=$as_dir/ ;;
5571 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005572 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005573 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5574 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5575 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 +02005576 break 2
5577 fi
5578done
5579 done
5580IFS=$as_save_IFS
5581
5582 ;;
5583esac
5584fi
5585ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5586if test -n "$ac_pt_CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5588printf "%s\n" "$ac_pt_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005589else
Pablo Galindocc128882021-03-01 16:47:53 +00005590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5591printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005592fi
5593
5594 if test "x$ac_pt_CXX" = x; then
5595 CXX="clang++"
5596 else
5597 case $cross_compiling:$ac_tool_warned in
5598yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00005599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5600printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005601ac_tool_warned=yes ;;
5602esac
5603 CXX=$ac_pt_CXX
5604 fi
5605else
5606 CXX="$ac_cv_path_CXX"
5607fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005608 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005609 icc|*/icc) if test -n "$ac_tool_prefix"; then
5610 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5611set dummy ${ac_tool_prefix}icpc; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613printf %s "checking for $ac_word... " >&6; }
5614if test ${ac_cv_path_CXX+y}
5615then :
5616 printf %s "(cached) " >&6
5617else $as_nop
Zachary Ware5af85642015-12-21 12:09:17 -06005618 case $CXX in
5619 [\\/]* | ?:[\\/]*)
5620 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5621 ;;
5622 *)
5623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624for as_dir in notfound
5625do
5626 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005627 case $as_dir in #(((
5628 '') as_dir=./ ;;
5629 */) ;;
5630 *) as_dir=$as_dir/ ;;
5631 esac
Zachary Ware5af85642015-12-21 12:09:17 -06005632 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005633 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5634 ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
5635 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005636 break 2
5637 fi
5638done
5639 done
5640IFS=$as_save_IFS
5641
5642 ;;
5643esac
5644fi
5645CXX=$ac_cv_path_CXX
5646if test -n "$CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5648printf "%s\n" "$CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005649else
Pablo Galindocc128882021-03-01 16:47:53 +00005650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651printf "%s\n" "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005652fi
5653
5654
5655fi
5656if test -z "$ac_cv_path_CXX"; then
5657 ac_pt_CXX=$CXX
5658 # Extract the first word of "icpc", so it can be a program name with args.
5659set dummy icpc; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661printf %s "checking for $ac_word... " >&6; }
5662if test ${ac_cv_path_ac_pt_CXX+y}
5663then :
5664 printf %s "(cached) " >&6
5665else $as_nop
Zachary Ware5af85642015-12-21 12:09:17 -06005666 case $ac_pt_CXX in
5667 [\\/]* | ?:[\\/]*)
5668 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5669 ;;
5670 *)
5671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5672for as_dir in notfound
5673do
5674 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005675 case $as_dir in #(((
5676 '') as_dir=./ ;;
5677 */) ;;
5678 *) as_dir=$as_dir/ ;;
5679 esac
Zachary Ware5af85642015-12-21 12:09:17 -06005680 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005681 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5682 ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
5683 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Zachary Ware5af85642015-12-21 12:09:17 -06005684 break 2
5685 fi
5686done
5687 done
5688IFS=$as_save_IFS
5689
5690 ;;
5691esac
5692fi
5693ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5694if test -n "$ac_pt_CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5696printf "%s\n" "$ac_pt_CXX" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005697else
Pablo Galindocc128882021-03-01 16:47:53 +00005698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699printf "%s\n" "no" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06005700fi
5701
5702 if test "x$ac_pt_CXX" = x; then
5703 CXX="icpc"
5704 else
5705 case $cross_compiling:$ac_tool_warned in
5706yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00005707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5708printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Zachary Ware5af85642015-12-21 12:09:17 -06005709ac_tool_warned=yes ;;
5710esac
5711 CXX=$ac_pt_CXX
5712 fi
5713else
5714 CXX="$ac_cv_path_CXX"
5715fi
5716 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005717 esac
5718 if test "$CXX" = "notfound"
5719 then
5720 CXX=""
5721 fi
5722fi
5723if test -z "$CXX"
5724then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005725 if test -n "$ac_tool_prefix"; then
5726 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5727 do
5728 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5729set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5731printf %s "checking for $ac_word... " >&6; }
5732if test ${ac_cv_prog_CXX+y}
5733then :
5734 printf %s "(cached) " >&6
5735else $as_nop
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005736 if test -n "$CXX"; then
5737 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5738else
5739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5740for as_dir in $PATH
5741do
5742 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005743 case $as_dir in #(((
5744 '') as_dir=./ ;;
5745 */) ;;
5746 *) as_dir=$as_dir/ ;;
5747 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005749 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005750 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00005751 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005752 break 2
5753 fi
5754done
Matthias Kloseb9621712010-04-24 17:59:49 +00005755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005756IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005757
5758fi
5759fi
5760CXX=$ac_cv_prog_CXX
5761if test -n "$CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5763printf "%s\n" "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005764else
Pablo Galindocc128882021-03-01 16:47:53 +00005765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766printf "%s\n" "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005767fi
5768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005770 test -n "$CXX" && break
5771 done
5772fi
5773if test -z "$CXX"; then
5774 ac_ct_CXX=$CXX
5775 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5776do
5777 # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00005779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780printf %s "checking for $ac_word... " >&6; }
5781if test ${ac_cv_prog_ac_ct_CXX+y}
5782then :
5783 printf %s "(cached) " >&6
5784else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005785 if test -n "$ac_ct_CXX"; then
5786 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5787else
5788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00005792 case $as_dir in #(((
5793 '') as_dir=./ ;;
5794 */) ;;
5795 *) as_dir=$as_dir/ ;;
5796 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005797 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00005798 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005799 ac_cv_prog_ac_ct_CXX="$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00005800 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 +02005801 break 2
5802 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005803done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 done
5805IFS=$as_save_IFS
5806
5807fi
5808fi
5809ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5810if test -n "$ac_ct_CXX"; then
Pablo Galindocc128882021-03-01 16:47:53 +00005811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5812printf "%s\n" "$ac_ct_CXX" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005813else
Pablo Galindocc128882021-03-01 16:47:53 +00005814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005816fi
5817
5818
5819 test -n "$ac_ct_CXX" && break
5820done
5821
5822 if test "x$ac_ct_CXX" = x; then
5823 CXX="notfound"
5824 else
5825 case $cross_compiling:$ac_tool_warned in
5826yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00005827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5828printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005829ac_tool_warned=yes ;;
5830esac
5831 CXX=$ac_ct_CXX
5832 fi
5833fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005834
5835 if test "$CXX" = "notfound"
5836 then
5837 CXX=""
5838 fi
5839fi
5840if test "$preset_cxx" != "$CXX"
5841then
Pablo Galindocc128882021-03-01 16:47:53 +00005842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005843
5844 By default, distutils will build C++ extension modules with \"$CXX\".
5845 If this is not intended, then set CXX on the configure command line.
5846 " >&5
Pablo Galindocc128882021-03-01 16:47:53 +00005847printf "%s\n" "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005848
5849 By default, distutils will build C++ extension modules with \"$CXX\".
5850 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005851 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005852fi
5853
5854
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005855MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5856
5857
Pablo Galindocc128882021-03-01 16:47:53 +00005858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5859printf %s "checking for the platform triplet based on compiler characteristics... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005860cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005861#undef bfin
5862#undef cris
5863#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005864#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005865#undef hppa
5866#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005867#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005868#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005869#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005870#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005871#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005872#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005873 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005874#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005875# if defined(__x86_64__) && defined(__LP64__)
5876 x86_64-linux-gnu
5877# elif defined(__x86_64__) && defined(__ILP32__)
5878 x86_64-linux-gnux32
5879# elif defined(__i386__)
5880 i386-linux-gnu
5881# elif defined(__aarch64__) && defined(__AARCH64EL__)
5882# if defined(__ILP32__)
5883 aarch64_ilp32-linux-gnu
5884# else
5885 aarch64-linux-gnu
5886# endif
5887# elif defined(__aarch64__) && defined(__AARCH64EB__)
5888# if defined(__ILP32__)
5889 aarch64_be_ilp32-linux-gnu
5890# else
5891 aarch64_be-linux-gnu
5892# endif
5893# elif defined(__alpha__)
5894 alpha-linux-gnu
5895# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5896# if defined(__ARMEL__)
5897 arm-linux-gnueabihf
5898# else
5899 armeb-linux-gnueabihf
5900# endif
5901# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5902# if defined(__ARMEL__)
5903 arm-linux-gnueabi
5904# else
5905 armeb-linux-gnueabi
5906# endif
5907# elif defined(__hppa__)
5908 hppa-linux-gnu
5909# elif defined(__ia64__)
5910 ia64-linux-gnu
5911# elif defined(__m68k__) && !defined(__mcoldfire__)
5912 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005913# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5914# if _MIPS_SIM == _ABIO32
5915 mipsisa32r6el-linux-gnu
5916# elif _MIPS_SIM == _ABIN32
5917 mipsisa64r6el-linux-gnuabin32
5918# elif _MIPS_SIM == _ABI64
5919 mipsisa64r6el-linux-gnuabi64
5920# else
5921# error unknown platform triplet
5922# endif
5923# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5924# if _MIPS_SIM == _ABIO32
5925 mipsisa32r6-linux-gnu
5926# elif _MIPS_SIM == _ABIN32
5927 mipsisa64r6-linux-gnuabin32
5928# elif _MIPS_SIM == _ABI64
5929 mipsisa64r6-linux-gnuabi64
5930# else
5931# error unknown platform triplet
5932# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005933# elif defined(__mips_hard_float) && defined(_MIPSEL)
5934# if _MIPS_SIM == _ABIO32
5935 mipsel-linux-gnu
5936# elif _MIPS_SIM == _ABIN32
5937 mips64el-linux-gnuabin32
5938# elif _MIPS_SIM == _ABI64
5939 mips64el-linux-gnuabi64
5940# else
5941# error unknown platform triplet
5942# endif
5943# elif defined(__mips_hard_float)
5944# if _MIPS_SIM == _ABIO32
5945 mips-linux-gnu
5946# elif _MIPS_SIM == _ABIN32
5947 mips64-linux-gnuabin32
5948# elif _MIPS_SIM == _ABI64
5949 mips64-linux-gnuabi64
5950# else
5951# error unknown platform triplet
5952# endif
5953# elif defined(__or1k__)
5954 or1k-linux-gnu
5955# elif defined(__powerpc__) && defined(__SPE__)
5956 powerpc-linux-gnuspe
5957# elif defined(__powerpc64__)
5958# if defined(__LITTLE_ENDIAN__)
5959 powerpc64le-linux-gnu
5960# else
5961 powerpc64-linux-gnu
5962# endif
5963# elif defined(__powerpc__)
5964 powerpc-linux-gnu
5965# elif defined(__s390x__)
5966 s390x-linux-gnu
5967# elif defined(__s390__)
5968 s390-linux-gnu
5969# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5970 sh4-linux-gnu
5971# elif defined(__sparc__) && defined(__arch64__)
5972 sparc64-linux-gnu
5973# elif defined(__sparc__)
5974 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005975# elif defined(__riscv)
5976# if __riscv_xlen == 32
5977 riscv32-linux-gnu
5978# elif __riscv_xlen == 64
5979 riscv64-linux-gnu
5980# else
5981# error unknown platform triplet
5982# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005983# else
5984# error unknown platform triplet
5985# endif
5986#elif defined(__FreeBSD_kernel__)
5987# if defined(__LP64__)
5988 x86_64-kfreebsd-gnu
5989# elif defined(__i386__)
5990 i386-kfreebsd-gnu
5991# else
5992# error unknown platform triplet
5993# endif
5994#elif defined(__gnu_hurd__)
5995 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005996#elif defined(__APPLE__)
5997 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005998#elif defined(__VXWORKS__)
5999 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006000#else
6001# error unknown platform triplet
6002#endif
6003
6004EOF
6005
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02006006if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006007 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
Pablo Galindocc128882021-03-01 16:47:53 +00006008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
6009printf "%s\n" "$PLATFORM_TRIPLET" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006010else
Pablo Galindocc128882021-03-01 16:47:53 +00006011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
6012printf "%s\n" "none" >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006013fi
6014rm -f conftest.c conftest.out
6015
6016if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
6017 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
6018 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
6019 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02006020elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
6021 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006022fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006023
doko@ubuntu.com55532312016-06-14 08:55:19 +02006024if test x$MULTIARCH != x; then
6025 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
6026fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02006027
6028
Pablo Galindocc128882021-03-01 16:47:53 +00006029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
6030printf %s "checking for -Wl,--no-as-needed... " >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006031save_LDFLAGS="$LDFLAGS"
6032LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00006033
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6035/* end confdefs.h. */
6036
6037int
Pablo Galindocc128882021-03-01 16:47:53 +00006038main (void)
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006039{
6040
6041 ;
6042 return 0;
6043}
6044_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00006045if ac_fn_c_try_link "$LINENO"
6046then :
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006047 NO_AS_NEEDED="-Wl,--no-as-needed"
Pablo Galindocc128882021-03-01 16:47:53 +00006048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6049printf "%s\n" "yes" >&6; }
6050else $as_nop
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006051 NO_AS_NEEDED=""
Pablo Galindocc128882021-03-01 16:47:53 +00006052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053printf "%s\n" "no" >&6; }
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006054fi
Pablo Galindocc128882021-03-01 16:47:53 +00006055rm -f core conftest.err conftest.$ac_objext conftest.beam \
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006056 conftest$ac_exeext conftest.$ac_ext
6057LDFLAGS="$save_LDFLAGS"
6058
6059
6060
6061# checks for UNIX variants that set C preprocessor variables
Pablo Galindocc128882021-03-01 16:47:53 +00006062ac_header= ac_cache=
6063for ac_item in $ac_header_c_list
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064do
Pablo Galindocc128882021-03-01 16:47:53 +00006065 if test $ac_cache; then
6066 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6067 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6068 printf "%s\n" "#define $ac_item 1" >> confdefs.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006069 fi
Pablo Galindocc128882021-03-01 16:47:53 +00006070 ac_header= ac_cache=
6071 elif test $ac_header; then
6072 ac_cache=$ac_item
6073 else
6074 ac_header=$ac_item
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006076done
6077
6078
6079
Pablo Galindocc128882021-03-01 16:47:53 +00006080
6081
6082
6083
6084
6085if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6086then :
6087
6088printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6089
Matthias Kloseb9621712010-04-24 17:59:49 +00006090fi
6091
6092
Matthias Kloseb9621712010-04-24 17:59:49 +00006093
6094
Matthias Kloseb9621712010-04-24 17:59:49 +00006095
6096
Pablo Galindocc128882021-03-01 16:47:53 +00006097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6098printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6099if test ${ac_cv_safe_to_define___extensions__+y}
6100then :
6101 printf %s "(cached) " >&6
6102else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00006103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6104/* end confdefs.h. */
6105
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006106# define __EXTENSIONS__ 1
6107 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00006108int
Pablo Galindocc128882021-03-01 16:47:53 +00006109main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00006110{
6111
6112 ;
6113 return 0;
6114}
6115_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00006116if ac_fn_c_try_compile "$LINENO"
6117then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 ac_cv_safe_to_define___extensions__=yes
Pablo Galindocc128882021-03-01 16:47:53 +00006119else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 ac_cv_safe_to_define___extensions__=no
6121fi
Pablo Galindocc128882021-03-01 16:47:53 +00006122rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006123fi
Pablo Galindocc128882021-03-01 16:47:53 +00006124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6125printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00006126
Pablo Galindocc128882021-03-01 16:47:53 +00006127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6128printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6129if test ${ac_cv_should_define__xopen_source+y}
6130then :
6131 printf %s "(cached) " >&6
6132else $as_nop
6133 ac_cv_should_define__xopen_source=no
6134 if test $ac_cv_header_wchar_h = yes
6135then :
6136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6137/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00006138
Pablo Galindocc128882021-03-01 16:47:53 +00006139 #include <wchar.h>
6140 mbstate_t x;
6141int
6142main (void)
6143{
Matthias Kloseb9621712010-04-24 17:59:49 +00006144
Pablo Galindocc128882021-03-01 16:47:53 +00006145 ;
6146 return 0;
6147}
6148_ACEOF
6149if ac_fn_c_try_compile "$LINENO"
6150then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006151
Pablo Galindocc128882021-03-01 16:47:53 +00006152else $as_nop
6153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6154/* end confdefs.h. */
6155
6156 #define _XOPEN_SOURCE 500
6157 #include <wchar.h>
6158 mbstate_t x;
6159int
6160main (void)
6161{
6162
6163 ;
6164 return 0;
6165}
6166_ACEOF
6167if ac_fn_c_try_compile "$LINENO"
6168then :
6169 ac_cv_should_define__xopen_source=yes
6170fi
6171rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6172fi
6173rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6174fi
6175fi
6176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6177printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6178
6179 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6180
6181 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6182
6183 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6184
6185 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6186
6187 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6188
6189 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6190
6191 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6192
6193 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6194
6195 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6196
6197 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6198
6199 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6200
6201 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6202
6203 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6204
6205 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6206
6207 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6208
6209 if test $ac_cv_header_minix_config_h = yes
6210then :
6211 MINIX=yes
6212 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6213
6214 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6215
6216 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6217
6218else $as_nop
6219 MINIX=
6220fi
6221 if test $ac_cv_safe_to_define___extensions__ = yes
6222then :
6223 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6224
6225fi
6226 if test $ac_cv_should_define__xopen_source = yes
6227then :
6228 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6229
6230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006231
6232
Pablo Galindocc128882021-03-01 16:47:53 +00006233{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
6234printf %s "checking for the Android API level... " >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02006235cat >> conftest.c <<EOF
6236#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006237android_api = __ANDROID_API__
6238arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02006239#else
6240#error not Android
6241#endif
6242EOF
6243
6244if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006245 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
6246 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Pablo Galindocc128882021-03-01 16:47:53 +00006247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
6248printf "%s\n" "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01006249 if test -z "$ANDROID_API_LEVEL"; then
6250 echo 'Fatal: you must define __ANDROID_API__'
6251 exit 1
6252 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02006253
Pablo Galindocc128882021-03-01 16:47:53 +00006254printf "%s\n" "#define ANDROID_API_LEVEL $ANDROID_API_LEVEL" >>confdefs.h
Xavier de Gaye95750b12016-07-09 11:05:42 +02006255
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006256
Pablo Galindocc128882021-03-01 16:47:53 +00006257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
6258printf %s "checking for the Android arm ABI... " >&6; }
6259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
6260printf "%s\n" "$_arm_arch" >&6; }
Xavier de Gaye2a352b62017-01-04 21:51:16 +01006261 if test "$_arm_arch" = 7; then
6262 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
6263 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
6264 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02006265else
Pablo Galindocc128882021-03-01 16:47:53 +00006266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
6267printf "%s\n" "not Android" >&6; }
Xavier de Gaye95750b12016-07-09 11:05:42 +02006268fi
6269rm -f conftest.c conftest.out
6270
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271# Check for unsupported systems
6272case $ac_sys_system/$ac_sys_release in
6273atheos*|Linux*/1*)
6274 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
6275 echo See README for details.
6276 exit 1;;
6277esac
6278
6279
Pablo Galindocc128882021-03-01 16:47:53 +00006280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
6281printf %s "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282
6283# Check whether --with-suffix was given.
Pablo Galindocc128882021-03-01 16:47:53 +00006284if test ${with_suffix+y}
6285then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286 withval=$with_suffix;
6287 case $withval in
6288 no) EXEEXT=;;
6289 yes) EXEEXT=.exe;;
6290 *) EXEEXT=$withval;;
6291 esac
6292fi
6293
Pablo Galindocc128882021-03-01 16:47:53 +00006294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
6295printf "%s\n" "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296
6297# Test whether we're running on a non-case-sensitive system, in which
6298# case we give a warning if no ext is given
6299
Pablo Galindocc128882021-03-01 16:47:53 +00006300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
6301printf %s "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302if test ! -d CaseSensitiveTestDir; then
6303mkdir CaseSensitiveTestDir
6304fi
6305
6306if test -d casesensitivetestdir
6307then
Pablo Galindocc128882021-03-01 16:47:53 +00006308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6309printf "%s\n" "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310 BUILDEXEEXT=.exe
6311else
Pablo Galindocc128882021-03-01 16:47:53 +00006312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314 BUILDEXEEXT=$EXEEXT
6315fi
6316rmdir CaseSensitiveTestDir
6317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318case $ac_sys_system in
6319hp*|HP*)
6320 case $CC in
6321 cc|*/cc) CC="$CC -Ae";;
6322 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323esac
6324
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
Pablo Galindocc128882021-03-01 16:47:53 +00006326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
6327printf %s "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328if test -z "$LIBRARY"
6329then
Barry Warsawf040d7d2010-10-18 17:09:07 +00006330 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331fi
Pablo Galindocc128882021-03-01 16:47:53 +00006332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
6333printf "%s\n" "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334
6335# LDLIBRARY is the name of the library to link against (as opposed to the
6336# name of the library into which to insert object files). BLDLIBRARY is also
6337# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
6338# is blank as the main program is not linked directly against LDLIBRARY.
6339# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
6340# systems without shared libraries, LDLIBRARY is the same as LIBRARY
6341# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
6342# DLLLIBRARY is the shared (i.e., DLL) library.
6343#
6344# RUNSHARED is used to run shared python without installed libraries
6345#
6346# INSTSONAME is the name of the shared library that will be use to install
6347# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006348#
6349# LDVERSION is the shared library version number, normally the Python version
6350# with the ABI build flags appended.
6351
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352
6353
6354
6355
6356
6357
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359LDLIBRARY="$LIBRARY"
6360BLDLIBRARY='$(LDLIBRARY)'
6361INSTSONAME='$(LDLIBRARY)'
6362DLLLIBRARY=''
6363LDLIBRARYDIR=''
6364RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00006365LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366
6367# LINKCC is the command that links the python executable -- default is $(CC).
6368# If CXX is set, and if it is needed to link a main function that was
6369# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
6370# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
Pablo Galindocc128882021-03-01 16:47:53 +00006372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
6373printf %s "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374if test -z "$LINKCC"
6375then
6376 LINKCC='$(PURIFY) $(MAINCC)'
6377 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378 QNX*)
6379 # qcc must be used because the other compilers do not
6380 # support -N.
6381 LINKCC=qcc;;
6382 esac
6383fi
Pablo Galindocc128882021-03-01 16:47:53 +00006384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
6385printf "%s\n" "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
Stefan Krahe6dcd372020-08-29 17:00:08 +02006387# EXPORTSYMS holds the list of exported symbols for AIX.
6388# EXPORTSFROM holds the module name exporting symbols on AIX.
6389EXPORTSYMS=
6390EXPORTSFROM=
6391
6392
Pablo Galindocc128882021-03-01 16:47:53 +00006393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
6394printf %s "checking EXPORTSYMS... " >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02006395case $ac_sys_system in
6396AIX*)
6397 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06006398 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02006399 ;;
6400esac
Pablo Galindocc128882021-03-01 16:47:53 +00006401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
6402printf "%s\n" "$EXPORTSYMS" >&6; }
Stefan Krahe6dcd372020-08-29 17:00:08 +02006403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
6405# make sure we default having it set to "no": this is used by
6406# distutils.unixccompiler to know if it should add --enable-new-dtags
6407# to linker command lines, and failing to detect GNU ld simply results
6408# in the same bahaviour as before.
6409
Pablo Galindocc128882021-03-01 16:47:53 +00006410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6411printf %s "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412ac_prog=ld
6413if test "$GCC" = yes; then
6414 ac_prog=`$CC -print-prog-name=ld`
6415fi
6416case `"$ac_prog" -V 2>&1 < /dev/null` in
6417 *GNU*)
6418 GNULD=yes;;
6419 *)
6420 GNULD=no;;
6421esac
Pablo Galindocc128882021-03-01 16:47:53 +00006422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
6423printf "%s\n" "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424
Pablo Galindocc128882021-03-01 16:47:53 +00006425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
6426printf %s "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427# Check whether --enable-shared was given.
Pablo Galindocc128882021-03-01 16:47:53 +00006428if test ${enable_shared+y}
6429then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430 enableval=$enable_shared;
6431fi
6432
6433
6434if test -z "$enable_shared"
6435then
6436 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006437 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 enable_shared="yes";;
6439 *)
6440 enable_shared="no";;
6441 esac
6442fi
Pablo Galindocc128882021-03-01 16:47:53 +00006443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
6444printf "%s\n" "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445
Pablo Galindocc128882021-03-01 16:47:53 +00006446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
6447printf %s "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006448# Check whether --enable-profiling was given.
Pablo Galindocc128882021-03-01 16:47:53 +00006449if test ${enable_profiling+y}
6450then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02006451 enableval=$enable_profiling;
6452fi
6453
6454if test "x$enable_profiling" = xyes; then
6455 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04006456 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00006457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458/* end confdefs.h. */
6459int main() { return 0; }
6460_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00006461if ac_fn_c_try_link "$LINENO"
6462then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02006463
Pablo Galindocc128882021-03-01 16:47:53 +00006464else $as_nop
doko@ubuntu.comba015832012-06-30 16:52:05 +02006465 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466fi
Pablo Galindocc128882021-03-01 16:47:53 +00006467rm -f core conftest.err conftest.$ac_objext conftest.beam \
doko@ubuntu.comba015832012-06-30 16:52:05 +02006468 conftest$ac_exeext conftest.$ac_ext
6469 CC="$ac_save_cc"
6470else
6471 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006472fi
Pablo Galindocc128882021-03-01 16:47:53 +00006473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
6474printf "%s\n" "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475
doko@ubuntu.comba015832012-06-30 16:52:05 +02006476if test "x$enable_profiling" = xyes; then
6477 BASECFLAGS="-pg $BASECFLAGS"
6478 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479fi
6480
Pablo Galindocc128882021-03-01 16:47:53 +00006481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
6482printf %s "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483
6484# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
6485# library that we build, but we do not want to link against it (we
6486# will find it with a -framework option). For this reason there is an
6487# extra variable BLDLIBRARY against which Python and the extension
6488# modules are linked, BLDLIBRARY. This is normally the same as
6489# LDLIBRARY, but empty for MacOSX framework builds.
6490if test "$enable_framework"
6491then
6492 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006493 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494 BLDLIBRARY=''
6495else
6496 BLDLIBRARY='$(LDLIBRARY)'
6497fi
6498
6499# Other platforms follow
6500if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006501 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006502
Pablo Galindocc128882021-03-01 16:47:53 +00006503printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504
6505 case $ac_sys_system in
6506 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006507 LDLIBRARY='libpython$(LDVERSION).dll.a'
6508 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509 ;;
6510 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006511 LDLIBRARY='libpython$(LDVERSION).so'
6512 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006513 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006515 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006516 then
6517 PY3LIBRARY=libpython3.so
6518 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006519 ;;
pxinwrc1174262020-12-15 06:14:43 +08006520 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006521 LDLIBRARY='libpython$(LDVERSION).so'
6522 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006523 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006525 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006526 then
6527 PY3LIBRARY=libpython3.so
6528 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006529 ;;
6530 hp*|HP*)
6531 case `uname -m` in
6532 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006533 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534 ;;
6535 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006536 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006537 ;;
6538 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006539 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006540 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006543 LDLIBRARY='libpython$(LDVERSION).dylib'
6544 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006545 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006547 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006548 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006549 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006550 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551
6552 esac
6553else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006554 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006555 case $ac_sys_system in
6556 CYGWIN*)
6557 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006558 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006559 ;;
6560 esac
6561fi
6562
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006563if test "$cross_compiling" = yes; then
6564 RUNSHARED=
6565fi
6566
Pablo Galindocc128882021-03-01 16:47:53 +00006567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6568printf "%s\n" "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006571if test -n "$ac_tool_prefix"; then
6572 for ac_prog in ar aal
6573 do
6574 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00006576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6577printf %s "checking for $ac_word... " >&6; }
6578if test ${ac_cv_prog_AR+y}
6579then :
6580 printf %s "(cached) " >&6
6581else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582 if test -n "$AR"; then
6583 ac_cv_prog_AR="$AR" # Let the user override the test.
6584else
6585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6586for as_dir in $PATH
6587do
6588 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00006589 case $as_dir in #(((
6590 '') as_dir=./ ;;
6591 */) ;;
6592 *) as_dir=$as_dir/ ;;
6593 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006594 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00006595 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006596 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00006597 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006598 break 2
6599 fi
6600done
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006602IFS=$as_save_IFS
6603
6604fi
6605fi
6606AR=$ac_cv_prog_AR
6607if test -n "$AR"; then
Pablo Galindocc128882021-03-01 16:47:53 +00006608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6609printf "%s\n" "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610else
Pablo Galindocc128882021-03-01 16:47:53 +00006611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6612printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613fi
6614
6615
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006616 test -n "$AR" && break
6617 done
6618fi
6619if test -z "$AR"; then
6620 ac_ct_AR=$AR
6621 for ac_prog in ar aal
6622do
6623 # Extract the first word of "$ac_prog", so it can be a program name with args.
6624set dummy $ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00006625{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626printf %s "checking for $ac_word... " >&6; }
6627if test ${ac_cv_prog_ac_ct_AR+y}
6628then :
6629 printf %s "(cached) " >&6
6630else $as_nop
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006631 if test -n "$ac_ct_AR"; then
6632 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6633else
6634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635for as_dir in $PATH
6636do
6637 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00006638 case $as_dir in #(((
6639 '') as_dir=./ ;;
6640 */) ;;
6641 *) as_dir=$as_dir/ ;;
6642 esac
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006643 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00006644 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006645 ac_cv_prog_ac_ct_AR="$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00006646 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 +02006647 break 2
6648 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006650 done
6651IFS=$as_save_IFS
6652
6653fi
6654fi
6655ac_ct_AR=$ac_cv_prog_ac_ct_AR
6656if test -n "$ac_ct_AR"; then
Pablo Galindocc128882021-03-01 16:47:53 +00006657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6658printf "%s\n" "$ac_ct_AR" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006659else
Pablo Galindocc128882021-03-01 16:47:53 +00006660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661printf "%s\n" "no" >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006662fi
6663
6664
6665 test -n "$ac_ct_AR" && break
6666done
6667
6668 if test "x$ac_ct_AR" = x; then
6669 AR="ar"
6670 else
6671 case $cross_compiling:$ac_tool_warned in
6672yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00006673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6674printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006675ac_tool_warned=yes ;;
6676esac
6677 AR=$ac_ct_AR
6678 fi
6679fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680
6681
6682# tweak ARFLAGS only if the user didn't set it on the command line
6683
6684if test -z "$ARFLAGS"
6685then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006686 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687fi
6688
doko@ubuntu.com58844492012-06-30 18:25:32 +02006689if test -n "$ac_tool_prefix"; then
6690 for ac_prog in readelf
6691 do
6692 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00006694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6695printf %s "checking for $ac_word... " >&6; }
6696if test ${ac_cv_prog_READELF+y}
6697then :
6698 printf %s "(cached) " >&6
6699else $as_nop
doko@ubuntu.com58844492012-06-30 18:25:32 +02006700 if test -n "$READELF"; then
6701 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6702else
6703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6704for as_dir in $PATH
6705do
6706 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00006707 case $as_dir in #(((
6708 '') as_dir=./ ;;
6709 */) ;;
6710 *) as_dir=$as_dir/ ;;
6711 esac
doko@ubuntu.com58844492012-06-30 18:25:32 +02006712 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00006713 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006714 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00006715 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 +02006716 break 2
6717 fi
6718done
6719 done
6720IFS=$as_save_IFS
6721
6722fi
6723fi
6724READELF=$ac_cv_prog_READELF
6725if test -n "$READELF"; then
Pablo Galindocc128882021-03-01 16:47:53 +00006726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6727printf "%s\n" "$READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006728else
Pablo Galindocc128882021-03-01 16:47:53 +00006729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6730printf "%s\n" "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006731fi
6732
6733
6734 test -n "$READELF" && break
6735 done
6736fi
6737if test -z "$READELF"; then
6738 ac_ct_READELF=$READELF
6739 for ac_prog in readelf
6740do
6741 # Extract the first word of "$ac_prog", so it can be a program name with args.
6742set dummy $ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00006743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744printf %s "checking for $ac_word... " >&6; }
6745if test ${ac_cv_prog_ac_ct_READELF+y}
6746then :
6747 printf %s "(cached) " >&6
6748else $as_nop
doko@ubuntu.com58844492012-06-30 18:25:32 +02006749 if test -n "$ac_ct_READELF"; then
6750 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6751else
6752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in $PATH
6754do
6755 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00006756 case $as_dir in #(((
6757 '') as_dir=./ ;;
6758 */) ;;
6759 *) as_dir=$as_dir/ ;;
6760 esac
doko@ubuntu.com58844492012-06-30 18:25:32 +02006761 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00006762 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006763 ac_cv_prog_ac_ct_READELF="$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +00006764 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 +02006765 break 2
6766 fi
6767done
6768 done
6769IFS=$as_save_IFS
6770
6771fi
6772fi
6773ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6774if test -n "$ac_ct_READELF"; then
Pablo Galindocc128882021-03-01 16:47:53 +00006775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6776printf "%s\n" "$ac_ct_READELF" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006777else
Pablo Galindocc128882021-03-01 16:47:53 +00006778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779printf "%s\n" "no" >&6; }
doko@ubuntu.com58844492012-06-30 18:25:32 +02006780fi
6781
6782
6783 test -n "$ac_ct_READELF" && break
6784done
6785
6786 if test "x$ac_ct_READELF" = x; then
6787 READELF=":"
6788 else
6789 case $cross_compiling:$ac_tool_warned in
6790yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00006791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6792printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
doko@ubuntu.com58844492012-06-30 18:25:32 +02006793ac_tool_warned=yes ;;
6794esac
6795 READELF=$ac_ct_READELF
6796 fi
6797fi
6798
6799if test "$cross_compiling" = yes; then
6800 case "$READELF" in
6801 readelf|:)
6802 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6803 ;;
6804 esac
6805fi
6806
6807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006810hp*|HP*)
6811 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812 if test -z "$INSTALL"
6813 then
6814 INSTALL="${srcdir}/install-sh -c"
6815 fi
6816esac
Pablo Galindocc128882021-03-01 16:47:53 +00006817
6818 # Find a good install program. We prefer a C program (faster),
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819# so one script is as good as another. But avoid the broken or
6820# incompatible versions:
6821# SysV /etc/install, /usr/sbin/install
6822# SunOS /usr/etc/install
6823# IRIX /sbin/install
6824# AIX /bin/install
6825# AmigaOS /C/install, which installs bootblocks on floppy discs
6826# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6827# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6828# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6829# OS/2's system install, which has a completely different semantic
6830# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831# Reject install programs that cannot install multiple files.
Pablo Galindocc128882021-03-01 16:47:53 +00006832{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6833printf %s "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834if test -z "$INSTALL"; then
Pablo Galindocc128882021-03-01 16:47:53 +00006835if test ${ac_cv_path_install+y}
6836then :
6837 printf %s "(cached) " >&6
6838else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6840for as_dir in $PATH
6841do
6842 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00006843 case $as_dir in #(((
6844 '') as_dir=./ ;;
6845 */) ;;
6846 *) as_dir=$as_dir/ ;;
6847 esac
6848 # Account for fact that we put trailing slashes in our PATH walk.
6849case $as_dir in #((
6850 ./ | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853 /usr/ucb/* ) ;;
6854 *)
6855 # OSF1 and SCO ODT 3.0 have their own names for install.
6856 # Don't use installbsd from OSF since it installs stuff as root
6857 # by default.
6858 for ac_prog in ginstall scoinst install; do
6859 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00006860 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 if test $ac_prog = install &&
Pablo Galindocc128882021-03-01 16:47:53 +00006862 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 # AIX install. It has an incompatible calling convention.
6864 :
6865 elif test $ac_prog = install &&
Pablo Galindocc128882021-03-01 16:47:53 +00006866 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867 # program-specific install script used by HP pwplus--don't use.
6868 :
6869 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 rm -rf conftest.one conftest.two conftest.dir
6871 echo one > conftest.one
6872 echo two > conftest.two
6873 mkdir conftest.dir
Pablo Galindocc128882021-03-01 16:47:53 +00006874 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 test -s conftest.one && test -s conftest.two &&
6876 test -s conftest.dir/conftest.one &&
6877 test -s conftest.dir/conftest.two
6878 then
Pablo Galindocc128882021-03-01 16:47:53 +00006879 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 break 3
6881 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882 fi
6883 fi
6884 done
6885 done
6886 ;;
6887esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006888
6889 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890IFS=$as_save_IFS
6891
Matthias Kloseb9621712010-04-24 17:59:49 +00006892rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893
6894fi
Pablo Galindocc128882021-03-01 16:47:53 +00006895 if test ${ac_cv_path_install+y}; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896 INSTALL=$ac_cv_path_install
6897 else
6898 # As a last resort, use the slow shell script. Don't cache a
6899 # value for INSTALL within a source directory, because that will
6900 # break other packages using the cache if that directory is
6901 # removed, or if the value is a relative name.
6902 INSTALL=$ac_install_sh
6903 fi
6904fi
Pablo Galindocc128882021-03-01 16:47:53 +00006905{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6906printf "%s\n" "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907
6908# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6909# It thinks the first close brace ends the variable substitution.
6910test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6911
6912test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6913
6914test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6915
Pablo Galindocc128882021-03-01 16:47:53 +00006916
6917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
6918printf %s "checking for a race-free mkdir -p... " >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006919if test -z "$MKDIR_P"; then
Pablo Galindocc128882021-03-01 16:47:53 +00006920 if test ${ac_cv_path_mkdir+y}
6921then :
6922 printf %s "(cached) " >&6
6923else $as_nop
Matthias Klose93a0ef12012-03-15 18:08:34 +01006924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6925for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6926do
6927 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00006928 case $as_dir in #(((
6929 '') as_dir=./ ;;
6930 */) ;;
6931 *) as_dir=$as_dir/ ;;
6932 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +01006933 for ac_prog in mkdir gmkdir; do
6934 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00006935 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
6936 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
6937 'mkdir ('*'coreutils) '* | \
6938 'BusyBox '* | \
Matthias Klose93a0ef12012-03-15 18:08:34 +01006939 'mkdir (fileutils) '4.1*)
Pablo Galindocc128882021-03-01 16:47:53 +00006940 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
Matthias Klose93a0ef12012-03-15 18:08:34 +01006941 break 3;;
6942 esac
6943 done
6944 done
6945 done
6946IFS=$as_save_IFS
6947
6948fi
6949
6950 test -d ./--version && rmdir ./--version
Pablo Galindocc128882021-03-01 16:47:53 +00006951 if test ${ac_cv_path_mkdir+y}; then
Matthias Klose93a0ef12012-03-15 18:08:34 +01006952 MKDIR_P="$ac_cv_path_mkdir -p"
6953 else
6954 # As a last resort, use the slow shell script. Don't cache a
6955 # value for MKDIR_P within a source directory, because that will
6956 # break other packages using the cache if that directory is
6957 # removed, or if the value is a relative name.
6958 MKDIR_P="$ac_install_sh -d"
6959 fi
6960fi
Pablo Galindocc128882021-03-01 16:47:53 +00006961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6962printf "%s\n" "$MKDIR_P" >&6; }
Matthias Klose93a0ef12012-03-15 18:08:34 +01006963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964
6965# Not every filesystem supports hard links
6966
6967if test -z "$LN" ; then
6968 case $ac_sys_system in
6969 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 *) LN=ln;;
6971 esac
6972fi
6973
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006974# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006975
6976ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006977
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978# Check for --with-pydebug
Pablo Galindocc128882021-03-01 16:47:53 +00006979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6980printf %s "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981
6982# Check whether --with-pydebug was given.
Pablo Galindocc128882021-03-01 16:47:53 +00006983if test ${with_pydebug+y}
6984then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 withval=$with_pydebug;
6986if test "$withval" != no
6987then
6988
Pablo Galindocc128882021-03-01 16:47:53 +00006989printf "%s\n" "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990
Pablo Galindocc128882021-03-01 16:47:53 +00006991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6992printf "%s\n" "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006994 ABIFLAGS="${ABIFLAGS}d"
Pablo Galindocc128882021-03-01 16:47:53 +00006995else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6996printf "%s\n" "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997fi
Pablo Galindocc128882021-03-01 16:47:53 +00006998else $as_nop
6999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7000printf "%s\n" "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001fi
7002
7003
Victor Stinnerf4e47032019-04-25 00:56:28 +02007004# Check for --with-trace-refs
7005# --with-trace-refs
Pablo Galindocc128882021-03-01 16:47:53 +00007006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
7007printf %s "checking for --with-trace-refs... " >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02007008
7009# Check whether --with-trace-refs was given.
Pablo Galindocc128882021-03-01 16:47:53 +00007010if test ${with_trace_refs+y}
7011then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02007012 withval=$with_trace_refs;
Pablo Galindocc128882021-03-01 16:47:53 +00007013else $as_nop
Victor Stinnerf4e47032019-04-25 00:56:28 +02007014 with_trace_refs=no
7015fi
7016
Pablo Galindocc128882021-03-01 16:47:53 +00007017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
7018printf "%s\n" "$with_trace_refs" >&6; }
Victor Stinnerf4e47032019-04-25 00:56:28 +02007019
7020if test "$with_trace_refs" = "yes"
7021then
7022
Pablo Galindocc128882021-03-01 16:47:53 +00007023printf "%s\n" "#define Py_TRACE_REFS 1" >>confdefs.h
Victor Stinnerf4e47032019-04-25 00:56:28 +02007024
7025fi
7026
7027# Check for --with-assertions.
7028# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02007029assertions='false'
Pablo Galindocc128882021-03-01 16:47:53 +00007030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
7031printf %s "checking for --with-assertions... " >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007032
7033# Check whether --with-assertions was given.
Pablo Galindocc128882021-03-01 16:47:53 +00007034if test ${with_assertions+y}
7035then :
T. Woutersddbfa2c2017-05-23 01:30:49 +02007036 withval=$with_assertions;
7037if test "$withval" != no
7038then
7039 assertions='true'
7040fi
7041fi
7042
7043if test "$assertions" = 'true'; then
Pablo Galindocc128882021-03-01 16:47:53 +00007044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7045printf "%s\n" "yes" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007046elif test "$Py_DEBUG" = 'true'; then
7047 assertions='true'
Pablo Galindocc128882021-03-01 16:47:53 +00007048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
7049printf "%s\n" "implied by --with-pydebug" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007050else
Pablo Galindocc128882021-03-01 16:47:53 +00007051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7052printf "%s\n" "no" >&6; }
T. Woutersddbfa2c2017-05-23 01:30:49 +02007053fi
7054
Brett Cannon63d98bc2016-09-06 17:12:40 -07007055# Enable optimization flags
7056
7057
7058Py_OPT='false'
Pablo Galindocc128882021-03-01 16:47:53 +00007059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
7060printf %s "checking for --enable-optimizations... " >&6; }
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007061# Check whether --enable-optimizations was given.
Pablo Galindocc128882021-03-01 16:47:53 +00007062if test ${enable_optimizations+y}
7063then :
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007064 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04007065if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07007066then
7067 Py_OPT='true'
Pablo Galindocc128882021-03-01 16:47:53 +00007068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7069printf "%s\n" "yes" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07007070else
7071 Py_OPT='false'
Pablo Galindocc128882021-03-01 16:47:53 +00007072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7073printf "%s\n" "no" >&6; };
Brett Cannon63d98bc2016-09-06 17:12:40 -07007074fi
Pablo Galindocc128882021-03-01 16:47:53 +00007075else $as_nop
7076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7077printf "%s\n" "no" >&6; }
Brett Cannon63d98bc2016-09-06 17:12:40 -07007078fi
7079
7080if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00007081 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
7082 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07007083 # 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 +00007084 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07007085 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007086 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07007087 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01007088 case $CC in
7089 *gcc*)
Pablo Galindocc128882021-03-01 16:47:53 +00007090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
7091printf %s "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
7092if test ${ax_cv_check_cflags___fno_semantic_interposition+y}
7093then :
7094 printf %s "(cached) " >&6
7095else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007096
7097 ax_check_save_flags=$CFLAGS
7098 CFLAGS="$CFLAGS -fno-semantic-interposition"
7099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7100/* end confdefs.h. */
7101
7102int
Pablo Galindocc128882021-03-01 16:47:53 +00007103main (void)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007104{
7105
7106 ;
7107 return 0;
7108}
7109_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007110if ac_fn_c_try_compile "$LINENO"
7111then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007112 ax_cv_check_cflags___fno_semantic_interposition=yes
Pablo Galindocc128882021-03-01 16:47:53 +00007113else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007114 ax_cv_check_cflags___fno_semantic_interposition=no
7115fi
Pablo Galindocc128882021-03-01 16:47:53 +00007116rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007117 CFLAGS=$ax_check_save_flags
7118fi
Pablo Galindocc128882021-03-01 16:47:53 +00007119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
7120printf "%s\n" "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
7121if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes
7122then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007123
Pablo Galindob451b0e2020-10-21 22:46:52 +01007124 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
7125 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007126
Pablo Galindocc128882021-03-01 16:47:53 +00007127else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007128 :
7129fi
7130
Pablo Galindob451b0e2020-10-21 22:46:52 +01007131 ;;
7132 esac
7133
7134
Brett Cannon63d98bc2016-09-06 17:12:40 -07007135else
7136 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007137 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07007138 DEF_MAKE_RULE="all"
7139fi
7140
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007141
Pablo Galindocc128882021-03-01 16:47:53 +00007142{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
7143printf %s "checking PROFILE_TASK... " >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007144if test -z "$PROFILE_TASK"
7145then
Victor Stinner67900052021-01-27 11:16:15 +01007146 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007147fi
Pablo Galindocc128882021-03-01 16:47:53 +00007148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
7149printf "%s\n" "$PROFILE_TASK" >&6; }
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07007150
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007151# Make llvm-relatec checks work on systems where llvm tools are not installed with their
7152# normal names in the default $PATH (ie: Ubuntu). They exist under the
7153# non-suffixed name in their versioned llvm directory.
7154
7155llvm_bin_dir=''
7156llvm_path="${PATH}"
7157if test "${CC}" = "clang"
7158then
7159 clang_bin=`which clang`
7160 # Some systems install clang elsewhere as a symlink to the real path
7161 # which is where the related llvm tools are located.
7162 if test -L "${clang_bin}"
7163 then
7164 clang_dir=`dirname "${clang_bin}"`
7165 clang_bin=`readlink "${clang_bin}"`
7166 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
7167 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
7168 fi
7169fi
7170
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007171# Enable LTO flags
Pablo Galindocc128882021-03-01 16:47:53 +00007172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
7173printf %s "checking for --with-lto... " >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007174
7175# Check whether --with-lto was given.
Pablo Galindocc128882021-03-01 16:47:53 +00007176if test ${with_lto+y}
7177then :
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007178 withval=$with_lto;
7179if test "$withval" != no
7180then
7181 Py_LTO='true'
Pablo Galindocc128882021-03-01 16:47:53 +00007182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7183printf "%s\n" "yes" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007184else
7185 Py_LTO='false'
Pablo Galindocc128882021-03-01 16:47:53 +00007186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7187printf "%s\n" "no" >&6; };
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007188fi
Pablo Galindocc128882021-03-01 16:47:53 +00007189else $as_nop
7190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7191printf "%s\n" "no" >&6; }
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07007192fi
7193
7194if test "$Py_LTO" = 'true' ; then
7195 case $CC in
7196 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02007197
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007198 if test -n "$ac_tool_prefix"; then
7199 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
7200set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00007201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202printf %s "checking for $ac_word... " >&6; }
7203if test ${ac_cv_path_LLVM_AR+y}
7204then :
7205 printf %s "(cached) " >&6
7206else $as_nop
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007207 case $LLVM_AR in
7208 [\\/]* | ?:[\\/]*)
7209 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
7210 ;;
7211 *)
7212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7213for as_dir in ${llvm_path}
7214do
7215 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00007216 case $as_dir in #(((
7217 '') as_dir=./ ;;
7218 */) ;;
7219 *) as_dir=$as_dir/ ;;
7220 esac
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007221 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00007222 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7223 ac_cv_path_LLVM_AR="$as_dir$ac_word$ac_exec_ext"
7224 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 +02007225 break 2
7226 fi
7227done
7228 done
7229IFS=$as_save_IFS
7230
7231 ;;
7232esac
7233fi
7234LLVM_AR=$ac_cv_path_LLVM_AR
7235if test -n "$LLVM_AR"; then
Pablo Galindocc128882021-03-01 16:47:53 +00007236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
7237printf "%s\n" "$LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007238else
Pablo Galindocc128882021-03-01 16:47:53 +00007239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240printf "%s\n" "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007241fi
7242
7243
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007244fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007245if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007246 ac_pt_LLVM_AR=$LLVM_AR
7247 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007248set dummy llvm-ar; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00007249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250printf %s "checking for $ac_word... " >&6; }
7251if test ${ac_cv_path_ac_pt_LLVM_AR+y}
7252then :
7253 printf %s "(cached) " >&6
7254else $as_nop
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007255 case $ac_pt_LLVM_AR in
7256 [\\/]* | ?:[\\/]*)
7257 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
7258 ;;
7259 *)
7260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261for as_dir in ${llvm_path}
7262do
7263 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00007264 case $as_dir in #(((
7265 '') as_dir=./ ;;
7266 */) ;;
7267 *) as_dir=$as_dir/ ;;
7268 esac
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007269 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00007270 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7271 ac_cv_path_ac_pt_LLVM_AR="$as_dir$ac_word$ac_exec_ext"
7272 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 +02007273 break 2
7274 fi
7275done
7276 done
7277IFS=$as_save_IFS
7278
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007279 ;;
7280esac
7281fi
7282ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
7283if test -n "$ac_pt_LLVM_AR"; then
Pablo Galindocc128882021-03-01 16:47:53 +00007284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
7285printf "%s\n" "$ac_pt_LLVM_AR" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007286else
Pablo Galindocc128882021-03-01 16:47:53 +00007287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7288printf "%s\n" "no" >&6; }
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007289fi
7290
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007291 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007292 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007293 else
7294 case $cross_compiling:$ac_tool_warned in
7295yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00007296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7297printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007298ac_tool_warned=yes ;;
7299esac
7300 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007301 fi
7302else
7303 LLVM_AR="$ac_cv_path_LLVM_AR"
7304fi
7305
7306
7307 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
7308 then
7309 LLVM_AR_FOUND="found"
7310 else
7311 LLVM_AR_FOUND="not-found"
7312 fi
7313 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
7314 then
7315 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
7316 if test -n "${found_llvm_ar}"
7317 then
7318 LLVM_AR='/usr/bin/xcrun llvm-ar'
7319 LLVM_AR_FOUND=found
Pablo Galindocc128882021-03-01 16:47:53 +00007320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
7321printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007322 fi
7323 fi
7324 if test $LLVM_AR_FOUND = not-found
7325 then
7326 LLVM_PROFR_ERR=yes
7327 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
7328 else
7329 LLVM_AR_ERR=no
7330 fi
7331 AR="${LLVM_AR}"
7332 case $ac_sys_system in
7333 Darwin*)
7334 # Any changes made here should be reflected in the GCC+Darwin case below
7335 LTOFLAGS="-flto -Wl,-export_dynamic"
7336 ;;
7337 *)
7338 LTOFLAGS="-flto"
7339 ;;
7340 esac
7341 ;;
7342 *gcc*)
7343 case $ac_sys_system in
7344 Darwin*)
7345 LTOFLAGS="-flto -Wl,-export_dynamic"
7346 ;;
7347 *)
7348 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
7349 ;;
7350 esac
7351 ;;
7352 esac
7353
7354 if test "$ac_cv_prog_cc_g" = "yes"
7355 then
7356 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
7357 # to get debug symbols.
7358 LTOFLAGS="$LTOFLAGS -g"
7359 fi
7360
stratakisf92c7aa2018-12-04 15:54:01 +01007361 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01007362 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007363fi
7364
7365# Enable PGO flags.
7366
7367
7368
7369
7370
7371
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007372if test -n "$ac_tool_prefix"; then
7373 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
7374set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00007375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7376printf %s "checking for $ac_word... " >&6; }
7377if test ${ac_cv_path_LLVM_PROFDATA+y}
7378then :
7379 printf %s "(cached) " >&6
7380else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007381 case $LLVM_PROFDATA in
7382 [\\/]* | ?:[\\/]*)
7383 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
7384 ;;
7385 *)
7386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07007388do
7389 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00007390 case $as_dir in #(((
7391 '') as_dir=./ ;;
7392 */) ;;
7393 *) as_dir=$as_dir/ ;;
7394 esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007395 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00007396 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7397 ac_cv_path_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7398 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07007399 break 2
7400 fi
7401done
7402 done
7403IFS=$as_save_IFS
7404
Gregory P. Smith799520c2016-09-07 16:10:00 -07007405 ;;
7406esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007407fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007408LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
7409if test -n "$LLVM_PROFDATA"; then
Pablo Galindocc128882021-03-01 16:47:53 +00007410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
7411printf "%s\n" "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007412else
Pablo Galindocc128882021-03-01 16:47:53 +00007413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7414printf "%s\n" "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007415fi
7416
7417
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007418fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007419if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007420 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
7421 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07007422set dummy llvm-profdata; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +00007423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7424printf %s "checking for $ac_word... " >&6; }
7425if test ${ac_cv_path_ac_pt_LLVM_PROFDATA+y}
7426then :
7427 printf %s "(cached) " >&6
7428else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007429 case $ac_pt_LLVM_PROFDATA in
7430 [\\/]* | ?:[\\/]*)
7431 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
7432 ;;
7433 *)
7434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435for as_dir in ${llvm_path}
7436do
7437 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +00007438 case $as_dir in #(((
7439 '') as_dir=./ ;;
7440 */) ;;
7441 *) as_dir=$as_dir/ ;;
7442 esac
Gregory P. Smith799520c2016-09-07 16:10:00 -07007443 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +00007444 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7445 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7446 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 -07007447 break 2
7448 fi
7449done
7450 done
7451IFS=$as_save_IFS
7452
Gregory P. Smith799520c2016-09-07 16:10:00 -07007453 ;;
7454esac
7455fi
7456ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
7457if test -n "$ac_pt_LLVM_PROFDATA"; then
Pablo Galindocc128882021-03-01 16:47:53 +00007458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
7459printf "%s\n" "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007460else
Pablo Galindocc128882021-03-01 16:47:53 +00007461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462printf "%s\n" "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007463fi
7464
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007465 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07007466 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007467 else
7468 case $cross_compiling:$ac_tool_warned in
7469yes:)
Pablo Galindocc128882021-03-01 16:47:53 +00007470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7471printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007472ac_tool_warned=yes ;;
7473esac
7474 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07007475 fi
7476else
7477 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
7478fi
7479
7480
7481if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
7482then
7483 LLVM_PROF_FOUND="found"
7484else
7485 LLVM_PROF_FOUND="not-found"
7486fi
7487if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
7488then
7489 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
7490 if test -n "${found_llvm_profdata}"
7491 then
7492 # llvm-profdata isn't directly in $PATH in some cases.
7493 # https://apple.stackexchange.com/questions/197053/
7494 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
7495 LLVM_PROF_FOUND=found
Pablo Galindocc128882021-03-01 16:47:53 +00007496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
7497printf "%s\n" "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07007498 fi
7499fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007500LLVM_PROF_ERR=no
7501case $CC in
7502 *clang*)
7503 # Any changes made here should be reflected in the GCC+Darwin case below
7504 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7505 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007506 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007507 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
7508 if test $LLVM_PROF_FOUND = not-found
7509 then
7510 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007511 if test "${REQUIRE_PGO}" = "yes"
7512 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007513 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 -07007514 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007515 fi
7516 ;;
7517 *gcc*)
7518 case $ac_sys_system in
7519 Darwin*)
7520 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7521 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007522 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007523 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07007524 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007525 then
7526 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007527 if test "${REQUIRE_PGO}" = "yes"
7528 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007529 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 -07007530 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007531 fi
7532 ;;
7533 *)
7534 PGO_PROF_GEN_FLAG="-fprofile-generate"
7535 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
7536 LLVM_PROF_MERGER="true"
7537 LLVM_PROF_FILE=""
7538 ;;
7539 esac
7540 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007541 *icc*)
7542 PGO_PROF_GEN_FLAG="-prof-gen"
7543 PGO_PROF_USE_FLAG="-prof-use"
7544 LLVM_PROF_MERGER="true"
7545 LLVM_PROF_FILE=""
7546 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07007547esac
7548
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
7550# merged with this chunk of code?
7551
7552# Optimizer/debugger flags
7553# ------------------------
7554# (The following bit of code is complicated enough - please keep things
7555# indented properly. Just pretend you're editing Python code. ;-)
7556
7557# There are two parallel sets of case statements below, one that checks to
7558# see if OPT was set and one that does BASECFLAGS setting based upon
7559# compiler and platform. BASECFLAGS tweaks need to be made even if the
7560# user set OPT.
7561
Victor Stinner23a683a2019-04-12 21:27:37 +02007562case $CC in
7563 *clang*)
7564 cc_is_clang=1
7565 ;;
7566 *)
7567 if $CC --version 2>&1 | grep -q clang
7568 then
7569 cc_is_clang=1
7570 else
7571 cc_is_clang=
7572 fi
7573esac
7574
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575# tweak OPT based on compiler and platform, only if the user didn't set
7576# it on the command line
7577
Victor Stinner9ed34a82017-05-02 22:35:58 +02007578
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00007579if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580then
7581 case $GCC in
7582 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583 # For gcc 4.x we need to use -fwrapv so lets check if its supported
7584 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
7585 WRAP="-fwrapv"
7586 fi
Stefan Krah962055d2011-09-14 15:14:08 +02007587
Victor Stinner35f3d242017-04-21 12:35:24 +02007588 if test -n "${cc_is_clang}"
7589 then
7590 # Clang also needs -fwrapv
7591 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02007592 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
7593 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02007594 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02007595 fi
7596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597 case $ac_cv_prog_cc_g in
7598 yes)
7599 if test "$Py_DEBUG" = 'true' ; then
7600 # Optimization messes up debuggers, so turn it off for
7601 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007602 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02007603 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007604 else
Victor Stinner28205b22017-04-21 11:24:34 +02007605 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007606 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607 else
Victor Stinner28205b22017-04-21 11:24:34 +02007608 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609 fi
7610 ;;
7611 *)
Victor Stinner28205b22017-04-21 11:24:34 +02007612 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613 ;;
7614 esac
Victor Stinner28205b22017-04-21 11:24:34 +02007615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616 case $ac_sys_system in
7617 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7618 ;;
7619 esac
7620 ;;
7621
7622 *)
7623 OPT="-O"
7624 ;;
7625 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626fi
7627
7628
7629
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007630
stratakiscf10a752018-12-19 18:19:01 +01007631
Ronald Oussoren41761932020-11-08 10:05:27 +01007632# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633UNIVERSAL_ARCH_FLAGS=
7634
7635
7636# tweak BASECFLAGS based on compiler and platform
7637case $GCC in
7638yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007639 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007640
Pablo Galindocc128882021-03-01 16:47:53 +00007641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7642printf %s "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007643 ac_save_cc="$CC"
7644 CC="$CC -Wextra -Werror"
Pablo Galindocc128882021-03-01 16:47:53 +00007645 if test ${ac_cv_extra_warnings+y}
7646then :
7647 printf %s "(cached) " >&6
7648else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7650/* end confdefs.h. */
7651
7652
7653int
Pablo Galindocc128882021-03-01 16:47:53 +00007654main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007655{
7656
7657 ;
7658 return 0;
7659}
7660
7661_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007662if ac_fn_c_try_compile "$LINENO"
7663then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007664
7665 ac_cv_extra_warnings=yes
7666
Pablo Galindocc128882021-03-01 16:47:53 +00007667else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007668
7669 ac_cv_extra_warnings=no
7670
7671fi
Pablo Galindocc128882021-03-01 16:47:53 +00007672rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007673fi
7674
7675 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00007676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7677printf "%s\n" "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007678
7679 if test $ac_cv_extra_warnings = yes
7680 then
7681 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7682 fi
7683
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007684 # Python doesn't violate C99 aliasing rules, but older versions of
7685 # GCC produce warnings for legal Python code. Enable
7686 # -fno-strict-aliasing on versions of GCC that support but produce
7687 # warnings. See Issue3326
Pablo Galindocc128882021-03-01 16:47:53 +00007688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7689printf %s "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690 ac_save_cc="$CC"
7691 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007692 save_CFLAGS="$CFLAGS"
Pablo Galindocc128882021-03-01 16:47:53 +00007693 if test ${ac_cv_no_strict_aliasing+y}
7694then :
7695 printf %s "(cached) " >&6
7696else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007699
Matthias Kloseb159a552010-04-25 21:00:44 +00007700
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007701int
Pablo Galindocc128882021-03-01 16:47:53 +00007702main (void)
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007703{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007704
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007705 ;
7706 return 0;
7707}
Matthias Kloseb159a552010-04-25 21:00:44 +00007708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007710if ac_fn_c_try_compile "$LINENO"
7711then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007712
7713 CC="$ac_save_cc -fstrict-aliasing"
7714 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007716/* end confdefs.h. */
7717
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007718 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007719int
Pablo Galindocc128882021-03-01 16:47:53 +00007720main (void)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007721{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007722double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007723 ;
7724 return 0;
7725}
Matthias Kloseb159a552010-04-25 21:00:44 +00007726
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007727_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007728if ac_fn_c_try_compile "$LINENO"
7729then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007730
7731 ac_cv_no_strict_aliasing=no
7732
Pablo Galindocc128882021-03-01 16:47:53 +00007733else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007734
7735 ac_cv_no_strict_aliasing=yes
7736
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007737fi
Pablo Galindocc128882021-03-01 16:47:53 +00007738rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007739
Pablo Galindocc128882021-03-01 16:47:53 +00007740else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007741
7742 ac_cv_no_strict_aliasing=no
7743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744fi
Pablo Galindocc128882021-03-01 16:47:53 +00007745rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007746fi
7747
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007748 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00007750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7751printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007752 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753 then
7754 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7755 fi
7756
Zachary Ware5af85642015-12-21 12:09:17 -06007757 # ICC doesn't recognize the option, but only emits a warning
7758 ## XXX does it emit an unused result warning and can it be disabled?
7759 case "$CC" in
7760 *icc*)
7761 ac_cv_disable_unused_result_warning=no
7762 ;;
7763 *)
Pablo Galindocc128882021-03-01 16:47:53 +00007764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7765printf %s "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007766 ac_save_cc="$CC"
7767 CC="$CC -Wunused-result -Werror"
7768 save_CFLAGS="$CFLAGS"
Pablo Galindocc128882021-03-01 16:47:53 +00007769 if test ${ac_cv_disable_unused_result_warning+y}
7770then :
7771 printf %s "(cached) " >&6
7772else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7774/* end confdefs.h. */
7775
7776
7777int
Pablo Galindocc128882021-03-01 16:47:53 +00007778main (void)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007779{
7780
7781 ;
7782 return 0;
7783}
7784
7785_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007786if ac_fn_c_try_compile "$LINENO"
7787then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007788
7789 ac_cv_disable_unused_result_warning=yes
7790
Pablo Galindocc128882021-03-01 16:47:53 +00007791else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007792
7793 ac_cv_disable_unused_result_warning=no
7794
7795fi
Pablo Galindocc128882021-03-01 16:47:53 +00007796rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007797fi
7798
7799 CFLAGS="$save_CFLAGS"
7800 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00007801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7802printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007803 ;;
7804 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007805
7806 if test $ac_cv_disable_unused_result_warning = yes
7807 then
7808 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007809 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7810 fi
7811
Pablo Galindocc128882021-03-01 16:47:53 +00007812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7813printf %s "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007814 ac_save_cc="$CC"
7815 CC="$CC -Wunused-parameter -Werror"
Pablo Galindocc128882021-03-01 16:47:53 +00007816 if test ${ac_cv_disable_unused_parameter_warning+y}
7817then :
7818 printf %s "(cached) " >&6
7819else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7821/* end confdefs.h. */
7822
7823
7824int
Pablo Galindocc128882021-03-01 16:47:53 +00007825main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007826{
7827
7828 ;
7829 return 0;
7830}
7831
7832_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007833if ac_fn_c_try_compile "$LINENO"
7834then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007835
7836 ac_cv_disable_unused_parameter_warning=yes
7837
Pablo Galindocc128882021-03-01 16:47:53 +00007838else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007839
7840 ac_cv_disable_unused_parameter_warning=no
7841
7842fi
Pablo Galindocc128882021-03-01 16:47:53 +00007843rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007844fi
7845
7846 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00007847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7848printf "%s\n" "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007849
7850 if test $ac_cv_disable_unused_parameter_warning = yes
7851 then
7852 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7853 fi
7854
Pablo Galindocc128882021-03-01 16:47:53 +00007855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7856printf %s "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007857 ac_save_cc="$CC"
7858 CC="$CC -Wmissing-field-initializers -Werror"
Pablo Galindocc128882021-03-01 16:47:53 +00007859 if test ${ac_cv_disable_missing_field_initializers+y}
7860then :
7861 printf %s "(cached) " >&6
7862else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7864/* end confdefs.h. */
7865
7866
7867int
Pablo Galindocc128882021-03-01 16:47:53 +00007868main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007869{
7870
7871 ;
7872 return 0;
7873}
7874
7875_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007876if ac_fn_c_try_compile "$LINENO"
7877then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007878
7879 ac_cv_disable_missing_field_initializers=yes
7880
Pablo Galindocc128882021-03-01 16:47:53 +00007881else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007882
7883 ac_cv_disable_missing_field_initializers=no
7884
7885fi
Pablo Galindocc128882021-03-01 16:47:53 +00007886rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007887fi
7888
7889 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00007890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7891printf "%s\n" "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007892
7893 if test $ac_cv_disable_missing_field_initializers = yes
7894 then
7895 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007896 fi
7897
Pablo Galindocc128882021-03-01 16:47:53 +00007898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7899printf %s "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007900 ac_save_cc="$CC"
7901 CC="$CC -Wsign-compare"
7902 save_CFLAGS="$CFLAGS"
Pablo Galindocc128882021-03-01 16:47:53 +00007903 if test ${ac_cv_enable_sign_compare_warning+y}
7904then :
7905 printf %s "(cached) " >&6
7906else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7908/* end confdefs.h. */
7909
7910
7911int
Pablo Galindocc128882021-03-01 16:47:53 +00007912main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007913{
7914
7915 ;
7916 return 0;
7917}
7918
7919_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007920if ac_fn_c_try_compile "$LINENO"
7921then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007922
7923 ac_cv_enable_sign_compare_warning=yes
7924
Pablo Galindocc128882021-03-01 16:47:53 +00007925else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007926
7927 ac_cv_enable_sign_compare_warning=no
7928
7929fi
Pablo Galindocc128882021-03-01 16:47:53 +00007930rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007931fi
7932
7933 CFLAGS="$save_CFLAGS"
7934 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00007935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7936printf "%s\n" "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007937
7938 if test $ac_cv_enable_sign_compare_warning = yes
7939 then
7940 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7941 fi
7942
Pablo Galindocc128882021-03-01 16:47:53 +00007943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7944printf %s "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007945 ac_save_cc="$CC"
7946 CC="$CC -Wunreachable-code"
7947 save_CFLAGS="$CFLAGS"
Pablo Galindocc128882021-03-01 16:47:53 +00007948 if test ${ac_cv_enable_unreachable_code_warning+y}
7949then :
7950 printf %s "(cached) " >&6
7951else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7953/* end confdefs.h. */
7954
7955
7956int
Pablo Galindocc128882021-03-01 16:47:53 +00007957main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007958{
7959
7960 ;
7961 return 0;
7962}
7963
7964_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00007965if ac_fn_c_try_compile "$LINENO"
7966then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007967
7968 ac_cv_enable_unreachable_code_warning=yes
7969
Pablo Galindocc128882021-03-01 16:47:53 +00007970else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007971
7972 ac_cv_enable_unreachable_code_warning=no
7973
7974fi
Pablo Galindocc128882021-03-01 16:47:53 +00007975rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007976fi
7977
7978 CFLAGS="$save_CFLAGS"
7979 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007980
7981 # Don't enable unreachable code warning in debug mode, since it usually
7982 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007983 # Issue #24324: Unfortunately, the unreachable code warning does not work
7984 # correctly on gcc and has been silently removed from the compiler.
7985 # It is supported on clang but on OS X systems gcc may be an alias
7986 # for clang. Try to determine if the compiler is not really gcc and,
7987 # if so, only then enable the warning.
7988 if test $ac_cv_enable_unreachable_code_warning = yes && \
7989 test "$Py_DEBUG" != "true" && \
7990 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007991 then
7992 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007993 else
7994 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007995 fi
Pablo Galindocc128882021-03-01 16:47:53 +00007996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7997printf "%s\n" "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007998
Pablo Galindocc128882021-03-01 16:47:53 +00007999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
8000printf %s "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008001 ac_save_cc="$CC"
8002 CC="$CC -Werror -Wstrict-prototypes"
Pablo Galindocc128882021-03-01 16:47:53 +00008003 if test ${ac_cv_enable_enable_strict_prototypes_warning+y}
8004then :
8005 printf %s "(cached) " >&6
8006else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8008/* end confdefs.h. */
8009
8010
8011int
Pablo Galindocc128882021-03-01 16:47:53 +00008012main (void)
INADA Naokie3364842018-06-05 20:40:53 +09008013{
8014
8015 ;
8016 return 0;
8017}
8018
8019_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008020if ac_fn_c_try_compile "$LINENO"
8021then :
INADA Naokie3364842018-06-05 20:40:53 +09008022
8023 ac_cv_enable_strict_prototypes_warning=yes
8024
Pablo Galindocc128882021-03-01 16:47:53 +00008025else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008026
8027 ac_cv_enable_strict_prototypes_warning=no
8028
8029fi
Pablo Galindocc128882021-03-01 16:47:53 +00008030rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09008031fi
8032
8033 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00008034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
8035printf "%s\n" "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008036
8037 if test $ac_cv_enable_strict_prototypes_warning = yes
8038 then
8039 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
8040 fi
8041
Pablo Galindocc128882021-03-01 16:47:53 +00008042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
8043printf %s "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008044 ac_save_cc="$CC"
8045 CC="$CC -Werror=implicit-function-declaration"
Pablo Galindocc128882021-03-01 16:47:53 +00008046 if test ${ac_cv_enable_implicit_function_declaration_error+y}
8047then :
8048 printf %s "(cached) " >&6
8049else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8051/* end confdefs.h. */
8052
8053
8054int
Pablo Galindocc128882021-03-01 16:47:53 +00008055main (void)
Victor Stinner193ee0a2017-02-06 14:24:00 +01008056{
8057
8058 ;
8059 return 0;
8060}
8061
8062_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008063if ac_fn_c_try_compile "$LINENO"
8064then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01008065
8066 ac_cv_enable_implicit_function_declaration_error=yes
8067
Pablo Galindocc128882021-03-01 16:47:53 +00008068else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008069
8070 ac_cv_enable_implicit_function_declaration_error=no
8071
8072fi
Pablo Galindocc128882021-03-01 16:47:53 +00008073rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01008074fi
8075
8076 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00008077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
8078printf "%s\n" "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008079
8080 if test $ac_cv_enable_implicit_function_declaration_error = yes
8081 then
8082 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
8083 fi
8084
Pablo Galindocc128882021-03-01 16:47:53 +00008085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
8086printf %s "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008087 ac_save_cc="$CC"
8088 CC="$CC -fvisibility=hidden"
Pablo Galindocc128882021-03-01 16:47:53 +00008089 if test ${ac_cv_enable_visibility+y}
8090then :
8091 printf %s "(cached) " >&6
8092else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8094/* end confdefs.h. */
8095
8096
8097int
Pablo Galindocc128882021-03-01 16:47:53 +00008098main (void)
Vinay Sajip0b60f642019-10-15 08:26:12 +01008099{
8100
8101 ;
8102 return 0;
8103}
8104
8105_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008106if ac_fn_c_try_compile "$LINENO"
8107then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01008108
8109 ac_cv_enable_visibility=yes
8110
Pablo Galindocc128882021-03-01 16:47:53 +00008111else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008112
8113 ac_cv_enable_visibility=no
8114
8115fi
Pablo Galindocc128882021-03-01 16:47:53 +00008116rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01008117fi
8118
8119 CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +00008120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
8121printf "%s\n" "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008122
8123 if test $ac_cv_enable_visibility = yes
8124 then
8125 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
8126 fi
8127
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008128 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
8129 # support. Without this, treatment of subnormals doesn't follow
8130 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01008131 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008132 alpha*)
8133 BASECFLAGS="$BASECFLAGS -mieee"
8134 ;;
8135 esac
8136
8137 case $ac_sys_system in
8138 SCO_SV*)
8139 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
8140 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008141
Ned Deily87adb6e2013-10-18 21:09:56 -07008142 Darwin*)
8143 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
8144 # used to be here, but non-Apple gcc doesn't accept them.
8145 if test "${CC}" = gcc
8146 then
Pablo Galindocc128882021-03-01 16:47:53 +00008147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
8148printf %s "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008149 case "${UNIVERSALSDK}" in
8150 */MacOSX10.4u.sdk)
8151 # Build using 10.4 SDK, force usage of gcc when the
8152 # compiler is gcc, otherwise the user will get very
8153 # confusing error messages when building on OSX 10.6
8154 CC=gcc-4.0
8155 CPP=cpp-4.0
8156 ;;
8157 esac
Pablo Galindocc128882021-03-01 16:47:53 +00008158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8159printf "%s\n" "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008160 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008161
Ned Deily87adb6e2013-10-18 21:09:56 -07008162 if test "${enable_universalsdk}"
8163 then
8164 case "$UNIVERSAL_ARCHS" in
8165 32-bit)
8166 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
8167 LIPO_32BIT_FLAGS=""
8168 ARCH_RUN_32BIT=""
8169 ;;
8170 64-bit)
8171 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
8172 LIPO_32BIT_FLAGS=""
8173 ARCH_RUN_32BIT="true"
8174 ;;
8175 all)
8176 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
8177 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8178 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8179 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01008180 universal2)
8181 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
8182 LIPO_32BIT_FLAGS=""
8183 ARCH_RUN_32BIT="true"
8184 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008185 intel)
8186 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
8187 LIPO_32BIT_FLAGS="-extract i386"
8188 ARCH_RUN_32BIT="/usr/bin/arch -i386"
8189 ;;
8190 intel-32)
8191 UNIVERSAL_ARCH_FLAGS="-arch i386"
8192 LIPO_32BIT_FLAGS=""
8193 ARCH_RUN_32BIT=""
8194 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05008195 intel-64)
8196 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
8197 LIPO_32BIT_FLAGS=""
8198 ARCH_RUN_32BIT="true"
8199 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008200 3-way)
8201 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
8202 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8203 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8204 ;;
8205 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01008206 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 -07008207 ;;
8208 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008209
Ned Deily87adb6e2013-10-18 21:09:56 -07008210 if test "${UNIVERSALSDK}" != "/"
8211 then
Ned Deily8c9bb722018-01-30 07:42:14 -05008212 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
8213 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008214 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05008215 else
8216 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
8217 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008218 fi
8219 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008220
Ned Deily87adb6e2013-10-18 21:09:56 -07008221 # Calculate an appropriate deployment target for this build:
8222 # The deployment target value is used explicitly to enable certain
8223 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07008224 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07008225 # component of the string returned by distutils.get_platform().
8226 #
8227 # Use the value from:
8228 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
8229 # 2. the operating system version of the build machine if >= 10.6
8230 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
8231 # below to pick either 10.3, 10.4, or 10.5 as the target.
8232 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008233
Pablo Galindocc128882021-03-01 16:47:53 +00008234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
8235printf %s "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07008236 cur_target_major=`sw_vers -productVersion | \
8237 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8238 cur_target_minor=`sw_vers -productVersion | \
8239 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8240 cur_target="${cur_target_major}.${cur_target_minor}"
8241 if test ${cur_target_major} -eq 10 && \
8242 test ${cur_target_minor} -ge 3 && \
8243 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07008244 then
Ned Deily36820b62014-06-25 13:44:22 -07008245 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07008246 cur_target=10.3
8247 if test ${enable_universalsdk}
8248 then
8249 case "$UNIVERSAL_ARCHS" in
8250 all|3-way|intel|64-bit)
8251 # These configurations were first supported in 10.5
8252 cur_target='10.5'
8253 ;;
8254 esac
8255 else
8256 if test `/usr/bin/arch` = "i386"
8257 then
8258 # 10.4 was the first release to support Intel archs
8259 cur_target="10.4"
8260 fi
8261 fi
8262 fi
8263 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008264
Ned Deily87adb6e2013-10-18 21:09:56 -07008265 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
8266 # environment with a value that is the same as what we'll use
8267 # in the Makefile to ensure that we'll get the same compiler
8268 # environment during configure and build time.
8269 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
8270 export MACOSX_DEPLOYMENT_TARGET
8271 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Pablo Galindocc128882021-03-01 16:47:53 +00008272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
8273printf "%s\n" "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008274
Pablo Galindocc128882021-03-01 16:47:53 +00008275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
8276printf %s "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8278/* end confdefs.h. */
8279#include <stdio.h>
8280int
Pablo Galindocc128882021-03-01 16:47:53 +00008281main (void)
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008282{
8283printf("%d", 42);
8284 ;
8285 return 0;
8286}
8287_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008288if ac_fn_c_try_link "$LINENO"
8289then :
8290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8291printf "%s\n" "yes" >&6; }
8292else $as_nop
8293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8294printf "%s\n" "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008295 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
8296
8297fi
Pablo Galindocc128882021-03-01 16:47:53 +00008298rm -f core conftest.err conftest.$ac_objext conftest.beam \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008299 conftest$ac_exeext conftest.$ac_ext
8300
Ned Deily87adb6e2013-10-18 21:09:56 -07008301 # end of Darwin* tests
8302 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008303 esac
8304 ;;
8305
8306*)
8307 case $ac_sys_system in
8308 OpenUNIX*|UnixWare*)
8309 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
8310 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008311 SCO_SV*)
8312 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
8313 ;;
8314 esac
8315 ;;
8316esac
8317
Zachary Ware5af85642015-12-21 12:09:17 -06008318case "$CC" in
8319*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02008320 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06008321 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
8322 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02008323*xlc*)
8324 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
8325 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06008326esac
8327
T. Woutersddbfa2c2017-05-23 01:30:49 +02008328if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008329 :
8330else
8331 OPT="-DNDEBUG $OPT"
8332fi
8333
8334if test "$ac_arch_flags"
8335then
8336 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
8337fi
8338
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008339# On some compilers, pthreads are available without further options
8340# (e.g. MacOS X). On some of these systems, the compiler will not
8341# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
8342# So we have to see first whether pthreads are available without
8343# options before we can check whether -Kpthread improves anything.
Pablo Galindocc128882021-03-01 16:47:53 +00008344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
8345printf %s "checking whether pthreads are available without options... " >&6; }
8346if test ${ac_cv_pthread_is_default+y}
8347then :
8348 printf %s "(cached) " >&6
8349else $as_nop
8350 if test "$cross_compiling" = yes
8351then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008352 ac_cv_pthread_is_default=no
Pablo Galindocc128882021-03-01 16:47:53 +00008353else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008355/* end confdefs.h. */
8356
Stefan Krah7dba5942012-11-22 22:49:11 +01008357#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008358#include <pthread.h>
8359
8360void* routine(void* p){return NULL;}
8361
8362int main(){
8363 pthread_t p;
8364 if(pthread_create(&p,NULL,routine,NULL)!=0)
8365 return 1;
8366 (void)pthread_detach(p);
8367 return 0;
8368}
8369
8370_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008371if ac_fn_c_try_run "$LINENO"
8372then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008373
8374 ac_cv_pthread_is_default=yes
8375 ac_cv_kthread=no
8376 ac_cv_pthread=no
8377
Pablo Galindocc128882021-03-01 16:47:53 +00008378else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8382 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008383fi
8384
8385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008386fi
8387
Pablo Galindocc128882021-03-01 16:47:53 +00008388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
8389printf "%s\n" "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008390
8391
8392if test $ac_cv_pthread_is_default = yes
8393then
8394 ac_cv_kpthread=no
8395else
8396# -Kpthread, if available, provides the right #defines
8397# and linker options to make pthread_create available
8398# Some compilers won't report that they do not support -Kpthread,
8399# so we need to run a program to see whether it really made the
8400# function available.
Pablo Galindocc128882021-03-01 16:47:53 +00008401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
8402printf %s "checking whether $CC accepts -Kpthread... " >&6; }
8403if test ${ac_cv_kpthread+y}
8404then :
8405 printf %s "(cached) " >&6
8406else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008407 ac_save_cc="$CC"
8408CC="$CC -Kpthread"
Pablo Galindocc128882021-03-01 16:47:53 +00008409if test "$cross_compiling" = yes
8410then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008411 ac_cv_kpthread=no
Pablo Galindocc128882021-03-01 16:47:53 +00008412else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008414/* end confdefs.h. */
8415
Stefan Krah7dba5942012-11-22 22:49:11 +01008416#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008417#include <pthread.h>
8418
8419void* routine(void* p){return NULL;}
8420
8421int main(){
8422 pthread_t p;
8423 if(pthread_create(&p,NULL,routine,NULL)!=0)
8424 return 1;
8425 (void)pthread_detach(p);
8426 return 0;
8427}
8428
8429_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008430if ac_fn_c_try_run "$LINENO"
8431then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008432 ac_cv_kpthread=yes
Pablo Galindocc128882021-03-01 16:47:53 +00008433else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8437 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008438fi
8439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008440CC="$ac_save_cc"
8441fi
8442
Pablo Galindocc128882021-03-01 16:47:53 +00008443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
8444printf "%s\n" "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008445fi
8446
8447if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
8448then
8449# -Kthread, if available, provides the right #defines
8450# and linker options to make pthread_create available
8451# Some compilers won't report that they do not support -Kthread,
8452# so we need to run a program to see whether it really made the
8453# function available.
Pablo Galindocc128882021-03-01 16:47:53 +00008454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
8455printf %s "checking whether $CC accepts -Kthread... " >&6; }
8456if test ${ac_cv_kthread+y}
8457then :
8458 printf %s "(cached) " >&6
8459else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008460 ac_save_cc="$CC"
8461CC="$CC -Kthread"
Pablo Galindocc128882021-03-01 16:47:53 +00008462if test "$cross_compiling" = yes
8463then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008464 ac_cv_kthread=no
Pablo Galindocc128882021-03-01 16:47:53 +00008465else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008467/* end confdefs.h. */
8468
Stefan Krah7dba5942012-11-22 22:49:11 +01008469#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008470#include <pthread.h>
8471
8472void* routine(void* p){return NULL;}
8473
8474int main(){
8475 pthread_t p;
8476 if(pthread_create(&p,NULL,routine,NULL)!=0)
8477 return 1;
8478 (void)pthread_detach(p);
8479 return 0;
8480}
8481
8482_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008483if ac_fn_c_try_run "$LINENO"
8484then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008485 ac_cv_kthread=yes
Pablo Galindocc128882021-03-01 16:47:53 +00008486else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008491fi
8492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008493CC="$ac_save_cc"
8494fi
8495
Pablo Galindocc128882021-03-01 16:47:53 +00008496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
8497printf "%s\n" "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008498fi
8499
8500if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
8501then
8502# -pthread, if available, provides the right #defines
8503# and linker options to make pthread_create available
8504# Some compilers won't report that they do not support -pthread,
8505# so we need to run a program to see whether it really made the
8506# function available.
Pablo Galindocc128882021-03-01 16:47:53 +00008507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
8508printf %s "checking whether $CC accepts -pthread... " >&6; }
8509if test ${ac_cv_pthread+y}
8510then :
8511 printf %s "(cached) " >&6
8512else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008513 ac_save_cc="$CC"
8514CC="$CC -pthread"
Pablo Galindocc128882021-03-01 16:47:53 +00008515if test "$cross_compiling" = yes
8516then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008517 ac_cv_pthread=no
Pablo Galindocc128882021-03-01 16:47:53 +00008518else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008520/* end confdefs.h. */
8521
Stefan Krah7dba5942012-11-22 22:49:11 +01008522#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008523#include <pthread.h>
8524
8525void* routine(void* p){return NULL;}
8526
8527int main(){
8528 pthread_t p;
8529 if(pthread_create(&p,NULL,routine,NULL)!=0)
8530 return 1;
8531 (void)pthread_detach(p);
8532 return 0;
8533}
8534
8535_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00008536if ac_fn_c_try_run "$LINENO"
8537then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008538 ac_cv_pthread=yes
Pablo Galindocc128882021-03-01 16:47:53 +00008539else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8543 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008544fi
8545
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008546CC="$ac_save_cc"
8547fi
8548
Pablo Galindocc128882021-03-01 16:47:53 +00008549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
8550printf "%s\n" "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008551fi
8552
8553# If we have set a CC compiler flag for thread support then
8554# check if it works for CXX, too.
8555ac_cv_cxx_thread=no
8556if test ! -z "$CXX"
8557then
Pablo Galindocc128882021-03-01 16:47:53 +00008558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
8559printf %s "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008560ac_save_cxx="$CXX"
8561
8562if test "$ac_cv_kpthread" = "yes"
8563then
8564 CXX="$CXX -Kpthread"
8565 ac_cv_cxx_thread=yes
8566elif test "$ac_cv_kthread" = "yes"
8567then
8568 CXX="$CXX -Kthread"
8569 ac_cv_cxx_thread=yes
8570elif test "$ac_cv_pthread" = "yes"
8571then
8572 CXX="$CXX -pthread"
8573 ac_cv_cxx_thread=yes
8574fi
8575
8576if test $ac_cv_cxx_thread = yes
8577then
8578 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
8579 $CXX -c conftest.$ac_ext 2>&5
8580 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
8581 && test -s conftest$ac_exeext && ./conftest$ac_exeext
8582 then
8583 ac_cv_cxx_thread=yes
8584 else
8585 ac_cv_cxx_thread=no
8586 fi
8587 rm -fr conftest*
8588fi
Pablo Galindocc128882021-03-01 16:47:53 +00008589{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
8590printf "%s\n" "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008591fi
8592CXX="$ac_save_cxx"
8593
8594
8595# checks for header files
Pablo Galindocc128882021-03-01 16:47:53 +00008596# Autoupdate added the next two lines to ensure that your configure
8597# script's behavior did not change. They are probably safe to remove.
8598
8599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8600printf %s "checking for egrep... " >&6; }
8601if test ${ac_cv_path_EGREP+y}
8602then :
8603 printf %s "(cached) " >&6
8604else $as_nop
8605 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8606 then ac_cv_path_EGREP="$GREP -E"
8607 else
8608 if test -z "$EGREP"; then
8609 ac_path_EGREP_found=false
8610 # Loop through the user's path and test for each of PROGNAME-LIST
8611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8612for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8613do
8614 IFS=$as_save_IFS
8615 case $as_dir in #(((
8616 '') as_dir=./ ;;
8617 */) ;;
8618 *) as_dir=$as_dir/ ;;
8619 esac
8620 for ac_prog in egrep
8621 do
8622 for ac_exec_ext in '' $ac_executable_extensions; do
8623 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8624 as_fn_executable_p "$ac_path_EGREP" || continue
8625# Check for GNU ac_path_EGREP and select it if it is found.
8626 # Check for GNU $ac_path_EGREP
8627case `"$ac_path_EGREP" --version 2>&1` in
8628*GNU*)
8629 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8630*)
8631 ac_count=0
8632 printf %s 0123456789 >"conftest.in"
8633 while :
8634 do
8635 cat "conftest.in" "conftest.in" >"conftest.tmp"
8636 mv "conftest.tmp" "conftest.in"
8637 cp "conftest.in" "conftest.nl"
8638 printf "%s\n" 'EGREP' >> "conftest.nl"
8639 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8640 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8641 as_fn_arith $ac_count + 1 && ac_count=$as_val
8642 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8643 # Best one so far, save it but keep looking for a better one
8644 ac_cv_path_EGREP="$ac_path_EGREP"
8645 ac_path_EGREP_max=$ac_count
8646 fi
8647 # 10*(2^10) chars as input seems more than enough
8648 test $ac_count -gt 10 && break
8649 done
8650 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8651esac
8652
8653 $ac_path_EGREP_found && break 3
8654 done
8655 done
8656 done
8657IFS=$as_save_IFS
8658 if test -z "$ac_cv_path_EGREP"; then
8659 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8660 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008661else
Pablo Galindocc128882021-03-01 16:47:53 +00008662 ac_cv_path_EGREP=$EGREP
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008663fi
8664
Pablo Galindocc128882021-03-01 16:47:53 +00008665 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008666fi
Pablo Galindocc128882021-03-01 16:47:53 +00008667{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8668printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8669 EGREP="$ac_cv_path_EGREP"
8670
8671
8672
8673ac_fn_c_check_header_compile "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default"
8674if test "x$ac_cv_header_asm_types_h" = xyes
8675then :
8676 printf "%s\n" "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008677
8678fi
Pablo Galindocc128882021-03-01 16:47:53 +00008679ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
8680if test "x$ac_cv_header_crypt_h" = xyes
8681then :
8682 printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008684fi
Pablo Galindocc128882021-03-01 16:47:53 +00008685ac_fn_c_check_header_compile "$LINENO" "conio.h" "ac_cv_header_conio_h" "$ac_includes_default"
8686if test "x$ac_cv_header_conio_h" = xyes
8687then :
8688 printf "%s\n" "#define HAVE_CONIO_H 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008689
8690fi
Pablo Galindocc128882021-03-01 16:47:53 +00008691ac_fn_c_check_header_compile "$LINENO" "direct.h" "ac_cv_header_direct_h" "$ac_includes_default"
8692if test "x$ac_cv_header_direct_h" = xyes
8693then :
8694 printf "%s\n" "#define HAVE_DIRECT_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008695
8696fi
Pablo Galindocc128882021-03-01 16:47:53 +00008697ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
8698if test "x$ac_cv_header_dlfcn_h" = xyes
8699then :
8700 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008701
Pablo Galindocc128882021-03-01 16:47:53 +00008702fi
8703ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
8704if test "x$ac_cv_header_errno_h" = xyes
8705then :
8706 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
8707
8708fi
8709ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
8710if test "x$ac_cv_header_fcntl_h" = xyes
8711then :
8712 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
8713
8714fi
8715ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default"
8716if test "x$ac_cv_header_grp_h" = xyes
8717then :
8718 printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
8719
8720fi
8721ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
8722if test "x$ac_cv_header_ieeefp_h" = xyes
8723then :
8724 printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h
8725
8726fi
8727ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default"
8728if test "x$ac_cv_header_io_h" = xyes
8729then :
8730 printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h
8731
8732fi
8733ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
8734if test "x$ac_cv_header_langinfo_h" = xyes
8735then :
8736 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
8737
8738fi
8739ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
8740if test "x$ac_cv_header_libintl_h" = xyes
8741then :
8742 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
8743
8744fi
8745ac_fn_c_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default"
8746if test "x$ac_cv_header_process_h" = xyes
8747then :
8748 printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h
8749
8750fi
8751ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8752if test "x$ac_cv_header_pthread_h" = xyes
8753then :
8754 printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
8755
8756fi
8757ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
8758if test "x$ac_cv_header_sched_h" = xyes
8759then :
8760 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
8761
8762fi
8763ac_fn_c_check_header_compile "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
8764if test "x$ac_cv_header_shadow_h" = xyes
8765then :
8766 printf "%s\n" "#define HAVE_SHADOW_H 1" >>confdefs.h
8767
8768fi
8769ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
8770if test "x$ac_cv_header_signal_h" = xyes
8771then :
8772 printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
8773
8774fi
8775ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
8776if test "x$ac_cv_header_stropts_h" = xyes
8777then :
8778 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
8779
8780fi
8781ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
8782if test "x$ac_cv_header_termios_h" = xyes
8783then :
8784 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
8785
8786fi
8787ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
8788if test "x$ac_cv_header_utime_h" = xyes
8789then :
8790 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
8791
8792fi
8793ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
8794if test "x$ac_cv_header_poll_h" = xyes
8795then :
8796 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
8797
8798fi
8799ac_fn_c_check_header_compile "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default"
8800if test "x$ac_cv_header_sys_devpoll_h" = xyes
8801then :
8802 printf "%s\n" "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h
8803
8804fi
8805ac_fn_c_check_header_compile "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
8806if test "x$ac_cv_header_sys_epoll_h" = xyes
8807then :
8808 printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h
8809
8810fi
8811ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
8812if test "x$ac_cv_header_sys_poll_h" = xyes
8813then :
8814 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
8815
8816fi
8817ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
8818if test "x$ac_cv_header_sys_audioio_h" = xyes
8819then :
8820 printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h
8821
8822fi
8823ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
8824if test "x$ac_cv_header_sys_xattr_h" = xyes
8825then :
8826 printf "%s\n" "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
8827
8828fi
8829ac_fn_c_check_header_compile "$LINENO" "sys/bsdtty.h" "ac_cv_header_sys_bsdtty_h" "$ac_includes_default"
8830if test "x$ac_cv_header_sys_bsdtty_h" = xyes
8831then :
8832 printf "%s\n" "#define HAVE_SYS_BSDTTY_H 1" >>confdefs.h
8833
8834fi
8835ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
8836if test "x$ac_cv_header_sys_event_h" = xyes
8837then :
8838 printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h
8839
8840fi
8841ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
8842if test "x$ac_cv_header_sys_file_h" = xyes
8843then :
8844 printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
8845
8846fi
8847ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
8848if test "x$ac_cv_header_sys_ioctl_h" = xyes
8849then :
8850 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
8851
8852fi
8853ac_fn_c_check_header_compile "$LINENO" "sys/kern_control.h" "ac_cv_header_sys_kern_control_h" "$ac_includes_default"
8854if test "x$ac_cv_header_sys_kern_control_h" = xyes
8855then :
8856 printf "%s\n" "#define HAVE_SYS_KERN_CONTROL_H 1" >>confdefs.h
8857
8858fi
8859ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
8860if test "x$ac_cv_header_sys_loadavg_h" = xyes
8861then :
8862 printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h
8863
8864fi
8865ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default"
8866if test "x$ac_cv_header_sys_lock_h" = xyes
8867then :
8868 printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h
8869
8870fi
8871ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8872if test "x$ac_cv_header_sys_mkdev_h" = xyes
8873then :
8874 printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h
8875
8876fi
8877ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
8878if test "x$ac_cv_header_sys_modem_h" = xyes
8879then :
8880 printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h
8881
8882fi
8883ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
8884if test "x$ac_cv_header_sys_param_h" = xyes
8885then :
8886 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
8887
8888fi
8889ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
8890if test "x$ac_cv_header_sys_random_h" = xyes
8891then :
8892 printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
8893
8894fi
8895ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
8896if test "x$ac_cv_header_sys_select_h" = xyes
8897then :
8898 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
8899
8900fi
8901ac_fn_c_check_header_compile "$LINENO" "sys/sendfile.h" "ac_cv_header_sys_sendfile_h" "$ac_includes_default"
8902if test "x$ac_cv_header_sys_sendfile_h" = xyes
8903then :
8904 printf "%s\n" "#define HAVE_SYS_SENDFILE_H 1" >>confdefs.h
8905
8906fi
8907ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
8908if test "x$ac_cv_header_sys_socket_h" = xyes
8909then :
8910 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
8911
8912fi
8913ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
8914if test "x$ac_cv_header_sys_statvfs_h" = xyes
8915then :
8916 printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h
8917
8918fi
8919ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
8920if test "x$ac_cv_header_sys_stat_h" = xyes
8921then :
8922 printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
8923
8924fi
8925ac_fn_c_check_header_compile "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default"
8926if test "x$ac_cv_header_sys_syscall_h" = xyes
8927then :
8928 printf "%s\n" "#define HAVE_SYS_SYSCALL_H 1" >>confdefs.h
8929
8930fi
8931ac_fn_c_check_header_compile "$LINENO" "sys/sys_domain.h" "ac_cv_header_sys_sys_domain_h" "$ac_includes_default"
8932if test "x$ac_cv_header_sys_sys_domain_h" = xyes
8933then :
8934 printf "%s\n" "#define HAVE_SYS_SYS_DOMAIN_H 1" >>confdefs.h
8935
8936fi
8937ac_fn_c_check_header_compile "$LINENO" "sys/termio.h" "ac_cv_header_sys_termio_h" "$ac_includes_default"
8938if test "x$ac_cv_header_sys_termio_h" = xyes
8939then :
8940 printf "%s\n" "#define HAVE_SYS_TERMIO_H 1" >>confdefs.h
8941
8942fi
8943ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
8944if test "x$ac_cv_header_sys_time_h" = xyes
8945then :
8946 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
8947
8948fi
8949ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default"
8950if test "x$ac_cv_header_sys_times_h" = xyes
8951then :
8952 printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h
8953
8954fi
8955ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
8956if test "x$ac_cv_header_sys_types_h" = xyes
8957then :
8958 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
8959
8960fi
8961ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
8962if test "x$ac_cv_header_sys_uio_h" = xyes
8963then :
8964 printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
8965
8966fi
8967ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
8968if test "x$ac_cv_header_sys_un_h" = xyes
8969then :
8970 printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
8971
8972fi
8973ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
8974if test "x$ac_cv_header_sys_utsname_h" = xyes
8975then :
8976 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
8977
8978fi
8979ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
8980if test "x$ac_cv_header_sys_wait_h" = xyes
8981then :
8982 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8983
8984fi
8985ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default"
8986if test "x$ac_cv_header_pty_h" = xyes
8987then :
8988 printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h
8989
8990fi
8991ac_fn_c_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default"
8992if test "x$ac_cv_header_libutil_h" = xyes
8993then :
8994 printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h
8995
8996fi
8997ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
8998if test "x$ac_cv_header_sys_resource_h" = xyes
8999then :
9000 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
9001
9002fi
9003ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
9004if test "x$ac_cv_header_netpacket_packet_h" = xyes
9005then :
9006 printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h
9007
9008fi
9009ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
9010if test "x$ac_cv_header_sysexits_h" = xyes
9011then :
9012 printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
9013
9014fi
9015ac_fn_c_check_header_compile "$LINENO" "bluetooth.h" "ac_cv_header_bluetooth_h" "$ac_includes_default"
9016if test "x$ac_cv_header_bluetooth_h" = xyes
9017then :
9018 printf "%s\n" "#define HAVE_BLUETOOTH_H 1" >>confdefs.h
9019
9020fi
9021ac_fn_c_check_header_compile "$LINENO" "linux/tipc.h" "ac_cv_header_linux_tipc_h" "$ac_includes_default"
9022if test "x$ac_cv_header_linux_tipc_h" = xyes
9023then :
9024 printf "%s\n" "#define HAVE_LINUX_TIPC_H 1" >>confdefs.h
9025
9026fi
9027ac_fn_c_check_header_compile "$LINENO" "linux/random.h" "ac_cv_header_linux_random_h" "$ac_includes_default"
9028if test "x$ac_cv_header_linux_random_h" = xyes
9029then :
9030 printf "%s\n" "#define HAVE_LINUX_RANDOM_H 1" >>confdefs.h
9031
9032fi
9033ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default"
9034if test "x$ac_cv_header_spawn_h" = xyes
9035then :
9036 printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h
9037
9038fi
9039ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
9040if test "x$ac_cv_header_util_h" = xyes
9041then :
9042 printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h
9043
9044fi
9045ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default"
9046if test "x$ac_cv_header_alloca_h" = xyes
9047then :
9048 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
9049
9050fi
9051ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default"
9052if test "x$ac_cv_header_endian_h" = xyes
9053then :
9054 printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
9055
9056fi
9057ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default"
9058if test "x$ac_cv_header_sys_endian_h" = xyes
9059then :
9060 printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
9061
9062fi
9063ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9064if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9065then :
9066 printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h
9067
9068fi
9069ac_fn_c_check_header_compile "$LINENO" "linux/memfd.h" "ac_cv_header_linux_memfd_h" "$ac_includes_default"
9070if test "x$ac_cv_header_linux_memfd_h" = xyes
9071then :
9072 printf "%s\n" "#define HAVE_LINUX_MEMFD_H 1" >>confdefs.h
9073
9074fi
9075ac_fn_c_check_header_compile "$LINENO" "linux/wait.h" "ac_cv_header_linux_wait_h" "$ac_includes_default"
9076if test "x$ac_cv_header_linux_wait_h" = xyes
9077then :
9078 printf "%s\n" "#define HAVE_LINUX_WAIT_H 1" >>confdefs.h
9079
9080fi
9081ac_fn_c_check_header_compile "$LINENO" "sys/memfd.h" "ac_cv_header_sys_memfd_h" "$ac_includes_default"
9082if test "x$ac_cv_header_sys_memfd_h" = xyes
9083then :
9084 printf "%s\n" "#define HAVE_SYS_MEMFD_H 1" >>confdefs.h
9085
9086fi
9087ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
9088if test "x$ac_cv_header_sys_mman_h" = xyes
9089then :
9090 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
9091
9092fi
9093ac_fn_c_check_header_compile "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default"
9094if test "x$ac_cv_header_sys_eventfd_h" = xyes
9095then :
9096 printf "%s\n" "#define HAVE_SYS_EVENTFD_H 1" >>confdefs.h
9097
9098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009100ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009101for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Pablo Galindocc128882021-03-01 16:47:53 +00009102 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9104printf %s "checking for $ac_hdr that defines DIR... " >&6; }
9105if eval test \${$as_ac_Header+y}
9106then :
9107 printf %s "(cached) " >&6
9108else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009110/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009111#include <sys/types.h>
9112#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00009113
Martin v. Löwis11437992002-04-12 09:54:03 +00009114int
Pablo Galindocc128882021-03-01 16:47:53 +00009115main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009116{
9117if ((DIR *) 0)
9118return 0;
9119 ;
9120 return 0;
9121}
9122_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00009123if ac_fn_c_try_compile "$LINENO"
9124then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 eval "$as_ac_Header=yes"
Pablo Galindocc128882021-03-01 16:47:53 +00009126else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009128fi
Pablo Galindocc128882021-03-01 16:47:53 +00009129rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009131eval ac_res=\$$as_ac_Header
Pablo Galindocc128882021-03-01 16:47:53 +00009132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9133printf "%s\n" "$ac_res" >&6; }
9134if eval test \"x\$"$as_ac_Header"\" = x"yes"
9135then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 cat >>confdefs.h <<_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00009137#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009138_ACEOF
9139
9140ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00009141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009143done
9144# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9145if test $ac_header_dirent = dirent.h; then
Pablo Galindocc128882021-03-01 16:47:53 +00009146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9147printf %s "checking for library containing opendir... " >&6; }
9148if test ${ac_cv_search_opendir+y}
9149then :
9150 printf %s "(cached) " >&6
9151else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009159char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009160int
Pablo Galindocc128882021-03-01 16:47:53 +00009161main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ;
9165 return 0;
9166}
9167_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00009168for ac_lib in '' dir
9169do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170 if test -z "$ac_lib"; then
9171 ac_res="none required"
9172 else
9173 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009174 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175 fi
Pablo Galindocc128882021-03-01 16:47:53 +00009176 if ac_fn_c_try_link "$LINENO"
9177then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009179fi
Pablo Galindocc128882021-03-01 16:47:53 +00009180rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 conftest$ac_exeext
Pablo Galindocc128882021-03-01 16:47:53 +00009182 if test ${ac_cv_search_opendir+y}
9183then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009186done
Pablo Galindocc128882021-03-01 16:47:53 +00009187if test ${ac_cv_search_opendir+y}
9188then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009189
Pablo Galindocc128882021-03-01 16:47:53 +00009190else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191 ac_cv_search_opendir=no
9192fi
9193rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009194LIBS=$ac_func_search_save_LIBS
9195fi
Pablo Galindocc128882021-03-01 16:47:53 +00009196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9197printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198ac_res=$ac_cv_search_opendir
Pablo Galindocc128882021-03-01 16:47:53 +00009199if test "$ac_res" != no
9200then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00009202
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009204
Michael W. Hudson54241132001-12-07 15:38:26 +00009205else
Pablo Galindocc128882021-03-01 16:47:53 +00009206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9207printf %s "checking for library containing opendir... " >&6; }
9208if test ${ac_cv_search_opendir+y}
9209then :
9210 printf %s "(cached) " >&6
9211else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216/* Override any GCC internal prototype to avoid an error.
9217 Use char because int might match the return type of a GCC
9218 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009219char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009220int
Pablo Galindocc128882021-03-01 16:47:53 +00009221main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009223return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ;
9225 return 0;
9226}
9227_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00009228for ac_lib in '' x
9229do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230 if test -z "$ac_lib"; then
9231 ac_res="none required"
9232 else
9233 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009234 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009235 fi
Pablo Galindocc128882021-03-01 16:47:53 +00009236 if ac_fn_c_try_link "$LINENO"
9237then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009239fi
Pablo Galindocc128882021-03-01 16:47:53 +00009240rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009241 conftest$ac_exeext
Pablo Galindocc128882021-03-01 16:47:53 +00009242 if test ${ac_cv_search_opendir+y}
9243then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246done
Pablo Galindocc128882021-03-01 16:47:53 +00009247if test ${ac_cv_search_opendir+y}
9248then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009249
Pablo Galindocc128882021-03-01 16:47:53 +00009250else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009251 ac_cv_search_opendir=no
9252fi
9253rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009254LIBS=$ac_func_search_save_LIBS
9255fi
Pablo Galindocc128882021-03-01 16:47:53 +00009256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9257printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258ac_res=$ac_cv_search_opendir
Pablo Galindocc128882021-03-01 16:47:53 +00009259if test "$ac_res" != no
9260then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009263fi
9264
9265fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009266
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009267
Pablo Galindocc128882021-03-01 16:47:53 +00009268ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
9269if test "x$ac_cv_header_sys_mkdev_h" = xyes
9270then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009271
Pablo Galindocc128882021-03-01 16:47:53 +00009272printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009273
9274fi
9275
Pablo Galindocc128882021-03-01 16:47:53 +00009276if test $ac_cv_header_sys_mkdev_h = no; then
9277 ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9278if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9279then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009280
Pablo Galindocc128882021-03-01 16:47:53 +00009281printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009282
9283fi
9284
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009285fi
9286
Michael W. Hudson54241132001-12-07 15:38:26 +00009287
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009288# bluetooth/bluetooth.h has been known to not compile with -std=c99.
9289# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
9290SAVE_CFLAGS=$CFLAGS
9291CFLAGS="-std=c99 $CFLAGS"
Pablo Galindocc128882021-03-01 16:47:53 +00009292ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
9293if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes
9294then :
9295 printf "%s\n" "#define HAVE_BLUETOOTH_BLUETOOTH_H 1" >>confdefs.h
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009296
9297fi
9298
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009299CFLAGS=$SAVE_CFLAGS
9300
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009301# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Pablo Galindocc128882021-03-01 16:47:53 +00009302ac_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 -07009303#ifdef STDC_HEADERS
9304# include <stdlib.h>
9305# include <stddef.h>
9306#else
9307# ifdef HAVE_STDLIB_H
9308# include <stdlib.h>
9309# endif
9310#endif
9311#ifdef HAVE_SYS_SOCKET_H
9312# include <sys/socket.h>
9313#endif
9314
9315"
Pablo Galindocc128882021-03-01 16:47:53 +00009316if test "x$ac_cv_header_net_if_h" = xyes
9317then :
9318 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009319
9320fi
9321
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009322
Martin v. Löwis11017b12006-01-14 18:12:57 +00009323# On Linux, netlink.h requires asm/types.h
Pablo Galindocc128882021-03-01 16:47:53 +00009324ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00009325#ifdef HAVE_ASM_TYPES_H
9326#include <asm/types.h>
9327#endif
9328#ifdef HAVE_SYS_SOCKET_H
9329#include <sys/socket.h>
9330#endif
9331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332"
Pablo Galindocc128882021-03-01 16:47:53 +00009333if test "x$ac_cv_header_linux_netlink_h" = xyes
9334then :
9335 printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00009336
9337fi
9338
Martin v. Löwis11017b12006-01-14 18:12:57 +00009339
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009340# On Linux, qrtr.h requires asm/types.h
Pablo Galindocc128882021-03-01 16:47:53 +00009341ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009342#ifdef HAVE_ASM_TYPES_H
9343#include <asm/types.h>
9344#endif
9345#ifdef HAVE_SYS_SOCKET_H
9346#include <sys/socket.h>
9347#endif
9348
9349"
Pablo Galindocc128882021-03-01 16:47:53 +00009350if test "x$ac_cv_header_linux_qrtr_h" = xyes
9351then :
9352 printf "%s\n" "#define HAVE_LINUX_QRTR_H 1" >>confdefs.h
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009353
9354fi
9355
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009356
Pablo Galindocc128882021-03-01 16:47:53 +00009357ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04009358#ifdef HAVE_SYS_SOCKET_H
9359#include <sys/socket.h>
9360#endif
9361
9362"
Pablo Galindocc128882021-03-01 16:47:53 +00009363if test "x$ac_cv_header_linux_vm_sockets_h" = xyes
9364then :
9365 printf "%s\n" "#define HAVE_LINUX_VM_SOCKETS_H 1" >>confdefs.h
caaveryeffc12f2017-09-06 18:18:10 -04009366
9367fi
9368
caaveryeffc12f2017-09-06 18:18:10 -04009369
karl ding360371f2020-04-29 15:31:19 -07009370# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Pablo Galindocc128882021-03-01 16:47:53 +00009371ac_fn_c_check_header_compile "$LINENO" "linux/can.h" "ac_cv_header_linux_can_h" "
Charles-François Natali47413c12011-10-06 19:47:44 +02009372#ifdef HAVE_SYS_SOCKET_H
9373#include <sys/socket.h>
9374#endif
9375
9376"
Pablo Galindocc128882021-03-01 16:47:53 +00009377if test "x$ac_cv_header_linux_can_h" = xyes
9378then :
9379 printf "%s\n" "#define HAVE_LINUX_CAN_H 1" >>confdefs.h
Charles-François Natali47413c12011-10-06 19:47:44 +02009380
9381fi
Pablo Galindocc128882021-03-01 16:47:53 +00009382ac_fn_c_check_header_compile "$LINENO" "linux/can/bcm.h" "ac_cv_header_linux_can_bcm_h" "
9383#ifdef HAVE_SYS_SOCKET_H
9384#include <sys/socket.h>
9385#endif
Charles-François Natali47413c12011-10-06 19:47:44 +02009386
Pablo Galindocc128882021-03-01 16:47:53 +00009387"
9388if test "x$ac_cv_header_linux_can_bcm_h" = xyes
9389then :
9390 printf "%s\n" "#define HAVE_LINUX_CAN_BCM_H 1" >>confdefs.h
9391
9392fi
9393ac_fn_c_check_header_compile "$LINENO" "linux/can/j1939.h" "ac_cv_header_linux_can_j1939_h" "
9394#ifdef HAVE_SYS_SOCKET_H
9395#include <sys/socket.h>
9396#endif
9397
9398"
9399if test "x$ac_cv_header_linux_can_j1939_h" = xyes
9400then :
9401 printf "%s\n" "#define HAVE_LINUX_CAN_J1939_H 1" >>confdefs.h
9402
9403fi
9404ac_fn_c_check_header_compile "$LINENO" "linux/can/raw.h" "ac_cv_header_linux_can_raw_h" "
9405#ifdef HAVE_SYS_SOCKET_H
9406#include <sys/socket.h>
9407#endif
9408
9409"
9410if test "x$ac_cv_header_linux_can_raw_h" = xyes
9411then :
9412 printf "%s\n" "#define HAVE_LINUX_CAN_RAW_H 1" >>confdefs.h
9413
9414fi
Charles-François Natali47413c12011-10-06 19:47:44 +02009415
9416
Guido van Rossum627b2d71993-12-24 10:39:16 +00009417# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00009418was_it_defined=no
Pablo Galindocc128882021-03-01 16:47:53 +00009419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
9420printf %s "checking for clock_t in time.h... " >&6; }
9421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009424#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009425
9426_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +00009428 $EGREP "clock_t" >/dev/null 2>&1
9429then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00009430 was_it_defined=yes
Pablo Galindocc128882021-03-01 16:47:53 +00009431else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009432
9433
Pablo Galindocc128882021-03-01 16:47:53 +00009434printf "%s\n" "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009435
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009436
Guido van Rossum627b2d71993-12-24 10:39:16 +00009437fi
Pablo Galindocc128882021-03-01 16:47:53 +00009438rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009439
Pablo Galindocc128882021-03-01 16:47:53 +00009440{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
9441printf "%s\n" "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00009442
Pablo Galindocc128882021-03-01 16:47:53 +00009443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
9444printf %s "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00009445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009446/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009447
Jesus Cea740f53a2010-04-28 11:35:30 +00009448#if defined(MAJOR_IN_MKDEV)
9449#include <sys/mkdev.h>
9450#elif defined(MAJOR_IN_SYSMACROS)
9451#include <sys/sysmacros.h>
9452#else
9453#include <sys/types.h>
9454#endif
9455
Neal Norwitz11690112002-07-30 01:08:28 +00009456int
Pablo Galindocc128882021-03-01 16:47:53 +00009457main (void)
Neal Norwitz11690112002-07-30 01:08:28 +00009458{
Jesus Cea740f53a2010-04-28 11:35:30 +00009459
9460 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00009461 ;
9462 return 0;
9463}
Matthias Kloseb159a552010-04-25 21:00:44 +00009464
Neal Norwitz11690112002-07-30 01:08:28 +00009465_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00009466if ac_fn_c_try_link "$LINENO"
9467then :
Neal Norwitz11690112002-07-30 01:08:28 +00009468 ac_cv_has_makedev=yes
Pablo Galindocc128882021-03-01 16:47:53 +00009469else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009470 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00009471fi
Pablo Galindocc128882021-03-01 16:47:53 +00009472rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009473 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00009474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
9475printf "%s\n" "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00009476if test "$ac_cv_has_makedev" = "yes"; then
9477
Pablo Galindocc128882021-03-01 16:47:53 +00009478printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00009479
9480fi
9481
Christian Heimes985ecdc2013-11-20 11:46:18 +01009482# byte swapping
Pablo Galindocc128882021-03-01 16:47:53 +00009483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
9484printf %s "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9486/* end confdefs.h. */
9487
9488#ifdef HAVE_ENDIAN_H
9489#include <endian.h>
9490#elif defined(HAVE_SYS_ENDIAN_H)
9491#include <sys/endian.h>
9492#endif
9493
9494int
Pablo Galindocc128882021-03-01 16:47:53 +00009495main (void)
Christian Heimes985ecdc2013-11-20 11:46:18 +01009496{
9497
9498 le64toh(1)
9499 ;
9500 return 0;
9501}
9502
9503_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00009504if ac_fn_c_try_link "$LINENO"
9505then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01009506 ac_cv_has_le64toh=yes
Pablo Galindocc128882021-03-01 16:47:53 +00009507else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +01009508 ac_cv_has_le64toh=no
9509fi
Pablo Galindocc128882021-03-01 16:47:53 +00009510rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimes985ecdc2013-11-20 11:46:18 +01009511 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +00009512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
9513printf "%s\n" "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009514if test "$ac_cv_has_le64toh" = "yes"; then
9515
Pablo Galindocc128882021-03-01 16:47:53 +00009516printf "%s\n" "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01009517
9518fi
9519
Martin v. Löwis399a6892002-10-04 10:22:02 +00009520use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02009521# Don't use largefile support for GNU/Hurd
9522case $ac_sys_system in GNU*)
9523 use_lfs=no
9524esac
9525
Martin v. Löwis399a6892002-10-04 10:22:02 +00009526if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00009527# Two defines needed to enable largefile support on various platforms
9528# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00009529case $ac_sys_system/$ac_sys_release in
9530AIX*)
9531
Pablo Galindocc128882021-03-01 16:47:53 +00009532printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00009533
9534 ;;
9535esac
Guido van Rossum810cc512001-09-09 23:51:39 +00009536
Pablo Galindocc128882021-03-01 16:47:53 +00009537printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009538
9539
Pablo Galindocc128882021-03-01 16:47:53 +00009540printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00009541
Martin v. Löwis399a6892002-10-04 10:22:02 +00009542fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009543
Guido van Rossum84e7b241996-08-19 21:59:00 +00009544# Add some code to confdefs.h so that the test for off_t works on SCO
9545cat >> confdefs.h <<\EOF
9546#if defined(SCO_DS)
9547#undef _OFF_T
9548#endif
9549EOF
9550
Guido van Rossumef2255b2000-03-10 22:30:29 +00009551# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00009552ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +00009553if test "x$ac_cv_type_mode_t" = xyes
9554then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009555
Pablo Galindocc128882021-03-01 16:47:53 +00009556else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009557
Pablo Galindocc128882021-03-01 16:47:53 +00009558printf "%s\n" "#define mode_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009559
9560fi
9561
Matthias Kloseb9621712010-04-24 17:59:49 +00009562ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +00009563if test "x$ac_cv_type_off_t" = xyes
9564then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009565
Pablo Galindocc128882021-03-01 16:47:53 +00009566else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009567
Pablo Galindocc128882021-03-01 16:47:53 +00009568printf "%s\n" "#define off_t long int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009569
9570fi
9571
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009572
Pablo Galindocc128882021-03-01 16:47:53 +00009573 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9574"
9575if test "x$ac_cv_type_pid_t" = xyes
9576then :
9577
9578else $as_nop
9579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580/* end confdefs.h. */
9581
9582 #if defined _WIN64 && !defined __CYGWIN__
9583 LLP64
9584 #endif
9585
9586int
9587main (void)
9588{
9589
9590 ;
9591 return 0;
9592}
9593
Martin v. Löwis11437992002-04-12 09:54:03 +00009594_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +00009595if ac_fn_c_try_compile "$LINENO"
9596then :
9597 ac_pid_type='int'
9598else $as_nop
9599 ac_pid_type='__int64'
9600fi
9601rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9602
9603printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
9604
9605
9606fi
9607
9608
9609
9610printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009611
Matthias Kloseb9621712010-04-24 17:59:49 +00009612ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +00009613if test "x$ac_cv_type_size_t" = xyes
9614then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009615
Pablo Galindocc128882021-03-01 16:47:53 +00009616else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
Pablo Galindocc128882021-03-01 16:47:53 +00009618printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009619
9620fi
9621
Pablo Galindocc128882021-03-01 16:47:53 +00009622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9623printf %s "checking for uid_t in sys/types.h... " >&6; }
9624if test ${ac_cv_type_uid_t+y}
9625then :
9626 printf %s "(cached) " >&6
9627else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009631
9632_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +00009634 $EGREP "uid_t" >/dev/null 2>&1
9635then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009636 ac_cv_type_uid_t=yes
Pablo Galindocc128882021-03-01 16:47:53 +00009637else $as_nop
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009638 ac_cv_type_uid_t=no
9639fi
Pablo Galindocc128882021-03-01 16:47:53 +00009640rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009641
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009642fi
Pablo Galindocc128882021-03-01 16:47:53 +00009643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9644printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00009645if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009646
Pablo Galindocc128882021-03-01 16:47:53 +00009647printf "%s\n" "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009648
9649
Pablo Galindocc128882021-03-01 16:47:53 +00009650printf "%s\n" "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651
9652fi
9653
Mark Dickinson983bc162012-12-02 12:11:38 +00009654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +00009656if test "x$ac_cv_type_ssize_t" = xyes
9657then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658
Pablo Galindocc128882021-03-01 16:47:53 +00009659printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00009660
9661fi
9662
Stefan Krah1919b7e2012-03-21 18:25:23 +01009663ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +00009664if test "x$ac_cv_type___uint128_t" = xyes
9665then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01009666
Pablo Galindocc128882021-03-01 16:47:53 +00009667printf "%s\n" "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01009668
9669fi
9670
Jack Jansendd19cf82001-12-06 22:36:17 +00009671
Michael W. Hudson54241132001-12-07 15:38:26 +00009672# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00009673# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674# The cast to long int works around a bug in the HP C Compiler
9675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9677# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9679printf %s "checking size of int... " >&6; }
9680if test ${ac_cv_sizeof_int+y}
9681then :
9682 printf %s "(cached) " >&6
9683else $as_nop
9684 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
9685then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009686
Pablo Galindocc128882021-03-01 16:47:53 +00009687else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 if test "$ac_cv_type_int" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009689 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9690printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009691as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02009692See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693 else
9694 ac_cv_sizeof_int=0
9695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009697
Martin v. Löwis11437992002-04-12 09:54:03 +00009698fi
Pablo Galindocc128882021-03-01 16:47:53 +00009699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9700printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701
9702
9703
Pablo Galindocc128882021-03-01 16:47:53 +00009704printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009705
9706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707# The cast to long int works around a bug in the HP C Compiler
9708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9710# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009711{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9712printf %s "checking size of long... " >&6; }
9713if test ${ac_cv_sizeof_long+y}
9714then :
9715 printf %s "(cached) " >&6
9716else $as_nop
9717 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
9718then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009719
Pablo Galindocc128882021-03-01 16:47:53 +00009720else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 if test "$ac_cv_type_long" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009722 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9723printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009724as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02009725See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726 else
9727 ac_cv_sizeof_long=0
9728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730
Martin v. Löwis11437992002-04-12 09:54:03 +00009731fi
Pablo Galindocc128882021-03-01 16:47:53 +00009732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9733printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734
9735
9736
Pablo Galindocc128882021-03-01 16:47:53 +00009737printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009738
9739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740# The cast to long int works around a bug in the HP C Compiler
9741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9743# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9745printf %s "checking size of long long... " >&6; }
9746if test ${ac_cv_sizeof_long_long+y}
9747then :
9748 printf %s "(cached) " >&6
9749else $as_nop
9750 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
9751then :
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009752
Pablo Galindocc128882021-03-01 16:47:53 +00009753else $as_nop
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009754 if test "$ac_cv_type_long_long" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009755 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9756printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009757as_fn_error 77 "cannot compute sizeof (long long)
9758See \`config.log' for more details" "$LINENO" 5; }
9759 else
9760 ac_cv_sizeof_long_long=0
9761 fi
9762fi
9763
9764fi
Pablo Galindocc128882021-03-01 16:47:53 +00009765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9766printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009767
9768
9769
Pablo Galindocc128882021-03-01 16:47:53 +00009770printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009771
9772
9773# The cast to long int works around a bug in the HP C Compiler
9774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9776# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
9778printf %s "checking size of void *... " >&6; }
9779if test ${ac_cv_sizeof_void_p+y}
9780then :
9781 printf %s "(cached) " >&6
9782else $as_nop
9783 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
9784then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009785
Pablo Galindocc128882021-03-01 16:47:53 +00009786else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 if test "$ac_cv_type_void_p" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009788 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9789printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009790as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02009791See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792 else
9793 ac_cv_sizeof_void_p=0
9794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009796
Martin v. Löwis11437992002-04-12 09:54:03 +00009797fi
Pablo Galindocc128882021-03-01 16:47:53 +00009798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
9799printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800
9801
9802
Pablo Galindocc128882021-03-01 16:47:53 +00009803printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009804
9805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806# The cast to long int works around a bug in the HP C Compiler
9807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9809# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9811printf %s "checking size of short... " >&6; }
9812if test ${ac_cv_sizeof_short+y}
9813then :
9814 printf %s "(cached) " >&6
9815else $as_nop
9816 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
9817then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009818
Pablo Galindocc128882021-03-01 16:47:53 +00009819else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 if test "$ac_cv_type_short" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009821 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9822printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009823as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02009824See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 else
9826 ac_cv_sizeof_short=0
9827 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829
Martin v. Löwis11437992002-04-12 09:54:03 +00009830fi
Pablo Galindocc128882021-03-01 16:47:53 +00009831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9832printf "%s\n" "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833
9834
9835
Pablo Galindocc128882021-03-01 16:47:53 +00009836printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009837
9838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839# The cast to long int works around a bug in the HP C Compiler
9840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9842# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
9844printf %s "checking size of float... " >&6; }
9845if test ${ac_cv_sizeof_float+y}
9846then :
9847 printf %s "(cached) " >&6
9848else $as_nop
9849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"
9850then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009851
Pablo Galindocc128882021-03-01 16:47:53 +00009852else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 if test "$ac_cv_type_float" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009854 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9855printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009856as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02009857See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 else
9859 ac_cv_sizeof_float=0
9860 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862
Martin v. Löwis11437992002-04-12 09:54:03 +00009863fi
Pablo Galindocc128882021-03-01 16:47:53 +00009864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
9865printf "%s\n" "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866
9867
9868
Pablo Galindocc128882021-03-01 16:47:53 +00009869printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009870
9871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872# The cast to long int works around a bug in the HP C Compiler
9873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9875# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009876{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
9877printf %s "checking size of double... " >&6; }
9878if test ${ac_cv_sizeof_double+y}
9879then :
9880 printf %s "(cached) " >&6
9881else $as_nop
9882 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
9883then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
Pablo Galindocc128882021-03-01 16:47:53 +00009885else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 if test "$ac_cv_type_double" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009887 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9888printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009889as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009890See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891 else
9892 ac_cv_sizeof_double=0
9893 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895
Martin v. Löwis11437992002-04-12 09:54:03 +00009896fi
Pablo Galindocc128882021-03-01 16:47:53 +00009897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
9898printf "%s\n" "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009899
9900
9901
Pablo Galindocc128882021-03-01 16:47:53 +00009902printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009903
9904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905# The cast to long int works around a bug in the HP C Compiler
9906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9908# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
9910printf %s "checking size of fpos_t... " >&6; }
9911if test ${ac_cv_sizeof_fpos_t+y}
9912then :
9913 printf %s "(cached) " >&6
9914else $as_nop
9915 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"
9916then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009917
Pablo Galindocc128882021-03-01 16:47:53 +00009918else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009919 if test "$ac_cv_type_fpos_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009920 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9921printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009922as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009923See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924 else
9925 ac_cv_sizeof_fpos_t=0
9926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009928
Martin v. Löwis11437992002-04-12 09:54:03 +00009929fi
Pablo Galindocc128882021-03-01 16:47:53 +00009930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
9931printf "%s\n" "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932
9933
9934
Pablo Galindocc128882021-03-01 16:47:53 +00009935printf "%s\n" "#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009936
Michael W. Hudson54241132001-12-07 15:38:26 +00009937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938# The cast to long int works around a bug in the HP C Compiler
9939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9941# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
9943printf %s "checking size of size_t... " >&6; }
9944if test ${ac_cv_sizeof_size_t+y}
9945then :
9946 printf %s "(cached) " >&6
9947else $as_nop
9948 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
9949then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00009950
Pablo Galindocc128882021-03-01 16:47:53 +00009951else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009953 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9954printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009955as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009956See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957 else
9958 ac_cv_sizeof_size_t=0
9959 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00009960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961
Martin v. Löwis18e16552006-02-15 17:27:45 +00009962fi
Pablo Galindocc128882021-03-01 16:47:53 +00009963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
9964printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965
9966
9967
Pablo Galindocc128882021-03-01 16:47:53 +00009968printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00009969
9970
Christian Heimes400adb02008-02-01 08:12:03 +00009971# The cast to long int works around a bug in the HP C Compiler
9972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9974# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +00009975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
9976printf %s "checking size of pid_t... " >&6; }
9977if test ${ac_cv_sizeof_pid_t+y}
9978then :
9979 printf %s "(cached) " >&6
9980else $as_nop
9981 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"
9982then :
Christian Heimes400adb02008-02-01 08:12:03 +00009983
Pablo Galindocc128882021-03-01 16:47:53 +00009984else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 if test "$ac_cv_type_pid_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +00009986 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9987printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009988as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009989See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00009990 else
9991 ac_cv_sizeof_pid_t=0
9992 fi
9993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009994
Christian Heimes400adb02008-02-01 08:12:03 +00009995fi
Pablo Galindocc128882021-03-01 16:47:53 +00009996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
9997printf "%s\n" "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00009998
9999
10000
Pablo Galindocc128882021-03-01 16:47:53 +000010001printf "%s\n" "#define SIZEOF_PID_T $ac_cv_sizeof_pid_t" >>confdefs.h
Christian Heimes400adb02008-02-01 08:12:03 +000010002
10003
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010004# The cast to long int works around a bug in the HP C Compiler
10005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10007# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000010008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
10009printf %s "checking size of uintptr_t... " >&6; }
10010if test ${ac_cv_sizeof_uintptr_t+y}
10011then :
10012 printf %s "(cached) " >&6
10013else $as_nop
10014 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"
10015then :
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010016
Pablo Galindocc128882021-03-01 16:47:53 +000010017else $as_nop
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010018 if test "$ac_cv_type_uintptr_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000010019 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10020printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010021as_fn_error 77 "cannot compute sizeof (uintptr_t)
10022See \`config.log' for more details" "$LINENO" 5; }
10023 else
10024 ac_cv_sizeof_uintptr_t=0
10025 fi
10026fi
10027
10028fi
Pablo Galindocc128882021-03-01 16:47:53 +000010029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
10030printf "%s\n" "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010031
10032
10033
Pablo Galindocc128882021-03-01 16:47:53 +000010034printf "%s\n" "#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t" >>confdefs.h
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010035
10036
Michael W. Hudson54241132001-12-07 15:38:26 +000010037
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010038
Pablo Galindocc128882021-03-01 16:47:53 +000010039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
10040printf %s "checking for long double... " >&6; }
10041if test ${ac_cv_type_long_double+y}
10042then :
10043 printf %s "(cached) " >&6
10044else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010045 if test "$GCC" = yes; then
10046 ac_cv_type_long_double=yes
10047 else
10048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10049/* end confdefs.h. */
10050/* The Stardent Vistra knows sizeof (long double), but does
10051 not support it. */
10052 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010053int
Pablo Galindocc128882021-03-01 16:47:53 +000010054main (void)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010055{
Eitan Adler3055c942018-05-15 22:58:09 -070010056static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
10057 sizeof (double) <= sizeof (long double))];
10058test_array [0] = 0;
10059return test_array [0];
10060
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010061 ;
10062 return 0;
10063}
10064_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010065if ac_fn_c_try_compile "$LINENO"
10066then :
Eitan Adler3055c942018-05-15 22:58:09 -070010067 ac_cv_type_long_double=yes
Pablo Galindocc128882021-03-01 16:47:53 +000010068else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010069 ac_cv_type_long_double=no
10070fi
Pablo Galindocc128882021-03-01 16:47:53 +000010071rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -070010072 fi
10073fi
Pablo Galindocc128882021-03-01 16:47:53 +000010074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
10075printf "%s\n" "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -070010076 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010077
Pablo Galindocc128882021-03-01 16:47:53 +000010078printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010079
Eitan Adler3055c942018-05-15 22:58:09 -070010080 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010081
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010082# The cast to long int works around a bug in the HP C Compiler
10083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10085# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000010086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
10087printf %s "checking size of long double... " >&6; }
10088if test ${ac_cv_sizeof_long_double+y}
10089then :
10090 printf %s "(cached) " >&6
10091else $as_nop
10092 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
10093then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010094
Pablo Galindocc128882021-03-01 16:47:53 +000010095else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 if test "$ac_cv_type_long_double" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000010097 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10098printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010099as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +020010100See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010101 else
10102 ac_cv_sizeof_long_double=0
10103 fi
10104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010105
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010106fi
Pablo Galindocc128882021-03-01 16:47:53 +000010107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
10108printf "%s\n" "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010109
10110
10111
Pablo Galindocc128882021-03-01 16:47:53 +000010112printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010113
10114
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116# The cast to long int works around a bug in the HP C Compiler
10117# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10118# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10119# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000010120{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
10121printf %s "checking size of _Bool... " >&6; }
10122if test ${ac_cv_sizeof__Bool+y}
10123then :
10124 printf %s "(cached) " >&6
10125else $as_nop
10126 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"
10127then :
Thomas Woutersb2137042007-02-01 18:02:27 +000010128
Pablo Galindocc128882021-03-01 16:47:53 +000010129else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 if test "$ac_cv_type__Bool" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000010131 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10132printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010133as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +020010134See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 else
10136 ac_cv_sizeof__Bool=0
10137 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000010138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010139
Thomas Woutersb2137042007-02-01 18:02:27 +000010140fi
Pablo Galindocc128882021-03-01 16:47:53 +000010141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
10142printf "%s\n" "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143
10144
10145
Pablo Galindocc128882021-03-01 16:47:53 +000010146printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +000010147
10148
Thomas Woutersb2137042007-02-01 18:02:27 +000010149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010150# The cast to long int works around a bug in the HP C Compiler
10151# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10152# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10153# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000010154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
10155printf %s "checking size of off_t... " >&6; }
10156if test ${ac_cv_sizeof_off_t+y}
10157then :
10158 printf %s "(cached) " >&6
10159else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010161#ifdef HAVE_SYS_TYPES_H
10162#include <sys/types.h>
10163#endif
10164
Pablo Galindocc128882021-03-01 16:47:53 +000010165"
10166then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010167
Pablo Galindocc128882021-03-01 16:47:53 +000010168else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 if test "$ac_cv_type_off_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000010170 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10171printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010172as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010173See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010174 else
10175 ac_cv_sizeof_off_t=0
10176 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010178
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010179fi
Pablo Galindocc128882021-03-01 16:47:53 +000010180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
10181printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010182
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010183
10184
Pablo Galindocc128882021-03-01 16:47:53 +000010185printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010186
Michael W. Hudson54241132001-12-07 15:38:26 +000010187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010188
Pablo Galindocc128882021-03-01 16:47:53 +000010189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
10190printf %s "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000010191if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010192 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010193
Pablo Galindocc128882021-03-01 16:47:53 +000010194printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010195
Pablo Galindocc128882021-03-01 16:47:53 +000010196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10197printf "%s\n" "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010198else
Pablo Galindocc128882021-03-01 16:47:53 +000010199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200printf "%s\n" "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010201fi
10202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010203# The cast to long int works around a bug in the HP C Compiler
10204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10206# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000010207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10208printf %s "checking size of time_t... " >&6; }
10209if test ${ac_cv_sizeof_time_t+y}
10210then :
10211 printf %s "(cached) " >&6
10212else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010214#ifdef HAVE_SYS_TYPES_H
10215#include <sys/types.h>
10216#endif
10217#ifdef HAVE_TIME_H
10218#include <time.h>
10219#endif
10220
Pablo Galindocc128882021-03-01 16:47:53 +000010221"
10222then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010223
Pablo Galindocc128882021-03-01 16:47:53 +000010224else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 if test "$ac_cv_type_time_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000010226 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10227printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010228as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010229See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010230 else
10231 ac_cv_sizeof_time_t=0
10232 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010235fi
Pablo Galindocc128882021-03-01 16:47:53 +000010236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10237printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010239
10240
Pablo Galindocc128882021-03-01 16:47:53 +000010241printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010242
Michael W. Hudson54241132001-12-07 15:38:26 +000010243
10244
Trent Mick635f6fb2000-08-23 21:33:05 +000010245# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010246ac_save_cc="$CC"
10247if test "$ac_cv_kpthread" = "yes"
10248then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010249elif test "$ac_cv_kthread" = "yes"
10250then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010251elif test "$ac_cv_pthread" = "yes"
10252then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010253fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010254
Pablo Galindocc128882021-03-01 16:47:53 +000010255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
10256printf %s "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010257have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010259/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010260
10261 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010262int
Pablo Galindocc128882021-03-01 16:47:53 +000010263main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010264{
Guido van Rossum12580492000-09-24 16:47:19 +000010265pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ;
10267 return 0;
10268}
Matthias Kloseb159a552010-04-25 21:00:44 +000010269
Martin v. Löwis11437992002-04-12 09:54:03 +000010270_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010271if ac_fn_c_try_compile "$LINENO"
10272then :
Trent Mick635f6fb2000-08-23 21:33:05 +000010273 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +000010274fi
Pablo Galindocc128882021-03-01 16:47:53 +000010275rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
10277printf "%s\n" "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010278if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010280# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10281# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10282# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000010283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
10284printf %s "checking size of pthread_t... " >&6; }
10285if test ${ac_cv_sizeof_pthread_t+y}
10286then :
10287 printf %s "(cached) " >&6
10288else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010290#ifdef HAVE_PTHREAD_H
10291#include <pthread.h>
10292#endif
10293
Pablo Galindocc128882021-03-01 16:47:53 +000010294"
10295then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010296
Pablo Galindocc128882021-03-01 16:47:53 +000010297else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 if test "$ac_cv_type_pthread_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000010299 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10300printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010301as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010302See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010303 else
10304 ac_cv_sizeof_pthread_t=0
10305 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000010306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010307
Trent Mick635f6fb2000-08-23 21:33:05 +000010308fi
Pablo Galindocc128882021-03-01 16:47:53 +000010309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
10310printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010312
10313
Pablo Galindocc128882021-03-01 16:47:53 +000010314printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
Trent Mick635f6fb2000-08-23 21:33:05 +000010315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010316
Trent Mick635f6fb2000-08-23 21:33:05 +000010317fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010318
10319# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
10320# This checking will be unnecessary after removing deprecated TLS API.
10321# The cast to long int works around a bug in the HP C Compiler
10322# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10323# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10324# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000010325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
10326printf %s "checking size of pthread_key_t... " >&6; }
10327if test ${ac_cv_sizeof_pthread_key_t+y}
10328then :
10329 printf %s "(cached) " >&6
10330else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010331 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Pablo Galindocc128882021-03-01 16:47:53 +000010332"
10333then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010334
Pablo Galindocc128882021-03-01 16:47:53 +000010335else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010336 if test "$ac_cv_type_pthread_key_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000010337 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10338printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010339as_fn_error 77 "cannot compute sizeof (pthread_key_t)
10340See \`config.log' for more details" "$LINENO" 5; }
10341 else
10342 ac_cv_sizeof_pthread_key_t=0
10343 fi
10344fi
10345
10346fi
Pablo Galindocc128882021-03-01 16:47:53 +000010347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
10348printf "%s\n" "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010349
10350
10351
Pablo Galindocc128882021-03-01 16:47:53 +000010352printf "%s\n" "#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010353
10354
Pablo Galindocc128882021-03-01 16:47:53 +000010355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
10356printf %s "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010357if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
10358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10359/* end confdefs.h. */
10360#include <pthread.h>
10361int
Pablo Galindocc128882021-03-01 16:47:53 +000010362main (void)
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010363{
10364pthread_key_t k; k * 1;
10365 ;
10366 return 0;
10367}
10368_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010369if ac_fn_c_try_compile "$LINENO"
10370then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010371 ac_pthread_key_t_is_arithmetic_type=yes
Pablo Galindocc128882021-03-01 16:47:53 +000010372else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010373 ac_pthread_key_t_is_arithmetic_type=no
10374
10375fi
Pablo Galindocc128882021-03-01 16:47:53 +000010376rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
10378printf "%s\n" "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010379 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
10380
Pablo Galindocc128882021-03-01 16:47:53 +000010381printf "%s\n" "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010382
10383 fi
10384else
Pablo Galindocc128882021-03-01 16:47:53 +000010385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386printf "%s\n" "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010387fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010388CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010389
Michael W. Hudson54241132001-12-07 15:38:26 +000010390
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010391case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010392 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010393 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10394 ;;
10395 Darwin/*)
10396 OTHER_LIBTOOL_OPT=""
10397 ;;
10398esac
10399
10400
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010401
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010402case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010403 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010404 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
10405 if test "${enable_universalsdk}"; then
10406 :
10407 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010408 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000010409 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000010410 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010411 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010412 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000010413 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010414 if test ${gcc_version} '<' 4.0
10415 then
10416 LIBTOOL_CRUFT="-lcc_dynamic"
10417 else
10418 LIBTOOL_CRUFT=""
10419 fi
Pablo Galindocc128882021-03-01 16:47:53 +000010420 if test "$cross_compiling" = yes
10421then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010422 ac_osx_32bit=yes
Pablo Galindocc128882021-03-01 16:47:53 +000010423else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010425/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010426
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010427 #include <unistd.h>
10428 int main(int argc, char*argv[])
10429 {
10430 if (sizeof(long) == 4) {
10431 return 0;
10432 } else {
10433 return 1;
10434 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010435 }
10436
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010437_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010438if ac_fn_c_try_run "$LINENO"
10439then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010440 ac_osx_32bit=yes
Pablo Galindocc128882021-03-01 16:47:53 +000010441else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010446fi
10447
10448
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010449 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010450 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010451 i386)
10452 MACOSX_DEFAULT_ARCH="i386"
10453 ;;
10454 ppc)
10455 MACOSX_DEFAULT_ARCH="ppc"
10456 ;;
10457 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010458 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010459 ;;
10460 esac
10461 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010462 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010463 i386)
10464 MACOSX_DEFAULT_ARCH="x86_64"
10465 ;;
10466 ppc)
10467 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +010010468 ;;
10469 arm64)
10470 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010471 ;;
10472 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010473 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010474 ;;
10475 esac
10476
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010477 fi
10478
10479 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000010480 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010481 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010482esac
Pablo Galindocc128882021-03-01 16:47:53 +000010483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
10484printf %s "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010485if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010486then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010487 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010489 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010490
Pablo Galindocc128882021-03-01 16:47:53 +000010491printf "%s\n" "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010492
Pablo Galindocc128882021-03-01 16:47:53 +000010493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10494printf "%s\n" "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000010495 if test $enable_shared = "yes"
10496 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010497 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 +000010498 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010499else
Pablo Galindocc128882021-03-01 16:47:53 +000010500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10501printf "%s\n" "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010502fi
10503
Pablo Galindocc128882021-03-01 16:47:53 +000010504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
10505printf %s "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010506case $ac_sys_system/$ac_sys_release in
10507 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010508
Pablo Galindocc128882021-03-01 16:47:53 +000010509printf "%s\n" "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010510
Pablo Galindocc128882021-03-01 16:47:53 +000010511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
10512printf "%s\n" "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010513 ;;
10514 *)
Pablo Galindocc128882021-03-01 16:47:53 +000010515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516printf "%s\n" "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010517 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010518esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010519
Guido van Rossum0a516c91994-09-12 10:58:40 +000010520# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010521
Michael W. Hudson54241132001-12-07 15:38:26 +000010522
10523
10524
10525
Benjamin Peterson99f03762010-04-11 22:15:28 +000010526
Thomas Wouters477c8d52006-05-27 19:21:47 +000010527
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010528# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
10529# -- usually .so, .sl on HP-UX, .dll on Cygwin
Pablo Galindocc128882021-03-01 16:47:53 +000010530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
10531printf %s "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010532if test -z "$SHLIB_SUFFIX"; then
10533 case $ac_sys_system in
10534 hp*|HP*)
10535 case `uname -m` in
10536 ia64) SHLIB_SUFFIX=.so;;
10537 *) SHLIB_SUFFIX=.sl;;
10538 esac
10539 ;;
10540 CYGWIN*) SHLIB_SUFFIX=.dll;;
10541 *) SHLIB_SUFFIX=.so;;
10542 esac
10543fi
Pablo Galindocc128882021-03-01 16:47:53 +000010544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
10545printf "%s\n" "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010546
Guido van Rossum0a516c91994-09-12 10:58:40 +000010547# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -070010548# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010549# (Shared libraries in this instance are shared modules to be loaded into
10550# Python, as opposed to building Python itself as a shared library.)
Pablo Galindocc128882021-03-01 16:47:53 +000010551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
10552printf %s "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010553if test -z "$LDSHARED"
10554then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010555 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010556 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +000010557 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +000010558 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010559 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010561 if test "$GCC" = "yes" ; then
10562 LDSHARED='$(CC) -shared'
10563 LDCXXSHARED='$(CXX) -shared'
10564 else
10565 LDSHARED='$(CC) -G'
10566 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +000010567 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010568 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010569 if test "$GCC" = "yes" ; then
10570 LDSHARED='$(CC) -shared'
10571 LDCXXSHARED='$(CXX) -shared'
10572 else
Rob Boehne9d25bd12017-12-06 11:58:17 -060010573 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010574 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010575 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +000010576 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010577 LDSHARED='$(CC) -bundle'
10578 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000010579 if test "$enable_framework" ; then
10580 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010581 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10582 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010583 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010584 else
10585 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010586 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +000010587 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010588 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010589 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010590 LDSHARED='$(CC) -bundle'
10591 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000010592 if test "$enable_framework" ; then
10593 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010594 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10595 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010596 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010597 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010598 # No framework, use the Python app as bundle-loader
10599 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010600 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010601 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010602 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010603 Darwin/*)
10604 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10605 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000010606
Ned Deily36820b62014-06-25 13:44:22 -070010607 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10608 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
10609 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10610 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
10611 if test ${dep_target_major} -eq 10 && \
10612 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +000010613 then
Ned Deily36820b62014-06-25 13:44:22 -070010614 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +000010615 LDSHARED='$(CC) -bundle'
10616 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000010617 if test "$enable_framework" ; then
10618 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010619 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10620 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010621 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010622 else
10623 # No framework, use the Python app as bundle-loader
10624 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10625 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010626 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010627 fi
Ned Deily36820b62014-06-25 13:44:22 -070010628 else
10629 # building for OS X 10.3 and later
10630 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
10631 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
10632 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010633 fi
10634 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010635 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010636 LDSHARED='$(CC) -shared'
10637 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010638 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010639 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010640 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010641 LDSHARED='$(CC) -shared'
10642 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +000010643 else
Antoine Pitroud4958c22010-10-13 17:01:10 +000010644 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010645 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010646 OpenBSD*)
10647 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10648 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010649 LDSHARED='$(CC) -shared $(CCSHARED)'
10650 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010651 else
10652 case `uname -r` in
10653 [01].* | 2.[0-7] | 2.[0-7].*)
10654 LDSHARED="ld -Bshareable ${LDFLAGS}"
10655 ;;
10656 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010657 LDSHARED='$(CC) -shared $(CCSHARED)'
10658 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010659 ;;
10660 esac
10661 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010662 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +000010663 LDSHARED='$(CC) -shared'
10664 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010665 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010666 if test "$GCC" = "yes" ; then
10667 LDSHARED='$(CC) -shared'
10668 LDCXXSHARED='$(CXX) -shared'
10669 else
10670 LDSHARED='$(CC) -G'
10671 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010672 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010673 SCO_SV*)
10674 LDSHARED='$(CC) -Wl,-G,-Bexport'
10675 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
10676 CYGWIN*)
10677 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
10678 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010679 *) LDSHARED="ld";;
10680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010681fi
Pablo Galindocc128882021-03-01 16:47:53 +000010682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
10683printf "%s\n" "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +000010684LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010685BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010686# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010687# library (module) -- this is only needed for a few systems
Pablo Galindocc128882021-03-01 16:47:53 +000010688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
10689printf %s "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010690if test -z "$CCSHARED"
10691then
Guido van Rossum07397971997-04-29 21:49:50 +000010692 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010693 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010694 then CCSHARED="-fPIC";
10695 elif test `uname -p` = sparc;
10696 then CCSHARED="-xcode=pic32";
10697 else CCSHARED="-Kpic";
10698 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010699 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010700 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010701 else CCSHARED="+z";
10702 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010703 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010704 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010705 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010706 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010707 if test "$GCC" = "yes"
10708 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010709 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010710 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010711 SCO_SV*)
10712 if test "$GCC" = "yes"
10713 then CCSHARED="-fPIC"
10714 else CCSHARED="-Kpic -belf"
10715 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010716 VxWorks*)
10717 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +000010718 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010719fi
Pablo Galindocc128882021-03-01 16:47:53 +000010720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
10721printf "%s\n" "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010722# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010723# the python executable -- this is only needed for a few systems
Pablo Galindocc128882021-03-01 16:47:53 +000010724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
10725printf %s "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010726if test -z "$LINKFORSHARED"
10727then
Guido van Rossum07397971997-04-29 21:49:50 +000010728 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010729 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010730 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010731 LINKFORSHARED="-Wl,-E -Wl,+s";;
10732# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010733 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010734 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010735 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000010737 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -040010738
10739 # Issue #18075: the default maximum stack size (8MBytes) is too
10740 # small for the default recursion limit. Increase the stack size
10741 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +020010742 # Note: This matches the value of THREAD_STACK_SIZE in
10743 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -040010744 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
10745
Jack Jansene578a632001-08-15 01:27:14 +000010746 if test "$enable_framework"
10747 then
Jack Jansenda49e192005-01-07 13:08:22 +000010748 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010749 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010750 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010751 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010752 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010753 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010754 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010755 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10756 then
10757 LINKFORSHARED="-Wl,--export-dynamic"
10758 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010759 SunOS/5*) case $CC in
10760 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010761 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010762 then
10763 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010764 fi;;
10765 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010766 CYGWIN*)
10767 if test $enable_shared = "no"
10768 then
10769 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10770 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000010771 QNX*)
10772 # -Wl,-E causes the symbols to be added to the dynamic
10773 # symbol table so that they can be found when a module
10774 # is loaded. -N 2048K causes the stack size to be set
10775 # to 2048 kilobytes so that the stack doesn't overflow
10776 # when running test_compile.py.
10777 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +080010778 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +080010779 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010780 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010781fi
Pablo Galindocc128882021-03-01 16:47:53 +000010782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
10783printf "%s\n" "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010784
Michael W. Hudson54241132001-12-07 15:38:26 +000010785
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010786
Pablo Galindocc128882021-03-01 16:47:53 +000010787{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
10788printf %s "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010789if test ! "$LIBRARY" = "$LDLIBRARY"
10790then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010791 case $ac_sys_system in
10792 CYGWIN*)
10793 # Cygwin needs CCSHARED when building extension DLLs
10794 # but not when building the interpreter DLL.
10795 CFLAGSFORSHARED='';;
10796 *)
10797 CFLAGSFORSHARED='$(CCSHARED)'
10798 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010799fi
Pablo Galindocc128882021-03-01 16:47:53 +000010800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
10801printf "%s\n" "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010802
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010803# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10804# library (with --enable-shared).
10805# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010806# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10807# if it is not required, since it creates a dependency of the shared library
10808# to LIBS. This, in turn, means that applications linking the shared libpython
10809# don't need to link LIBS explicitly. The default should be only changed
10810# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010811
Pablo Galindocc128882021-03-01 16:47:53 +000010812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
10813printf %s "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010814case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010815 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010816 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010817esac
Pablo Galindocc128882021-03-01 16:47:53 +000010818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
10819printf "%s\n" "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010820
10821
Guido van Rossum627b2d71993-12-24 10:39:16 +000010822# checks for libraries
Pablo Galindocc128882021-03-01 16:47:53 +000010823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
10824printf %s "checking for sendfile in -lsendfile... " >&6; }
10825if test ${ac_cv_lib_sendfile_sendfile+y}
10826then :
10827 printf %s "(cached) " >&6
10828else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010829 ac_check_lib_save_LIBS=$LIBS
10830LIBS="-lsendfile $LIBS"
10831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832/* end confdefs.h. */
10833
10834/* Override any GCC internal prototype to avoid an error.
10835 Use char because int might match the return type of a GCC
10836 builtin and then its argument prototype would still apply. */
Georg Brandl941f9562011-02-25 15:21:47 +000010837char sendfile ();
10838int
Pablo Galindocc128882021-03-01 16:47:53 +000010839main (void)
Georg Brandl941f9562011-02-25 15:21:47 +000010840{
10841return sendfile ();
10842 ;
10843 return 0;
10844}
10845_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010846if ac_fn_c_try_link "$LINENO"
10847then :
Georg Brandl941f9562011-02-25 15:21:47 +000010848 ac_cv_lib_sendfile_sendfile=yes
Pablo Galindocc128882021-03-01 16:47:53 +000010849else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010850 ac_cv_lib_sendfile_sendfile=no
10851fi
Pablo Galindocc128882021-03-01 16:47:53 +000010852rm -f core conftest.err conftest.$ac_objext conftest.beam \
Georg Brandl941f9562011-02-25 15:21:47 +000010853 conftest$ac_exeext conftest.$ac_ext
10854LIBS=$ac_check_lib_save_LIBS
10855fi
Pablo Galindocc128882021-03-01 16:47:53 +000010856{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
10857printf "%s\n" "$ac_cv_lib_sendfile_sendfile" >&6; }
10858if test "x$ac_cv_lib_sendfile_sendfile" = xyes
10859then :
10860 printf "%s\n" "#define HAVE_LIBSENDFILE 1" >>confdefs.h
Georg Brandl941f9562011-02-25 15:21:47 +000010861
10862 LIBS="-lsendfile $LIBS"
10863
10864fi
10865
Pablo Galindocc128882021-03-01 16:47:53 +000010866{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10867printf %s "checking for dlopen in -ldl... " >&6; }
10868if test ${ac_cv_lib_dl_dlopen+y}
10869then :
10870 printf %s "(cached) " >&6
10871else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010873LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877/* Override any GCC internal prototype to avoid an error.
10878 Use char because int might match the return type of a GCC
10879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010880char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010881int
Pablo Galindocc128882021-03-01 16:47:53 +000010882main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010884return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 ;
10886 return 0;
10887}
10888_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010889if ac_fn_c_try_link "$LINENO"
10890then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 ac_cv_lib_dl_dlopen=yes
Pablo Galindocc128882021-03-01 16:47:53 +000010892else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010893 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010894fi
Pablo Galindocc128882021-03-01 16:47:53 +000010895rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010897LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010898fi
Pablo Galindocc128882021-03-01 16:47:53 +000010899{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10900printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
10901if test "x$ac_cv_lib_dl_dlopen" = xyes
10902then :
10903 printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010904
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010905 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010907fi
10908 # Dynamic linking for SunOS/Solaris and SYSV
Pablo Galindocc128882021-03-01 16:47:53 +000010909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10910printf %s "checking for shl_load in -ldld... " >&6; }
10911if test ${ac_cv_lib_dld_shl_load+y}
10912then :
10913 printf %s "(cached) " >&6
10914else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010916LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920/* Override any GCC internal prototype to avoid an error.
10921 Use char because int might match the return type of a GCC
10922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010923char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010924int
Pablo Galindocc128882021-03-01 16:47:53 +000010925main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 ;
10929 return 0;
10930}
10931_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010932if ac_fn_c_try_link "$LINENO"
10933then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 ac_cv_lib_dld_shl_load=yes
Pablo Galindocc128882021-03-01 16:47:53 +000010935else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010937fi
Pablo Galindocc128882021-03-01 16:47:53 +000010938rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010940LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010941fi
Pablo Galindocc128882021-03-01 16:47:53 +000010942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10943printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
10944if test "x$ac_cv_lib_dld_shl_load" = xyes
10945then :
10946 printf "%s\n" "#define HAVE_LIBDLD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010948 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010949
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010950fi
10951 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010952
Michael Felt0d3ccb42017-12-30 22:39:20 +010010953# checks for uuid.h location
Pablo Galindocc128882021-03-01 16:47:53 +000010954ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
10955if test "x$ac_cv_header_uuid_uuid_h" = xyes
10956then :
10957 printf "%s\n" "#define HAVE_UUID_UUID_H 1" >>confdefs.h
10958
10959fi
10960ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10961if test "x$ac_cv_header_uuid_h" = xyes
10962then :
10963 printf "%s\n" "#define HAVE_UUID_H 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010010964
10965fi
10966
Michael Felt0d3ccb42017-12-30 22:39:20 +010010967
Pablo Galindocc128882021-03-01 16:47:53 +000010968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
10969printf %s "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10971/* end confdefs.h. */
10972#include <uuid/uuid.h>
10973int
Pablo Galindocc128882021-03-01 16:47:53 +000010974main (void)
Berker Peksag9a10ff42017-11-08 23:09:16 +030010975{
10976
10977#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030010978void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030010979#endif
10980
10981 ;
10982 return 0;
10983}
10984_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000010985if ac_fn_c_try_compile "$LINENO"
10986then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030010987
Pablo Galindocc128882021-03-01 16:47:53 +000010988printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030010989
Pablo Galindocc128882021-03-01 16:47:53 +000010990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10991printf "%s\n" "yes" >&6; }
10992else $as_nop
10993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994printf "%s\n" "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030010995
10996fi
Pablo Galindocc128882021-03-01 16:47:53 +000010997rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030010998
Michael Felt0d3ccb42017-12-30 22:39:20 +010010999# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000011000# FreeBSD and OpenBSD provides support as well
Pablo Galindocc128882021-03-01 16:47:53 +000011001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
11002printf %s "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11004/* end confdefs.h. */
11005#include <uuid.h>
11006int
Pablo Galindocc128882021-03-01 16:47:53 +000011007main (void)
Michael Felt0d3ccb42017-12-30 22:39:20 +010011008{
11009
11010#ifndef uuid_create
11011void *x = uuid_create
11012#endif
11013
11014 ;
11015 return 0;
11016}
11017_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011018if ac_fn_c_try_compile "$LINENO"
11019then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010011020
Pablo Galindocc128882021-03-01 16:47:53 +000011021printf "%s\n" "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010011022
Pablo Galindocc128882021-03-01 16:47:53 +000011023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11024printf "%s\n" "yes" >&6; }
11025else $as_nop
11026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027printf "%s\n" "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011028
11029fi
Pablo Galindocc128882021-03-01 16:47:53 +000011030rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010011031
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011032# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
11033# stream in big-endian byte-order
Pablo Galindocc128882021-03-01 16:47:53 +000011034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
11035printf %s "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037/* end confdefs.h. */
11038#include <uuid.h>
11039int
Pablo Galindocc128882021-03-01 16:47:53 +000011040main (void)
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011041{
11042
11043#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040011044void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011045#endif
11046
11047 ;
11048 return 0;
11049}
11050_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011051if ac_fn_c_try_compile "$LINENO"
11052then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011053
Pablo Galindocc128882021-03-01 16:47:53 +000011054printf "%s\n" "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011055
Pablo Galindocc128882021-03-01 16:47:53 +000011056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11057printf "%s\n" "yes" >&6; }
11058else $as_nop
11059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060printf "%s\n" "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011061
11062fi
Pablo Galindocc128882021-03-01 16:47:53 +000011063rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011064
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011065# 'Real Time' functions on Solaris
11066# posix4 on Solaris 2.6
11067# pthread (first!) on Linux
Pablo Galindocc128882021-03-01 16:47:53 +000011068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
11069printf %s "checking for library containing sem_init... " >&6; }
11070if test ${ac_cv_search_sem_init+y}
11071then :
11072 printf %s "(cached) " >&6
11073else $as_nop
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011074 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000011075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078/* Override any GCC internal prototype to avoid an error.
11079 Use char because int might match the return type of a GCC
11080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011081char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011082int
Pablo Galindocc128882021-03-01 16:47:53 +000011083main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 ;
11087 return 0;
11088}
11089_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011090for ac_lib in '' pthread rt posix4
11091do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092 if test -z "$ac_lib"; then
11093 ac_res="none required"
11094 else
11095 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011096 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011097 fi
Pablo Galindocc128882021-03-01 16:47:53 +000011098 if ac_fn_c_try_link "$LINENO"
11099then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011100 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000011101fi
Pablo Galindocc128882021-03-01 16:47:53 +000011102rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 conftest$ac_exeext
Pablo Galindocc128882021-03-01 16:47:53 +000011104 if test ${ac_cv_search_sem_init+y}
11105then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011106 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011108done
Pablo Galindocc128882021-03-01 16:47:53 +000011109if test ${ac_cv_search_sem_init+y}
11110then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011111
Pablo Galindocc128882021-03-01 16:47:53 +000011112else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113 ac_cv_search_sem_init=no
11114fi
11115rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011116LIBS=$ac_func_search_save_LIBS
11117fi
Pablo Galindocc128882021-03-01 16:47:53 +000011118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
11119printf "%s\n" "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120ac_res=$ac_cv_search_sem_init
Pablo Galindocc128882021-03-01 16:47:53 +000011121if test "$ac_res" != no
11122then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011124
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011125fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011126
Martin v. Löwis519adae2003-09-20 10:47:47 +000011127
Martin v. Löwis19d17342003-06-14 21:03:05 +000011128# check if we need libintl for locale functions
Pablo Galindocc128882021-03-01 16:47:53 +000011129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
11130printf %s "checking for textdomain in -lintl... " >&6; }
11131if test ${ac_cv_lib_intl_textdomain+y}
11132then :
11133 printf %s "(cached) " >&6
11134else $as_nop
Martin v. Löwis19d17342003-06-14 21:03:05 +000011135 ac_check_lib_save_LIBS=$LIBS
11136LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011140/* Override any GCC internal prototype to avoid an error.
11141 Use char because int might match the return type of a GCC
11142 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011143char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011144int
Pablo Galindocc128882021-03-01 16:47:53 +000011145main (void)
Martin v. Löwis19d17342003-06-14 21:03:05 +000011146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011148 ;
11149 return 0;
11150}
11151_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011152if ac_fn_c_try_link "$LINENO"
11153then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011154 ac_cv_lib_intl_textdomain=yes
Pablo Galindocc128882021-03-01 16:47:53 +000011155else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011156 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000011157fi
Pablo Galindocc128882021-03-01 16:47:53 +000011158rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011160LIBS=$ac_check_lib_save_LIBS
11161fi
Pablo Galindocc128882021-03-01 16:47:53 +000011162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
11163printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; }
11164if test "x$ac_cv_lib_intl_textdomain" = xyes
11165then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011166
Pablo Galindocc128882021-03-01 16:47:53 +000011167printf "%s\n" "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000011168
Brett Cannonc6d936e2009-06-07 20:09:53 +000011169 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000011170fi
11171
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011172
11173# checks for system dependent C++ extensions support
11174case "$ac_sys_system" in
Pablo Galindocc128882021-03-01 16:47:53 +000011175 AIX*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
11176printf %s "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011178/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011179
Georg Brandl59e87bd2011-02-15 19:48:59 +000011180 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
Pablo Galindocc128882021-03-01 16:47:53 +000011182main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011183{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011184loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ;
11186 return 0;
11187}
Matthias Kloseb159a552010-04-25 21:00:44 +000011188
Martin v. Löwis11437992002-04-12 09:54:03 +000011189_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011190if ac_fn_c_try_link "$LINENO"
11191then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011192
Matthias Kloseb159a552010-04-25 21:00:44 +000011193
Pablo Galindocc128882021-03-01 16:47:53 +000011194printf "%s\n" "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
Pablo Galindocc128882021-03-01 16:47:53 +000011196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11197printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011198
Pablo Galindocc128882021-03-01 16:47:53 +000011199else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000011200
Pablo Galindocc128882021-03-01 16:47:53 +000011201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011203
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011204fi
Pablo Galindocc128882021-03-01 16:47:53 +000011205rm -f core conftest.err conftest.$ac_objext conftest.beam \
Michael Felt39afa2d2019-12-15 15:17:53 +010011206 conftest$ac_exeext conftest.$ac_ext
11207# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
11208# of the AIX system used to build/package Python executable. This tag serves
11209# as a baseline for bdist module packages
Pablo Galindocc128882021-03-01 16:47:53 +000011210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
11211printf %s "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011212 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
11213
Pablo Galindocc128882021-03-01 16:47:53 +000011214printf "%s\n" "#define AIX_BUILDDATE $AIX_BUILDDATE" >>confdefs.h
Michael Felt39afa2d2019-12-15 15:17:53 +010011215
Pablo Galindocc128882021-03-01 16:47:53 +000011216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
11217printf "%s\n" "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011218 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011219 *) ;;
11220esac
11221
Christian Heimes985ecdc2013-11-20 11:46:18 +010011222# check for systems that require aligned memory access
Pablo Galindocc128882021-03-01 16:47:53 +000011223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
11224printf %s "checking aligned memory access is required... " >&6; }
11225if test ${ac_cv_aligned_required+y}
11226then :
11227 printf %s "(cached) " >&6
11228else $as_nop
11229 if test "$cross_compiling" = yes
11230then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011231 ac_cv_aligned_required=yes
Pablo Galindocc128882021-03-01 16:47:53 +000011232else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +010011233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11234/* end confdefs.h. */
11235
11236int main()
11237{
11238 char s[16];
11239 int i, *p1, *p2;
11240 for (i=0; i < 16; i++)
11241 s[i] = i;
11242 p1 = (int*)(s+1);
11243 p2 = (int*)(s+2);
11244 if (*p1 == *p2)
11245 return 1;
11246 return 0;
11247}
Christian Heimes985ecdc2013-11-20 11:46:18 +010011248_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011249if ac_fn_c_try_run "$LINENO"
11250then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011251 ac_cv_aligned_required=no
Pablo Galindocc128882021-03-01 16:47:53 +000011252else $as_nop
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011253 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010011254fi
11255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11256 conftest.$ac_objext conftest.beam conftest.$ac_ext
11257fi
11258
11259
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011260fi
11261
Pablo Galindocc128882021-03-01 16:47:53 +000011262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
11263printf "%s\n" "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011264if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010011265
Pablo Galindocc128882021-03-01 16:47:53 +000011266printf "%s\n" "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011267
11268fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010011269
11270# str, bytes and memoryview hash algorithm
11271
11272
Pablo Galindocc128882021-03-01 16:47:53 +000011273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
11274printf %s "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011275
11276# Check whether --with-hash_algorithm was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011277if test ${with_hash_algorithm+y}
11278then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010011279 withval=$with_hash_algorithm;
Pablo Galindocc128882021-03-01 16:47:53 +000011280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11281printf "%s\n" "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011282case "$withval" in
11283 siphash24)
Pablo Galindocc128882021-03-01 16:47:53 +000011284 printf "%s\n" "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011285
11286 ;;
11287 fnv)
Pablo Galindocc128882021-03-01 16:47:53 +000011288 printf "%s\n" "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011289
11290 ;;
11291 *)
11292 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
11293 ;;
11294esac
11295
Pablo Galindocc128882021-03-01 16:47:53 +000011296else $as_nop
11297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5
11298printf "%s\n" "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011299fi
11300
11301
Paul Ganssle62972d92020-05-16 04:20:06 -040011302validate_tzpath() {
11303 # Checks that each element of hte path is an absolute path
11304 if test -z "$1"; then
11305 # Empty string is allowed: it indicates no system TZPATH
11306 return 0
11307 fi
11308
11309 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050011310 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040011311 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
11312 return 1;
11313 fi
11314}
11315
11316TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Pablo Galindocc128882021-03-01 16:47:53 +000011317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
11318printf %s "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011319
11320# Check whether --with-tzpath was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011321if test ${with_tzpath+y}
11322then :
Paul Ganssle62972d92020-05-16 04:20:06 -040011323 withval=$with_tzpath;
11324case "$withval" in
11325 yes)
11326 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
11327 ;;
11328 *)
11329 validate_tzpath "$withval"
11330 TZPATH="$withval"
Pablo Galindocc128882021-03-01 16:47:53 +000011331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
11332printf "%s\n" "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011333 ;;
11334esac
11335
Pablo Galindocc128882021-03-01 16:47:53 +000011336else $as_nop
Paul Ganssle62972d92020-05-16 04:20:06 -040011337 validate_tzpath "$TZPATH"
Pablo Galindocc128882021-03-01 16:47:53 +000011338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
11339printf "%s\n" "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011340fi
11341
11342
11343
Pablo Galindocc128882021-03-01 16:47:53 +000011344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
11345printf %s "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011346
11347# Check whether --with-address_sanitizer was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011348if test ${with_address_sanitizer+y}
11349then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010011350 withval=$with_address_sanitizer;
Pablo Galindocc128882021-03-01 16:47:53 +000011351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11352printf "%s\n" "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011353BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
11354LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080011355# ASan works by controlling memory allocation, our own malloc interferes.
11356with_pymalloc="no"
11357
Pablo Galindocc128882021-03-01 16:47:53 +000011358else $as_nop
11359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011361fi
11362
11363
Pablo Galindocc128882021-03-01 16:47:53 +000011364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
11365printf %s "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011366
11367# Check whether --with-memory_sanitizer was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011368if test ${with_memory_sanitizer+y}
11369then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011370 withval=$with_memory_sanitizer;
Pablo Galindocc128882021-03-01 16:47:53 +000011371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11372printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011373BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
11374LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
11375# MSan works by controlling memory allocation, our own malloc interferes.
11376with_pymalloc="no"
11377
Pablo Galindocc128882021-03-01 16:47:53 +000011378else $as_nop
11379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011381fi
11382
11383
Pablo Galindocc128882021-03-01 16:47:53 +000011384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
11385printf %s "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011386
11387# Check whether --with-undefined_behavior_sanitizer was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011388if test ${with_undefined_behavior_sanitizer+y}
11389then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011390 withval=$with_undefined_behavior_sanitizer;
Pablo Galindocc128882021-03-01 16:47:53 +000011391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11392printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011393BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
11394LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010011395
Pablo Galindocc128882021-03-01 16:47:53 +000011396else $as_nop
11397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11398printf "%s\n" "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011399fi
11400
11401
Guido van Rossum70c7f481998-03-26 18:44:10 +000011402# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Pablo Galindocc128882021-03-01 16:47:53 +000011403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
11404printf %s "checking for t_open in -lnsl... " >&6; }
11405if test ${ac_cv_lib_nsl_t_open+y}
11406then :
11407 printf %s "(cached) " >&6
11408else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011410LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414/* Override any GCC internal prototype to avoid an error.
11415 Use char because int might match the return type of a GCC
11416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011417char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011418int
Pablo Galindocc128882021-03-01 16:47:53 +000011419main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 ;
11423 return 0;
11424}
11425_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011426if ac_fn_c_try_link "$LINENO"
11427then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 ac_cv_lib_nsl_t_open=yes
Pablo Galindocc128882021-03-01 16:47:53 +000011429else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011431fi
Pablo Galindocc128882021-03-01 16:47:53 +000011432rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011434LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011435fi
Pablo Galindocc128882021-03-01 16:47:53 +000011436{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
11437printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; }
11438if test "x$ac_cv_lib_nsl_t_open" = xyes
11439then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011440 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011441fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011442 # SVR4
Pablo Galindocc128882021-03-01 16:47:53 +000011443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
11444printf %s "checking for socket in -lsocket... " >&6; }
11445if test ${ac_cv_lib_socket_socket+y}
11446then :
11447 printf %s "(cached) " >&6
11448else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011450LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454/* Override any GCC internal prototype to avoid an error.
11455 Use char because int might match the return type of a GCC
11456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011457char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011458int
Pablo Galindocc128882021-03-01 16:47:53 +000011459main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011460{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 ;
11463 return 0;
11464}
11465_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011466if ac_fn_c_try_link "$LINENO"
11467then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 ac_cv_lib_socket_socket=yes
Pablo Galindocc128882021-03-01 16:47:53 +000011469else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011471fi
Pablo Galindocc128882021-03-01 16:47:53 +000011472rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011474LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011475fi
Pablo Galindocc128882021-03-01 16:47:53 +000011476{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
11477printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
11478if test "x$ac_cv_lib_socket_socket" = xyes
11479then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011480 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011481fi
11482 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011483
Pablo Galindocc128882021-03-01 16:47:53 +000011484{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
11485printf %s "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487# Check whether --with-libs was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011488if test ${with_libs+y}
11489then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490 withval=$with_libs;
Pablo Galindocc128882021-03-01 16:47:53 +000011491{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11492printf "%s\n" "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000011493LIBS="$withval $LIBS"
11494
Pablo Galindocc128882021-03-01 16:47:53 +000011495else $as_nop
11496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497printf "%s\n" "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498fi
11499
Guido van Rossum7f43da71994-08-01 12:15:30 +000011500
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011501
11502
11503
11504
11505
11506
Victor Stinnerb477d192020-01-22 22:48:16 +010011507
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011508if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11509 if test -n "$ac_tool_prefix"; then
11510 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11511set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +000011512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11513printf %s "checking for $ac_word... " >&6; }
11514if test ${ac_cv_path_PKG_CONFIG+y}
11515then :
11516 printf %s "(cached) " >&6
11517else $as_nop
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011518 case $PKG_CONFIG in
11519 [\\/]* | ?:[\\/]*)
11520 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11521 ;;
11522 *)
11523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11524for as_dir in $PATH
11525do
11526 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +000011527 case $as_dir in #(((
11528 '') as_dir=./ ;;
11529 */) ;;
11530 *) as_dir=$as_dir/ ;;
11531 esac
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011532 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +000011533 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11534 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
11535 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 +080011536 break 2
11537 fi
11538done
11539 done
11540IFS=$as_save_IFS
11541
11542 ;;
11543esac
11544fi
11545PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11546if test -n "$PKG_CONFIG"; then
Pablo Galindocc128882021-03-01 16:47:53 +000011547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11548printf "%s\n" "$PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011549else
Pablo Galindocc128882021-03-01 16:47:53 +000011550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011552fi
11553
11554
11555fi
11556if test -z "$ac_cv_path_PKG_CONFIG"; then
11557 ac_pt_PKG_CONFIG=$PKG_CONFIG
11558 # Extract the first word of "pkg-config", so it can be a program name with args.
11559set dummy pkg-config; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +000011560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11561printf %s "checking for $ac_word... " >&6; }
11562if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
11563then :
11564 printf %s "(cached) " >&6
11565else $as_nop
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011566 case $ac_pt_PKG_CONFIG in
11567 [\\/]* | ?:[\\/]*)
11568 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11569 ;;
11570 *)
11571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11572for as_dir in $PATH
11573do
11574 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +000011575 case $as_dir in #(((
11576 '') as_dir=./ ;;
11577 */) ;;
11578 *) as_dir=$as_dir/ ;;
11579 esac
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011580 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +000011581 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11582 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
11583 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 +080011584 break 2
11585 fi
11586done
11587 done
11588IFS=$as_save_IFS
11589
11590 ;;
11591esac
11592fi
11593ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11594if test -n "$ac_pt_PKG_CONFIG"; then
Pablo Galindocc128882021-03-01 16:47:53 +000011595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11596printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011597else
Pablo Galindocc128882021-03-01 16:47:53 +000011598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011600fi
11601
11602 if test "x$ac_pt_PKG_CONFIG" = x; then
11603 PKG_CONFIG=""
11604 else
11605 case $cross_compiling:$ac_tool_warned in
11606yes:)
Pablo Galindocc128882021-03-01 16:47:53 +000011607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11608printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011609ac_tool_warned=yes ;;
11610esac
11611 PKG_CONFIG=$ac_pt_PKG_CONFIG
11612 fi
11613else
11614 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11615fi
11616
11617fi
11618if test -n "$PKG_CONFIG"; then
11619 _pkg_min_version=0.9.0
Pablo Galindocc128882021-03-01 16:47:53 +000011620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11621printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011622 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
Pablo Galindocc128882021-03-01 16:47:53 +000011623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11624printf "%s\n" "yes" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011625 else
Pablo Galindocc128882021-03-01 16:47:53 +000011626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11627printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011628 PKG_CONFIG=""
11629 fi
11630fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011631
11632# Check for use of the system expat library
Pablo Galindocc128882021-03-01 16:47:53 +000011633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
11634printf %s "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011635
11636# Check whether --with-system_expat was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011637if test ${with_system_expat+y}
11638then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011639 withval=$with_system_expat;
Pablo Galindocc128882021-03-01 16:47:53 +000011640else $as_nop
Benjamin Peterson79263252010-10-31 16:50:44 +000011641 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011642fi
11643
11644
Pablo Galindocc128882021-03-01 16:47:53 +000011645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
11646printf "%s\n" "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011647
11648# Check for use of the system libffi library
Pablo Galindocc128882021-03-01 16:47:53 +000011649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
11650printf %s "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011651
11652# Check whether --with-system_ffi was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011653if test ${with_system_ffi+y}
11654then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011655 withval=$with_system_ffi;
11656fi
11657
11658
Zachary Waref40d4dd2016-09-17 01:25:24 -050011659if test "$ac_sys_system" = "Darwin"
11660then
11661 case "$with_system_ffi" in
11662 "")
11663 with_system_ffi="no"
11664 ;;
11665 yes|no)
11666 ;;
11667 *)
11668 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
11669 ;;
11670 esac
Pablo Galindocc128882021-03-01 16:47:53 +000011671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
11672printf "%s\n" "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011673else
Pablo Galindocc128882021-03-01 16:47:53 +000011674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11675printf "%s\n" "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011676 if test "$with_system_ffi" != ""
11677 then
Pablo Galindocc128882021-03-01 16:47:53 +000011678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
11679printf "%s\n" "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050011680 fi
11681 with_system_ffi="yes"
11682fi
Zachary Ware935043d2016-09-09 17:01:21 -070011683
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011684if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000011685 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
11686else
11687 LIBFFI_INCLUDEDIR=""
11688fi
11689
11690
Stefan Krah60187b52012-03-23 19:06:27 +010011691# Check for use of the system libmpdec library
Pablo Galindocc128882021-03-01 16:47:53 +000011692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
11693printf %s "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011694
11695# Check whether --with-system_libmpdec was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011696if test ${with_system_libmpdec+y}
11697then :
Stefan Krah60187b52012-03-23 19:06:27 +010011698 withval=$with_system_libmpdec;
Pablo Galindocc128882021-03-01 16:47:53 +000011699else $as_nop
Stefan Krah60187b52012-03-23 19:06:27 +010011700 with_system_libmpdec="no"
11701fi
11702
11703
Pablo Galindocc128882021-03-01 16:47:53 +000011704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
11705printf "%s\n" "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011706
Stefan Krah815280e2020-02-29 19:43:42 +010011707# Check whether _decimal should use a coroutine-local or thread-local context
Pablo Galindocc128882021-03-01 16:47:53 +000011708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
11709printf %s "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011710
11711# Check whether --with-decimal_contextvar was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011712if test ${with_decimal_contextvar+y}
11713then :
Stefan Krah815280e2020-02-29 19:43:42 +010011714 withval=$with_decimal_contextvar;
Pablo Galindocc128882021-03-01 16:47:53 +000011715else $as_nop
Stefan Krah815280e2020-02-29 19:43:42 +010011716 with_decimal_contextvar="yes"
11717fi
11718
11719
11720if test "$with_decimal_contextvar" != "no"
11721then
11722
Pablo Galindocc128882021-03-01 16:47:53 +000011723printf "%s\n" "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010011724
11725fi
11726
Pablo Galindocc128882021-03-01 16:47:53 +000011727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
11728printf "%s\n" "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011729
Benjamin Peterson076ed002010-10-31 17:11:02 +000011730# Check for support for loadable sqlite extensions
Pablo Galindocc128882021-03-01 16:47:53 +000011731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
11732printf %s "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011733# Check whether --enable-loadable-sqlite-extensions was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011734if test ${enable_loadable_sqlite_extensions+y}
11735then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000011736 enableval=$enable_loadable_sqlite_extensions;
Pablo Galindocc128882021-03-01 16:47:53 +000011737else $as_nop
Benjamin Peterson076ed002010-10-31 17:11:02 +000011738 enable_loadable_sqlite_extensions="no"
11739fi
11740
11741
Pablo Galindocc128882021-03-01 16:47:53 +000011742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
11743printf "%s\n" "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011744
Ned Deilyd819b932013-09-06 01:07:05 -070011745# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
11746
11747
Pablo Galindocc128882021-03-01 16:47:53 +000011748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
11749printf %s "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011750
11751# Check whether --with-tcltk-includes was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011752if test ${with_tcltk_includes+y}
11753then :
Ned Deilyd819b932013-09-06 01:07:05 -070011754 withval=$with_tcltk_includes;
Pablo Galindocc128882021-03-01 16:47:53 +000011755else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011756 with_tcltk_includes="default"
11757fi
11758
Pablo Galindocc128882021-03-01 16:47:53 +000011759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
11760printf "%s\n" "$with_tcltk_includes" >&6; }
11761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
11762printf %s "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011763
11764# Check whether --with-tcltk-libs was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011765if test ${with_tcltk_libs+y}
11766then :
Ned Deilyd819b932013-09-06 01:07:05 -070011767 withval=$with_tcltk_libs;
Pablo Galindocc128882021-03-01 16:47:53 +000011768else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011769 with_tcltk_libs="default"
11770fi
11771
Pablo Galindocc128882021-03-01 16:47:53 +000011772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
11773printf "%s\n" "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011774if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
11775then
11776 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
11777 then
11778 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
11779 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010011780 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
11781 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
11782 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
11783 else
11784 TCLTK_INCLUDES=""
11785 TCLTK_LIBS=""
11786 fi
Ned Deilyd819b932013-09-06 01:07:05 -070011787else
11788 TCLTK_INCLUDES="$with_tcltk_includes"
11789 TCLTK_LIBS="$with_tcltk_libs"
11790fi
11791
Matthias Klose55708cc2009-04-30 08:06:49 +000011792# Check for --with-dbmliborder
Pablo Galindocc128882021-03-01 16:47:53 +000011793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
11794printf %s "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011795
11796# Check whether --with-dbmliborder was given.
Pablo Galindocc128882021-03-01 16:47:53 +000011797if test ${with_dbmliborder+y}
11798then :
Matthias Klose55708cc2009-04-30 08:06:49 +000011799 withval=$with_dbmliborder;
11800if test x$with_dbmliborder = xyes
11801then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011802as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011803else
11804 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
11805 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
11806 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011807 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011808 fi
11809 done
11810fi
11811fi
11812
Pablo Galindocc128882021-03-01 16:47:53 +000011813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
11814printf "%s\n" "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011815
Martin v. Löwis11437992002-04-12 09:54:03 +000011816# Templates for things AC_DEFINEd more than once.
11817# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011818
11819
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011820if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011821then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011822 # Defining _REENTRANT on system with POSIX threads should not hurt.
Pablo Galindocc128882021-03-01 16:47:53 +000011823 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011824
11825 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020011826 if test "$ac_sys_system" = "SunOS"; then
11827 CFLAGS="$CFLAGS -D_REENTRANT"
11828 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000011829elif test "$ac_cv_kpthread" = "yes"
11830then
11831 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011832 if test "$ac_cv_cxx_thread" = "yes"; then
11833 CXX="$CXX -Kpthread"
11834 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011835 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011836elif test "$ac_cv_kthread" = "yes"
11837then
11838 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011839 if test "$ac_cv_cxx_thread" = "yes"; then
11840 CXX="$CXX -Kthread"
11841 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011842 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011843elif test "$ac_cv_pthread" = "yes"
11844then
11845 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011846 if test "$ac_cv_cxx_thread" = "yes"; then
11847 CXX="$CXX -pthread"
11848 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011849 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011850else
Martin v. Löwis130fb172001-07-19 11:00:41 +000011851 if test ! -z "$withval" -a -d "$withval"
11852 then LDFLAGS="$LDFLAGS -L$withval"
11853 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011854
11855 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011856 # define _POSIX_THREADS in unistd.h. Some apparently don't
11857 # (e.g. gnu pth with pthread emulation)
Pablo Galindocc128882021-03-01 16:47:53 +000011858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
11859printf %s "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011861/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011862
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011863#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011864#ifdef _POSIX_THREADS
11865yes
11866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011867
11868_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +000011870 $EGREP "yes" >/dev/null 2>&1
11871then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011872 unistd_defines_pthreads=yes
Pablo Galindocc128882021-03-01 16:47:53 +000011873else $as_nop
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011874 unistd_defines_pthreads=no
11875fi
Pablo Galindocc128882021-03-01 16:47:53 +000011876rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011877
Pablo Galindocc128882021-03-01 16:47:53 +000011878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
11879printf "%s\n" "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011880
Pablo Galindocc128882021-03-01 16:47:53 +000011881 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011882
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011883 # Just looking for pthread_create in libpthread is not enough:
11884 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11885 # So we really have to include pthread.h, and then link.
11886 _libs=$LIBS
11887 LIBS="$LIBS -lpthread"
Pablo Galindocc128882021-03-01 16:47:53 +000011888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
11889printf %s "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011891/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011892
11893#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011894#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011895
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011896void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011897int
Pablo Galindocc128882021-03-01 16:47:53 +000011898main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011899{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011900
11901pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011902 ;
11903 return 0;
11904}
11905_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011906if ac_fn_c_try_link "$LINENO"
11907then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011908
Pablo Galindocc128882021-03-01 16:47:53 +000011909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11910printf "%s\n" "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011911 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011912
Pablo Galindocc128882021-03-01 16:47:53 +000011913else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011914
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011915 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Pablo Galindocc128882021-03-01 16:47:53 +000011917if test "x$ac_cv_func_pthread_detach" = xyes
11918then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011919
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011920 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011921
Pablo Galindocc128882021-03-01 16:47:53 +000011922else $as_nop
Guido van Rossumad678af1998-10-02 14:42:15 +000011923
Pablo Galindocc128882021-03-01 16:47:53 +000011924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
11925printf %s "checking for pthread_create in -lpthreads... " >&6; }
11926if test ${ac_cv_lib_pthreads_pthread_create+y}
11927then :
11928 printf %s "(cached) " >&6
11929else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011930 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011931LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011935/* Override any GCC internal prototype to avoid an error.
11936 Use char because int might match the return type of a GCC
11937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011938char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011939int
Pablo Galindocc128882021-03-01 16:47:53 +000011940main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011942return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 ;
11944 return 0;
11945}
11946_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011947if ac_fn_c_try_link "$LINENO"
11948then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011949 ac_cv_lib_pthreads_pthread_create=yes
Pablo Galindocc128882021-03-01 16:47:53 +000011950else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011952fi
Pablo Galindocc128882021-03-01 16:47:53 +000011953rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011955LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011956fi
Pablo Galindocc128882021-03-01 16:47:53 +000011957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
11958printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; }
11959if test "x$ac_cv_lib_pthreads_pthread_create" = xyes
11960then :
Greg Steinadf63d62000-07-05 10:38:09 +000011961
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011962 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011963 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011964
Pablo Galindocc128882021-03-01 16:47:53 +000011965else $as_nop
Greg Steinadf63d62000-07-05 10:38:09 +000011966
Pablo Galindocc128882021-03-01 16:47:53 +000011967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
11968printf %s "checking for pthread_create in -lc_r... " >&6; }
11969if test ${ac_cv_lib_c_r_pthread_create+y}
11970then :
11971 printf %s "(cached) " >&6
11972else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011973 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011974LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978/* Override any GCC internal prototype to avoid an error.
11979 Use char because int might match the return type of a GCC
11980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011981char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011982int
Pablo Galindocc128882021-03-01 16:47:53 +000011983main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011985return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011986 ;
11987 return 0;
11988}
11989_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000011990if ac_fn_c_try_link "$LINENO"
11991then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 ac_cv_lib_c_r_pthread_create=yes
Pablo Galindocc128882021-03-01 16:47:53 +000011993else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011995fi
Pablo Galindocc128882021-03-01 16:47:53 +000011996rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011998LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011999fi
Pablo Galindocc128882021-03-01 16:47:53 +000012000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
12001printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; }
12002if test "x$ac_cv_lib_c_r_pthread_create" = xyes
12003then :
Guido van Rossum49545951997-12-02 19:28:29 +000012004
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012005 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012006 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012007
Pablo Galindocc128882021-03-01 16:47:53 +000012008else $as_nop
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012009
Pablo Galindocc128882021-03-01 16:47:53 +000012010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
12011printf %s "checking for __pthread_create_system in -lpthread... " >&6; }
12012if test ${ac_cv_lib_pthread___pthread_create_system+y}
12013then :
12014 printf %s "(cached) " >&6
12015else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012017LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021/* Override any GCC internal prototype to avoid an error.
12022 Use char because int might match the return type of a GCC
12023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012024char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
Pablo Galindocc128882021-03-01 16:47:53 +000012026main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012028return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012033if ac_fn_c_try_link "$LINENO"
12034then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 ac_cv_lib_pthread___pthread_create_system=yes
Pablo Galindocc128882021-03-01 16:47:53 +000012036else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012038fi
Pablo Galindocc128882021-03-01 16:47:53 +000012039rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012041LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012042fi
Pablo Galindocc128882021-03-01 16:47:53 +000012043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12044printf "%s\n" "$ac_cv_lib_pthread___pthread_create_system" >&6; }
12045if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes
12046then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012047
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012048 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012049 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012050
Pablo Galindocc128882021-03-01 16:47:53 +000012051else $as_nop
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012052
Pablo Galindocc128882021-03-01 16:47:53 +000012053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
12054printf %s "checking for pthread_create in -lcma... " >&6; }
12055if test ${ac_cv_lib_cma_pthread_create+y}
12056then :
12057 printf %s "(cached) " >&6
12058else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012060LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064/* Override any GCC internal prototype to avoid an error.
12065 Use char because int might match the return type of a GCC
12066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012067char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
Pablo Galindocc128882021-03-01 16:47:53 +000012069main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012076if ac_fn_c_try_link "$LINENO"
12077then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 ac_cv_lib_cma_pthread_create=yes
Pablo Galindocc128882021-03-01 16:47:53 +000012079else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012081fi
Pablo Galindocc128882021-03-01 16:47:53 +000012082rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012084LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012085fi
Pablo Galindocc128882021-03-01 16:47:53 +000012086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
12087printf "%s\n" "$ac_cv_lib_cma_pthread_create" >&6; }
12088if test "x$ac_cv_lib_cma_pthread_create" = xyes
12089then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000012090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012091 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012092 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012093
Pablo Galindocc128882021-03-01 16:47:53 +000012094else $as_nop
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012095
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012096 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
12097
Guido van Rossum2d38f911996-06-26 19:47:01 +000012098fi
12099
Guido van Rossum627b2d71993-12-24 10:39:16 +000012100
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012101fi
12102
Guido van Rossum0be3e491997-05-22 20:33:33 +000012103fi
12104
Guido van Rossum49545951997-12-02 19:28:29 +000012105fi
12106
Guido van Rossumb93a8621998-05-07 13:27:32 +000012107fi
12108
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012109fi
Pablo Galindocc128882021-03-01 16:47:53 +000012110rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012112
Pablo Galindocc128882021-03-01 16:47:53 +000012113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
12114printf %s "checking for usconfig in -lmpc... " >&6; }
12115if test ${ac_cv_lib_mpc_usconfig+y}
12116then :
12117 printf %s "(cached) " >&6
12118else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012120LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124/* Override any GCC internal prototype to avoid an error.
12125 Use char because int might match the return type of a GCC
12126 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012127char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012128int
Pablo Galindocc128882021-03-01 16:47:53 +000012129main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012131return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 ;
12133 return 0;
12134}
12135_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012136if ac_fn_c_try_link "$LINENO"
12137then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 ac_cv_lib_mpc_usconfig=yes
Pablo Galindocc128882021-03-01 16:47:53 +000012139else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012141fi
Pablo Galindocc128882021-03-01 16:47:53 +000012142rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012145fi
Pablo Galindocc128882021-03-01 16:47:53 +000012146{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
12147printf "%s\n" "$ac_cv_lib_mpc_usconfig" >&6; }
12148if test "x$ac_cv_lib_mpc_usconfig" = xyes
12149then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000012150
Martin v. Löwis130fb172001-07-19 11:00:41 +000012151 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012152
Guido van Rossum627b2d71993-12-24 10:39:16 +000012153fi
12154
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012155
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012156fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012157
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012158if test "$posix_threads" = "yes"; then
12159 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012160
Pablo Galindocc128882021-03-01 16:47:53 +000012161printf "%s\n" "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012162
12163 fi
12164
12165 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12166 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020012167 SunOS/5.6)
Pablo Galindocc128882021-03-01 16:47:53 +000012168printf "%s\n" "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012169
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012170 ;;
12171 SunOS/5.8)
Pablo Galindocc128882021-03-01 16:47:53 +000012172printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012173
12174 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020012175 AIX/*)
Pablo Galindocc128882021-03-01 16:47:53 +000012176printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000012177
12178 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012179 esac
12180
Pablo Galindocc128882021-03-01 16:47:53 +000012181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12182printf %s "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
12183 if test ${ac_cv_pthread_system_supported+y}
12184then :
12185 printf %s "(cached) " >&6
12186else $as_nop
12187 if test "$cross_compiling" = yes
12188then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012189 ac_cv_pthread_system_supported=no
Pablo Galindocc128882021-03-01 16:47:53 +000012190else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012192/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010012193
12194 #include <stdio.h>
12195 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012196 void *foo(void *parm) {
12197 return NULL;
12198 }
12199 main() {
12200 pthread_attr_t attr;
12201 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110012202 if (pthread_attr_init(&attr)) return (-1);
12203 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
12204 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
12205 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012206 }
12207_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012208if ac_fn_c_try_run "$LINENO"
12209then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012210 ac_cv_pthread_system_supported=yes
Pablo Galindocc128882021-03-01 16:47:53 +000012211else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012216fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218
Guido van Rossum627b2d71993-12-24 10:39:16 +000012219fi
12220
Pablo Galindocc128882021-03-01 16:47:53 +000012221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
12222printf "%s\n" "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012223 if test "$ac_cv_pthread_system_supported" = "yes"; then
12224
Pablo Galindocc128882021-03-01 16:47:53 +000012225printf "%s\n" "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012226
12227 fi
Pablo Galindocc128882021-03-01 16:47:53 +000012228
12229 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000012230do :
12231 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Pablo Galindocc128882021-03-01 16:47:53 +000012232if test "x$ac_cv_func_pthread_sigmask" = xyes
12233then :
12234 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012235 case $ac_sys_system in
12236 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012237
Pablo Galindocc128882021-03-01 16:47:53 +000012238printf "%s\n" "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012239
12240 ;;
12241 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012242fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012243
Pablo Galindocc128882021-03-01 16:47:53 +000012244done
12245 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
12246if test "x$ac_cv_func_pthread_getcpuclockid" = xyes
12247then :
12248 printf "%s\n" "#define HAVE_PTHREAD_GETCPUCLOCKID 1" >>confdefs.h
pdoxe14679c2017-10-05 00:01:56 -070012249
12250fi
pdoxe14679c2017-10-05 00:01:56 -070012251
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012252fi
12253
12254
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012255# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Pablo Galindocc128882021-03-01 16:47:53 +000012257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
12258printf %s "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259# Check whether --enable-ipv6 was given.
Pablo Galindocc128882021-03-01 16:47:53 +000012260if test ${enable_ipv6+y}
12261then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012263 no)
Pablo Galindocc128882021-03-01 16:47:53 +000012264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012266 ipv6=no
12267 ;;
Pablo Galindocc128882021-03-01 16:47:53 +000012268 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12269printf "%s\n" "yes" >&6; }
12270 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012271
12272 ipv6=yes
12273 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 esac
Pablo Galindocc128882021-03-01 16:47:53 +000012275else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012278/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012279 /* AF_INET6 available check */
12280#include <sys/types.h>
12281#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012282int
Pablo Galindocc128882021-03-01 16:47:53 +000012283main (void)
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012284{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012285int domain = AF_INET6;
12286 ;
12287 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012288}
Martin v. Löwis11437992002-04-12 09:54:03 +000012289_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012290if ac_fn_c_try_compile "$LINENO"
12291then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012292
Pablo Galindocc128882021-03-01 16:47:53 +000012293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12294printf "%s\n" "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012295 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000012296
Pablo Galindocc128882021-03-01 16:47:53 +000012297else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012298
Pablo Galindocc128882021-03-01 16:47:53 +000012299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12300printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012301 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012302
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012303fi
Pablo Galindocc128882021-03-01 16:47:53 +000012304rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012306if test "$ipv6" = "yes"; then
Pablo Galindocc128882021-03-01 16:47:53 +000012307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
12308printf %s "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012310/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012311
12312 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012313#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012314int
Pablo Galindocc128882021-03-01 16:47:53 +000012315main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012316{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012317struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000012318 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 ;
12320 return 0;
12321}
Matthias Kloseb159a552010-04-25 21:00:44 +000012322
Martin v. Löwis11437992002-04-12 09:54:03 +000012323_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012324if ac_fn_c_try_compile "$LINENO"
12325then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012326
Pablo Galindocc128882021-03-01 16:47:53 +000012327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12328printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012329 ipv6=yes
12330
Pablo Galindocc128882021-03-01 16:47:53 +000012331else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012332
Pablo Galindocc128882021-03-01 16:47:53 +000012333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12334printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012335 ipv6=no
12336
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012337fi
Pablo Galindocc128882021-03-01 16:47:53 +000012338rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012339fi
12340
12341if test "$ipv6" = "yes"; then
Pablo Galindocc128882021-03-01 16:47:53 +000012342 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012343
12344fi
12345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346fi
12347
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012348
12349ipv6type=unknown
12350ipv6lib=none
12351ipv6trylibc=no
12352
12353if test "$ipv6" = "yes"; then
Pablo Galindocc128882021-03-01 16:47:53 +000012354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
12355printf %s "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000012356 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12357 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012358 case $i in
12359 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012361/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012362
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012363#include <netinet/in.h>
12364#ifdef IPV6_INRIA_VERSION
12365yes
12366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012367_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +000012369 $EGREP "yes" >/dev/null 2>&1
12370then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012371 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012372fi
Pablo Galindocc128882021-03-01 16:47:53 +000012373rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012374
12375 ;;
12376 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012379
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012380#include <netinet/in.h>
12381#ifdef __KAME__
12382yes
12383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +000012386 $EGREP "yes" >/dev/null 2>&1
12387then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012388 ipv6type=$i;
12389 ipv6lib=inet6
12390 ipv6libdir=/usr/local/v6/lib
12391 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012392fi
Pablo Galindocc128882021-03-01 16:47:53 +000012393rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012394
12395 ;;
12396 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012398/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012399
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012400#include <features.h>
12401#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12402yes
12403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012404_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +000012406 $EGREP "yes" >/dev/null 2>&1
12407then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012408 ipv6type=$i;
12409 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012410fi
Pablo Galindocc128882021-03-01 16:47:53 +000012411rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012412
12413 ;;
12414 linux-inet6)
12415 if test -d /usr/inet6; then
12416 ipv6type=$i
12417 ipv6lib=inet6
12418 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012419 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012420 fi
12421 ;;
12422 solaris)
12423 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000012424 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012425 ipv6type=$i
12426 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012427 fi
12428 fi
12429 ;;
12430 toshiba)
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 <sys/param.h>
12435#ifdef _TOSHIBA_INET6
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 Galindocc128882021-03-01 16:47:53 +000012440 $EGREP "yes" >/dev/null 2>&1
12441then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012442 ipv6type=$i;
12443 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012444 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012445fi
Pablo Galindocc128882021-03-01 16:47:53 +000012446rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012447
12448 ;;
12449 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012451/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012452
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012453#include </usr/local/v6/include/sys/v6config.h>
12454#ifdef __V6D__
12455yes
12456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +000012459 $EGREP "yes" >/dev/null 2>&1
12460then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012461 ipv6type=$i;
12462 ipv6lib=v6;
12463 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012464 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012465fi
Pablo Galindocc128882021-03-01 16:47:53 +000012466rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012467
12468 ;;
12469 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012472
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012473#include <sys/param.h>
12474#ifdef _ZETA_MINAMI_INET6
12475yes
12476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012477_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc128882021-03-01 16:47:53 +000012479 $EGREP "yes" >/dev/null 2>&1
12480then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012481 ipv6type=$i;
12482 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012483 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012484fi
Pablo Galindocc128882021-03-01 16:47:53 +000012485rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012486
12487 ;;
12488 esac
12489 if test "$ipv6type" != "unknown"; then
12490 break
12491 fi
12492 done
Pablo Galindocc128882021-03-01 16:47:53 +000012493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
12494printf "%s\n" "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012495fi
12496
12497if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12498 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12499 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12500 echo "using lib$ipv6lib"
12501 else
12502 if test $ipv6trylibc = "yes"; then
12503 echo "using libc"
12504 else
12505 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12506 echo "You need to fetch lib$ipv6lib.a from appropriate"
12507 echo 'ipv6 kit and compile beforehand.'
12508 exit 1
12509 fi
12510 fi
12511fi
12512
Pablo Galindocc128882021-03-01 16:47:53 +000012513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
12514printf %s "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12516/* end confdefs.h. */
12517 /* CAN_RAW_FD_FRAMES available check */
12518#include <linux/can/raw.h>
12519int
Pablo Galindocc128882021-03-01 16:47:53 +000012520main (void)
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012521{
12522int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
12523 ;
12524 return 0;
12525}
12526_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012527if ac_fn_c_try_compile "$LINENO"
12528then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012529
12530
Pablo Galindocc128882021-03-01 16:47:53 +000012531printf "%s\n" "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012532
Pablo Galindocc128882021-03-01 16:47:53 +000012533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12534printf "%s\n" "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012535
Pablo Galindocc128882021-03-01 16:47:53 +000012536else $as_nop
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012537
Pablo Galindocc128882021-03-01 16:47:53 +000012538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539printf "%s\n" "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012540
12541fi
Pablo Galindocc128882021-03-01 16:47:53 +000012542rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012543
Pablo Galindocc128882021-03-01 16:47:53 +000012544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
12545printf %s "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12547/* end confdefs.h. */
12548
12549#include <linux/can/raw.h>
12550int
Pablo Galindocc128882021-03-01 16:47:53 +000012551main (void)
Zackery Spytz97e0de02020-04-09 06:03:49 -060012552{
12553int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
12554 ;
12555 return 0;
12556}
12557_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000012558if ac_fn_c_try_compile "$LINENO"
12559then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060012560
12561
Pablo Galindocc128882021-03-01 16:47:53 +000012562printf "%s\n" "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060012563
Pablo Galindocc128882021-03-01 16:47:53 +000012564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12565printf "%s\n" "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012566
Pablo Galindocc128882021-03-01 16:47:53 +000012567else $as_nop
Zackery Spytz97e0de02020-04-09 06:03:49 -060012568
Pablo Galindocc128882021-03-01 16:47:53 +000012569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12570printf "%s\n" "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012571
12572fi
Pablo Galindocc128882021-03-01 16:47:53 +000012573rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060012574
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012575# Check for --with-doc-strings
Pablo Galindocc128882021-03-01 16:47:53 +000012576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
12577printf %s "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579# Check whether --with-doc-strings was given.
Pablo Galindocc128882021-03-01 16:47:53 +000012580if test ${with_doc_strings+y}
12581then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582 withval=$with_doc_strings;
12583fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012584
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012585
12586if test -z "$with_doc_strings"
12587then with_doc_strings="yes"
12588fi
12589if test "$with_doc_strings" != "no"
12590then
12591
Pablo Galindocc128882021-03-01 16:47:53 +000012592printf "%s\n" "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012593
12594fi
Pablo Galindocc128882021-03-01 16:47:53 +000012595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
12596printf "%s\n" "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012597
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000012598# Check for Python-specific malloc support
Pablo Galindocc128882021-03-01 16:47:53 +000012599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
12600printf %s "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602# Check whether --with-pymalloc was given.
Pablo Galindocc128882021-03-01 16:47:53 +000012603if test ${with_pymalloc+y}
12604then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605 withval=$with_pymalloc;
12606fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012607
Neil Schemenauera35c6882001-02-27 04:45:05 +000012608
Neil Schemenauer16c22972002-03-22 15:34:49 +000012609if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012610then
12611 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000012612fi
12613if test "$with_pymalloc" != "no"
12614then
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
Pablo Galindocc128882021-03-01 16:47:53 +000012616printf "%s\n" "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000012617
12618fi
Pablo Galindocc128882021-03-01 16:47:53 +000012619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
12620printf "%s\n" "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000012621
Nick Coghlan6ea41862017-06-11 13:16:15 +100012622# Check for --with-c-locale-coercion
Pablo Galindocc128882021-03-01 16:47:53 +000012623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
12624printf %s "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012625
12626# Check whether --with-c-locale-coercion was given.
Pablo Galindocc128882021-03-01 16:47:53 +000012627if test ${with_c_locale_coercion+y}
12628then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100012629 withval=$with_c_locale_coercion;
12630fi
12631
12632
12633if test -z "$with_c_locale_coercion"
12634then
12635 with_c_locale_coercion="yes"
12636fi
12637if test "$with_c_locale_coercion" != "no"
12638then
12639
Pablo Galindocc128882021-03-01 16:47:53 +000012640printf "%s\n" "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100012641
12642fi
Pablo Galindocc128882021-03-01 16:47:53 +000012643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
12644printf "%s\n" "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012645
Benjamin Peterson05159c42009-12-03 03:01:27 +000012646# Check for Valgrind support
Pablo Galindocc128882021-03-01 16:47:53 +000012647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
12648printf %s "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012649
12650# Check whether --with-valgrind was given.
Pablo Galindocc128882021-03-01 16:47:53 +000012651if test ${with_valgrind+y}
12652then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012653 withval=$with_valgrind;
Pablo Galindocc128882021-03-01 16:47:53 +000012654else $as_nop
Benjamin Peterson05159c42009-12-03 03:01:27 +000012655 with_valgrind=no
12656fi
12657
Pablo Galindocc128882021-03-01 16:47:53 +000012658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
12659printf "%s\n" "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012660if test "$with_valgrind" != no; then
Pablo Galindocc128882021-03-01 16:47:53 +000012661 ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
12662if test "x$ac_cv_header_valgrind_valgrind_h" = xyes
12663then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012664
Pablo Galindocc128882021-03-01 16:47:53 +000012665printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000012666
Pablo Galindocc128882021-03-01 16:47:53 +000012667else $as_nop
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012668 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000012669
12670fi
12671
Jeffrey Yasskin39370832010-05-03 19:29:34 +000012672 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000012673fi
12674
Łukasz Langaa785c872016-09-09 17:37:37 -070012675# Check for DTrace support
Pablo Galindocc128882021-03-01 16:47:53 +000012676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
12677printf %s "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012678
12679# Check whether --with-dtrace was given.
Pablo Galindocc128882021-03-01 16:47:53 +000012680if test ${with_dtrace+y}
12681then :
Łukasz Langaa785c872016-09-09 17:37:37 -070012682 withval=$with_dtrace;
Pablo Galindocc128882021-03-01 16:47:53 +000012683else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012684 with_dtrace=no
12685fi
12686
Pablo Galindocc128882021-03-01 16:47:53 +000012687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
12688printf "%s\n" "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012689
12690
12691
12692
12693
12694DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070012695DTRACE_HEADERS=
12696DTRACE_OBJS=
12697
12698if test "$with_dtrace" = "yes"
12699then
12700 # Extract the first word of "dtrace", so it can be a program name with args.
12701set dummy dtrace; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +000012702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12703printf %s "checking for $ac_word... " >&6; }
12704if test ${ac_cv_path_DTRACE+y}
12705then :
12706 printf %s "(cached) " >&6
12707else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012708 case $DTRACE in
12709 [\\/]* | ?:[\\/]*)
12710 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
12711 ;;
12712 *)
12713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12714for as_dir in $PATH
12715do
12716 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +000012717 case $as_dir in #(((
12718 '') as_dir=./ ;;
12719 */) ;;
12720 *) as_dir=$as_dir/ ;;
12721 esac
Łukasz Langaa785c872016-09-09 17:37:37 -070012722 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +000012723 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
12724 ac_cv_path_DTRACE="$as_dir$ac_word$ac_exec_ext"
12725 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070012726 break 2
12727 fi
12728done
12729 done
12730IFS=$as_save_IFS
12731
12732 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
12733 ;;
12734esac
12735fi
12736DTRACE=$ac_cv_path_DTRACE
12737if test -n "$DTRACE"; then
Pablo Galindocc128882021-03-01 16:47:53 +000012738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
12739printf "%s\n" "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012740else
Pablo Galindocc128882021-03-01 16:47:53 +000012741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12742printf "%s\n" "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012743fi
12744
12745
12746 if test "$DTRACE" = "not found"; then
12747 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
12748 fi
12749
Pablo Galindocc128882021-03-01 16:47:53 +000012750printf "%s\n" "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070012751
12752 DTRACE_HEADERS="Include/pydtrace_probes.h"
12753
12754 # On OS X, DTrace providers do not need to be explicitly compiled and
12755 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
12756 # generation flag '-G'. We check for presence of this flag, rather than
12757 # hardcoding support by OS, in the interest of robustness.
Pablo Galindocc128882021-03-01 16:47:53 +000012758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
12759printf %s "checking whether DTrace probes require linking... " >&6; }
12760if test ${ac_cv_dtrace_link+y}
12761then :
12762 printf %s "(cached) " >&6
12763else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012764 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010012765 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010012766 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070012767 ac_cv_dtrace_link=yes
12768
12769fi
Pablo Galindocc128882021-03-01 16:47:53 +000012770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
12771printf "%s\n" "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012772 if test "$ac_cv_dtrace_link" = "yes"; then
12773 DTRACE_OBJS="Python/pydtrace.o"
12774 fi
12775fi
12776
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012777# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012778
Guido van Rossum98935bf2001-09-05 19:13:16 +000012779DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012780
Guido van Rossume97ee181999-12-20 21:27:22 +000012781# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060012782# platforms have dlopen(), but don't want to use it.
Pablo Galindocc128882021-03-01 16:47:53 +000012783ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12784if test "x$ac_cv_func_dlopen" = xyes
12785then :
12786 printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012787
Guido van Rossume97ee181999-12-20 21:27:22 +000012788fi
12789
Michael W. Hudson54241132001-12-07 15:38:26 +000012790
Guido van Rossume97ee181999-12-20 21:27:22 +000012791# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12792# loading of modules.
12793
Pablo Galindocc128882021-03-01 16:47:53 +000012794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
12795printf %s "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012796if test -z "$DYNLOADFILE"
12797then
12798 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000012799 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012800 *)
12801 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12802 # out any dynamic loading
12803 if test "$ac_cv_func_dlopen" = yes
12804 then DYNLOADFILE="dynload_shlib.o"
12805 else DYNLOADFILE="dynload_stub.o"
12806 fi
12807 ;;
12808 esac
12809fi
Pablo Galindocc128882021-03-01 16:47:53 +000012810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
12811printf "%s\n" "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012812if test "$DYNLOADFILE" != "dynload_stub.o"
12813then
Martin v. Löwis11437992002-04-12 09:54:03 +000012814
Pablo Galindocc128882021-03-01 16:47:53 +000012815printf "%s\n" "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012816
12817fi
12818
Neil Schemenauer4e425612001-06-19 15:44:15 +000012819# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12820
Michael W. Hudson54241132001-12-07 15:38:26 +000012821
Pablo Galindocc128882021-03-01 16:47:53 +000012822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
12823printf %s "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000012824if test -z "$MACHDEP_OBJS"
12825then
Jack Jansene578a632001-08-15 01:27:14 +000012826 MACHDEP_OBJS=$extra_machdep_objs
12827else
12828 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012829fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012830if test -z "$MACHDEP_OBJS"; then
Pablo Galindocc128882021-03-01 16:47:53 +000012831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
12832printf "%s\n" "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012833else
Pablo Galindocc128882021-03-01 16:47:53 +000012834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
12835printf "%s\n" "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012836fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000012837
Guido van Rossum627b2d71993-12-24 10:39:16 +000012838# checks for library functions
Pablo Galindocc128882021-03-01 16:47:53 +000012839ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm"
12840if test "x$ac_cv_func_alarm" = xyes
12841then :
12842 printf "%s\n" "#define HAVE_ALARM 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012844fi
Pablo Galindocc128882021-03-01 16:47:53 +000012845ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
12846if test "x$ac_cv_func_accept4" = xyes
12847then :
12848 printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
12849
12850fi
12851ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
12852if test "x$ac_cv_func_setitimer" = xyes
12853then :
12854 printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
12855
12856fi
12857ac_fn_c_check_func "$LINENO" "getitimer" "ac_cv_func_getitimer"
12858if test "x$ac_cv_func_getitimer" = xyes
12859then :
12860 printf "%s\n" "#define HAVE_GETITIMER 1" >>confdefs.h
12861
12862fi
12863ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12864if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
12865then :
12866 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
12867
12868fi
12869ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
12870if test "x$ac_cv_func_chown" = xyes
12871then :
12872 printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
12873
12874fi
12875ac_fn_c_check_func "$LINENO" "clock" "ac_cv_func_clock"
12876if test "x$ac_cv_func_clock" = xyes
12877then :
12878 printf "%s\n" "#define HAVE_CLOCK 1" >>confdefs.h
12879
12880fi
12881ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
12882if test "x$ac_cv_func_confstr" = xyes
12883then :
12884 printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
12885
12886fi
12887ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range"
12888if test "x$ac_cv_func_close_range" = xyes
12889then :
12890 printf "%s\n" "#define HAVE_CLOSE_RANGE 1" >>confdefs.h
12891
12892fi
12893ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range"
12894if test "x$ac_cv_func_copy_file_range" = xyes
12895then :
12896 printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h
12897
12898fi
12899ac_fn_c_check_func "$LINENO" "ctermid" "ac_cv_func_ctermid"
12900if test "x$ac_cv_func_ctermid" = xyes
12901then :
12902 printf "%s\n" "#define HAVE_CTERMID 1" >>confdefs.h
12903
12904fi
12905ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
12906if test "x$ac_cv_func_dup3" = xyes
12907then :
12908 printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
12909
12910fi
12911ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
12912if test "x$ac_cv_func_execv" = xyes
12913then :
12914 printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h
12915
12916fi
12917ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
12918if test "x$ac_cv_func_explicit_bzero" = xyes
12919then :
12920 printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
12921
12922fi
12923ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
12924if test "x$ac_cv_func_explicit_memset" = xyes
12925then :
12926 printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h
12927
12928fi
12929ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
12930if test "x$ac_cv_func_faccessat" = xyes
12931then :
12932 printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h
12933
12934fi
12935ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
12936if test "x$ac_cv_func_fchmod" = xyes
12937then :
12938 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
12939
12940fi
12941ac_fn_c_check_func "$LINENO" "fchmodat" "ac_cv_func_fchmodat"
12942if test "x$ac_cv_func_fchmodat" = xyes
12943then :
12944 printf "%s\n" "#define HAVE_FCHMODAT 1" >>confdefs.h
12945
12946fi
12947ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
12948if test "x$ac_cv_func_fchown" = xyes
12949then :
12950 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
12951
12952fi
12953ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
12954if test "x$ac_cv_func_fchownat" = xyes
12955then :
12956 printf "%s\n" "#define HAVE_FCHOWNAT 1" >>confdefs.h
12957
12958fi
12959ac_fn_c_check_func "$LINENO" "fdwalk" "ac_cv_func_fdwalk"
12960if test "x$ac_cv_func_fdwalk" = xyes
12961then :
12962 printf "%s\n" "#define HAVE_FDWALK 1" >>confdefs.h
12963
12964fi
12965ac_fn_c_check_func "$LINENO" "fexecve" "ac_cv_func_fexecve"
12966if test "x$ac_cv_func_fexecve" = xyes
12967then :
12968 printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h
12969
12970fi
12971ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir"
12972if test "x$ac_cv_func_fdopendir" = xyes
12973then :
12974 printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h
12975
12976fi
12977ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
12978if test "x$ac_cv_func_fork" = xyes
12979then :
12980 printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h
12981
12982fi
12983ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf"
12984if test "x$ac_cv_func_fpathconf" = xyes
12985then :
12986 printf "%s\n" "#define HAVE_FPATHCONF 1" >>confdefs.h
12987
12988fi
12989ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
12990if test "x$ac_cv_func_fstatat" = xyes
12991then :
12992 printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
12993
12994fi
12995ac_fn_c_check_func "$LINENO" "ftime" "ac_cv_func_ftime"
12996if test "x$ac_cv_func_ftime" = xyes
12997then :
12998 printf "%s\n" "#define HAVE_FTIME 1" >>confdefs.h
12999
13000fi
13001ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13002if test "x$ac_cv_func_ftruncate" = xyes
13003then :
13004 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13005
13006fi
13007ac_fn_c_check_func "$LINENO" "futimesat" "ac_cv_func_futimesat"
13008if test "x$ac_cv_func_futimesat" = xyes
13009then :
13010 printf "%s\n" "#define HAVE_FUTIMESAT 1" >>confdefs.h
13011
13012fi
13013ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
13014if test "x$ac_cv_func_futimens" = xyes
13015then :
13016 printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h
13017
13018fi
13019ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes"
13020if test "x$ac_cv_func_futimes" = xyes
13021then :
13022 printf "%s\n" "#define HAVE_FUTIMES 1" >>confdefs.h
13023
13024fi
13025ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
13026if test "x$ac_cv_func_gai_strerror" = xyes
13027then :
13028 printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h
13029
13030fi
13031ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
13032if test "x$ac_cv_func_getentropy" = xyes
13033then :
13034 printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
13035
13036fi
13037ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r"
13038if test "x$ac_cv_func_getgrgid_r" = xyes
13039then :
13040 printf "%s\n" "#define HAVE_GETGRGID_R 1" >>confdefs.h
13041
13042fi
13043ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r"
13044if test "x$ac_cv_func_getgrnam_r" = xyes
13045then :
13046 printf "%s\n" "#define HAVE_GETGRNAM_R 1" >>confdefs.h
13047
13048fi
13049ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
13050if test "x$ac_cv_func_getgrouplist" = xyes
13051then :
13052 printf "%s\n" "#define HAVE_GETGROUPLIST 1" >>confdefs.h
13053
13054fi
13055ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
13056if test "x$ac_cv_func_getgroups" = xyes
13057then :
13058 printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h
13059
13060fi
13061ac_fn_c_check_func "$LINENO" "getlogin" "ac_cv_func_getlogin"
13062if test "x$ac_cv_func_getlogin" = xyes
13063then :
13064 printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h
13065
13066fi
13067ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
13068if test "x$ac_cv_func_getloadavg" = xyes
13069then :
13070 printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h
13071
13072fi
13073ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername"
13074if test "x$ac_cv_func_getpeername" = xyes
13075then :
13076 printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h
13077
13078fi
13079ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13080if test "x$ac_cv_func_getpgid" = xyes
13081then :
13082 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13083
13084fi
13085ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
13086if test "x$ac_cv_func_getpid" = xyes
13087then :
13088 printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h
13089
13090fi
13091ac_fn_c_check_func "$LINENO" "getpriority" "ac_cv_func_getpriority"
13092if test "x$ac_cv_func_getpriority" = xyes
13093then :
13094 printf "%s\n" "#define HAVE_GETPRIORITY 1" >>confdefs.h
13095
13096fi
13097ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid"
13098if test "x$ac_cv_func_getresuid" = xyes
13099then :
13100 printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h
13101
13102fi
13103ac_fn_c_check_func "$LINENO" "getresgid" "ac_cv_func_getresgid"
13104if test "x$ac_cv_func_getresgid" = xyes
13105then :
13106 printf "%s\n" "#define HAVE_GETRESGID 1" >>confdefs.h
13107
13108fi
13109ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13110if test "x$ac_cv_func_getpwent" = xyes
13111then :
13112 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13113
13114fi
13115ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r"
13116if test "x$ac_cv_func_getpwnam_r" = xyes
13117then :
13118 printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h
13119
13120fi
13121ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r"
13122if test "x$ac_cv_func_getpwuid_r" = xyes
13123then :
13124 printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h
13125
13126fi
13127ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
13128if test "x$ac_cv_func_getspnam" = xyes
13129then :
13130 printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h
13131
13132fi
13133ac_fn_c_check_func "$LINENO" "getspent" "ac_cv_func_getspent"
13134if test "x$ac_cv_func_getspent" = xyes
13135then :
13136 printf "%s\n" "#define HAVE_GETSPENT 1" >>confdefs.h
13137
13138fi
13139ac_fn_c_check_func "$LINENO" "getsid" "ac_cv_func_getsid"
13140if test "x$ac_cv_func_getsid" = xyes
13141then :
13142 printf "%s\n" "#define HAVE_GETSID 1" >>confdefs.h
13143
13144fi
13145ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13146if test "x$ac_cv_func_getwd" = xyes
13147then :
13148 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
13149
13150fi
13151ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex"
13152if test "x$ac_cv_func_if_nameindex" = xyes
13153then :
13154 printf "%s\n" "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
13155
13156fi
13157ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
13158if test "x$ac_cv_func_initgroups" = xyes
13159then :
13160 printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
13161
13162fi
13163ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
13164if test "x$ac_cv_func_kill" = xyes
13165then :
13166 printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
13167
13168fi
13169ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg"
13170if test "x$ac_cv_func_killpg" = xyes
13171then :
13172 printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h
13173
13174fi
13175ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
13176if test "x$ac_cv_func_lchown" = xyes
13177then :
13178 printf "%s\n" "#define HAVE_LCHOWN 1" >>confdefs.h
13179
13180fi
13181ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf"
13182if test "x$ac_cv_func_lockf" = xyes
13183then :
13184 printf "%s\n" "#define HAVE_LOCKF 1" >>confdefs.h
13185
13186fi
13187ac_fn_c_check_func "$LINENO" "linkat" "ac_cv_func_linkat"
13188if test "x$ac_cv_func_linkat" = xyes
13189then :
13190 printf "%s\n" "#define HAVE_LINKAT 1" >>confdefs.h
13191
13192fi
13193ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13194if test "x$ac_cv_func_lstat" = xyes
13195then :
13196 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13197
13198fi
13199ac_fn_c_check_func "$LINENO" "lutimes" "ac_cv_func_lutimes"
13200if test "x$ac_cv_func_lutimes" = xyes
13201then :
13202 printf "%s\n" "#define HAVE_LUTIMES 1" >>confdefs.h
13203
13204fi
13205ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
13206if test "x$ac_cv_func_mmap" = xyes
13207then :
13208 printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
13209
13210fi
13211ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
13212if test "x$ac_cv_func_memrchr" = xyes
13213then :
13214 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
13215
13216fi
13217ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
13218if test "x$ac_cv_func_mbrtowc" = xyes
13219then :
13220 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
13221
13222fi
13223ac_fn_c_check_func "$LINENO" "mkdirat" "ac_cv_func_mkdirat"
13224if test "x$ac_cv_func_mkdirat" = xyes
13225then :
13226 printf "%s\n" "#define HAVE_MKDIRAT 1" >>confdefs.h
13227
13228fi
13229ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
13230if test "x$ac_cv_func_mkfifo" = xyes
13231then :
13232 printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h
13233
13234fi
13235ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise"
13236if test "x$ac_cv_func_madvise" = xyes
13237then :
13238 printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h
13239
13240fi
13241ac_fn_c_check_func "$LINENO" "mkfifoat" "ac_cv_func_mkfifoat"
13242if test "x$ac_cv_func_mkfifoat" = xyes
13243then :
13244 printf "%s\n" "#define HAVE_MKFIFOAT 1" >>confdefs.h
13245
13246fi
13247ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod"
13248if test "x$ac_cv_func_mknod" = xyes
13249then :
13250 printf "%s\n" "#define HAVE_MKNOD 1" >>confdefs.h
13251
13252fi
13253ac_fn_c_check_func "$LINENO" "mknodat" "ac_cv_func_mknodat"
13254if test "x$ac_cv_func_mknodat" = xyes
13255then :
13256 printf "%s\n" "#define HAVE_MKNODAT 1" >>confdefs.h
13257
13258fi
13259ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
13260if test "x$ac_cv_func_mktime" = xyes
13261then :
13262 printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h
13263
13264fi
13265ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap"
13266if test "x$ac_cv_func_mremap" = xyes
13267then :
13268 printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h
13269
13270fi
13271ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
13272if test "x$ac_cv_func_nice" = xyes
13273then :
13274 printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
13275
13276fi
13277ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
13278if test "x$ac_cv_func_openat" = xyes
13279then :
13280 printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h
13281
13282fi
13283ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
13284if test "x$ac_cv_func_pathconf" = xyes
13285then :
13286 printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h
13287
13288fi
13289ac_fn_c_check_func "$LINENO" "pause" "ac_cv_func_pause"
13290if test "x$ac_cv_func_pause" = xyes
13291then :
13292 printf "%s\n" "#define HAVE_PAUSE 1" >>confdefs.h
13293
13294fi
13295ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
13296if test "x$ac_cv_func_pipe2" = xyes
13297then :
13298 printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
13299
13300fi
13301ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
13302if test "x$ac_cv_func_plock" = xyes
13303then :
13304 printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h
13305
13306fi
13307ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
13308if test "x$ac_cv_func_poll" = xyes
13309then :
13310 printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
13311
13312fi
13313ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate"
13314if test "x$ac_cv_func_posix_fallocate" = xyes
13315then :
13316 printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h
13317
13318fi
13319ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13320if test "x$ac_cv_func_posix_fadvise" = xyes
13321then :
13322 printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
13323
13324fi
13325ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
13326if test "x$ac_cv_func_posix_spawn" = xyes
13327then :
13328 printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
13329
13330fi
13331ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
13332if test "x$ac_cv_func_posix_spawnp" = xyes
13333then :
13334 printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
13335
13336fi
13337ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
13338if test "x$ac_cv_func_pread" = xyes
13339then :
13340 printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h
13341
13342fi
13343ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv"
13344if test "x$ac_cv_func_preadv" = xyes
13345then :
13346 printf "%s\n" "#define HAVE_PREADV 1" >>confdefs.h
13347
13348fi
13349ac_fn_c_check_func "$LINENO" "preadv2" "ac_cv_func_preadv2"
13350if test "x$ac_cv_func_preadv2" = xyes
13351then :
13352 printf "%s\n" "#define HAVE_PREADV2 1" >>confdefs.h
13353
13354fi
13355ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock"
13356if test "x$ac_cv_func_pthread_condattr_setclock" = xyes
13357then :
13358 printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
13359
13360fi
13361ac_fn_c_check_func "$LINENO" "pthread_init" "ac_cv_func_pthread_init"
13362if test "x$ac_cv_func_pthread_init" = xyes
13363then :
13364 printf "%s\n" "#define HAVE_PTHREAD_INIT 1" >>confdefs.h
13365
13366fi
13367ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13368if test "x$ac_cv_func_pthread_kill" = xyes
13369then :
13370 printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
13371
13372fi
13373ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
13374if test "x$ac_cv_func_pwrite" = xyes
13375then :
13376 printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h
13377
13378fi
13379ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev"
13380if test "x$ac_cv_func_pwritev" = xyes
13381then :
13382 printf "%s\n" "#define HAVE_PWRITEV 1" >>confdefs.h
13383
13384fi
13385ac_fn_c_check_func "$LINENO" "pwritev2" "ac_cv_func_pwritev2"
13386if test "x$ac_cv_func_pwritev2" = xyes
13387then :
13388 printf "%s\n" "#define HAVE_PWRITEV2 1" >>confdefs.h
13389
13390fi
13391ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13392if test "x$ac_cv_func_readlink" = xyes
13393then :
13394 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13395
13396fi
13397ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
13398if test "x$ac_cv_func_readlinkat" = xyes
13399then :
13400 printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h
13401
13402fi
13403ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv"
13404if test "x$ac_cv_func_readv" = xyes
13405then :
13406 printf "%s\n" "#define HAVE_READV 1" >>confdefs.h
13407
13408fi
13409ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
13410if test "x$ac_cv_func_realpath" = xyes
13411then :
13412 printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
13413
13414fi
13415ac_fn_c_check_func "$LINENO" "renameat" "ac_cv_func_renameat"
13416if test "x$ac_cv_func_renameat" = xyes
13417then :
13418 printf "%s\n" "#define HAVE_RENAMEAT 1" >>confdefs.h
13419
13420fi
13421ac_fn_c_check_func "$LINENO" "sem_open" "ac_cv_func_sem_open"
13422if test "x$ac_cv_func_sem_open" = xyes
13423then :
13424 printf "%s\n" "#define HAVE_SEM_OPEN 1" >>confdefs.h
13425
13426fi
13427ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
13428if test "x$ac_cv_func_sem_timedwait" = xyes
13429then :
13430 printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
13431
13432fi
13433ac_fn_c_check_func "$LINENO" "sem_getvalue" "ac_cv_func_sem_getvalue"
13434if test "x$ac_cv_func_sem_getvalue" = xyes
13435then :
13436 printf "%s\n" "#define HAVE_SEM_GETVALUE 1" >>confdefs.h
13437
13438fi
13439ac_fn_c_check_func "$LINENO" "sem_unlink" "ac_cv_func_sem_unlink"
13440if test "x$ac_cv_func_sem_unlink" = xyes
13441then :
13442 printf "%s\n" "#define HAVE_SEM_UNLINK 1" >>confdefs.h
13443
13444fi
13445ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile"
13446if test "x$ac_cv_func_sendfile" = xyes
13447then :
13448 printf "%s\n" "#define HAVE_SENDFILE 1" >>confdefs.h
13449
13450fi
13451ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
13452if test "x$ac_cv_func_setegid" = xyes
13453then :
13454 printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
13455
13456fi
13457ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
13458if test "x$ac_cv_func_seteuid" = xyes
13459then :
13460 printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
13461
13462fi
13463ac_fn_c_check_func "$LINENO" "setgid" "ac_cv_func_setgid"
13464if test "x$ac_cv_func_setgid" = xyes
13465then :
13466 printf "%s\n" "#define HAVE_SETGID 1" >>confdefs.h
13467
13468fi
13469ac_fn_c_check_func "$LINENO" "sethostname" "ac_cv_func_sethostname"
13470if test "x$ac_cv_func_sethostname" = xyes
13471then :
13472 printf "%s\n" "#define HAVE_SETHOSTNAME 1" >>confdefs.h
13473
13474fi
13475ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
13476if test "x$ac_cv_func_setlocale" = xyes
13477then :
13478 printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
13479
13480fi
13481ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
13482if test "x$ac_cv_func_setregid" = xyes
13483then :
13484 printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
13485
13486fi
13487ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
13488if test "x$ac_cv_func_setreuid" = xyes
13489then :
13490 printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
13491
13492fi
13493ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
13494if test "x$ac_cv_func_setresuid" = xyes
13495then :
13496 printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
13497
13498fi
13499ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
13500if test "x$ac_cv_func_setresgid" = xyes
13501then :
13502 printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
13503
13504fi
13505ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13506if test "x$ac_cv_func_setsid" = xyes
13507then :
13508 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13509
13510fi
13511ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13512if test "x$ac_cv_func_setpgid" = xyes
13513then :
13514 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13515
13516fi
13517ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
13518if test "x$ac_cv_func_setpgrp" = xyes
13519then :
13520 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
13521
13522fi
13523ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
13524if test "x$ac_cv_func_setpriority" = xyes
13525then :
13526 printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
13527
13528fi
13529ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid"
13530if test "x$ac_cv_func_setuid" = xyes
13531then :
13532 printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h
13533
13534fi
13535ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
13536if test "x$ac_cv_func_setvbuf" = xyes
13537then :
13538 printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
13539
13540fi
13541ac_fn_c_check_func "$LINENO" "sched_get_priority_max" "ac_cv_func_sched_get_priority_max"
13542if test "x$ac_cv_func_sched_get_priority_max" = xyes
13543then :
13544 printf "%s\n" "#define HAVE_SCHED_GET_PRIORITY_MAX 1" >>confdefs.h
13545
13546fi
13547ac_fn_c_check_func "$LINENO" "sched_setaffinity" "ac_cv_func_sched_setaffinity"
13548if test "x$ac_cv_func_sched_setaffinity" = xyes
13549then :
13550 printf "%s\n" "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
13551
13552fi
13553ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
13554if test "x$ac_cv_func_sched_setscheduler" = xyes
13555then :
13556 printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
13557
13558fi
13559ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
13560if test "x$ac_cv_func_sched_setparam" = xyes
13561then :
13562 printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
13563
13564fi
13565ac_fn_c_check_func "$LINENO" "sched_rr_get_interval" "ac_cv_func_sched_rr_get_interval"
13566if test "x$ac_cv_func_sched_rr_get_interval" = xyes
13567then :
13568 printf "%s\n" "#define HAVE_SCHED_RR_GET_INTERVAL 1" >>confdefs.h
13569
13570fi
13571ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13572if test "x$ac_cv_func_sigaction" = xyes
13573then :
13574 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13575
13576fi
13577ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13578if test "x$ac_cv_func_sigaltstack" = xyes
13579then :
13580 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13581
13582fi
13583ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset"
13584if test "x$ac_cv_func_sigfillset" = xyes
13585then :
13586 printf "%s\n" "#define HAVE_SIGFILLSET 1" >>confdefs.h
13587
13588fi
13589ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt"
13590if test "x$ac_cv_func_siginterrupt" = xyes
13591then :
13592 printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h
13593
13594fi
13595ac_fn_c_check_func "$LINENO" "sigpending" "ac_cv_func_sigpending"
13596if test "x$ac_cv_func_sigpending" = xyes
13597then :
13598 printf "%s\n" "#define HAVE_SIGPENDING 1" >>confdefs.h
13599
13600fi
13601ac_fn_c_check_func "$LINENO" "sigrelse" "ac_cv_func_sigrelse"
13602if test "x$ac_cv_func_sigrelse" = xyes
13603then :
13604 printf "%s\n" "#define HAVE_SIGRELSE 1" >>confdefs.h
13605
13606fi
13607ac_fn_c_check_func "$LINENO" "sigtimedwait" "ac_cv_func_sigtimedwait"
13608if test "x$ac_cv_func_sigtimedwait" = xyes
13609then :
13610 printf "%s\n" "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
13611
13612fi
13613ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
13614if test "x$ac_cv_func_sigwait" = xyes
13615then :
13616 printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
13617
13618fi
13619ac_fn_c_check_func "$LINENO" "sigwaitinfo" "ac_cv_func_sigwaitinfo"
13620if test "x$ac_cv_func_sigwaitinfo" = xyes
13621then :
13622 printf "%s\n" "#define HAVE_SIGWAITINFO 1" >>confdefs.h
13623
13624fi
13625ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13626if test "x$ac_cv_func_snprintf" = xyes
13627then :
13628 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
13629
13630fi
13631ac_fn_c_check_func "$LINENO" "splice" "ac_cv_func_splice"
13632if test "x$ac_cv_func_splice" = xyes
13633then :
13634 printf "%s\n" "#define HAVE_SPLICE 1" >>confdefs.h
13635
13636fi
13637ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13638if test "x$ac_cv_func_strftime" = xyes
13639then :
13640 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13641
13642fi
13643ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13644if test "x$ac_cv_func_strlcpy" = xyes
13645then :
13646 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
13647
13648fi
13649ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
13650if test "x$ac_cv_func_strsignal" = xyes
13651then :
13652 printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
13653
13654fi
13655ac_fn_c_check_func "$LINENO" "symlinkat" "ac_cv_func_symlinkat"
13656if test "x$ac_cv_func_symlinkat" = xyes
13657then :
13658 printf "%s\n" "#define HAVE_SYMLINKAT 1" >>confdefs.h
13659
13660fi
13661ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
13662if test "x$ac_cv_func_sync" = xyes
13663then :
13664 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
13665
13666fi
13667ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
13668if test "x$ac_cv_func_sysconf" = xyes
13669then :
13670 printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
13671
13672fi
13673ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp"
13674if test "x$ac_cv_func_tcgetpgrp" = xyes
13675then :
13676 printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h
13677
13678fi
13679ac_fn_c_check_func "$LINENO" "tcsetpgrp" "ac_cv_func_tcsetpgrp"
13680if test "x$ac_cv_func_tcsetpgrp" = xyes
13681then :
13682 printf "%s\n" "#define HAVE_TCSETPGRP 1" >>confdefs.h
13683
13684fi
13685ac_fn_c_check_func "$LINENO" "tempnam" "ac_cv_func_tempnam"
13686if test "x$ac_cv_func_tempnam" = xyes
13687then :
13688 printf "%s\n" "#define HAVE_TEMPNAM 1" >>confdefs.h
13689
13690fi
13691ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
13692if test "x$ac_cv_func_timegm" = xyes
13693then :
13694 printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
13695
13696fi
13697ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
13698if test "x$ac_cv_func_times" = xyes
13699then :
13700 printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h
13701
13702fi
13703ac_fn_c_check_func "$LINENO" "tmpfile" "ac_cv_func_tmpfile"
13704if test "x$ac_cv_func_tmpfile" = xyes
13705then :
13706 printf "%s\n" "#define HAVE_TMPFILE 1" >>confdefs.h
13707
13708fi
13709ac_fn_c_check_func "$LINENO" "tmpnam" "ac_cv_func_tmpnam"
13710if test "x$ac_cv_func_tmpnam" = xyes
13711then :
13712 printf "%s\n" "#define HAVE_TMPNAM 1" >>confdefs.h
13713
13714fi
13715ac_fn_c_check_func "$LINENO" "tmpnam_r" "ac_cv_func_tmpnam_r"
13716if test "x$ac_cv_func_tmpnam_r" = xyes
13717then :
13718 printf "%s\n" "#define HAVE_TMPNAM_R 1" >>confdefs.h
13719
13720fi
13721ac_fn_c_check_func "$LINENO" "truncate" "ac_cv_func_truncate"
13722if test "x$ac_cv_func_truncate" = xyes
13723then :
13724 printf "%s\n" "#define HAVE_TRUNCATE 1" >>confdefs.h
13725
13726fi
13727ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
13728if test "x$ac_cv_func_uname" = xyes
13729then :
13730 printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
13731
13732fi
13733ac_fn_c_check_func "$LINENO" "unlinkat" "ac_cv_func_unlinkat"
13734if test "x$ac_cv_func_unlinkat" = xyes
13735then :
13736 printf "%s\n" "#define HAVE_UNLINKAT 1" >>confdefs.h
13737
13738fi
13739ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
13740if test "x$ac_cv_func_utimensat" = xyes
13741then :
13742 printf "%s\n" "#define HAVE_UTIMENSAT 1" >>confdefs.h
13743
13744fi
13745ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13746if test "x$ac_cv_func_utimes" = xyes
13747then :
13748 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13749
13750fi
13751ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
13752if test "x$ac_cv_func_vfork" = xyes
13753then :
13754 printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
13755
13756fi
13757ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
13758if test "x$ac_cv_func_waitid" = xyes
13759then :
13760 printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
13761
13762fi
13763ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
13764if test "x$ac_cv_func_waitpid" = xyes
13765then :
13766 printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
13767
13768fi
13769ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
13770if test "x$ac_cv_func_wait3" = xyes
13771then :
13772 printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h
13773
13774fi
13775ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4"
13776if test "x$ac_cv_func_wait4" = xyes
13777then :
13778 printf "%s\n" "#define HAVE_WAIT4 1" >>confdefs.h
13779
13780fi
13781ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
13782if test "x$ac_cv_func_wcscoll" = xyes
13783then :
13784 printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h
13785
13786fi
13787ac_fn_c_check_func "$LINENO" "wcsftime" "ac_cv_func_wcsftime"
13788if test "x$ac_cv_func_wcsftime" = xyes
13789then :
13790 printf "%s\n" "#define HAVE_WCSFTIME 1" >>confdefs.h
13791
13792fi
13793ac_fn_c_check_func "$LINENO" "wcsxfrm" "ac_cv_func_wcsxfrm"
13794if test "x$ac_cv_func_wcsxfrm" = xyes
13795then :
13796 printf "%s\n" "#define HAVE_WCSXFRM 1" >>confdefs.h
13797
13798fi
13799ac_fn_c_check_func "$LINENO" "wmemcmp" "ac_cv_func_wmemcmp"
13800if test "x$ac_cv_func_wmemcmp" = xyes
13801then :
13802 printf "%s\n" "#define HAVE_WMEMCMP 1" >>confdefs.h
13803
13804fi
13805ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
13806if test "x$ac_cv_func_writev" = xyes
13807then :
13808 printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
13809
13810fi
13811ac_fn_c_check_func "$LINENO" "_getpty" "ac_cv_func__getpty"
13812if test "x$ac_cv_func__getpty" = xyes
13813then :
13814 printf "%s\n" "#define HAVE__GETPTY 1" >>confdefs.h
13815
13816fi
13817ac_fn_c_check_func "$LINENO" "rtpSpawn" "ac_cv_func_rtpSpawn"
13818if test "x$ac_cv_func_rtpSpawn" = xyes
13819then :
13820 printf "%s\n" "#define HAVE_RTPSPAWN 1" >>confdefs.h
13821
13822fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013823
Michael W. Hudson54241132001-12-07 15:38:26 +000013824
Benjamin Peterson40caa052018-09-12 15:52:40 -070013825# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
13826# links. Some libc implementations have a stub lchmod implementation that always
13827# returns an error.
13828if test "$MACHDEP" != linux; then
13829 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Pablo Galindocc128882021-03-01 16:47:53 +000013830if test "x$ac_cv_func_lchmod" = xyes
13831then :
13832 printf "%s\n" "#define HAVE_LCHMOD 1" >>confdefs.h
13833
13834fi
13835
13836fi
13837
13838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
13839printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
13840if test ${ac_cv_c_undeclared_builtin_options+y}
13841then :
13842 printf %s "(cached) " >&6
13843else $as_nop
13844 ac_save_CFLAGS=$CFLAGS
13845 ac_cv_c_undeclared_builtin_options='cannot detect'
13846 for ac_arg in '' -fno-builtin; do
13847 CFLAGS="$ac_save_CFLAGS $ac_arg"
13848 # This test program should *not* compile successfully.
13849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13850/* end confdefs.h. */
13851
13852int
13853main (void)
13854{
13855(void) strchr;
13856 ;
13857 return 0;
13858}
Benjamin Petersoned709d52018-09-12 17:22:11 -070013859_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000013860if ac_fn_c_try_compile "$LINENO"
13861then :
13862
13863else $as_nop
13864 # This test program should compile successfully.
13865 # No library function is consistently available on
13866 # freestanding implementations, so test against a dummy
13867 # declaration. Include always-available headers on the
13868 # off chance that they somehow elicit warnings.
13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870/* end confdefs.h. */
13871#include <float.h>
13872#include <limits.h>
13873#include <stdarg.h>
13874#include <stddef.h>
13875extern void ac_decl (int, char *);
13876
13877int
13878main (void)
13879{
13880(void) ac_decl (0, (char *) 0);
13881 (void) ac_decl;
13882
13883 ;
13884 return 0;
13885}
13886_ACEOF
13887if ac_fn_c_try_compile "$LINENO"
13888then :
13889 if test x"$ac_arg" = x
13890then :
13891 ac_cv_c_undeclared_builtin_options='none needed'
13892else $as_nop
13893 ac_cv_c_undeclared_builtin_options=$ac_arg
13894fi
13895 break
13896fi
13897rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13898fi
13899rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13900 done
13901 CFLAGS=$ac_save_CFLAGS
Benjamin Peterson40caa052018-09-12 15:52:40 -070013902
13903fi
Pablo Galindocc128882021-03-01 16:47:53 +000013904{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
13905printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
13906 case $ac_cv_c_undeclared_builtin_options in #(
13907 'cannot detect') :
13908 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13909printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13910as_fn_error $? "cannot make $CC report undeclared builtins
13911See \`config.log' for more details" "$LINENO" 5; } ;; #(
13912 'none needed') :
13913 ac_c_undeclared_builtin_options='' ;; #(
13914 *) :
13915 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
13916esac
Benjamin Peterson40caa052018-09-12 15:52:40 -070013917
Pablo Galindocc128882021-03-01 16:47:53 +000013918ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013919 #include <dirent.h>
Pablo Galindocc128882021-03-01 16:47:53 +000013920" "$ac_c_undeclared_builtin_options" "CFLAGS"
13921if test "x$ac_cv_have_decl_dirfd" = xyes
13922then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013923
Pablo Galindocc128882021-03-01 16:47:53 +000013924printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013925
13926fi
13927
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013928# For some functions, having a definition is not sufficient, since
13929# we want to take their address.
Pablo Galindocc128882021-03-01 16:47:53 +000013930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
13931printf %s "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013933/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013934#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013935int
Pablo Galindocc128882021-03-01 16:47:53 +000013936main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013937{
13938void *x=chroot
13939 ;
13940 return 0;
13941}
13942_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000013943if ac_fn_c_try_compile "$LINENO"
13944then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013945
Pablo Galindocc128882021-03-01 16:47:53 +000013946printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013947
Pablo Galindocc128882021-03-01 16:47:53 +000013948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13949printf "%s\n" "yes" >&6; }
13950else $as_nop
13951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13952printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013953
13954fi
Pablo Galindocc128882021-03-01 16:47:53 +000013955rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13956{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for link" >&5
13957printf %s "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013959/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013960#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013961int
Pablo Galindocc128882021-03-01 16:47:53 +000013962main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013963{
13964void *x=link
13965 ;
13966 return 0;
13967}
13968_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000013969if ac_fn_c_try_compile "$LINENO"
13970then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013971
Pablo Galindocc128882021-03-01 16:47:53 +000013972printf "%s\n" "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013973
Pablo Galindocc128882021-03-01 16:47:53 +000013974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13975printf "%s\n" "yes" >&6; }
13976else $as_nop
13977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13978printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013979
13980fi
Pablo Galindocc128882021-03-01 16:47:53 +000013981rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
13983printf %s "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013985/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013986#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013987int
Pablo Galindocc128882021-03-01 16:47:53 +000013988main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013989{
13990void *x=symlink
13991 ;
13992 return 0;
13993}
13994_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000013995if ac_fn_c_try_compile "$LINENO"
13996then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013997
Pablo Galindocc128882021-03-01 16:47:53 +000013998printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013999
Pablo Galindocc128882021-03-01 16:47:53 +000014000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14001printf "%s\n" "yes" >&6; }
14002else $as_nop
14003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14004printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014005
14006fi
Pablo Galindocc128882021-03-01 16:47:53 +000014007rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
14009printf %s "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014011/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014012#include <unistd.h>
14013int
Pablo Galindocc128882021-03-01 16:47:53 +000014014main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014015{
14016void *x=fchdir
14017 ;
14018 return 0;
14019}
14020_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014021if ac_fn_c_try_compile "$LINENO"
14022then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014023
Pablo Galindocc128882021-03-01 16:47:53 +000014024printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014025
Pablo Galindocc128882021-03-01 16:47:53 +000014026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14027printf "%s\n" "yes" >&6; }
14028else $as_nop
14029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14030printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014031
14032fi
Pablo Galindocc128882021-03-01 16:47:53 +000014033rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
14035printf %s "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014037/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014038#include <unistd.h>
14039int
Pablo Galindocc128882021-03-01 16:47:53 +000014040main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014041{
14042void *x=fsync
14043 ;
14044 return 0;
14045}
14046_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014047if ac_fn_c_try_compile "$LINENO"
14048then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014049
Pablo Galindocc128882021-03-01 16:47:53 +000014050printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014051
Pablo Galindocc128882021-03-01 16:47:53 +000014052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14053printf "%s\n" "yes" >&6; }
14054else $as_nop
14055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14056printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014057
14058fi
Pablo Galindocc128882021-03-01 16:47:53 +000014059rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
14061printf %s "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014063/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014064#include <unistd.h>
14065int
Pablo Galindocc128882021-03-01 16:47:53 +000014066main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014067{
14068void *x=fdatasync
14069 ;
14070 return 0;
14071}
14072_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014073if ac_fn_c_try_compile "$LINENO"
14074then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014075
Pablo Galindocc128882021-03-01 16:47:53 +000014076printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014077
Pablo Galindocc128882021-03-01 16:47:53 +000014078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14079printf "%s\n" "yes" >&6; }
14080else $as_nop
14081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14082printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014083
14084fi
Pablo Galindocc128882021-03-01 16:47:53 +000014085rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
14087printf %s "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014089/* end confdefs.h. */
14090#include <sys/epoll.h>
14091int
Pablo Galindocc128882021-03-01 16:47:53 +000014092main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014093{
14094void *x=epoll_create
14095 ;
14096 return 0;
14097}
14098_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014099if ac_fn_c_try_compile "$LINENO"
14100then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014101
Pablo Galindocc128882021-03-01 16:47:53 +000014102printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014103
Pablo Galindocc128882021-03-01 16:47:53 +000014104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14105printf "%s\n" "yes" >&6; }
14106else $as_nop
14107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14108printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014109
14110fi
Pablo Galindocc128882021-03-01 16:47:53 +000014111rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14112{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
14113printf %s "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14115/* end confdefs.h. */
14116#include <sys/epoll.h>
14117int
Pablo Galindocc128882021-03-01 16:47:53 +000014118main (void)
Benjamin Peterson95c16622011-12-27 15:36:32 -060014119{
14120void *x=epoll_create1
14121 ;
14122 return 0;
14123}
14124_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014125if ac_fn_c_try_compile "$LINENO"
14126then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060014127
Pablo Galindocc128882021-03-01 16:47:53 +000014128printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060014129
Pablo Galindocc128882021-03-01 16:47:53 +000014130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14131printf "%s\n" "yes" >&6; }
14132else $as_nop
14133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14134printf "%s\n" "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014135
14136fi
Pablo Galindocc128882021-03-01 16:47:53 +000014137rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
14139printf %s "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014141/* end confdefs.h. */
14142
14143#include <sys/types.h>
14144#include <sys/event.h>
14145
14146int
Pablo Galindocc128882021-03-01 16:47:53 +000014147main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014148{
14149int x=kqueue()
14150 ;
14151 return 0;
14152}
14153_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014154if ac_fn_c_try_compile "$LINENO"
14155then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014156
Pablo Galindocc128882021-03-01 16:47:53 +000014157printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014158
Pablo Galindocc128882021-03-01 16:47:53 +000014159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14160printf "%s\n" "yes" >&6; }
14161else $as_nop
14162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14163printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014164
14165fi
Pablo Galindocc128882021-03-01 16:47:53 +000014166rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
14168printf %s "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14170/* end confdefs.h. */
14171
14172#include <sys/time.h>
14173#include <sys/resource.h>
14174
14175int
Pablo Galindocc128882021-03-01 16:47:53 +000014176main (void)
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014177{
14178void *x=prlimit
14179 ;
14180 return 0;
14181}
14182_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014183if ac_fn_c_try_compile "$LINENO"
14184then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014185
Pablo Galindocc128882021-03-01 16:47:53 +000014186printf "%s\n" "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014187
Pablo Galindocc128882021-03-01 16:47:53 +000014188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14189printf "%s\n" "yes" >&6; }
14190else $as_nop
14191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14192printf "%s\n" "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014193
14194fi
Pablo Galindocc128882021-03-01 16:47:53 +000014195rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
14197printf %s "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14199/* end confdefs.h. */
14200#include <mach-o/dyld.h>
14201int
Pablo Galindocc128882021-03-01 16:47:53 +000014202main (void)
Ronald Oussoren41761932020-11-08 10:05:27 +010014203{
14204void *x=_dyld_shared_cache_contains_path
14205 ;
14206 return 0;
14207}
14208_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014209if ac_fn_c_try_compile "$LINENO"
14210then :
Ronald Oussoren41761932020-11-08 10:05:27 +010014211
Pablo Galindocc128882021-03-01 16:47:53 +000014212printf "%s\n" "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010014213
Pablo Galindocc128882021-03-01 16:47:53 +000014214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14215printf "%s\n" "yes" >&6; }
14216else $as_nop
14217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14218printf "%s\n" "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014219
14220fi
Pablo Galindocc128882021-03-01 16:47:53 +000014221rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014222
Pablo Galindocc128882021-03-01 16:47:53 +000014223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
14224printf %s "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14226/* end confdefs.h. */
14227
14228#ifdef HAVE_SYS_MMAN_H
14229#include <sys/mman.h>
14230#endif
14231#ifdef HAVE_SYS_MEMFD_H
14232#include <sys/memfd.h>
14233#endif
14234
14235int
Pablo Galindocc128882021-03-01 16:47:53 +000014236main (void)
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014237{
14238void *x=memfd_create
14239 ;
14240 return 0;
14241}
14242_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014243if ac_fn_c_try_compile "$LINENO"
14244then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014245
Pablo Galindocc128882021-03-01 16:47:53 +000014246printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014247
Pablo Galindocc128882021-03-01 16:47:53 +000014248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14249printf "%s\n" "yes" >&6; }
14250else $as_nop
14251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14252printf "%s\n" "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014253
14254fi
Pablo Galindocc128882021-03-01 16:47:53 +000014255rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014256
Pablo Galindocc128882021-03-01 16:47:53 +000014257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
14258printf %s "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14260/* end confdefs.h. */
14261
14262#ifdef HAVE_SYS_EVENTFD_H
14263#include <sys/eventfd.h>
14264#endif
14265
14266int
Pablo Galindocc128882021-03-01 16:47:53 +000014267main (void)
Christian Heimescd9fed62020-11-13 19:48:52 +010014268{
14269int x = eventfd(0, EFD_CLOEXEC)
14270 ;
14271 return 0;
14272}
14273_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014274if ac_fn_c_try_compile "$LINENO"
14275then :
Christian Heimescd9fed62020-11-13 19:48:52 +010014276
Pablo Galindocc128882021-03-01 16:47:53 +000014277printf "%s\n" "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010014278
Pablo Galindocc128882021-03-01 16:47:53 +000014279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14280printf "%s\n" "yes" >&6; }
14281else $as_nop
14282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14283printf "%s\n" "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014284
14285fi
Pablo Galindocc128882021-03-01 16:47:53 +000014286rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010014287
Martin v. Löwisd5843682002-11-21 20:41:28 +000014288# On some systems (eg. FreeBSD 5), we would find a definition of the
14289# functions ctermid_r, setgroups in the library, but no prototype
14290# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14291# address to avoid compiler warnings and potential miscompilations
14292# because of the missing prototypes.
14293
Pablo Galindocc128882021-03-01 16:47:53 +000014294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
14295printf %s "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014297/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014298
Martin v. Löwisd5843682002-11-21 20:41:28 +000014299#include <stdio.h>
14300
Martin v. Löwisd5843682002-11-21 20:41:28 +000014301int
Pablo Galindocc128882021-03-01 16:47:53 +000014302main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014303{
14304void* p = ctermid_r
14305 ;
14306 return 0;
14307}
14308_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014309if ac_fn_c_try_compile "$LINENO"
14310then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014311
Pablo Galindocc128882021-03-01 16:47:53 +000014312printf "%s\n" "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014313
Pablo Galindocc128882021-03-01 16:47:53 +000014314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14315printf "%s\n" "yes" >&6; }
14316else $as_nop
14317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14318printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014319
14320fi
Pablo Galindocc128882021-03-01 16:47:53 +000014321rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322
Pablo Galindocc128882021-03-01 16:47:53 +000014323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
14324printf %s "checking for flock declaration... " >&6; }
14325if test ${ac_cv_flock_decl+y}
14326then :
14327 printf %s "(cached) " >&6
14328else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014330/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014331#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014332int
Pablo Galindocc128882021-03-01 16:47:53 +000014333main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014334{
14335void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014336
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014337 ;
14338 return 0;
14339}
14340_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014341if ac_fn_c_try_compile "$LINENO"
14342then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014343 ac_cv_flock_decl=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014344else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014345 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014346
14347fi
Pablo Galindocc128882021-03-01 16:47:53 +000014348rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000014349
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014350fi
Pablo Galindocc128882021-03-01 16:47:53 +000014351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
14352printf "%s\n" "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014353if test "x${ac_cv_flock_decl}" = xyes; then
Pablo Galindocc128882021-03-01 16:47:53 +000014354
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014355 for ac_func in flock
14356do :
14357 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Pablo Galindocc128882021-03-01 16:47:53 +000014358if test "x$ac_cv_func_flock" = xyes
14359then :
14360 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014361
Pablo Galindocc128882021-03-01 16:47:53 +000014362else $as_nop
14363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
14364printf %s "checking for flock in -lbsd... " >&6; }
14365if test ${ac_cv_lib_bsd_flock+y}
14366then :
14367 printf %s "(cached) " >&6
14368else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014369 ac_check_lib_save_LIBS=$LIBS
14370LIBS="-lbsd $LIBS"
14371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14372/* end confdefs.h. */
14373
14374/* Override any GCC internal prototype to avoid an error.
14375 Use char because int might match the return type of a GCC
14376 builtin and then its argument prototype would still apply. */
Antoine Pitroua3000072010-09-07 14:52:42 +000014377char flock ();
14378int
Pablo Galindocc128882021-03-01 16:47:53 +000014379main (void)
Antoine Pitroua3000072010-09-07 14:52:42 +000014380{
14381return flock ();
14382 ;
14383 return 0;
14384}
14385_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014386if ac_fn_c_try_link "$LINENO"
14387then :
Antoine Pitroua3000072010-09-07 14:52:42 +000014388 ac_cv_lib_bsd_flock=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014389else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014390 ac_cv_lib_bsd_flock=no
14391fi
Pablo Galindocc128882021-03-01 16:47:53 +000014392rm -f core conftest.err conftest.$ac_objext conftest.beam \
Antoine Pitroua3000072010-09-07 14:52:42 +000014393 conftest$ac_exeext conftest.$ac_ext
14394LIBS=$ac_check_lib_save_LIBS
14395fi
Pablo Galindocc128882021-03-01 16:47:53 +000014396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
14397printf "%s\n" "$ac_cv_lib_bsd_flock" >&6; }
14398if test "x$ac_cv_lib_bsd_flock" = xyes
14399then :
14400 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014401
14402
Pablo Galindocc128882021-03-01 16:47:53 +000014403printf "%s\n" "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014404
14405
14406fi
14407
14408
14409fi
Pablo Galindocc128882021-03-01 16:47:53 +000014410
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014411done
Antoine Pitroua3000072010-09-07 14:52:42 +000014412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413
Pablo Galindocc128882021-03-01 16:47:53 +000014414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
14415printf %s "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014417/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014418
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014419#include <unistd.h>
14420
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014421int
Pablo Galindocc128882021-03-01 16:47:53 +000014422main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014423{
14424void* p = getpagesize
14425 ;
14426 return 0;
14427}
14428_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014429if ac_fn_c_try_compile "$LINENO"
14430then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014431
Pablo Galindocc128882021-03-01 16:47:53 +000014432printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014433
Pablo Galindocc128882021-03-01 16:47:53 +000014434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14435printf "%s\n" "yes" >&6; }
14436else $as_nop
14437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14438printf "%s\n" "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014439
14440fi
Pablo Galindocc128882021-03-01 16:47:53 +000014441rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014442
Pablo Galindocc128882021-03-01 16:47:53 +000014443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
14444printf %s "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14446/* end confdefs.h. */
14447
14448#include <stdlib.h>
14449
14450int
Pablo Galindocc128882021-03-01 16:47:53 +000014451main (void)
Victor Stinner984890f2011-11-24 13:53:38 +010014452{
14453int res = unsetenv("DUMMY")
14454 ;
14455 return 0;
14456}
14457_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014458if ac_fn_c_try_compile "$LINENO"
14459then :
14460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14461printf "%s\n" "no" >&6; }
14462else $as_nop
Victor Stinner984890f2011-11-24 13:53:38 +010014463
Pablo Galindocc128882021-03-01 16:47:53 +000014464printf "%s\n" "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010014465
Pablo Galindocc128882021-03-01 16:47:53 +000014466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14467printf "%s\n" "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014468
14469fi
Pablo Galindocc128882021-03-01 16:47:53 +000014470rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010014471
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014472for ac_prog in true
14473do
14474 # Extract the first word of "$ac_prog", so it can be a program name with args.
14475set dummy $ac_prog; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +000014476{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14477printf %s "checking for $ac_word... " >&6; }
14478if test ${ac_cv_prog_TRUE+y}
14479then :
14480 printf %s "(cached) " >&6
14481else $as_nop
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014482 if test -n "$TRUE"; then
14483 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14484else
14485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14486for as_dir in $PATH
14487do
14488 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +000014489 case $as_dir in #(((
14490 '') as_dir=./ ;;
14491 */) ;;
14492 *) as_dir=$as_dir/ ;;
14493 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +000014495 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014496 ac_cv_prog_TRUE="$ac_prog"
Pablo Galindocc128882021-03-01 16:47:53 +000014497 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 +000014498 break 2
14499 fi
14500done
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014503
14504fi
14505fi
14506TRUE=$ac_cv_prog_TRUE
14507if test -n "$TRUE"; then
Pablo Galindocc128882021-03-01 16:47:53 +000014508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
14509printf "%s\n" "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014510else
Pablo Galindocc128882021-03-01 16:47:53 +000014511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14512printf "%s\n" "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014513fi
14514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014516 test -n "$TRUE" && break
14517done
14518test -n "$TRUE" || TRUE="/bin/true"
14519
14520
Pablo Galindocc128882021-03-01 16:47:53 +000014521{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
14522printf %s "checking for inet_aton in -lc... " >&6; }
14523if test ${ac_cv_lib_c_inet_aton+y}
14524then :
14525 printf %s "(cached) " >&6
14526else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014527 ac_check_lib_save_LIBS=$LIBS
14528LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014530/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532/* Override any GCC internal prototype to avoid an error.
14533 Use char because int might match the return type of a GCC
14534 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014535char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014536int
Pablo Galindocc128882021-03-01 16:47:53 +000014537main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014540 ;
14541 return 0;
14542}
14543_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014544if ac_fn_c_try_link "$LINENO"
14545then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014546 ac_cv_lib_c_inet_aton=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014547else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014549fi
Pablo Galindocc128882021-03-01 16:47:53 +000014550rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014552LIBS=$ac_check_lib_save_LIBS
14553fi
Pablo Galindocc128882021-03-01 16:47:53 +000014554{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
14555printf "%s\n" "$ac_cv_lib_c_inet_aton" >&6; }
14556if test "x$ac_cv_lib_c_inet_aton" = xyes
14557then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014558 $ac_cv_prog_TRUE
Pablo Galindocc128882021-03-01 16:47:53 +000014559else $as_nop
14560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
14561printf %s "checking for inet_aton in -lresolv... " >&6; }
14562if test ${ac_cv_lib_resolv_inet_aton+y}
14563then :
14564 printf %s "(cached) " >&6
14565else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014566 ac_check_lib_save_LIBS=$LIBS
14567LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014569/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571/* Override any GCC internal prototype to avoid an error.
14572 Use char because int might match the return type of a GCC
14573 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014574char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014575int
Pablo Galindocc128882021-03-01 16:47:53 +000014576main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014577{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014579 ;
14580 return 0;
14581}
14582_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014583if ac_fn_c_try_link "$LINENO"
14584then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014585 ac_cv_lib_resolv_inet_aton=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014586else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014588fi
Pablo Galindocc128882021-03-01 16:47:53 +000014589rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014591LIBS=$ac_check_lib_save_LIBS
14592fi
Pablo Galindocc128882021-03-01 16:47:53 +000014593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
14594printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; }
14595if test "x$ac_cv_lib_resolv_inet_aton" = xyes
14596then :
14597 printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014598
14599 LIBS="-lresolv $LIBS"
14600
14601fi
14602
14603
14604fi
14605
14606
Christian Heimesd0764e22007-12-04 15:00:33 +000014607# On Tru64, chflags seems to be present, but calling it will
14608# exit Python
Pablo Galindocc128882021-03-01 16:47:53 +000014609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
14610printf %s "checking for chflags... " >&6; }
14611if test ${ac_cv_have_chflags+y}
14612then :
14613 printf %s "(cached) " >&6
14614else $as_nop
14615 if test "$cross_compiling" = yes
14616then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014617 ac_cv_have_chflags=cross
Pablo Galindocc128882021-03-01 16:47:53 +000014618else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014620/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014621
Christian Heimesd0764e22007-12-04 15:00:33 +000014622#include <sys/stat.h>
14623#include <unistd.h>
14624int main(int argc, char*argv[])
14625{
14626 if(chflags(argv[0], 0) != 0)
14627 return 1;
14628 return 0;
14629}
Ned Deily3eb67d52011-06-28 00:00:28 -070014630
Christian Heimesd0764e22007-12-04 15:00:33 +000014631_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014632if ac_fn_c_try_run "$LINENO"
14633then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014634 ac_cv_have_chflags=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014635else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014636 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014640fi
14641
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014642
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014643fi
Pablo Galindocc128882021-03-01 16:47:53 +000014644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
14645printf "%s\n" "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014646if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Pablo Galindocc128882021-03-01 16:47:53 +000014648if test "x$ac_cv_func_chflags" = xyes
14649then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014650 ac_cv_have_chflags="yes"
Pablo Galindocc128882021-03-01 16:47:53 +000014651else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014652 ac_cv_have_chflags="no"
14653fi
14654
14655fi
14656if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014657
Pablo Galindocc128882021-03-01 16:47:53 +000014658printf "%s\n" "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014659
14660fi
14661
Pablo Galindocc128882021-03-01 16:47:53 +000014662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
14663printf %s "checking for lchflags... " >&6; }
14664if test ${ac_cv_have_lchflags+y}
14665then :
14666 printf %s "(cached) " >&6
14667else $as_nop
14668 if test "$cross_compiling" = yes
14669then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014670 ac_cv_have_lchflags=cross
Pablo Galindocc128882021-03-01 16:47:53 +000014671else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014673/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014674
Christian Heimesd0764e22007-12-04 15:00:33 +000014675#include <sys/stat.h>
14676#include <unistd.h>
14677int main(int argc, char*argv[])
14678{
14679 if(lchflags(argv[0], 0) != 0)
14680 return 1;
14681 return 0;
14682}
Ned Deily3eb67d52011-06-28 00:00:28 -070014683
Christian Heimesd0764e22007-12-04 15:00:33 +000014684_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014685if ac_fn_c_try_run "$LINENO"
14686then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014687 ac_cv_have_lchflags=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014688else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000014690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014693fi
14694
14695
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014696fi
Pablo Galindocc128882021-03-01 16:47:53 +000014697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
14698printf "%s\n" "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014699if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Pablo Galindocc128882021-03-01 16:47:53 +000014701if test "x$ac_cv_func_lchflags" = xyes
14702then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014703 ac_cv_have_lchflags="yes"
Pablo Galindocc128882021-03-01 16:47:53 +000014704else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014705 ac_cv_have_lchflags="no"
14706fi
14707
14708fi
14709if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014710
Pablo Galindocc128882021-03-01 16:47:53 +000014711printf "%s\n" "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014712
14713fi
14714
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014715case $ac_sys_system/$ac_sys_release in
14716Darwin/*)
14717 _CUR_CFLAGS="${CFLAGS}"
14718 _CUR_LDFLAGS="${LDFLAGS}"
14719 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
14720 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
14721 ;;
14722esac
14723
Pablo Galindocc128882021-03-01 16:47:53 +000014724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
14725printf %s "checking for inflateCopy in -lz... " >&6; }
14726if test ${ac_cv_lib_z_inflateCopy+y}
14727then :
14728 printf %s "(cached) " >&6
14729else $as_nop
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014730 ac_check_lib_save_LIBS=$LIBS
14731LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014733/* end confdefs.h. */
14734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735/* Override any GCC internal prototype to avoid an error.
14736 Use char because int might match the return type of a GCC
14737 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014738char inflateCopy ();
14739int
Pablo Galindocc128882021-03-01 16:47:53 +000014740main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014743 ;
14744 return 0;
14745}
14746_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014747if ac_fn_c_try_link "$LINENO"
14748then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014749 ac_cv_lib_z_inflateCopy=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014750else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014752fi
Pablo Galindocc128882021-03-01 16:47:53 +000014753rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014755LIBS=$ac_check_lib_save_LIBS
14756fi
Pablo Galindocc128882021-03-01 16:47:53 +000014757{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
14758printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; }
14759if test "x$ac_cv_lib_z_inflateCopy" = xyes
14760then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014761
Pablo Galindocc128882021-03-01 16:47:53 +000014762printf "%s\n" "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014763
14764fi
14765
14766
14767case $ac_sys_system/$ac_sys_release in
14768Darwin/*)
14769 CFLAGS="${_CUR_CFLAGS}"
14770 LDFLAGS="${_CUR_LDFLAGS}"
14771 ;;
14772esac
14773
Pablo Galindocc128882021-03-01 16:47:53 +000014774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
14775printf %s "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014777/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014778
Martin v. Löwise9416172003-05-03 10:12:45 +000014779#include <netdb.h>
14780
Martin v. Löwise9416172003-05-03 10:12:45 +000014781int
Pablo Galindocc128882021-03-01 16:47:53 +000014782main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014783{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014784void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014785 ;
14786 return 0;
14787}
14788_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014789if ac_fn_c_try_link "$LINENO"
14790then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014791
Pablo Galindocc128882021-03-01 16:47:53 +000014792printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014793
Pablo Galindocc128882021-03-01 16:47:53 +000014794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14795printf "%s\n" "yes" >&6; }
14796else $as_nop
14797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14798printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014799
14800fi
Pablo Galindocc128882021-03-01 16:47:53 +000014801rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803
Pablo Galindocc128882021-03-01 16:47:53 +000014804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
14805printf %s "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014807/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014808
Martin v. Löwis86d66262006-02-17 08:40:11 +000014809#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014810#include <sys/socket.h>
14811#include <netinet/in.h>
14812#include <arpa/inet.h>
14813
Martin v. Löwise9416172003-05-03 10:12:45 +000014814int
Pablo Galindocc128882021-03-01 16:47:53 +000014815main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014816{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014817void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014818 ;
14819 return 0;
14820}
14821_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014822if ac_fn_c_try_link "$LINENO"
14823then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014824
Pablo Galindocc128882021-03-01 16:47:53 +000014825printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014826
Pablo Galindocc128882021-03-01 16:47:53 +000014827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14828printf "%s\n" "yes" >&6; }
14829else $as_nop
14830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14831printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014832
14833fi
Pablo Galindocc128882021-03-01 16:47:53 +000014834rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836
Pablo Galindocc128882021-03-01 16:47:53 +000014837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
14838printf %s "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014840/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014841
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014842#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014843#include <sys/socket.h>
14844#include <netinet/in.h>
14845#include <arpa/inet.h>
14846
Martin v. Löwise9416172003-05-03 10:12:45 +000014847int
Pablo Galindocc128882021-03-01 16:47:53 +000014848main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014849{
14850void* p = inet_pton
14851 ;
14852 return 0;
14853}
14854_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014855if ac_fn_c_try_compile "$LINENO"
14856then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014857
Pablo Galindocc128882021-03-01 16:47:53 +000014858printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014859
Pablo Galindocc128882021-03-01 16:47:53 +000014860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14861printf "%s\n" "yes" >&6; }
14862else $as_nop
14863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14864printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014865
14866fi
Pablo Galindocc128882021-03-01 16:47:53 +000014867rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014868
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014869# On some systems, setgroups is in unistd.h, on others, in grp.h
Pablo Galindocc128882021-03-01 16:47:53 +000014870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
14871printf %s "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014873/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014874
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014875#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014876#ifdef HAVE_GRP_H
14877#include <grp.h>
14878#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014879
Martin v. Löwisd5843682002-11-21 20:41:28 +000014880int
Pablo Galindocc128882021-03-01 16:47:53 +000014881main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014882{
14883void* p = setgroups
14884 ;
14885 return 0;
14886}
14887_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014888if ac_fn_c_try_compile "$LINENO"
14889then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014890
Pablo Galindocc128882021-03-01 16:47:53 +000014891printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014892
Pablo Galindocc128882021-03-01 16:47:53 +000014893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14894printf "%s\n" "yes" >&6; }
14895else $as_nop
14896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14897printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014898
14899fi
Pablo Galindocc128882021-03-01 16:47:53 +000014900rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014901
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014902# check for openpty and forkpty
14903
Pablo Galindocc128882021-03-01 16:47:53 +000014904
14905 for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000014906do :
14907 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Pablo Galindocc128882021-03-01 16:47:53 +000014908if test "x$ac_cv_func_openpty" = xyes
14909then :
14910 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014911
Pablo Galindocc128882021-03-01 16:47:53 +000014912else $as_nop
14913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
14914printf %s "checking for openpty in -lutil... " >&6; }
14915if test ${ac_cv_lib_util_openpty+y}
14916then :
14917 printf %s "(cached) " >&6
14918else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014920LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924/* Override any GCC internal prototype to avoid an error.
14925 Use char because int might match the return type of a GCC
14926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014927char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014928int
Pablo Galindocc128882021-03-01 16:47:53 +000014929main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000014930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014932 ;
14933 return 0;
14934}
14935_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014936if ac_fn_c_try_link "$LINENO"
14937then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 ac_cv_lib_util_openpty=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014939else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014941fi
Pablo Galindocc128882021-03-01 16:47:53 +000014942rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014944LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014945fi
Pablo Galindocc128882021-03-01 16:47:53 +000014946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
14947printf "%s\n" "$ac_cv_lib_util_openpty" >&6; }
14948if test "x$ac_cv_lib_util_openpty" = xyes
14949then :
14950 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000014951 LIBS="$LIBS -lutil"
Pablo Galindocc128882021-03-01 16:47:53 +000014952else $as_nop
14953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
14954printf %s "checking for openpty in -lbsd... " >&6; }
14955if test ${ac_cv_lib_bsd_openpty+y}
14956then :
14957 printf %s "(cached) " >&6
14958else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014959 ac_check_lib_save_LIBS=$LIBS
14960LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014962/* end confdefs.h. */
14963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964/* Override any GCC internal prototype to avoid an error.
14965 Use char because int might match the return type of a GCC
14966 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014967char openpty ();
14968int
Pablo Galindocc128882021-03-01 16:47:53 +000014969main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014972 ;
14973 return 0;
14974}
14975_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000014976if ac_fn_c_try_link "$LINENO"
14977then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014978 ac_cv_lib_bsd_openpty=yes
Pablo Galindocc128882021-03-01 16:47:53 +000014979else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014981fi
Pablo Galindocc128882021-03-01 16:47:53 +000014982rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014984LIBS=$ac_check_lib_save_LIBS
14985fi
Pablo Galindocc128882021-03-01 16:47:53 +000014986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
14987printf "%s\n" "$ac_cv_lib_bsd_openpty" >&6; }
14988if test "x$ac_cv_lib_bsd_openpty" = xyes
14989then :
14990 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014991 LIBS="$LIBS -lbsd"
14992fi
14993
14994
14995fi
14996
Fred Drake8cef4cf2000-06-28 16:40:38 +000014997
14998fi
Pablo Galindocc128882021-03-01 16:47:53 +000014999
Fred Drake8cef4cf2000-06-28 16:40:38 +000015000done
15001
Pablo Galindocc128882021-03-01 16:47:53 +000015002 for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000015003do :
15004 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Pablo Galindocc128882021-03-01 16:47:53 +000015005if test "x$ac_cv_func_forkpty" = xyes
15006then :
15007 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015008
Pablo Galindocc128882021-03-01 16:47:53 +000015009else $as_nop
15010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
15011printf %s "checking for forkpty in -lutil... " >&6; }
15012if test ${ac_cv_lib_util_forkpty+y}
15013then :
15014 printf %s "(cached) " >&6
15015else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015017LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021/* Override any GCC internal prototype to avoid an error.
15022 Use char because int might match the return type of a GCC
15023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015024char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015025int
Pablo Galindocc128882021-03-01 16:47:53 +000015026main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 ;
15030 return 0;
15031}
15032_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015033if ac_fn_c_try_link "$LINENO"
15034then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 ac_cv_lib_util_forkpty=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015036else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015038fi
Pablo Galindocc128882021-03-01 16:47:53 +000015039rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015041LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015042fi
Pablo Galindocc128882021-03-01 16:47:53 +000015043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
15044printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; }
15045if test "x$ac_cv_lib_util_forkpty" = xyes
15046then :
15047 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000015048 LIBS="$LIBS -lutil"
Pablo Galindocc128882021-03-01 16:47:53 +000015049else $as_nop
15050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
15051printf %s "checking for forkpty in -lbsd... " >&6; }
15052if test ${ac_cv_lib_bsd_forkpty+y}
15053then :
15054 printf %s "(cached) " >&6
15055else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015056 ac_check_lib_save_LIBS=$LIBS
15057LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015059/* end confdefs.h. */
15060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061/* Override any GCC internal prototype to avoid an error.
15062 Use char because int might match the return type of a GCC
15063 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015064char forkpty ();
15065int
Pablo Galindocc128882021-03-01 16:47:53 +000015066main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015067{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015069 ;
15070 return 0;
15071}
15072_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015073if ac_fn_c_try_link "$LINENO"
15074then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015075 ac_cv_lib_bsd_forkpty=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015076else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015078fi
Pablo Galindocc128882021-03-01 16:47:53 +000015079rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015081LIBS=$ac_check_lib_save_LIBS
15082fi
Pablo Galindocc128882021-03-01 16:47:53 +000015083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
15084printf "%s\n" "$ac_cv_lib_bsd_forkpty" >&6; }
15085if test "x$ac_cv_lib_bsd_forkpty" = xyes
15086then :
15087 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015088 LIBS="$LIBS -lbsd"
15089fi
15090
15091
15092fi
15093
Fred Drake8cef4cf2000-06-28 16:40:38 +000015094
15095fi
Fred Drake8cef4cf2000-06-28 16:40:38 +000015096
Pablo Galindocc128882021-03-01 16:47:53 +000015097done
Jack Jansendd19cf82001-12-06 22:36:17 +000015098
Michael W. Hudson54241132001-12-07 15:38:26 +000015099# check for long file support functions
Pablo Galindocc128882021-03-01 16:47:53 +000015100ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64"
15101if test "x$ac_cv_func_fseek64" = xyes
15102then :
15103 printf "%s\n" "#define HAVE_FSEEK64 1" >>confdefs.h
Michael W. Hudson54241132001-12-07 15:38:26 +000015104
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015105fi
Pablo Galindocc128882021-03-01 16:47:53 +000015106ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15107if test "x$ac_cv_func_fseeko" = xyes
15108then :
15109 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
15110
15111fi
15112ac_fn_c_check_func "$LINENO" "fstatvfs" "ac_cv_func_fstatvfs"
15113if test "x$ac_cv_func_fstatvfs" = xyes
15114then :
15115 printf "%s\n" "#define HAVE_FSTATVFS 1" >>confdefs.h
15116
15117fi
15118ac_fn_c_check_func "$LINENO" "ftell64" "ac_cv_func_ftell64"
15119if test "x$ac_cv_func_ftell64" = xyes
15120then :
15121 printf "%s\n" "#define HAVE_FTELL64 1" >>confdefs.h
15122
15123fi
15124ac_fn_c_check_func "$LINENO" "ftello" "ac_cv_func_ftello"
15125if test "x$ac_cv_func_ftello" = xyes
15126then :
15127 printf "%s\n" "#define HAVE_FTELLO 1" >>confdefs.h
15128
15129fi
15130ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
15131if test "x$ac_cv_func_statvfs" = xyes
15132then :
15133 printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h
15134
15135fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015136
Michael W. Hudson54241132001-12-07 15:38:26 +000015137
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015138ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Pablo Galindocc128882021-03-01 16:47:53 +000015139if test "x$ac_cv_func_dup2" = xyes
15140then :
15141 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000015142
Pablo Galindocc128882021-03-01 16:47:53 +000015143else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015145 *" dup2.$ac_objext "* ) ;;
15146 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015148esac
15149
Martin v. Löwis1142de32002-03-29 16:28:31 +000015150fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015151
Martin v. Löwis1142de32002-03-29 16:28:31 +000015152
Pablo Galindocc128882021-03-01 16:47:53 +000015153 for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015154do :
15155 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Pablo Galindocc128882021-03-01 16:47:53 +000015156if test "x$ac_cv_func_getpgrp" = xyes
15157then :
15158 printf "%s\n" "#define HAVE_GETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015160/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015161#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015162int
Pablo Galindocc128882021-03-01 16:47:53 +000015163main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015165getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ;
15167 return 0;
15168}
15169_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015170if ac_fn_c_try_compile "$LINENO"
15171then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015172
Pablo Galindocc128882021-03-01 16:47:53 +000015173printf "%s\n" "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015174
Guido van Rossum627b2d71993-12-24 10:39:16 +000015175fi
Pablo Galindocc128882021-03-01 16:47:53 +000015176rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015177
Guido van Rossum627b2d71993-12-24 10:39:16 +000015178fi
Pablo Galindocc128882021-03-01 16:47:53 +000015179
Thomas Wouters3a584202000-08-05 23:28:51 +000015180done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015181
Pablo Galindocc128882021-03-01 16:47:53 +000015182 for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015183do :
15184 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Pablo Galindocc128882021-03-01 16:47:53 +000015185if test "x$ac_cv_func_setpgrp" = xyes
15186then :
15187 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015189/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015190#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015191int
Pablo Galindocc128882021-03-01 16:47:53 +000015192main (void)
Jack Jansen150753c2003-03-29 22:07:47 +000015193{
15194setpgrp(0,0);
15195 ;
15196 return 0;
15197}
15198_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015199if ac_fn_c_try_compile "$LINENO"
15200then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015201
Pablo Galindocc128882021-03-01 16:47:53 +000015202printf "%s\n" "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015203
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015204fi
Pablo Galindocc128882021-03-01 16:47:53 +000015205rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015206
15207fi
Pablo Galindocc128882021-03-01 16:47:53 +000015208
Jack Jansen150753c2003-03-29 22:07:47 +000015209done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015210
Gregory P. Smith387512c2018-12-30 15:42:32 -080015211# We search for both crypt and crypt_r as one or the other may be defined
15212# This gets us our -lcrypt in LIBS when required on the target platform.
Pablo Galindocc128882021-03-01 16:47:53 +000015213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
15214printf %s "checking for library containing crypt... " >&6; }
15215if test ${ac_cv_search_crypt+y}
15216then :
15217 printf %s "(cached) " >&6
15218else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015219 ac_func_search_save_LIBS=$LIBS
15220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15221/* end confdefs.h. */
15222
15223/* Override any GCC internal prototype to avoid an error.
15224 Use char because int might match the return type of a GCC
15225 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015226char crypt ();
15227int
Pablo Galindocc128882021-03-01 16:47:53 +000015228main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015229{
15230return crypt ();
15231 ;
15232 return 0;
15233}
15234_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015235for ac_lib in '' crypt
15236do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015237 if test -z "$ac_lib"; then
15238 ac_res="none required"
15239 else
15240 ac_res=-l$ac_lib
15241 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15242 fi
Pablo Galindocc128882021-03-01 16:47:53 +000015243 if ac_fn_c_try_link "$LINENO"
15244then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015245 ac_cv_search_crypt=$ac_res
15246fi
Pablo Galindocc128882021-03-01 16:47:53 +000015247rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015248 conftest$ac_exeext
Pablo Galindocc128882021-03-01 16:47:53 +000015249 if test ${ac_cv_search_crypt+y}
15250then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015251 break
15252fi
15253done
Pablo Galindocc128882021-03-01 16:47:53 +000015254if test ${ac_cv_search_crypt+y}
15255then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015256
Pablo Galindocc128882021-03-01 16:47:53 +000015257else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015258 ac_cv_search_crypt=no
15259fi
15260rm conftest.$ac_ext
15261LIBS=$ac_func_search_save_LIBS
15262fi
Pablo Galindocc128882021-03-01 16:47:53 +000015263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
15264printf "%s\n" "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015265ac_res=$ac_cv_search_crypt
Pablo Galindocc128882021-03-01 16:47:53 +000015266if test "$ac_res" != no
15267then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015268 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15269
15270fi
15271
Pablo Galindocc128882021-03-01 16:47:53 +000015272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15273printf %s "checking for library containing crypt_r... " >&6; }
15274if test ${ac_cv_search_crypt_r+y}
15275then :
15276 printf %s "(cached) " >&6
15277else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015278 ac_func_search_save_LIBS=$LIBS
15279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15280/* end confdefs.h. */
15281
15282/* Override any GCC internal prototype to avoid an error.
15283 Use char because int might match the return type of a GCC
15284 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015285char crypt_r ();
15286int
Pablo Galindocc128882021-03-01 16:47:53 +000015287main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015288{
15289return crypt_r ();
15290 ;
15291 return 0;
15292}
15293_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015294for ac_lib in '' crypt
15295do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015296 if test -z "$ac_lib"; then
15297 ac_res="none required"
15298 else
15299 ac_res=-l$ac_lib
15300 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15301 fi
Pablo Galindocc128882021-03-01 16:47:53 +000015302 if ac_fn_c_try_link "$LINENO"
15303then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015304 ac_cv_search_crypt_r=$ac_res
15305fi
Pablo Galindocc128882021-03-01 16:47:53 +000015306rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015307 conftest$ac_exeext
Pablo Galindocc128882021-03-01 16:47:53 +000015308 if test ${ac_cv_search_crypt_r+y}
15309then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015310 break
15311fi
15312done
Pablo Galindocc128882021-03-01 16:47:53 +000015313if test ${ac_cv_search_crypt_r+y}
15314then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015315
Pablo Galindocc128882021-03-01 16:47:53 +000015316else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015317 ac_cv_search_crypt_r=no
15318fi
15319rm conftest.$ac_ext
15320LIBS=$ac_func_search_save_LIBS
15321fi
Pablo Galindocc128882021-03-01 16:47:53 +000015322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
15323printf "%s\n" "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015324ac_res=$ac_cv_search_crypt_r
Pablo Galindocc128882021-03-01 16:47:53 +000015325if test "$ac_res" != no
15326then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015327 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15328
15329fi
15330
15331
15332ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Pablo Galindocc128882021-03-01 16:47:53 +000015333if test "x$ac_cv_func_crypt_r" = xyes
15334then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336/* end confdefs.h. */
15337
15338#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
15339#include <crypt.h>
15340
15341int
Pablo Galindocc128882021-03-01 16:47:53 +000015342main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015343{
15344
15345struct crypt_data d;
15346char *r = crypt_r("", "", &d);
15347
15348 ;
15349 return 0;
15350}
15351_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015352if ac_fn_c_try_compile "$LINENO"
15353then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015354
Pablo Galindocc128882021-03-01 16:47:53 +000015355printf "%s\n" "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080015356
15357fi
Pablo Galindocc128882021-03-01 16:47:53 +000015358rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080015359
15360fi
15361
15362
Pablo Galindocc128882021-03-01 16:47:53 +000015363
15364 for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020015365do :
15366 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Pablo Galindocc128882021-03-01 16:47:53 +000015367if test "x$ac_cv_func_clock_gettime" = xyes
15368then :
15369 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015370
Pablo Galindocc128882021-03-01 16:47:53 +000015371else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015372
Pablo Galindocc128882021-03-01 16:47:53 +000015373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
15374printf %s "checking for clock_gettime in -lrt... " >&6; }
15375if test ${ac_cv_lib_rt_clock_gettime+y}
15376then :
15377 printf %s "(cached) " >&6
15378else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015379 ac_check_lib_save_LIBS=$LIBS
15380LIBS="-lrt $LIBS"
15381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15382/* end confdefs.h. */
15383
15384/* Override any GCC internal prototype to avoid an error.
15385 Use char because int might match the return type of a GCC
15386 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015387char clock_gettime ();
15388int
Pablo Galindocc128882021-03-01 16:47:53 +000015389main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015390{
15391return clock_gettime ();
15392 ;
15393 return 0;
15394}
15395_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015396if ac_fn_c_try_link "$LINENO"
15397then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015398 ac_cv_lib_rt_clock_gettime=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015399else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015400 ac_cv_lib_rt_clock_gettime=no
15401fi
Pablo Galindocc128882021-03-01 16:47:53 +000015402rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015403 conftest$ac_exeext conftest.$ac_ext
15404LIBS=$ac_check_lib_save_LIBS
15405fi
Pablo Galindocc128882021-03-01 16:47:53 +000015406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
15407printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
15408if test "x$ac_cv_lib_rt_clock_gettime" = xyes
15409then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015410
Victor Stinner7efb8332014-08-29 15:41:08 +020015411 LIBS="$LIBS -lrt"
Pablo Galindocc128882021-03-01 16:47:53 +000015412 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015413
15414
Pablo Galindocc128882021-03-01 16:47:53 +000015415printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015416
15417
15418fi
15419
15420
15421fi
Pablo Galindocc128882021-03-01 16:47:53 +000015422
Victor Stinnere0be4232011-10-25 13:06:09 +020015423done
15424
15425
Pablo Galindocc128882021-03-01 16:47:53 +000015426 for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020015427do :
15428 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Pablo Galindocc128882021-03-01 16:47:53 +000015429if test "x$ac_cv_func_clock_getres" = xyes
15430then :
15431 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015432
Pablo Galindocc128882021-03-01 16:47:53 +000015433else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015434
Pablo Galindocc128882021-03-01 16:47:53 +000015435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
15436printf %s "checking for clock_getres in -lrt... " >&6; }
15437if test ${ac_cv_lib_rt_clock_getres+y}
15438then :
15439 printf %s "(cached) " >&6
15440else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015441 ac_check_lib_save_LIBS=$LIBS
15442LIBS="-lrt $LIBS"
15443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15444/* end confdefs.h. */
15445
15446/* Override any GCC internal prototype to avoid an error.
15447 Use char because int might match the return type of a GCC
15448 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015449char clock_getres ();
15450int
Pablo Galindocc128882021-03-01 16:47:53 +000015451main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015452{
15453return clock_getres ();
15454 ;
15455 return 0;
15456}
15457_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015458if ac_fn_c_try_link "$LINENO"
15459then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015460 ac_cv_lib_rt_clock_getres=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015461else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015462 ac_cv_lib_rt_clock_getres=no
15463fi
Pablo Galindocc128882021-03-01 16:47:53 +000015464rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015465 conftest$ac_exeext conftest.$ac_ext
15466LIBS=$ac_check_lib_save_LIBS
15467fi
Pablo Galindocc128882021-03-01 16:47:53 +000015468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
15469printf "%s\n" "$ac_cv_lib_rt_clock_getres" >&6; }
15470if test "x$ac_cv_lib_rt_clock_getres" = xyes
15471then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015472
Pablo Galindocc128882021-03-01 16:47:53 +000015473 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015474
15475
15476fi
15477
15478
15479fi
Pablo Galindocc128882021-03-01 16:47:53 +000015480
Victor Stinnere0be4232011-10-25 13:06:09 +020015481done
15482
15483
Pablo Galindocc128882021-03-01 16:47:53 +000015484 for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015485do :
15486 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Pablo Galindocc128882021-03-01 16:47:53 +000015487if test "x$ac_cv_func_clock_settime" = xyes
15488then :
15489 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015490
Pablo Galindocc128882021-03-01 16:47:53 +000015491else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015492
Pablo Galindocc128882021-03-01 16:47:53 +000015493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
15494printf %s "checking for clock_settime in -lrt... " >&6; }
15495if test ${ac_cv_lib_rt_clock_settime+y}
15496then :
15497 printf %s "(cached) " >&6
15498else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015499 ac_check_lib_save_LIBS=$LIBS
15500LIBS="-lrt $LIBS"
15501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15502/* end confdefs.h. */
15503
15504/* Override any GCC internal prototype to avoid an error.
15505 Use char because int might match the return type of a GCC
15506 builtin and then its argument prototype would still apply. */
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015507char clock_settime ();
15508int
Pablo Galindocc128882021-03-01 16:47:53 +000015509main (void)
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015510{
15511return clock_settime ();
15512 ;
15513 return 0;
15514}
15515_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015516if ac_fn_c_try_link "$LINENO"
15517then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015518 ac_cv_lib_rt_clock_settime=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015519else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015520 ac_cv_lib_rt_clock_settime=no
15521fi
Pablo Galindocc128882021-03-01 16:47:53 +000015522rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015523 conftest$ac_exeext conftest.$ac_ext
15524LIBS=$ac_check_lib_save_LIBS
15525fi
Pablo Galindocc128882021-03-01 16:47:53 +000015526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
15527printf "%s\n" "$ac_cv_lib_rt_clock_settime" >&6; }
15528if test "x$ac_cv_lib_rt_clock_settime" = xyes
15529then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015530
Pablo Galindocc128882021-03-01 16:47:53 +000015531 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015532
15533
15534fi
15535
15536
15537fi
Pablo Galindocc128882021-03-01 16:47:53 +000015538
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015539done
15540
Pablo Galindocc128882021-03-01 16:47:53 +000015541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for major" >&5
15542printf %s "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015544/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015545
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015546#if defined(MAJOR_IN_MKDEV)
15547#include <sys/mkdev.h>
15548#elif defined(MAJOR_IN_SYSMACROS)
15549#include <sys/sysmacros.h>
15550#else
15551#include <sys/types.h>
15552#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015553
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015554int
Pablo Galindocc128882021-03-01 16:47:53 +000015555main (void)
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015556{
15557
15558 makedev(major(0),minor(0));
15559
15560 ;
15561 return 0;
15562}
15563_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015564if ac_fn_c_try_link "$LINENO"
15565then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015566
15567
Pablo Galindocc128882021-03-01 16:47:53 +000015568printf "%s\n" "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015569
Pablo Galindocc128882021-03-01 16:47:53 +000015570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15571printf "%s\n" "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015572
Pablo Galindocc128882021-03-01 16:47:53 +000015573else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000015574
Pablo Galindocc128882021-03-01 16:47:53 +000015575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15576printf "%s\n" "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015577
15578fi
Pablo Galindocc128882021-03-01 16:47:53 +000015579rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015581
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015582# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015583# for [no]getaddrinfo in netdb.h.
Pablo Galindocc128882021-03-01 16:47:53 +000015584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
15585printf %s "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015587/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015588
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015589#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015590#include <sys/socket.h>
15591#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015592#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015593
Martin v. Löwis11437992002-04-12 09:54:03 +000015594int
Pablo Galindocc128882021-03-01 16:47:53 +000015595main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015596{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015597getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 ;
15599 return 0;
15600}
15601_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015602if ac_fn_c_try_link "$LINENO"
15603then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015604 have_getaddrinfo=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015605else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015607fi
Pablo Galindocc128882021-03-01 16:47:53 +000015608rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000015610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
15611printf "%s\n" "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015612if test $have_getaddrinfo = yes
15613then
Pablo Galindocc128882021-03-01 16:47:53 +000015614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
15615printf %s "checking getaddrinfo bug... " >&6; }
15616 if test ${ac_cv_buggy_getaddrinfo+y}
15617then :
15618 printf %s "(cached) " >&6
15619else $as_nop
15620 if test "$cross_compiling" = yes
15621then :
Matthias Klose96350132012-03-15 20:42:23 +010015622
15623if test "${enable_ipv6+set}" = set; then
15624 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
15625else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015626 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010015627fi
Pablo Galindocc128882021-03-01 16:47:53 +000015628else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015630/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015631
Stefan Krah19c21392012-11-22 23:47:32 +010015632#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015633#include <sys/types.h>
15634#include <netdb.h>
15635#include <string.h>
15636#include <sys/socket.h>
15637#include <netinet/in.h>
15638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015639int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015640{
15641 int passive, gaierr, inet4 = 0, inet6 = 0;
15642 struct addrinfo hints, *ai, *aitop;
15643 char straddr[INET6_ADDRSTRLEN], strport[16];
15644
15645 for (passive = 0; passive <= 1; passive++) {
15646 memset(&hints, 0, sizeof(hints));
15647 hints.ai_family = AF_UNSPEC;
15648 hints.ai_flags = passive ? AI_PASSIVE : 0;
15649 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015650 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015651 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15652 (void)gai_strerror(gaierr);
15653 goto bad;
15654 }
15655 for (ai = aitop; ai; ai = ai->ai_next) {
15656 if (ai->ai_addr == NULL ||
15657 ai->ai_addrlen == 0 ||
15658 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15659 straddr, sizeof(straddr), strport, sizeof(strport),
15660 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15661 goto bad;
15662 }
15663 switch (ai->ai_family) {
15664 case AF_INET:
15665 if (strcmp(strport, "54321") != 0) {
15666 goto bad;
15667 }
15668 if (passive) {
15669 if (strcmp(straddr, "0.0.0.0") != 0) {
15670 goto bad;
15671 }
15672 } else {
15673 if (strcmp(straddr, "127.0.0.1") != 0) {
15674 goto bad;
15675 }
15676 }
15677 inet4++;
15678 break;
15679 case AF_INET6:
15680 if (strcmp(strport, "54321") != 0) {
15681 goto bad;
15682 }
15683 if (passive) {
15684 if (strcmp(straddr, "::") != 0) {
15685 goto bad;
15686 }
15687 } else {
15688 if (strcmp(straddr, "::1") != 0) {
15689 goto bad;
15690 }
15691 }
15692 inet6++;
15693 break;
15694 case AF_UNSPEC:
15695 goto bad;
15696 break;
15697 default:
15698 /* another family support? */
15699 break;
15700 }
15701 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070015702 freeaddrinfo(aitop);
15703 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015704 }
15705
15706 if (!(inet4 == 0 || inet4 == 2))
15707 goto bad;
15708 if (!(inet6 == 0 || inet6 == 2))
15709 goto bad;
15710
15711 if (aitop)
15712 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015713 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015714
15715 bad:
15716 if (aitop)
15717 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015718 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015719}
15720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015722if ac_fn_c_try_run "$LINENO"
15723then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015724 ac_cv_buggy_getaddrinfo=no
Pablo Galindocc128882021-03-01 16:47:53 +000015725else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15729 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015732fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015733
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735
Pablo Galindocc128882021-03-01 16:47:53 +000015736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
15737printf "%s\n" "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015738
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020015739if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015740then
15741 if test $ipv6 = yes
15742 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015743 echo 'Fatal: You must get working getaddrinfo() function.'
15744 echo ' or you can specify "--disable-ipv6"'.
15745 exit 1
15746 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015747else
Martin v. Löwis11437992002-04-12 09:54:03 +000015748
Pablo Galindocc128882021-03-01 16:47:53 +000015749printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015750
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015751fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015752
Pablo Galindocc128882021-03-01 16:47:53 +000015753ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
15754if test "x$ac_cv_func_getnameinfo" = xyes
15755then :
15756 printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015757
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015758fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015759
Michael W. Hudson54241132001-12-07 15:38:26 +000015760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015761# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015762
Martin v. Löwis11437992002-04-12 09:54:03 +000015763
Pablo Galindocc128882021-03-01 16:47:53 +000015764# Obsolete code to be removed.
15765if test $ac_cv_header_sys_time_h = yes; then
15766
15767printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015768
15769fi
Pablo Galindocc128882021-03-01 16:47:53 +000015770# End of obsolete code.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015771
Pablo Galindocc128882021-03-01 16:47:53 +000015772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
15773printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15774if test ${ac_cv_struct_tm+y}
15775then :
15776 printf %s "(cached) " >&6
15777else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015779/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015780#include <sys/types.h>
15781#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783int
Pablo Galindocc128882021-03-01 16:47:53 +000015784main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786struct tm tm;
15787 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 ;
15790 return 0;
15791}
15792_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015793if ac_fn_c_try_compile "$LINENO"
15794then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015795 ac_cv_struct_tm=time.h
Pablo Galindocc128882021-03-01 16:47:53 +000015796else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015797 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015798fi
Pablo Galindocc128882021-03-01 16:47:53 +000015799rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015800fi
Pablo Galindocc128882021-03-01 16:47:53 +000015801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
15802printf "%s\n" "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015803if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015804
Pablo Galindocc128882021-03-01 16:47:53 +000015805printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015806
15807fi
15808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809ac_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 +000015810#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015811
Matthias Kloseb9621712010-04-24 17:59:49 +000015812"
Pablo Galindocc128882021-03-01 16:47:53 +000015813if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
15814then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015815
Pablo Galindocc128882021-03-01 16:47:53 +000015816printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015819fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15822
Pablo Galindocc128882021-03-01 16:47:53 +000015823printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015824
15825else
Pablo Galindocc128882021-03-01 16:47:53 +000015826 ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15827" "$ac_c_undeclared_builtin_options" "CFLAGS"
15828if test "x$ac_cv_have_decl_tzname" = xyes
15829then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000015831else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833fi
Pablo Galindocc128882021-03-01 16:47:53 +000015834printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835
Pablo Galindocc128882021-03-01 16:47:53 +000015836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15837printf %s "checking for tzname... " >&6; }
15838if test ${ac_cv_var_tzname+y}
15839then :
15840 printf %s "(cached) " >&6
15841else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015843/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015844#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015845#if !HAVE_DECL_TZNAME
15846extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000015847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849int
Pablo Galindocc128882021-03-01 16:47:53 +000015850main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000015853 ;
15854 return 0;
15855}
15856_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015857if ac_fn_c_try_link "$LINENO"
15858then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015859 ac_cv_var_tzname=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015860else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015862fi
Pablo Galindocc128882021-03-01 16:47:53 +000015863rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015864 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015865fi
Pablo Galindocc128882021-03-01 16:47:53 +000015866{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15867printf "%s\n" "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015868 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
Pablo Galindocc128882021-03-01 16:47:53 +000015870printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000015871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015872 fi
15873fi
15874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +000015876if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
15877then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
Pablo Galindocc128882021-03-01 16:47:53 +000015879printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015880
15881
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015882fi
15883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +000015885if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
15886then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015887
Pablo Galindocc128882021-03-01 16:47:53 +000015888printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015889
15890
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015891fi
15892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +000015894if test "x$ac_cv_member_struct_stat_st_flags" = xyes
15895then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015896
Pablo Galindocc128882021-03-01 16:47:53 +000015897printf "%s\n" "#define HAVE_STRUCT_STAT_ST_FLAGS 1" >>confdefs.h
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015898
15899
15900fi
15901
Matthias Kloseb9621712010-04-24 17:59:49 +000015902ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +000015903if test "x$ac_cv_member_struct_stat_st_gen" = xyes
15904then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015905
Pablo Galindocc128882021-03-01 16:47:53 +000015906printf "%s\n" "#define HAVE_STRUCT_STAT_ST_GEN 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015907
15908
15909fi
15910
Matthias Kloseb9621712010-04-24 17:59:49 +000015911ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +000015912if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes
15913then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015914
Pablo Galindocc128882021-03-01 16:47:53 +000015915printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015916
15917
15918fi
15919
Matthias Kloseb9621712010-04-24 17:59:49 +000015920ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +000015921if test "x$ac_cv_member_struct_stat_st_blocks" = xyes
15922then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015923
Pablo Galindocc128882021-03-01 16:47:53 +000015924printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015925
15926
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015927fi
15928
Stefan Krah267b6392016-04-26 01:09:18 +020015929ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
15930 #include <sys/types.h>
15931 #include <pwd.h>
15932
15933"
Pablo Galindocc128882021-03-01 16:47:53 +000015934if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes
15935then :
Stefan Krah267b6392016-04-26 01:09:18 +020015936
Pablo Galindocc128882021-03-01 16:47:53 +000015937printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_GECOS 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020015938
15939
15940fi
15941ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
15942 #include <sys/types.h>
15943 #include <pwd.h>
15944
15945"
Pablo Galindocc128882021-03-01 16:47:53 +000015946if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes
15947then :
Stefan Krah267b6392016-04-26 01:09:18 +020015948
Pablo Galindocc128882021-03-01 16:47:53 +000015949printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_PASSWD 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020015950
15951
15952fi
15953
Zachary Ware6a6967e2016-10-01 00:47:27 -050015954# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
15955ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
15956"
Pablo Galindocc128882021-03-01 16:47:53 +000015957if test "x$ac_cv_member_siginfo_t_si_band" = xyes
15958then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050015959
Pablo Galindocc128882021-03-01 16:47:53 +000015960printf "%s\n" "#define HAVE_SIGINFO_T_SI_BAND 1" >>confdefs.h
Zachary Ware6a6967e2016-10-01 00:47:27 -050015961
15962
15963fi
15964
Michael W. Hudson54241132001-12-07 15:38:26 +000015965
Pablo Galindocc128882021-03-01 16:47:53 +000015966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
15967printf %s "checking for time.h that defines altzone... " >&6; }
15968if test ${ac_cv_header_time_altzone+y}
15969then :
15970 printf %s "(cached) " >&6
15971else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000015972
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015974/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015975#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015976int
Pablo Galindocc128882021-03-01 16:47:53 +000015977main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015978{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015979return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015980 ;
15981 return 0;
15982}
15983_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000015984if ac_fn_c_try_compile "$LINENO"
15985then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015986 ac_cv_header_time_altzone=yes
Pablo Galindocc128882021-03-01 16:47:53 +000015987else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015988 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015989fi
Pablo Galindocc128882021-03-01 16:47:53 +000015990rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000015991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992fi
15993
Pablo Galindocc128882021-03-01 16:47:53 +000015994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
15995printf "%s\n" "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015996if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Pablo Galindocc128882021-03-01 16:47:53 +000015998printf "%s\n" "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015999
16000fi
16001
Guido van Rossumda88dad1995-01-26 00:46:29 +000016002was_it_defined=no
Pablo Galindocc128882021-03-01 16:47:53 +000016003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
16004printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016006/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016007
16008#include <sys/types.h>
16009#include <sys/select.h>
16010#include <sys/time.h>
16011
Martin v. Löwis11437992002-04-12 09:54:03 +000016012int
Pablo Galindocc128882021-03-01 16:47:53 +000016013main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016014{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016015;
Martin v. Löwis11437992002-04-12 09:54:03 +000016016 ;
16017 return 0;
16018}
16019_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016020if ac_fn_c_try_compile "$LINENO"
16021then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016022
16023
Pablo Galindocc128882021-03-01 16:47:53 +000016024printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016025
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016026 was_it_defined=yes
16027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016028fi
Pablo Galindocc128882021-03-01 16:47:53 +000016029rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
16031printf "%s\n" "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032
Pablo Galindocc128882021-03-01 16:47:53 +000016033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
16034printf %s "checking for addrinfo... " >&6; }
16035if test ${ac_cv_struct_addrinfo+y}
16036then :
16037 printf %s "(cached) " >&6
16038else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016040/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000016041#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016042int
Pablo Galindocc128882021-03-01 16:47:53 +000016043main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016044{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016045struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 ;
16047 return 0;
16048}
16049_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016050if ac_fn_c_try_compile "$LINENO"
16051then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016052 ac_cv_struct_addrinfo=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016053else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016054 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016055fi
Pablo Galindocc128882021-03-01 16:47:53 +000016056rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057fi
16058
Pablo Galindocc128882021-03-01 16:47:53 +000016059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
16060printf "%s\n" "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016061if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016062
Pablo Galindocc128882021-03-01 16:47:53 +000016063printf "%s\n" "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016064
16065fi
16066
Pablo Galindocc128882021-03-01 16:47:53 +000016067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
16068printf %s "checking for sockaddr_storage... " >&6; }
16069if test ${ac_cv_struct_sockaddr_storage+y}
16070then :
16071 printf %s "(cached) " >&6
16072else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016074/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016075
16076# include <sys/types.h>
16077# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016078int
Pablo Galindocc128882021-03-01 16:47:53 +000016079main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016080{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016081struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 ;
16083 return 0;
16084}
16085_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016086if ac_fn_c_try_compile "$LINENO"
16087then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016088 ac_cv_struct_sockaddr_storage=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016089else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016090 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016091fi
Pablo Galindocc128882021-03-01 16:47:53 +000016092rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016093fi
16094
Pablo Galindocc128882021-03-01 16:47:53 +000016095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
16096printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016097if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016098
Pablo Galindocc128882021-03-01 16:47:53 +000016099printf "%s\n" "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016100
16101fi
16102
Pablo Galindocc128882021-03-01 16:47:53 +000016103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
16104printf %s "checking for sockaddr_alg... " >&6; }
16105if test ${ac_cv_struct_sockaddr_alg+y}
16106then :
16107 printf %s "(cached) " >&6
16108else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16110/* end confdefs.h. */
16111
16112# include <sys/types.h>
16113# include <sys/socket.h>
16114# include <linux/if_alg.h>
16115int
Pablo Galindocc128882021-03-01 16:47:53 +000016116main (void)
Christian Heimesdffa3942016-09-05 23:54:41 +020016117{
16118struct sockaddr_alg s
16119 ;
16120 return 0;
16121}
16122_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016123if ac_fn_c_try_compile "$LINENO"
16124then :
Christian Heimesdffa3942016-09-05 23:54:41 +020016125 ac_cv_struct_sockaddr_alg=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016126else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016127 ac_cv_struct_sockaddr_alg=no
16128fi
Pablo Galindocc128882021-03-01 16:47:53 +000016129rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020016130fi
16131
Pablo Galindocc128882021-03-01 16:47:53 +000016132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
16133printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020016134if test $ac_cv_struct_sockaddr_alg = yes; then
16135
Pablo Galindocc128882021-03-01 16:47:53 +000016136printf "%s\n" "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020016137
16138fi
16139
Guido van Rossum627b2d71993-12-24 10:39:16 +000016140# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016141
Pablo Galindocc128882021-03-01 16:47:53 +000016142{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
16143printf %s "checking whether char is unsigned... " >&6; }
16144if test ${ac_cv_c_char_unsigned+y}
16145then :
16146 printf %s "(cached) " >&6
16147else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016150$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016151int
Pablo Galindocc128882021-03-01 16:47:53 +000016152main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016153{
16154static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016155test_array [0] = 0;
16156return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000016157
16158 ;
16159 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016160}
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016162if ac_fn_c_try_compile "$LINENO"
16163then :
Michael W. Hudson54241132001-12-07 15:38:26 +000016164 ac_cv_c_char_unsigned=no
Pablo Galindocc128882021-03-01 16:47:53 +000016165else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016166 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016167fi
Pablo Galindocc128882021-03-01 16:47:53 +000016168rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016169fi
Pablo Galindocc128882021-03-01 16:47:53 +000016170{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
16171printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
16172if test $ac_cv_c_char_unsigned = yes; then
16173 printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016174
16175fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016176
Pablo Galindocc128882021-03-01 16:47:53 +000016177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
16178printf %s "checking for an ANSI C-conforming const... " >&6; }
16179if test ${ac_cv_c_const+y}
16180then :
16181 printf %s "(cached) " >&6
16182else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016184/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016185
Martin v. Löwis11437992002-04-12 09:54:03 +000016186int
Pablo Galindocc128882021-03-01 16:47:53 +000016187main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016188{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016189
Martin v. Löwis11437992002-04-12 09:54:03 +000016190#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016191 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016193 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195 char const *const *pcpcc;
16196 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000016197 /* NEC SVR4.0.2 mips cc rejects this. */
16198 struct point {int x, y;};
16199 static struct point const zero = {0,0};
Pablo Galindocc128882021-03-01 16:47:53 +000016200 /* IBM XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000016201 It does not let you subtract one const X* pointer from another in
16202 an arm of an if-expression whose if-part is not a constant
16203 expression */
16204 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207 ++pcpcc;
16208 ppc = (char**) pcpcc;
16209 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016210 { /* SCO 3.2v4 cc rejects this sort of thing. */
16211 char tx;
16212 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016214
Martin v. Löwis11437992002-04-12 09:54:03 +000016215 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 }
16218 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16219 int x[] = {25, 17};
16220 const int *foo = &x[0];
16221 ++foo;
16222 }
16223 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16224 typedef const int *iptr;
16225 iptr p = 0;
16226 ++p;
16227 }
Pablo Galindocc128882021-03-01 16:47:53 +000016228 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016230 struct s { int j; const int *ap[3]; } bx;
16231 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000016232 }
16233 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16234 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000016238#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016239
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 ;
16241 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016242}
Martin v. Löwis11437992002-04-12 09:54:03 +000016243_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016244if ac_fn_c_try_compile "$LINENO"
16245then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016246 ac_cv_c_const=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016247else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016248 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016249fi
Pablo Galindocc128882021-03-01 16:47:53 +000016250rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016251fi
Pablo Galindocc128882021-03-01 16:47:53 +000016252{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
16253printf "%s\n" "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016254if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016255
Pablo Galindocc128882021-03-01 16:47:53 +000016256printf "%s\n" "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016257
16258fi
16259
Michael W. Hudson54241132001-12-07 15:38:26 +000016260
Guido van Rossumda88dad1995-01-26 00:46:29 +000016261works=no
Pablo Galindocc128882021-03-01 16:47:53 +000016262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
16263printf %s "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016265/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016266
Martin v. Löwis11437992002-04-12 09:54:03 +000016267int
Pablo Galindocc128882021-03-01 16:47:53 +000016268main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016269{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016270signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016271 ;
16272 return 0;
16273}
16274_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016275if ac_fn_c_try_compile "$LINENO"
16276then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000016277 works=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016278else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016279
Pablo Galindocc128882021-03-01 16:47:53 +000016280printf "%s\n" "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016281
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016282
Guido van Rossum7f43da71994-08-01 12:15:30 +000016283fi
Pablo Galindocc128882021-03-01 16:47:53 +000016284rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16286printf "%s\n" "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016287
Guido van Rossumda88dad1995-01-26 00:46:29 +000016288have_prototypes=no
Pablo Galindocc128882021-03-01 16:47:53 +000016289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
16290printf %s "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016292/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016293int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016294int
Pablo Galindocc128882021-03-01 16:47:53 +000016295main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016296{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016297return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 ;
16299 return 0;
16300}
16301_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016302if ac_fn_c_try_compile "$LINENO"
16303then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016304
Pablo Galindocc128882021-03-01 16:47:53 +000016305printf "%s\n" "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016306
Matthias Kloseb159a552010-04-25 21:00:44 +000016307 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016308fi
Pablo Galindocc128882021-03-01 16:47:53 +000016309rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
16311printf "%s\n" "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016312
Guido van Rossumda88dad1995-01-26 00:46:29 +000016313works=no
Pablo Galindocc128882021-03-01 16:47:53 +000016314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
16315printf %s "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016317/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016318
16319#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016320int foo(int x, ...) {
16321 va_list va;
16322 va_start(va, x);
16323 va_arg(va, int);
16324 va_arg(va, char *);
16325 va_arg(va, double);
16326 return 0;
16327}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016328
Martin v. Löwis11437992002-04-12 09:54:03 +000016329int
Pablo Galindocc128882021-03-01 16:47:53 +000016330main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016331{
Guido van Rossum90eea071996-08-30 20:58:57 +000016332return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016333 ;
16334 return 0;
16335}
16336_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016337if ac_fn_c_try_compile "$LINENO"
16338then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016339
16340
Pablo Galindocc128882021-03-01 16:47:53 +000016341printf "%s\n" "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016342
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016343 works=yes
16344
Guido van Rossum627b2d71993-12-24 10:39:16 +000016345fi
Pablo Galindocc128882021-03-01 16:47:53 +000016346rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16348printf "%s\n" "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016349
Martin v. Löwisd6320502004-08-12 13:45:08 +000016350# check for socketpair
Pablo Galindocc128882021-03-01 16:47:53 +000016351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
16352printf %s "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016354/* end confdefs.h. */
16355
16356#include <sys/types.h>
16357#include <sys/socket.h>
16358
16359int
Pablo Galindocc128882021-03-01 16:47:53 +000016360main (void)
Martin v. Löwisd6320502004-08-12 13:45:08 +000016361{
16362void *x=socketpair
16363 ;
16364 return 0;
16365}
16366_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016367if ac_fn_c_try_compile "$LINENO"
16368then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000016369
Pablo Galindocc128882021-03-01 16:47:53 +000016370printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000016371
Pablo Galindocc128882021-03-01 16:47:53 +000016372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16373printf "%s\n" "yes" >&6; }
16374else $as_nop
16375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16376printf "%s\n" "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000016377
16378fi
Pablo Galindocc128882021-03-01 16:47:53 +000016379rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016380
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016381# check if sockaddr has sa_len member
Pablo Galindocc128882021-03-01 16:47:53 +000016382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
16383printf %s "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016385/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016386#include <sys/types.h>
16387#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016388int
Pablo Galindocc128882021-03-01 16:47:53 +000016389main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016390{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016391struct sockaddr x;
16392x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 ;
16394 return 0;
16395}
16396_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016397if ac_fn_c_try_compile "$LINENO"
16398then :
16399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16400printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016401
Pablo Galindocc128882021-03-01 16:47:53 +000016402printf "%s\n" "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016403
Pablo Galindocc128882021-03-01 16:47:53 +000016404else $as_nop
16405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16406printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016407
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016408fi
Pablo Galindocc128882021-03-01 16:47:53 +000016409rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016411# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016412
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Pablo Galindocc128882021-03-01 16:47:53 +000016415if test "x$ac_cv_func_gethostbyname_r" = xyes
16416then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
Pablo Galindocc128882021-03-01 16:47:53 +000016418 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016419
Pablo Galindocc128882021-03-01 16:47:53 +000016420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
16421printf %s "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016422 OLD_CFLAGS=$CFLAGS
16423 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016425/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016426
16427# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016428
Martin v. Löwis11437992002-04-12 09:54:03 +000016429int
Pablo Galindocc128882021-03-01 16:47:53 +000016430main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016431{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016432
16433 char *name;
16434 struct hostent *he, *res;
16435 char buffer[2048];
16436 int buflen = 2048;
16437 int h_errnop;
16438
16439 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016440
16441 ;
16442 return 0;
16443}
16444_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016445if ac_fn_c_try_compile "$LINENO"
16446then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016447
Pablo Galindocc128882021-03-01 16:47:53 +000016448 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016449
Martin v. Löwis11437992002-04-12 09:54:03 +000016450
Pablo Galindocc128882021-03-01 16:47:53 +000016451printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016452
Pablo Galindocc128882021-03-01 16:47:53 +000016453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16454printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016455
Pablo Galindocc128882021-03-01 16:47:53 +000016456else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016457
Pablo Galindocc128882021-03-01 16:47:53 +000016458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16459printf "%s\n" "no" >&6; }
16460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
16461printf %s "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016463/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016465# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016466
Martin v. Löwis11437992002-04-12 09:54:03 +000016467int
Pablo Galindocc128882021-03-01 16:47:53 +000016468main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016469{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016470
16471 char *name;
16472 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000016473 char buffer[2048];
16474 int buflen = 2048;
16475 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016476
Matthias Kloseb159a552010-04-25 21:00:44 +000016477 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016478
16479 ;
16480 return 0;
16481}
16482_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016483if ac_fn_c_try_compile "$LINENO"
16484then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016485
Pablo Galindocc128882021-03-01 16:47:53 +000016486 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016487
Martin v. Löwis11437992002-04-12 09:54:03 +000016488
Pablo Galindocc128882021-03-01 16:47:53 +000016489printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016490
Pablo Galindocc128882021-03-01 16:47:53 +000016491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16492printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016493
Pablo Galindocc128882021-03-01 16:47:53 +000016494else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016495
Pablo Galindocc128882021-03-01 16:47:53 +000016496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16497printf "%s\n" "no" >&6; }
16498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
16499printf %s "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16501/* end confdefs.h. */
16502
16503# include <netdb.h>
16504
16505int
Pablo Galindocc128882021-03-01 16:47:53 +000016506main (void)
Matthias Kloseb159a552010-04-25 21:00:44 +000016507{
16508
16509 char *name;
16510 struct hostent *he;
16511 struct hostent_data data;
16512
16513 (void) gethostbyname_r(name, he, &data);
16514
16515 ;
16516 return 0;
16517}
16518_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016519if ac_fn_c_try_compile "$LINENO"
16520then :
Matthias Kloseb159a552010-04-25 21:00:44 +000016521
Pablo Galindocc128882021-03-01 16:47:53 +000016522 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016523
16524
Pablo Galindocc128882021-03-01 16:47:53 +000016525printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016526
Pablo Galindocc128882021-03-01 16:47:53 +000016527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16528printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016529
Pablo Galindocc128882021-03-01 16:47:53 +000016530else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000016531
Pablo Galindocc128882021-03-01 16:47:53 +000016532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16533printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016534
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016535fi
Pablo Galindocc128882021-03-01 16:47:53 +000016536rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016538fi
Pablo Galindocc128882021-03-01 16:47:53 +000016539rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016541fi
Pablo Galindocc128882021-03-01 16:47:53 +000016542rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016543 CFLAGS=$OLD_CFLAGS
16544
Pablo Galindocc128882021-03-01 16:47:53 +000016545else $as_nop
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016546
Matthias Kloseb9621712010-04-24 17:59:49 +000016547 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Pablo Galindocc128882021-03-01 16:47:53 +000016548if test "x$ac_cv_func_gethostbyname" = xyes
16549then :
16550 printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016552fi
16553
Michael W. Hudson54241132001-12-07 15:38:26 +000016554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016555fi
16556
Michael W. Hudson54241132001-12-07 15:38:26 +000016557
16558
16559
16560
16561
16562
Guido van Rossum627b2d71993-12-24 10:39:16 +000016563# checks for system services
16564# (none yet)
16565
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016566# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000016567ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Pablo Galindocc128882021-03-01 16:47:53 +000016568if test "x$ac_cv_func___fpu_control" = xyes
16569then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016570
Pablo Galindocc128882021-03-01 16:47:53 +000016571else $as_nop
16572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
16573printf %s "checking for __fpu_control in -lieee... " >&6; }
16574if test ${ac_cv_lib_ieee___fpu_control+y}
16575then :
16576 printf %s "(cached) " >&6
16577else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016579LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583/* Override any GCC internal prototype to avoid an error.
16584 Use char because int might match the return type of a GCC
16585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016586char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016587int
Pablo Galindocc128882021-03-01 16:47:53 +000016588main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016589{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016591 ;
16592 return 0;
16593}
16594_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016595if ac_fn_c_try_link "$LINENO"
16596then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016597 ac_cv_lib_ieee___fpu_control=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016598else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016599 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016600fi
Pablo Galindocc128882021-03-01 16:47:53 +000016601rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000016602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016603LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016604fi
Pablo Galindocc128882021-03-01 16:47:53 +000016605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
16606printf "%s\n" "$ac_cv_lib_ieee___fpu_control" >&6; }
16607if test "x$ac_cv_lib_ieee___fpu_control" = xyes
16608then :
16609 printf "%s\n" "#define HAVE_LIBIEEE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016610
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016611 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016612
Guido van Rossum627b2d71993-12-24 10:39:16 +000016613fi
16614
Michael W. Hudson54241132001-12-07 15:38:26 +000016615
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016616fi
16617
Michael W. Hudson54241132001-12-07 15:38:26 +000016618
Guido van Rossum7f43da71994-08-01 12:15:30 +000016619# check for --with-libm=...
16620
Guido van Rossum563e7081996-09-10 18:20:48 +000016621case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016622Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016623*) LIBM=-lm
16624esac
Pablo Galindocc128882021-03-01 16:47:53 +000016625{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
16626printf %s "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628# Check whether --with-libm was given.
Pablo Galindocc128882021-03-01 16:47:53 +000016629if test ${with_libm+y}
16630then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000016632if test "$withval" = no
16633then LIBM=
Pablo Galindocc128882021-03-01 16:47:53 +000016634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
16635printf "%s\n" "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016636elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016637then LIBM=$withval
Pablo Galindocc128882021-03-01 16:47:53 +000016638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
16639printf "%s\n" "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016640else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016641fi
Pablo Galindocc128882021-03-01 16:47:53 +000016642else $as_nop
16643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
16644printf "%s\n" "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645fi
16646
Guido van Rossum7f43da71994-08-01 12:15:30 +000016647
16648# check for --with-libc=...
16649
Pablo Galindocc128882021-03-01 16:47:53 +000016650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
16651printf %s "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653# Check whether --with-libc was given.
Pablo Galindocc128882021-03-01 16:47:53 +000016654if test ${with_libc+y}
16655then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000016657if test "$withval" = no
16658then LIBC=
Pablo Galindocc128882021-03-01 16:47:53 +000016659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
16660printf "%s\n" "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016661elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016662then LIBC=$withval
Pablo Galindocc128882021-03-01 16:47:53 +000016663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
16664printf "%s\n" "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016665else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016666fi
Pablo Galindocc128882021-03-01 16:47:53 +000016667else $as_nop
16668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
16669printf "%s\n" "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670fi
16671
Guido van Rossum7f43da71994-08-01 12:15:30 +000016672
Stefan Krah1919b7e2012-03-21 18:25:23 +010016673# **************************************
16674# * Check for gcc x64 inline assembler *
16675# **************************************
16676
Pablo Galindocc128882021-03-01 16:47:53 +000016677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
16678printf %s "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16680/* end confdefs.h. */
16681
16682int
Pablo Galindocc128882021-03-01 16:47:53 +000016683main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010016684{
16685
16686 __asm__ __volatile__ ("movq %rcx, %rax");
16687
16688 ;
16689 return 0;
16690}
16691_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016692if ac_fn_c_try_link "$LINENO"
16693then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010016694 have_gcc_asm_for_x64=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016695else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010016696 have_gcc_asm_for_x64=no
16697fi
Pablo Galindocc128882021-03-01 16:47:53 +000016698rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016699 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000016700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
16701printf "%s\n" "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016702if test "$have_gcc_asm_for_x64" = yes
16703then
16704
Pablo Galindocc128882021-03-01 16:47:53 +000016705printf "%s\n" "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010016706
16707fi
16708
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016709# **************************************************
16710# * Check for various properties of floating point *
16711# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016712
Pablo Galindocc128882021-03-01 16:47:53 +000016713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
16714printf %s "checking whether float word ordering is bigendian... " >&6; }
16715if test ${ax_cv_c_float_words_bigendian+y}
16716then :
16717 printf %s "(cached) " >&6
16718else $as_nop
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016719
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016720
16721ax_cv_c_float_words_bigendian=unknown
16722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016723/* end confdefs.h. */
16724
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016725
16726double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
16727
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016728
16729_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016730if ac_fn_c_try_compile "$LINENO"
16731then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016732
16733
Arnon Yaari5dd83602020-04-01 18:19:09 +030016734if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016735 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016736fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030016737if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016738 if test "$ax_cv_c_float_words_bigendian" = unknown; then
16739 ax_cv_c_float_words_bigendian=no
16740 else
16741 ax_cv_c_float_words_bigendian=unknown
16742 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016743fi
16744
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016745
16746fi
Pablo Galindocc128882021-03-01 16:47:53 +000016747rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016748fi
Pablo Galindocc128882021-03-01 16:47:53 +000016749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
16750printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016751
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016752case $ax_cv_c_float_words_bigendian in
16753 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016754
Pablo Galindocc128882021-03-01 16:47:53 +000016755printf "%s\n" "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016756 ;;
16757 no)
16758 ;;
16759 *)
16760 as_fn_error $? "
16761
16762Unknown float word ordering. You need to manually preset
16763ax_cv_c_float_words_bigendian=no (or yes) according to your system.
16764
16765 " "$LINENO" 5 ;;
16766esac
16767
16768
16769if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016770then
16771
Pablo Galindocc128882021-03-01 16:47:53 +000016772printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016773
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016774elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016775then
16776
Pablo Galindocc128882021-03-01 16:47:53 +000016777printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016778
16779else
16780 # Some ARM platforms use a mixed-endian representation for doubles.
16781 # While Python doesn't currently have full support for these platforms
16782 # (see e.g., issue 1762561), we can at least make sure that float <-> string
16783 # conversions work.
16784 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
16785 # or little, then it must be this?
16786
Pablo Galindocc128882021-03-01 16:47:53 +000016787printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016788
16789fi
16790
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016791# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000016792# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016793# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000016794# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016795# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000016796# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016797
16798# This inline assembler syntax may also work for suncc and icc,
16799# so we try it on all platforms.
16800
Pablo Galindocc128882021-03-01 16:47:53 +000016801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
16802printf %s "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016804/* end confdefs.h. */
16805
16806int
Pablo Galindocc128882021-03-01 16:47:53 +000016807main (void)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016808{
16809
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016810 unsigned short cw;
16811 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
16812 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016813
16814 ;
16815 return 0;
16816}
16817_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016818if ac_fn_c_try_link "$LINENO"
16819then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016820 have_gcc_asm_for_x87=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016821else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016822 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016823fi
Pablo Galindocc128882021-03-01 16:47:53 +000016824rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016825 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000016826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
16827printf "%s\n" "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016828if test "$have_gcc_asm_for_x87" = yes
16829then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016830
Pablo Galindocc128882021-03-01 16:47:53 +000016831printf "%s\n" "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016832
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016834
Pablo Galindocc128882021-03-01 16:47:53 +000016835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
16836printf %s "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16838/* end confdefs.h. */
16839
16840int
Pablo Galindocc128882021-03-01 16:47:53 +000016841main (void)
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016842{
16843
16844 unsigned int fpcr;
16845 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
16846 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
16847
16848 ;
16849 return 0;
16850}
16851_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016852if ac_fn_c_try_link "$LINENO"
16853then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016854 have_gcc_asm_for_mc68881=yes
Pablo Galindocc128882021-03-01 16:47:53 +000016855else $as_nop
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016856 have_gcc_asm_for_mc68881=no
16857fi
Pablo Galindocc128882021-03-01 16:47:53 +000016858rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016859 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000016860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
16861printf "%s\n" "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016862if test "$have_gcc_asm_for_mc68881" = yes
16863then
16864
Pablo Galindocc128882021-03-01 16:47:53 +000016865printf "%s\n" "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016866
16867fi
16868
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016869# Detect whether system arithmetic is subject to x87-style double
16870# rounding issues. The result of this test has little meaning on non
16871# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
16872# mode is round-to-nearest and double rounding issues are present, and
16873# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Pablo Galindocc128882021-03-01 16:47:53 +000016874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
16875printf %s "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016876# $BASECFLAGS may affect the result
16877ac_save_cc="$CC"
16878CC="$CC $BASECFLAGS"
Pablo Galindocc128882021-03-01 16:47:53 +000016879if test "$cross_compiling" = yes
16880then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016881 ac_cv_x87_double_rounding=no
Pablo Galindocc128882021-03-01 16:47:53 +000016882else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016884/* end confdefs.h. */
16885
16886#include <stdlib.h>
16887#include <math.h>
16888int main() {
16889 volatile double x, y, z;
16890 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
16891 x = 0.99999999999999989; /* 1-2**-53 */
16892 y = 1./x;
16893 if (y != 1.)
16894 exit(0);
16895 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
16896 x = 1e16;
16897 y = 2.99999;
16898 z = x + y;
16899 if (z != 1e16+4.)
16900 exit(0);
16901 /* both tests show evidence of double rounding */
16902 exit(1);
16903}
16904
16905_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000016906if ac_fn_c_try_run "$LINENO"
16907then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016908 ac_cv_x87_double_rounding=no
Pablo Galindocc128882021-03-01 16:47:53 +000016909else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016910 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016914fi
16915
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016916CC="$ac_save_cc"
Pablo Galindocc128882021-03-01 16:47:53 +000016917{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
16918printf "%s\n" "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016919if test "$ac_cv_x87_double_rounding" = yes
16920then
16921
Pablo Galindocc128882021-03-01 16:47:53 +000016922printf "%s\n" "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016923
16924fi
16925
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016926# ************************************
16927# * Check for mathematical functions *
16928# ************************************
16929
16930LIBS_SAVE=$LIBS
16931LIBS="$LIBS $LIBM"
16932
Pablo Galindocc128882021-03-01 16:47:53 +000016933ac_fn_c_check_func "$LINENO" "acosh" "ac_cv_func_acosh"
16934if test "x$ac_cv_func_acosh" = xyes
16935then :
16936 printf "%s\n" "#define HAVE_ACOSH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016937
16938fi
Pablo Galindocc128882021-03-01 16:47:53 +000016939ac_fn_c_check_func "$LINENO" "asinh" "ac_cv_func_asinh"
16940if test "x$ac_cv_func_asinh" = xyes
16941then :
16942 printf "%s\n" "#define HAVE_ASINH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016943
16944fi
Pablo Galindocc128882021-03-01 16:47:53 +000016945ac_fn_c_check_func "$LINENO" "atanh" "ac_cv_func_atanh"
16946if test "x$ac_cv_func_atanh" = xyes
16947then :
16948 printf "%s\n" "#define HAVE_ATANH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016949
Pablo Galindocc128882021-03-01 16:47:53 +000016950fi
16951ac_fn_c_check_func "$LINENO" "copysign" "ac_cv_func_copysign"
16952if test "x$ac_cv_func_copysign" = xyes
16953then :
16954 printf "%s\n" "#define HAVE_COPYSIGN 1" >>confdefs.h
16955
16956fi
16957ac_fn_c_check_func "$LINENO" "erf" "ac_cv_func_erf"
16958if test "x$ac_cv_func_erf" = xyes
16959then :
16960 printf "%s\n" "#define HAVE_ERF 1" >>confdefs.h
16961
16962fi
16963ac_fn_c_check_func "$LINENO" "erfc" "ac_cv_func_erfc"
16964if test "x$ac_cv_func_erfc" = xyes
16965then :
16966 printf "%s\n" "#define HAVE_ERFC 1" >>confdefs.h
16967
16968fi
16969ac_fn_c_check_func "$LINENO" "expm1" "ac_cv_func_expm1"
16970if test "x$ac_cv_func_expm1" = xyes
16971then :
16972 printf "%s\n" "#define HAVE_EXPM1 1" >>confdefs.h
16973
16974fi
16975ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
16976if test "x$ac_cv_func_finite" = xyes
16977then :
16978 printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h
16979
16980fi
16981ac_fn_c_check_func "$LINENO" "gamma" "ac_cv_func_gamma"
16982if test "x$ac_cv_func_gamma" = xyes
16983then :
16984 printf "%s\n" "#define HAVE_GAMMA 1" >>confdefs.h
16985
16986fi
16987
16988ac_fn_c_check_func "$LINENO" "hypot" "ac_cv_func_hypot"
16989if test "x$ac_cv_func_hypot" = xyes
16990then :
16991 printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h
16992
16993fi
16994ac_fn_c_check_func "$LINENO" "lgamma" "ac_cv_func_lgamma"
16995if test "x$ac_cv_func_lgamma" = xyes
16996then :
16997 printf "%s\n" "#define HAVE_LGAMMA 1" >>confdefs.h
16998
16999fi
17000ac_fn_c_check_func "$LINENO" "log1p" "ac_cv_func_log1p"
17001if test "x$ac_cv_func_log1p" = xyes
17002then :
17003 printf "%s\n" "#define HAVE_LOG1P 1" >>confdefs.h
17004
17005fi
17006ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2"
17007if test "x$ac_cv_func_log2" = xyes
17008then :
17009 printf "%s\n" "#define HAVE_LOG2 1" >>confdefs.h
17010
17011fi
17012ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round"
17013if test "x$ac_cv_func_round" = xyes
17014then :
17015 printf "%s\n" "#define HAVE_ROUND 1" >>confdefs.h
17016
17017fi
17018ac_fn_c_check_func "$LINENO" "tgamma" "ac_cv_func_tgamma"
17019if test "x$ac_cv_func_tgamma" = xyes
17020then :
17021 printf "%s\n" "#define HAVE_TGAMMA 1" >>confdefs.h
17022
17023fi
17024
17025ac_fn_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
17026" "$ac_c_undeclared_builtin_options" "CFLAGS"
17027if test "x$ac_cv_have_decl_isinf" = xyes
17028then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017029 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017030else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017031 ac_have_decl=0
17032fi
Pablo Galindocc128882021-03-01 16:47:53 +000017033printf "%s\n" "#define HAVE_DECL_ISINF $ac_have_decl" >>confdefs.h
17034ac_fn_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
17035" "$ac_c_undeclared_builtin_options" "CFLAGS"
17036if test "x$ac_cv_have_decl_isnan" = xyes
17037then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017038 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017039else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017040 ac_have_decl=0
17041fi
Pablo Galindocc128882021-03-01 16:47:53 +000017042printf "%s\n" "#define HAVE_DECL_ISNAN $ac_have_decl" >>confdefs.h
17043ac_fn_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
17044" "$ac_c_undeclared_builtin_options" "CFLAGS"
17045if test "x$ac_cv_have_decl_isfinite" = xyes
17046then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017047 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017048else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017049 ac_have_decl=0
17050fi
Pablo Galindocc128882021-03-01 16:47:53 +000017051printf "%s\n" "#define HAVE_DECL_ISFINITE $ac_have_decl" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000017052
17053
Mark Dickinsona614f042009-11-28 12:48:43 +000017054# For multiprocessing module, check that sem_open
17055# actually works. For FreeBSD versions <= 7.2,
17056# the kernel module that provides POSIX semaphores
17057# isn't loaded by default, so an attempt to call
17058# sem_open results in a 'Signal 12' error.
Pablo Galindocc128882021-03-01 16:47:53 +000017059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
17060printf %s "checking whether POSIX semaphores are enabled... " >&6; }
17061if test ${ac_cv_posix_semaphores_enabled+y}
17062then :
17063 printf %s "(cached) " >&6
17064else $as_nop
17065 if test "$cross_compiling" = yes
17066then :
Mark Dickinsona614f042009-11-28 12:48:43 +000017067 ac_cv_posix_semaphores_enabled=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017068else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000017070/* end confdefs.h. */
17071
17072#include <unistd.h>
17073#include <fcntl.h>
17074#include <stdio.h>
17075#include <semaphore.h>
17076#include <sys/stat.h>
17077
17078int main(void) {
17079 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
17080 if (a == SEM_FAILED) {
17081 perror("sem_open");
17082 return 1;
17083 }
17084 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017085 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000017086 return 0;
17087}
17088
17089_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017090if ac_fn_c_try_run "$LINENO"
17091then :
Mark Dickinsona614f042009-11-28 12:48:43 +000017092 ac_cv_posix_semaphores_enabled=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017093else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017094 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000017095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000017098fi
17099
17100
Mark Dickinsona614f042009-11-28 12:48:43 +000017101fi
17102
Pablo Galindocc128882021-03-01 16:47:53 +000017103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
17104printf "%s\n" "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000017105if test $ac_cv_posix_semaphores_enabled = no
17106then
17107
Pablo Galindocc128882021-03-01 16:47:53 +000017108printf "%s\n" "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000017109
17110fi
17111
Mark Dickinson10683072009-04-18 21:18:19 +000017112# Multiprocessing check for broken sem_getvalue
Pablo Galindocc128882021-03-01 16:47:53 +000017113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
17114printf %s "checking for broken sem_getvalue... " >&6; }
17115if test ${ac_cv_broken_sem_getvalue+y}
17116then :
17117 printf %s "(cached) " >&6
17118else $as_nop
17119 if test "$cross_compiling" = yes
17120then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017121 ac_cv_broken_sem_getvalue=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017122else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000017124/* end confdefs.h. */
17125
17126#include <unistd.h>
17127#include <fcntl.h>
17128#include <stdio.h>
17129#include <semaphore.h>
17130#include <sys/stat.h>
17131
17132int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000017133 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000017134 int count;
17135 int res;
17136 if(a==SEM_FAILED){
17137 perror("sem_open");
17138 return 1;
17139
17140 }
17141 res = sem_getvalue(a, &count);
17142 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017143 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000017144 return res==-1 ? 1 : 0;
17145}
17146
Mark Dickinson10683072009-04-18 21:18:19 +000017147_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017148if ac_fn_c_try_run "$LINENO"
17149then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017150 ac_cv_broken_sem_getvalue=no
Pablo Galindocc128882021-03-01 16:47:53 +000017151else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017152 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017156fi
17157
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017159fi
17160
Pablo Galindocc128882021-03-01 16:47:53 +000017161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
17162printf "%s\n" "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017163if test $ac_cv_broken_sem_getvalue = yes
17164then
17165
Pablo Galindocc128882021-03-01 16:47:53 +000017166printf "%s\n" "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017167
17168fi
17169
Pablo Galindocc128882021-03-01 16:47:53 +000017170ac_fn_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
17171" "$ac_c_undeclared_builtin_options" "CFLAGS"
17172if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes
17173then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017174 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017175else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017176 ac_have_decl=0
17177fi
Pablo Galindocc128882021-03-01 16:47:53 +000017178printf "%s\n" "#define HAVE_DECL_RTLD_LAZY $ac_have_decl" >>confdefs.h
17179ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
17180" "$ac_c_undeclared_builtin_options" "CFLAGS"
17181if test "x$ac_cv_have_decl_RTLD_NOW" = xyes
17182then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017183 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017184else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017185 ac_have_decl=0
17186fi
Pablo Galindocc128882021-03-01 16:47:53 +000017187printf "%s\n" "#define HAVE_DECL_RTLD_NOW $ac_have_decl" >>confdefs.h
17188ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
17189" "$ac_c_undeclared_builtin_options" "CFLAGS"
17190if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes
17191then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017192 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017193else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017194 ac_have_decl=0
17195fi
Pablo Galindocc128882021-03-01 16:47:53 +000017196printf "%s\n" "#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl" >>confdefs.h
17197ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
17198" "$ac_c_undeclared_builtin_options" "CFLAGS"
17199if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes
17200then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017201 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017202else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017203 ac_have_decl=0
17204fi
Pablo Galindocc128882021-03-01 16:47:53 +000017205printf "%s\n" "#define HAVE_DECL_RTLD_LOCAL $ac_have_decl" >>confdefs.h
17206ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
17207" "$ac_c_undeclared_builtin_options" "CFLAGS"
17208if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes
17209then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017210 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017211else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017212 ac_have_decl=0
17213fi
Pablo Galindocc128882021-03-01 16:47:53 +000017214printf "%s\n" "#define HAVE_DECL_RTLD_NODELETE $ac_have_decl" >>confdefs.h
17215ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
17216" "$ac_c_undeclared_builtin_options" "CFLAGS"
17217if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes
17218then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017219 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017220else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017221 ac_have_decl=0
17222fi
Pablo Galindocc128882021-03-01 16:47:53 +000017223printf "%s\n" "#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl" >>confdefs.h
17224ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
17225" "$ac_c_undeclared_builtin_options" "CFLAGS"
17226if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes
17227then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017228 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017229else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017230 ac_have_decl=0
17231fi
Pablo Galindocc128882021-03-01 16:47:53 +000017232printf "%s\n" "#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl" >>confdefs.h
17233ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
17234" "$ac_c_undeclared_builtin_options" "CFLAGS"
17235if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes
17236then :
Michael Feltc5ae1692017-12-19 13:58:49 +010017237 ac_have_decl=1
Pablo Galindocc128882021-03-01 16:47:53 +000017238else $as_nop
Michael Feltc5ae1692017-12-19 13:58:49 +010017239 ac_have_decl=0
17240fi
Pablo Galindocc128882021-03-01 16:47:53 +000017241printf "%s\n" "#define HAVE_DECL_RTLD_MEMBER $ac_have_decl" >>confdefs.h
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017242
17243
Mark Dickinsonbd792642009-03-18 20:06:12 +000017244# determine what size digit to use for Python's longs
Pablo Galindocc128882021-03-01 16:47:53 +000017245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
17246printf %s "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017247# Check whether --enable-big-digits was given.
Pablo Galindocc128882021-03-01 16:47:53 +000017248if test ${enable_big_digits+y}
17249then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000017250 enableval=$enable_big_digits; case $enable_big_digits in
17251yes)
17252 enable_big_digits=30 ;;
17253no)
17254 enable_big_digits=15 ;;
1725515|30)
17256 ;;
17257*)
Victor Stinnere0be4232011-10-25 13:06:09 +020017258 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 +000017259esac
Pablo Galindocc128882021-03-01 16:47:53 +000017260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
17261printf "%s\n" "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017262
Pablo Galindocc128882021-03-01 16:47:53 +000017263printf "%s\n" "#define PYLONG_BITS_IN_DIGIT $enable_big_digits" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +000017264
17265
Pablo Galindocc128882021-03-01 16:47:53 +000017266else $as_nop
17267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
17268printf "%s\n" "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017269fi
17270
17271
Guido van Rossumef2255b2000-03-10 22:30:29 +000017272# check for wchar.h
Pablo Galindocc128882021-03-01 16:47:53 +000017273ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
17274if test "x$ac_cv_header_wchar_h" = xyes
17275then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017276
17277
Pablo Galindocc128882021-03-01 16:47:53 +000017278printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017279
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017280 wchar_h="yes"
17281
Pablo Galindocc128882021-03-01 16:47:53 +000017282else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017284
17285fi
17286
Michael W. Hudson54241132001-12-07 15:38:26 +000017287
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017288# determine wchar_t size
17289if test "$wchar_h" = yes
17290then
Matthias Kloseb9621712010-04-24 17:59:49 +000017291 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17293# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17294# This bug is HP SR number 8606223364.
Pablo Galindocc128882021-03-01 16:47:53 +000017295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
17296printf %s "checking size of wchar_t... " >&6; }
17297if test ${ac_cv_sizeof_wchar_t+y}
17298then :
17299 printf %s "(cached) " >&6
17300else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017301 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
Pablo Galindocc128882021-03-01 16:47:53 +000017302"
17303then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017304
Pablo Galindocc128882021-03-01 16:47:53 +000017305else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017306 if test "$ac_cv_type_wchar_t" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000017307 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17308printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017309as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020017310See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311 else
17312 ac_cv_sizeof_wchar_t=0
17313 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017315
Martin v. Löwis11437992002-04-12 09:54:03 +000017316fi
Pablo Galindocc128882021-03-01 16:47:53 +000017317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
17318printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319
17320
17321
Pablo Galindocc128882021-03-01 16:47:53 +000017322printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017323
Michael W. Hudson54241132001-12-07 15:38:26 +000017324
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017325fi
17326
Pablo Galindocc128882021-03-01 16:47:53 +000017327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
17328printf %s "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017329have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000017330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017331/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017332
17333#include <tcl.h>
17334#if TCL_UTF_MAX != 6
17335# error "NOT UCS4_TCL"
17336#endif
17337int
Pablo Galindocc128882021-03-01 16:47:53 +000017338main (void)
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017339{
17340
17341 ;
17342 return 0;
17343}
17344_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017345if ac_fn_c_try_compile "$LINENO"
17346then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017347
17348
Pablo Galindocc128882021-03-01 16:47:53 +000017349printf "%s\n" "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017350
17351 have_ucs4_tcl=yes
17352
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017353fi
Pablo Galindocc128882021-03-01 16:47:53 +000017354rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
17356printf "%s\n" "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017357
Skip Montanaro6dead952003-09-25 14:50:04 +000017358# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017359if test "$wchar_h" = yes
17360then
17361 # check whether wchar_t is signed or not
Pablo Galindocc128882021-03-01 16:47:53 +000017362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
17363printf %s "checking whether wchar_t is signed... " >&6; }
17364 if test ${ac_cv_wchar_t_signed+y}
17365then :
17366 printf %s "(cached) " >&6
17367else $as_nop
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017368
Pablo Galindocc128882021-03-01 16:47:53 +000017369 if test "$cross_compiling" = yes
17370then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017371 ac_cv_wchar_t_signed=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017372else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017374/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017375
17376 #include <wchar.h>
17377 int main()
17378 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017379 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110017380 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017381 }
17382
17383_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017384if ac_fn_c_try_run "$LINENO"
17385then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017386 ac_cv_wchar_t_signed=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017387else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017388 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017392fi
17393
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017394fi
17395
Pablo Galindocc128882021-03-01 16:47:53 +000017396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
17397printf "%s\n" "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398fi
17399
Pablo Galindocc128882021-03-01 16:47:53 +000017400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
17401printf %s "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017402# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020017403if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000017404 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000017405then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017406
Pablo Galindocc128882021-03-01 16:47:53 +000017407printf "%s\n" "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017408
Pablo Galindocc128882021-03-01 16:47:53 +000017409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17410printf "%s\n" "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017411else
Pablo Galindocc128882021-03-01 16:47:53 +000017412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17413printf "%s\n" "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017414fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017415
17416# check for endianness
Pablo Galindocc128882021-03-01 16:47:53 +000017417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17418printf %s "checking whether byte ordering is bigendian... " >&6; }
17419if test ${ac_cv_c_bigendian+y}
17420then :
17421 printf %s "(cached) " >&6
17422else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 ac_cv_c_bigendian=unknown
17424 # See if we're dealing with a universal compiler.
17425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17426/* end confdefs.h. */
17427#ifndef __APPLE_CC__
17428 not a universal capable compiler
17429 #endif
17430 typedef int dummy;
17431
Skip Montanaro6dead952003-09-25 14:50:04 +000017432_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017433if ac_fn_c_try_compile "$LINENO"
17434then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017435
17436 # Check for potential -arch flags. It is not universal unless
17437 # there are at least two -arch flags with different values.
17438 ac_arch=
17439 ac_prev=
17440 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17441 if test -n "$ac_prev"; then
17442 case $ac_word in
17443 i?86 | x86_64 | ppc | ppc64)
17444 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17445 ac_arch=$ac_word
17446 else
17447 ac_cv_c_bigendian=universal
17448 break
17449 fi
17450 ;;
17451 esac
17452 ac_prev=
17453 elif test "x$ac_word" = "x-arch"; then
17454 ac_prev=arch
17455 fi
17456 done
17457fi
Pablo Galindocc128882021-03-01 16:47:53 +000017458rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 if test $ac_cv_c_bigendian = unknown; then
17460 # See if sys/param.h defines the BYTE_ORDER macro.
17461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017462/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017463#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017464 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017465
Martin v. Löwis11437992002-04-12 09:54:03 +000017466int
Pablo Galindocc128882021-03-01 16:47:53 +000017467main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017468{
Matthias Kloseb9621712010-04-24 17:59:49 +000017469#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17470 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17471 && LITTLE_ENDIAN)
17472 bogus endian macros
17473 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017474
17475 ;
17476 return 0;
17477}
17478_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017479if ac_fn_c_try_compile "$LINENO"
17480then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017481 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017483/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017484#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017486
Martin v. Löwis11437992002-04-12 09:54:03 +000017487int
Pablo Galindocc128882021-03-01 16:47:53 +000017488main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017489{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017490#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000017491 not big endian
17492 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017493
17494 ;
17495 return 0;
17496}
17497_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017498if ac_fn_c_try_compile "$LINENO"
17499then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017500 ac_cv_c_bigendian=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017501else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017502 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017503fi
Pablo Galindocc128882021-03-01 16:47:53 +000017504rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017505fi
Pablo Galindocc128882021-03-01 16:47:53 +000017506rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017507 fi
17508 if test $ac_cv_c_bigendian = unknown; then
17509 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017511/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017512#include <limits.h>
17513
Martin v. Löwis11437992002-04-12 09:54:03 +000017514int
Pablo Galindocc128882021-03-01 16:47:53 +000017515main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017516{
Matthias Kloseb9621712010-04-24 17:59:49 +000017517#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17518 bogus endian macros
17519 #endif
17520
Martin v. Löwis11437992002-04-12 09:54:03 +000017521 ;
17522 return 0;
17523}
17524_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017525if ac_fn_c_try_compile "$LINENO"
17526then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017527 # It does; now see whether it defined to _BIG_ENDIAN or not.
17528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17529/* end confdefs.h. */
17530#include <limits.h>
17531
17532int
Pablo Galindocc128882021-03-01 16:47:53 +000017533main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017534{
17535#ifndef _BIG_ENDIAN
17536 not big endian
17537 #endif
17538
17539 ;
17540 return 0;
17541}
17542_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017543if ac_fn_c_try_compile "$LINENO"
17544then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 ac_cv_c_bigendian=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017546else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017547 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017548fi
Pablo Galindocc128882021-03-01 16:47:53 +000017549rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017550fi
Pablo Galindocc128882021-03-01 16:47:53 +000017551rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017552 fi
17553 if test $ac_cv_c_bigendian = unknown; then
17554 # Compile a test program.
Pablo Galindocc128882021-03-01 16:47:53 +000017555 if test "$cross_compiling" = yes
17556then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017557 # Try to guess by grepping values from an object file.
17558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17559/* end confdefs.h. */
Pablo Galindocc128882021-03-01 16:47:53 +000017560unsigned short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Pablo Galindocc128882021-03-01 16:47:53 +000017562 unsigned short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017563 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17564 int use_ascii (int i) {
17565 return ascii_mm[i] + ascii_ii[i];
17566 }
Pablo Galindocc128882021-03-01 16:47:53 +000017567 unsigned short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Pablo Galindocc128882021-03-01 16:47:53 +000017569 unsigned short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017570 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17571 int use_ebcdic (int i) {
17572 return ebcdic_mm[i] + ebcdic_ii[i];
17573 }
17574 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575
Matthias Kloseb9621712010-04-24 17:59:49 +000017576int
Pablo Galindocc128882021-03-01 16:47:53 +000017577main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017578{
17579return use_ascii (foo) == use_ebcdic (foo);
17580 ;
17581 return 0;
17582}
17583_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017584if ac_fn_c_try_compile "$LINENO"
17585then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017586 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17587 ac_cv_c_bigendian=yes
17588 fi
17589 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17590 if test "$ac_cv_c_bigendian" = unknown; then
17591 ac_cv_c_bigendian=no
17592 else
17593 # finding both strings is unlikely to happen, but who knows?
17594 ac_cv_c_bigendian=unknown
17595 fi
17596 fi
17597fi
Pablo Galindocc128882021-03-01 16:47:53 +000017598rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17599else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017601/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017603int
Pablo Galindocc128882021-03-01 16:47:53 +000017604main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 /* Are we little or big endian? From Harbison&Steele. */
17608 union
17609 {
17610 long int l;
17611 char c[sizeof (long int)];
17612 } u;
17613 u.l = 1;
17614 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615
17616 ;
17617 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017618}
Martin v. Löwis11437992002-04-12 09:54:03 +000017619_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017620if ac_fn_c_try_run "$LINENO"
17621then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017622 ac_cv_c_bigendian=no
Pablo Galindocc128882021-03-01 16:47:53 +000017623else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017624 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17627 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017631fi
Pablo Galindocc128882021-03-01 16:47:53 +000017632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17633printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000017634 case $ac_cv_c_bigendian in #(
17635 yes)
Pablo Galindocc128882021-03-01 16:47:53 +000017636 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000017637;; #(
17638 no)
17639 ;; #(
17640 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017641
Pablo Galindocc128882021-03-01 16:47:53 +000017642printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017643
Matthias Kloseb9621712010-04-24 17:59:49 +000017644 ;; #(
17645 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017646 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020017647 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017648 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017649
Michael W. Hudson54241132001-12-07 15:38:26 +000017650
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017651# ABI version string for Python extension modules. This appears between the
17652# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
17653# from the following attributes which affect the ABI of this Python build (in
17654# this order):
17655#
17656# * The Python implementation (always 'cpython-' for us)
17657# * The major and minor version numbers
17658# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017659#
17660# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000017661# would get a shared library ABI version tag of 'cpython-32dmu' and shared
17662# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020017663#
17664# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
17665# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017666
Pablo Galindocc128882021-03-01 16:47:53 +000017667{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
17668printf %s "checking ABIFLAGS... " >&6; }
17669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
17670printf "%s\n" "$ABIFLAGS" >&6; }
17671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
17672printf %s "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020017673SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Pablo Galindocc128882021-03-01 16:47:53 +000017674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
17675printf "%s\n" "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017676
Victor Stinner6d13e5b2019-04-26 18:56:19 +020017677# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
17678if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020017679 # Similar to SOABI but remove "d" flag from ABIFLAGS
17680
17681 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
17682
Pablo Galindocc128882021-03-01 16:47:53 +000017683printf "%s\n" "#define ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h
Victor Stinner5422e3c2019-04-26 01:40:00 +020017684
17685fi
17686
Victor Stinner52a327c2020-12-23 03:41:08 +010017687
Matti Picusa44ce6c2020-12-20 04:56:57 +020017688EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070017689
Pablo Galindocc128882021-03-01 16:47:53 +000017690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
17691printf %s "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017692LDVERSION='$(VERSION)$(ABIFLAGS)'
Pablo Galindocc128882021-03-01 16:47:53 +000017693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
17694printf "%s\n" "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017695
E. M. Brayc994c8f2019-05-24 17:33:47 +020017696# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020017697
E. M. Brayb1fc4172019-05-24 18:39:39 +020017698if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020017699 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020017700else
17701 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020017702fi
17703
doko@python.org87421192013-01-26 11:39:31 +010017704
Victor Stinner51ae31e2020-06-09 15:32:43 +020017705
17706BINLIBDEST='$(LIBDIR)/python$(VERSION)'
17707
17708
17709# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010017710# /usr/$LIDIRNAME/python$VERSION
17711
17712PLATLIBDIR="lib"
Pablo Galindocc128882021-03-01 16:47:53 +000017713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
17714printf %s "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017715
17716# Check whether --with-platlibdir was given.
Pablo Galindocc128882021-03-01 16:47:53 +000017717if test ${with_platlibdir+y}
17718then :
Victor Stinner8510f432020-03-10 09:53:09 +010017719 withval=$with_platlibdir;
17720# ignore 3 options:
17721# --with-platlibdir
17722# --with-platlibdir=
17723# --without-platlibdir
17724if test -n "$withval" -a "$withval" != yes -a "$withval" != no
17725then
Pablo Galindocc128882021-03-01 16:47:53 +000017726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17727printf "%s\n" "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017728 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020017729 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020017730else
Pablo Galindocc128882021-03-01 16:47:53 +000017731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17732printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017733fi
Pablo Galindocc128882021-03-01 16:47:53 +000017734else $as_nop
17735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17736printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017737fi
17738
17739
17740
17741
17742if test x$PLATFORM_TRIPLET = x; then
17743 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
17744else
17745 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020017746fi
doko@python.org87421192013-01-26 11:39:31 +010017747
17748
Victor Stinner75e59a92021-01-20 17:07:21 +010017749# Check for --with-wheel-pkg-dir=PATH
17750
17751WHEEL_PKG_DIR=""
Pablo Galindocc128882021-03-01 16:47:53 +000017752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
17753printf %s "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017754
17755# Check whether --with-wheel-pkg-dir was given.
Pablo Galindocc128882021-03-01 16:47:53 +000017756if test ${with_wheel_pkg_dir+y}
17757then :
Victor Stinner75e59a92021-01-20 17:07:21 +010017758 withval=$with_wheel_pkg_dir;
17759if test -n "$withval"; then
Pablo Galindocc128882021-03-01 16:47:53 +000017760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17761printf "%s\n" "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017762 WHEEL_PKG_DIR="$withval"
17763else
Pablo Galindocc128882021-03-01 16:47:53 +000017764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17765printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017766fi
Pablo Galindocc128882021-03-01 16:47:53 +000017767else $as_nop
17768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17769printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017770fi
17771
17772
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017773# Check whether right shifting a negative integer extends the sign bit
17774# or fills with zeros (like the Cray J90, according to Tim Peters).
Pablo Galindocc128882021-03-01 16:47:53 +000017775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
17776printf %s "checking whether right shift extends the sign bit... " >&6; }
17777if test ${ac_cv_rshift_extends_sign+y}
17778then :
17779 printf %s "(cached) " >&6
17780else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017781
Pablo Galindocc128882021-03-01 16:47:53 +000017782if test "$cross_compiling" = yes
17783then :
Guido van Rossum3065c942001-09-17 04:03:14 +000017784 ac_cv_rshift_extends_sign=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017785else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017787/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017788
17789int main()
17790{
Joshua Root674fa0a2020-12-14 07:56:34 +110017791 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017792}
17793
Martin v. Löwis11437992002-04-12 09:54:03 +000017794_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017795if ac_fn_c_try_run "$LINENO"
17796then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000017797 ac_cv_rshift_extends_sign=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017798else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017799 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000017803fi
17804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805fi
17806
Pablo Galindocc128882021-03-01 16:47:53 +000017807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
17808printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000017809if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017810then
Martin v. Löwis11437992002-04-12 09:54:03 +000017811
Pablo Galindocc128882021-03-01 16:47:53 +000017812printf "%s\n" "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017813
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017814fi
17815
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017816# check for getc_unlocked and related locking functions
Pablo Galindocc128882021-03-01 16:47:53 +000017817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
17818printf %s "checking for getc_unlocked() and friends... " >&6; }
17819if test ${ac_cv_have_getc_unlocked+y}
17820then :
17821 printf %s "(cached) " >&6
17822else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017823
Matthias Kloseb9621712010-04-24 17:59:49 +000017824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017825/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017826#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017827int
Pablo Galindocc128882021-03-01 16:47:53 +000017828main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017829{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017830
17831 FILE *f = fopen("/dev/null", "r");
17832 flockfile(f);
17833 getc_unlocked(f);
17834 funlockfile(f);
17835
Martin v. Löwis11437992002-04-12 09:54:03 +000017836 ;
17837 return 0;
17838}
17839_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017840if ac_fn_c_try_link "$LINENO"
17841then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017842 ac_cv_have_getc_unlocked=yes
Pablo Galindocc128882021-03-01 16:47:53 +000017843else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017844 ac_cv_have_getc_unlocked=no
17845fi
Pablo Galindocc128882021-03-01 16:47:53 +000017846rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017847 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849
Pablo Galindocc128882021-03-01 16:47:53 +000017850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
17851printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017852if test "$ac_cv_have_getc_unlocked" = yes
17853then
Martin v. Löwis11437992002-04-12 09:54:03 +000017854
Pablo Galindocc128882021-03-01 16:47:53 +000017855printf "%s\n" "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017856
17857fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017858
Roland Hiebere1f77692021-02-09 02:05:25 +010017859
17860# Check whether --with-readline was given.
Pablo Galindocc128882021-03-01 16:47:53 +000017861if test ${with_readline+y}
17862then :
Roland Hiebere1f77692021-02-09 02:05:25 +010017863 withval=$with_readline;
Pablo Galindocc128882021-03-01 16:47:53 +000017864else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010017865 with_readline=yes
17866fi
17867
17868
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017869# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010017870py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000017871# save the value of LIBS so we don't actually link Python with readline
17872LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017873
Roland Hiebere1f77692021-02-09 02:05:25 +010017874if test "$with_readline" != no; then
17875 case "$with_readline" in
17876 editline|edit)
17877 LIBREADLINE=edit
17878
Pablo Galindocc128882021-03-01 16:47:53 +000017879printf "%s\n" "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010017880
17881 ;;
17882 yes|readline)
17883 LIBREADLINE=readline
17884 ;;
17885 *)
17886 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
17887 ;;
17888 esac
17889
17890 # On some systems we need to link readline to a termcap compatible
17891 # library. NOTE: Keep the precedence of listed libraries synchronised
17892 # with setup.py.
Pablo Galindocc128882021-03-01 16:47:53 +000017893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
17894printf %s "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010017895 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
17896 if test -z "$py_libtermcap"; then
17897 READLINE_LIBS="-l$LIBREADLINE"
17898 else
17899 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
17900 fi
17901 LIBS="$READLINE_LIBS $LIBS_no_readline"
17902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017903/* end confdefs.h. */
17904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905/* Override any GCC internal prototype to avoid an error.
17906 Use char because int might match the return type of a GCC
17907 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017908char readline ();
17909int
Pablo Galindocc128882021-03-01 16:47:53 +000017910main (void)
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017913 ;
17914 return 0;
17915}
17916_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000017917if ac_fn_c_try_link "$LINENO"
17918then :
Gregory P. Smith18820942008-09-07 06:24:49 +000017919 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017920fi
Pablo Galindocc128882021-03-01 16:47:53 +000017921rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017922 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010017923 if test $py_cv_lib_readline = yes; then
17924 break
17925 fi
17926 done
17927
17928 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
17929 #AC_SUBST([READLINE_LIBS])
17930 if test $py_cv_lib_readline = no; then
Pablo Galindocc128882021-03-01 16:47:53 +000017931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
17932printf "%s\n" "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010017933 else
Pablo Galindocc128882021-03-01 16:47:53 +000017934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
17935printf "%s\n" "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000017936
Pablo Galindocc128882021-03-01 16:47:53 +000017937printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017938
Roland Hiebere1f77692021-02-09 02:05:25 +010017939 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017940fi
17941
Roland Hiebere1f77692021-02-09 02:05:25 +010017942if test "$py_cv_lib_readline" = yes; then
17943 # check for readline 2.2
Pablo Galindocc128882021-03-01 16:47:53 +000017944 ac_fn_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
Roland Hiebere1f77692021-02-09 02:05:25 +010017945#include <stdio.h> /* Must be first for Gnu Readline */
17946#ifdef WITH_EDITLINE
17947# include <editline/readline.h>
17948#else
17949# include <readline/readline.h>
17950#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000017951
Pablo Galindocc128882021-03-01 16:47:53 +000017952" "$ac_c_undeclared_builtin_options" "CFLAGS"
17953if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes
17954then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017955
Pablo Galindocc128882021-03-01 16:47:53 +000017956printf "%s\n" "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017957
17958fi
Pablo Galindocc128882021-03-01 16:47:53 +000017959 ac_fn_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
Roland Hiebere1f77692021-02-09 02:05:25 +010017960#include <stdio.h> /* Must be first for Gnu Readline */
17961#ifdef WITH_EDITLINE
17962# include <editline/readline.h>
17963#else
17964# include <readline/readline.h>
17965#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000017966
Pablo Galindocc128882021-03-01 16:47:53 +000017967" "$ac_c_undeclared_builtin_options" "CFLAGS"
17968if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes
17969then :
Antoine Pitroud5131772009-10-26 19:22:14 +000017970
Pablo Galindocc128882021-03-01 16:47:53 +000017971printf "%s\n" "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000017972
17973fi
Antoine Pitroud5131772009-10-26 19:22:14 +000017974
Roland Hiebere1f77692021-02-09 02:05:25 +010017975 # check for readline 4.0
Pablo Galindocc128882021-03-01 16:47:53 +000017976 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_pre_input_hook" | $as_tr_sh`
17977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
17978printf %s "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
17979if eval test \${$as_ac_Lib+y}
17980then :
17981 printf %s "(cached) " >&6
17982else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010017984LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017988/* Override any GCC internal prototype to avoid an error.
17989 Use char because int might match the return type of a GCC
17990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017991char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017992int
Pablo Galindocc128882021-03-01 16:47:53 +000017993main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 ;
17997 return 0;
17998}
17999_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018000if ac_fn_c_try_link "$LINENO"
18001then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018002 eval "$as_ac_Lib=yes"
Pablo Galindocc128882021-03-01 16:47:53 +000018003else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018004 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000018005fi
Pablo Galindocc128882021-03-01 16:47:53 +000018006rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018008LIBS=$ac_check_lib_save_LIBS
18009fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018010eval ac_res=\$$as_ac_Lib
Pablo Galindocc128882021-03-01 16:47:53 +000018011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18012printf "%s\n" "$ac_res" >&6; }
18013if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18014then :
Michael W. Hudson54241132001-12-07 15:38:26 +000018015
Pablo Galindocc128882021-03-01 16:47:53 +000018016printf "%s\n" "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000018017
Martin v. Löwis0daad592001-09-30 21:09:59 +000018018fi
18019
Michael W. Hudson54241132001-12-07 15:38:26 +000018020
Roland Hiebere1f77692021-02-09 02:05:25 +010018021 # also in 4.0
Pablo Galindocc128882021-03-01 16:47:53 +000018022 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_display_matches_hook" | $as_tr_sh`
18023{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
18024printf %s "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
18025if eval test \${$as_ac_Lib+y}
18026then :
18027 printf %s "(cached) " >&6
18028else $as_nop
Thomas Wouters89d996e2007-09-08 17:39:28 +000018029 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018030LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000018032/* end confdefs.h. */
18033
18034/* Override any GCC internal prototype to avoid an error.
18035 Use char because int might match the return type of a GCC
18036 builtin and then its argument prototype would still apply. */
Thomas Wouters89d996e2007-09-08 17:39:28 +000018037char rl_completion_display_matches_hook ();
18038int
Pablo Galindocc128882021-03-01 16:47:53 +000018039main (void)
Thomas Wouters89d996e2007-09-08 17:39:28 +000018040{
18041return rl_completion_display_matches_hook ();
18042 ;
18043 return 0;
18044}
18045_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018046if ac_fn_c_try_link "$LINENO"
18047then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018048 eval "$as_ac_Lib=yes"
Pablo Galindocc128882021-03-01 16:47:53 +000018049else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018050 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000018051fi
Pablo Galindocc128882021-03-01 16:47:53 +000018052rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018053 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000018054LIBS=$ac_check_lib_save_LIBS
18055fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018056eval ac_res=\$$as_ac_Lib
Pablo Galindocc128882021-03-01 16:47:53 +000018057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18058printf "%s\n" "$ac_res" >&6; }
18059if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18060then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000018061
Pablo Galindocc128882021-03-01 16:47:53 +000018062printf "%s\n" "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000018063
18064fi
18065
18066
Roland Hiebere1f77692021-02-09 02:05:25 +010018067 # also in 4.0, but not in editline
Pablo Galindocc128882021-03-01 16:47:53 +000018068 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_resize_terminal" | $as_tr_sh`
18069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
18070printf %s "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
18071if eval test \${$as_ac_Lib+y}
18072then :
18073 printf %s "(cached) " >&6
18074else $as_nop
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018075 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018076LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18078/* end confdefs.h. */
18079
18080/* Override any GCC internal prototype to avoid an error.
18081 Use char because int might match the return type of a GCC
18082 builtin and then its argument prototype would still apply. */
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018083char rl_resize_terminal ();
18084int
Pablo Galindocc128882021-03-01 16:47:53 +000018085main (void)
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018086{
18087return rl_resize_terminal ();
18088 ;
18089 return 0;
18090}
18091_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018092if ac_fn_c_try_link "$LINENO"
18093then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018094 eval "$as_ac_Lib=yes"
Pablo Galindocc128882021-03-01 16:47:53 +000018095else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018096 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018097fi
Pablo Galindocc128882021-03-01 16:47:53 +000018098rm -f core conftest.err conftest.$ac_objext conftest.beam \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018099 conftest$ac_exeext conftest.$ac_ext
18100LIBS=$ac_check_lib_save_LIBS
18101fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018102eval ac_res=\$$as_ac_Lib
Pablo Galindocc128882021-03-01 16:47:53 +000018103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18104printf "%s\n" "$ac_res" >&6; }
18105if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18106then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018107
Pablo Galindocc128882021-03-01 16:47:53 +000018108printf "%s\n" "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018109
18110fi
18111
18112
Roland Hiebere1f77692021-02-09 02:05:25 +010018113 # check for readline 4.2
Pablo Galindocc128882021-03-01 16:47:53 +000018114 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_matches" | $as_tr_sh`
18115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
18116printf %s "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
18117if eval test \${$as_ac_Lib+y}
18118then :
18119 printf %s "(cached) " >&6
18120else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018121 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018122LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126/* Override any GCC internal prototype to avoid an error.
18127 Use char because int might match the return type of a GCC
18128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018129char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018130int
Pablo Galindocc128882021-03-01 16:47:53 +000018131main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 ;
18135 return 0;
18136}
18137_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018138if ac_fn_c_try_link "$LINENO"
18139then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018140 eval "$as_ac_Lib=yes"
Pablo Galindocc128882021-03-01 16:47:53 +000018141else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018142 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000018143fi
Pablo Galindocc128882021-03-01 16:47:53 +000018144rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018146LIBS=$ac_check_lib_save_LIBS
18147fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018148eval ac_res=\$$as_ac_Lib
Pablo Galindocc128882021-03-01 16:47:53 +000018149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18150printf "%s\n" "$ac_res" >&6; }
18151if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18152then :
Michael W. Hudson54241132001-12-07 15:38:26 +000018153
Pablo Galindocc128882021-03-01 16:47:53 +000018154printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000018155
Guido van Rossum353ae582001-07-10 16:45:32 +000018156fi
18157
Jack Jansendd19cf82001-12-06 22:36:17 +000018158
Roland Hiebere1f77692021-02-09 02:05:25 +010018159 # also in readline 4.2
Pablo Galindocc128882021-03-01 16:47:53 +000018160 ac_fn_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018161#include <stdio.h> /* Must be first for Gnu Readline */
18162#ifdef WITH_EDITLINE
18163# include <editline/readline.h>
18164#else
18165# include <readline/readline.h>
18166#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000018167
Pablo Galindocc128882021-03-01 16:47:53 +000018168" "$ac_c_undeclared_builtin_options" "CFLAGS"
18169if test "x$ac_cv_have_decl_rl_catch_signals" = xyes
18170then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018171
Pablo Galindocc128882021-03-01 16:47:53 +000018172printf "%s\n" "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018173
18174fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018175
Pablo Galindocc128882021-03-01 16:47:53 +000018176 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_append_history" | $as_tr_sh`
18177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
18178printf %s "checking for append_history in -l$LIBREADLINE... " >&6; }
18179if eval test \${$as_ac_Lib+y}
18180then :
18181 printf %s "(cached) " >&6
18182else $as_nop
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018183 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018184LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18186/* end confdefs.h. */
18187
18188/* Override any GCC internal prototype to avoid an error.
18189 Use char because int might match the return type of a GCC
18190 builtin and then its argument prototype would still apply. */
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018191char append_history ();
18192int
Pablo Galindocc128882021-03-01 16:47:53 +000018193main (void)
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018194{
18195return append_history ();
18196 ;
18197 return 0;
18198}
18199_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018200if ac_fn_c_try_link "$LINENO"
18201then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018202 eval "$as_ac_Lib=yes"
Pablo Galindocc128882021-03-01 16:47:53 +000018203else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018204 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018205fi
Pablo Galindocc128882021-03-01 16:47:53 +000018206rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018207 conftest$ac_exeext conftest.$ac_ext
18208LIBS=$ac_check_lib_save_LIBS
18209fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018210eval ac_res=\$$as_ac_Lib
Pablo Galindocc128882021-03-01 16:47:53 +000018211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18212printf "%s\n" "$ac_res" >&6; }
18213if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18214then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018215
Pablo Galindocc128882021-03-01 16:47:53 +000018216printf "%s\n" "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018217
18218fi
18219
Roland Hiebere1f77692021-02-09 02:05:25 +010018220fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018221
Martin v. Löwis82bca632006-02-10 20:49:30 +000018222# End of readline checks: restore LIBS
18223LIBS=$LIBS_no_readline
18224
Pablo Galindocc128882021-03-01 16:47:53 +000018225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
18226printf %s "checking for broken nice()... " >&6; }
18227if test ${ac_cv_broken_nice+y}
18228then :
18229 printf %s "(cached) " >&6
18230else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018231
Pablo Galindocc128882021-03-01 16:47:53 +000018232if test "$cross_compiling" = yes
18233then :
Guido van Rossum3065c942001-09-17 04:03:14 +000018234 ac_cv_broken_nice=no
Pablo Galindocc128882021-03-01 16:47:53 +000018235else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018237/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018238
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080018239#include <stdlib.h>
18240#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018241int main()
18242{
18243 int val1 = nice(1);
18244 if (val1 != -1 && val1 == nice(2))
18245 exit(0);
18246 exit(1);
18247}
18248
Martin v. Löwis11437992002-04-12 09:54:03 +000018249_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018250if ac_fn_c_try_run "$LINENO"
18251then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018252 ac_cv_broken_nice=yes
Pablo Galindocc128882021-03-01 16:47:53 +000018253else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018254 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18257 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018258fi
18259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018260fi
18261
Pablo Galindocc128882021-03-01 16:47:53 +000018262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
18263printf "%s\n" "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018264if test "$ac_cv_broken_nice" = yes
18265then
Martin v. Löwis11437992002-04-12 09:54:03 +000018266
Pablo Galindocc128882021-03-01 16:47:53 +000018267printf "%s\n" "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018268
18269fi
18270
Pablo Galindocc128882021-03-01 16:47:53 +000018271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
18272printf %s "checking for broken poll()... " >&6; }
18273if test ${ac_cv_broken_poll+y}
18274then :
18275 printf %s "(cached) " >&6
18276else $as_nop
18277 if test "$cross_compiling" = yes
18278then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018279 ac_cv_broken_poll=no
Pablo Galindocc128882021-03-01 16:47:53 +000018280else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018282/* end confdefs.h. */
18283
18284#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110018285#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018286
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018287int main()
18288{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018289 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018290 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018291
18292 close (42);
18293
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018294 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018295 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018296 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018297 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018298 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018299 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018300 return 1;
18301}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018302
18303_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018304if ac_fn_c_try_run "$LINENO"
18305then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018306 ac_cv_broken_poll=yes
Pablo Galindocc128882021-03-01 16:47:53 +000018307else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018308 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018313
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018314fi
18315
Pablo Galindocc128882021-03-01 16:47:53 +000018316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
18317printf "%s\n" "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018318if test "$ac_cv_broken_poll" = yes
18319then
18320
Pablo Galindocc128882021-03-01 16:47:53 +000018321printf "%s\n" "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018322
18323fi
18324
Martin v. Löwis1d459062005-03-14 21:23:33 +000018325# check tzset(3) exists and works like we expect it to
Pablo Galindocc128882021-03-01 16:47:53 +000018326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
18327printf %s "checking for working tzset()... " >&6; }
18328if test ${ac_cv_working_tzset+y}
18329then :
18330 printf %s "(cached) " >&6
18331else $as_nop
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018332
Pablo Galindocc128882021-03-01 16:47:53 +000018333if test "$cross_compiling" = yes
18334then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018335 ac_cv_working_tzset=no
Pablo Galindocc128882021-03-01 16:47:53 +000018336else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018338/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018339
18340#include <stdlib.h>
18341#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018342#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000018343
18344#if HAVE_TZNAME
18345extern char *tzname[];
18346#endif
18347
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018348int main()
18349{
Brett Cannon18367812003-09-19 00:59:16 +000018350 /* Note that we need to ensure that not only does tzset(3)
18351 do 'something' with localtime, but it works as documented
18352 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000018353 This includes making sure that tzname is set properly if
18354 tm->tm_zone does not exist since it is the alternative way
18355 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000018356
18357 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000018358 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000018359 */
18360
Martin v. Löwis1d459062005-03-14 21:23:33 +000018361 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000018362 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18363
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018364 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018365 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018366 if (localtime(&groundhogday)->tm_hour != 0)
18367 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018368#if HAVE_TZNAME
18369 /* For UTC, tzname[1] is sometimes "", sometimes " " */
18370 if (strcmp(tzname[0], "UTC") ||
18371 (tzname[1][0] != 0 && tzname[1][0] != ' '))
18372 exit(1);
18373#endif
Brett Cannon18367812003-09-19 00:59:16 +000018374
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018375 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018376 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018377 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018378 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018379#if HAVE_TZNAME
18380 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
18381 exit(1);
18382#endif
Brett Cannon18367812003-09-19 00:59:16 +000018383
18384 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18385 tzset();
18386 if (localtime(&groundhogday)->tm_hour != 11)
18387 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018388#if HAVE_TZNAME
18389 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
18390 exit(1);
18391#endif
18392
18393#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000018394 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18395 exit(1);
18396 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18397 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018398#endif
Brett Cannon18367812003-09-19 00:59:16 +000018399
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018400 exit(0);
18401}
18402
18403_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018404if ac_fn_c_try_run "$LINENO"
18405then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018406 ac_cv_working_tzset=yes
Pablo Galindocc128882021-03-01 16:47:53 +000018407else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018408 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18411 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018412fi
18413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414fi
18415
Pablo Galindocc128882021-03-01 16:47:53 +000018416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
18417printf "%s\n" "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018418if test "$ac_cv_working_tzset" = yes
18419then
18420
Pablo Galindocc128882021-03-01 16:47:53 +000018421printf "%s\n" "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018422
18423fi
18424
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018425# Look for subsecond timestamps in struct stat
Pablo Galindocc128882021-03-01 16:47:53 +000018426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
18427printf %s "checking for tv_nsec in struct stat... " >&6; }
18428if test ${ac_cv_stat_tv_nsec+y}
18429then :
18430 printf %s "(cached) " >&6
18431else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018433/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018434#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018435int
Pablo Galindocc128882021-03-01 16:47:53 +000018436main (void)
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018437{
18438
18439struct stat st;
18440st.st_mtim.tv_nsec = 1;
18441
18442 ;
18443 return 0;
18444}
18445_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018446if ac_fn_c_try_compile "$LINENO"
18447then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018448 ac_cv_stat_tv_nsec=yes
Pablo Galindocc128882021-03-01 16:47:53 +000018449else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018450 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018451fi
Pablo Galindocc128882021-03-01 16:47:53 +000018452rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453fi
18454
Pablo Galindocc128882021-03-01 16:47:53 +000018455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
18456printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018457if test "$ac_cv_stat_tv_nsec" = yes
18458then
18459
Pablo Galindocc128882021-03-01 16:47:53 +000018460printf "%s\n" "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018461
18462fi
18463
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018464# Look for BSD style subsecond timestamps in struct stat
Pablo Galindocc128882021-03-01 16:47:53 +000018465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
18466printf %s "checking for tv_nsec2 in struct stat... " >&6; }
18467if test ${ac_cv_stat_tv_nsec2+y}
18468then :
18469 printf %s "(cached) " >&6
18470else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018472/* end confdefs.h. */
18473#include <sys/stat.h>
18474int
Pablo Galindocc128882021-03-01 16:47:53 +000018475main (void)
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018476{
18477
18478struct stat st;
18479st.st_mtimespec.tv_nsec = 1;
18480
18481 ;
18482 return 0;
18483}
18484_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018485if ac_fn_c_try_compile "$LINENO"
18486then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018487 ac_cv_stat_tv_nsec2=yes
Pablo Galindocc128882021-03-01 16:47:53 +000018488else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018489 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018490fi
Pablo Galindocc128882021-03-01 16:47:53 +000018491rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492fi
18493
Pablo Galindocc128882021-03-01 16:47:53 +000018494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
18495printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018496if test "$ac_cv_stat_tv_nsec2" = yes
18497then
18498
Pablo Galindocc128882021-03-01 16:47:53 +000018499printf "%s\n" "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018500
18501fi
18502
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018503# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020018504ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010018505if test "$cross_compiling" = no; then
18506 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
18507fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018508
Pablo Galindocc128882021-03-01 16:47:53 +000018509ac_fn_c_check_header_compile "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
18510if test "x$ac_cv_header_curses_h" = xyes
18511then :
18512 printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h
18513
18514fi
18515ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default"
18516if test "x$ac_cv_header_ncurses_h" = xyes
18517then :
18518 printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018519
18520fi
18521
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018522
18523# On Solaris, term.h requires curses.h
Pablo Galindocc128882021-03-01 16:47:53 +000018524ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018525#ifdef HAVE_CURSES_H
18526#include <curses.h>
18527#endif
18528
18529"
Pablo Galindocc128882021-03-01 16:47:53 +000018530if test "x$ac_cv_header_term_h" = xyes
18531then :
18532 printf "%s\n" "#define HAVE_TERM_H 1" >>confdefs.h
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018533
18534fi
18535
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018536
Jack Jansen666b1e72001-10-31 12:11:48 +000018537# On HP/UX 11.0, mvwdelch is a block with a return statement
Pablo Galindocc128882021-03-01 16:47:53 +000018538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
18539printf %s "checking whether mvwdelch is an expression... " >&6; }
18540if test ${ac_cv_mvwdelch_is_expression+y}
18541then :
18542 printf %s "(cached) " >&6
18543else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018545/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018546#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018547int
Pablo Galindocc128882021-03-01 16:47:53 +000018548main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018549{
Jack Jansen666b1e72001-10-31 12:11:48 +000018550
18551 int rtn;
18552 rtn = mvwdelch(0,0,0);
18553
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 ;
18555 return 0;
18556}
18557_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018558if ac_fn_c_try_compile "$LINENO"
18559then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018560 ac_cv_mvwdelch_is_expression=yes
Pablo Galindocc128882021-03-01 16:47:53 +000018561else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018562 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018563fi
Pablo Galindocc128882021-03-01 16:47:53 +000018564rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565fi
18566
Pablo Galindocc128882021-03-01 16:47:53 +000018567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
18568printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000018569
18570if test "$ac_cv_mvwdelch_is_expression" = yes
18571then
Martin v. Löwis11437992002-04-12 09:54:03 +000018572
Pablo Galindocc128882021-03-01 16:47:53 +000018573printf "%s\n" "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018574
18575fi
18576
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018577# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
18578# structs since version 5.7. If the macro is defined as zero before including
18579# [n]curses.h, ncurses will expose fields of the structs regardless of the
18580# configuration.
Pablo Galindocc128882021-03-01 16:47:53 +000018581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
18582printf %s "checking whether WINDOW has _flags... " >&6; }
18583if test ${ac_cv_window_has_flags+y}
18584then :
18585 printf %s "(cached) " >&6
18586else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018588/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018589
18590 #define NCURSES_OPAQUE 0
18591 #include <curses.h>
18592
Martin v. Löwis11437992002-04-12 09:54:03 +000018593int
Pablo Galindocc128882021-03-01 16:47:53 +000018594main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018595{
Jack Jansen666b1e72001-10-31 12:11:48 +000018596
18597 WINDOW *w;
18598 w->_flags = 0;
18599
Martin v. Löwis11437992002-04-12 09:54:03 +000018600 ;
18601 return 0;
18602}
18603_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018604if ac_fn_c_try_compile "$LINENO"
18605then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018606 ac_cv_window_has_flags=yes
Pablo Galindocc128882021-03-01 16:47:53 +000018607else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018608 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018609fi
Pablo Galindocc128882021-03-01 16:47:53 +000018610rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611fi
18612
Pablo Galindocc128882021-03-01 16:47:53 +000018613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
18614printf "%s\n" "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018615
Jack Jansen666b1e72001-10-31 12:11:48 +000018616
18617if test "$ac_cv_window_has_flags" = yes
18618then
Martin v. Löwis11437992002-04-12 09:54:03 +000018619
Pablo Galindocc128882021-03-01 16:47:53 +000018620printf "%s\n" "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018621
18622fi
18623
Pablo Galindocc128882021-03-01 16:47:53 +000018624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
18625printf %s "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18627/* end confdefs.h. */
18628#include <curses.h>
18629int
Pablo Galindocc128882021-03-01 16:47:53 +000018630main (void)
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018631{
18632
18633#ifndef is_pad
18634void *x=is_pad
18635#endif
18636
18637 ;
18638 return 0;
18639}
18640_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018641if ac_fn_c_try_compile "$LINENO"
18642then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018643
Pablo Galindocc128882021-03-01 16:47:53 +000018644printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018645
Pablo Galindocc128882021-03-01 16:47:53 +000018646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18647printf "%s\n" "yes" >&6; }
18648else $as_nop
18649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18650printf "%s\n" "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018651
18652fi
Pablo Galindocc128882021-03-01 16:47:53 +000018653rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018654
Pablo Galindocc128882021-03-01 16:47:53 +000018655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
18656printf %s "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018658/* end confdefs.h. */
18659#include <curses.h>
18660int
Pablo Galindocc128882021-03-01 16:47:53 +000018661main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018662{
18663void *x=is_term_resized
18664 ;
18665 return 0;
18666}
18667_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018668if ac_fn_c_try_compile "$LINENO"
18669then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018670
Pablo Galindocc128882021-03-01 16:47:53 +000018671printf "%s\n" "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018672
Pablo Galindocc128882021-03-01 16:47:53 +000018673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18674printf "%s\n" "yes" >&6; }
18675else $as_nop
18676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018678
18679fi
Pablo Galindocc128882021-03-01 16:47:53 +000018680rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018681
Pablo Galindocc128882021-03-01 16:47:53 +000018682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
18683printf %s "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018685/* end confdefs.h. */
18686#include <curses.h>
18687int
Pablo Galindocc128882021-03-01 16:47:53 +000018688main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018689{
18690void *x=resize_term
18691 ;
18692 return 0;
18693}
18694_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018695if ac_fn_c_try_compile "$LINENO"
18696then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018697
Pablo Galindocc128882021-03-01 16:47:53 +000018698printf "%s\n" "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018699
Pablo Galindocc128882021-03-01 16:47:53 +000018700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18701printf "%s\n" "yes" >&6; }
18702else $as_nop
18703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18704printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018705
18706fi
Pablo Galindocc128882021-03-01 16:47:53 +000018707rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018708
Pablo Galindocc128882021-03-01 16:47:53 +000018709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
18710printf %s "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018712/* end confdefs.h. */
18713#include <curses.h>
18714int
Pablo Galindocc128882021-03-01 16:47:53 +000018715main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018716{
18717void *x=resizeterm
18718 ;
18719 return 0;
18720}
18721_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018722if ac_fn_c_try_compile "$LINENO"
18723then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018724
Pablo Galindocc128882021-03-01 16:47:53 +000018725printf "%s\n" "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018726
Pablo Galindocc128882021-03-01 16:47:53 +000018727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18728printf "%s\n" "yes" >&6; }
18729else $as_nop
18730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18731printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018732
18733fi
Pablo Galindocc128882021-03-01 16:47:53 +000018734rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018735
Pablo Galindocc128882021-03-01 16:47:53 +000018736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
18737printf %s "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18739/* end confdefs.h. */
18740#include <curses.h>
18741int
Pablo Galindocc128882021-03-01 16:47:53 +000018742main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018743{
18744
18745#ifndef immedok
18746void *x=immedok
18747#endif
18748
18749 ;
18750 return 0;
18751}
18752_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018753if ac_fn_c_try_compile "$LINENO"
18754then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018755
Pablo Galindocc128882021-03-01 16:47:53 +000018756printf "%s\n" "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018757
Pablo Galindocc128882021-03-01 16:47:53 +000018758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18759printf "%s\n" "yes" >&6; }
18760else $as_nop
18761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18762printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018763
18764fi
Pablo Galindocc128882021-03-01 16:47:53 +000018765rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018766
Pablo Galindocc128882021-03-01 16:47:53 +000018767{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
18768printf %s "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18770/* end confdefs.h. */
18771#include <curses.h>
18772int
Pablo Galindocc128882021-03-01 16:47:53 +000018773main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018774{
18775
18776#ifndef syncok
18777void *x=syncok
18778#endif
18779
18780 ;
18781 return 0;
18782}
18783_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018784if ac_fn_c_try_compile "$LINENO"
18785then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018786
Pablo Galindocc128882021-03-01 16:47:53 +000018787printf "%s\n" "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018788
Pablo Galindocc128882021-03-01 16:47:53 +000018789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18790printf "%s\n" "yes" >&6; }
18791else $as_nop
18792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18793printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018794
18795fi
Pablo Galindocc128882021-03-01 16:47:53 +000018796rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018797
Pablo Galindocc128882021-03-01 16:47:53 +000018798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
18799printf %s "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18801/* end confdefs.h. */
18802#include <curses.h>
18803int
Pablo Galindocc128882021-03-01 16:47:53 +000018804main (void)
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018805{
18806
18807#ifndef wchgat
18808void *x=wchgat
18809#endif
18810
18811 ;
18812 return 0;
18813}
18814_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018815if ac_fn_c_try_compile "$LINENO"
18816then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018817
Pablo Galindocc128882021-03-01 16:47:53 +000018818printf "%s\n" "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018819
Pablo Galindocc128882021-03-01 16:47:53 +000018820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18821printf "%s\n" "yes" >&6; }
18822else $as_nop
18823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18824printf "%s\n" "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018825
18826fi
Pablo Galindocc128882021-03-01 16:47:53 +000018827rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018828
Pablo Galindocc128882021-03-01 16:47:53 +000018829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
18830printf %s "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18832/* end confdefs.h. */
18833#include <curses.h>
18834int
Pablo Galindocc128882021-03-01 16:47:53 +000018835main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018836{
18837
18838#ifndef filter
18839void *x=filter
18840#endif
18841
18842 ;
18843 return 0;
18844}
18845_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018846if ac_fn_c_try_compile "$LINENO"
18847then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018848
Pablo Galindocc128882021-03-01 16:47:53 +000018849printf "%s\n" "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018850
Pablo Galindocc128882021-03-01 16:47:53 +000018851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18852printf "%s\n" "yes" >&6; }
18853else $as_nop
18854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18855printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018856
18857fi
Pablo Galindocc128882021-03-01 16:47:53 +000018858rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018859
Pablo Galindocc128882021-03-01 16:47:53 +000018860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
18861printf %s "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18863/* end confdefs.h. */
18864#include <curses.h>
18865int
Pablo Galindocc128882021-03-01 16:47:53 +000018866main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018867{
18868
18869#ifndef has_key
18870void *x=has_key
18871#endif
18872
18873 ;
18874 return 0;
18875}
18876_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018877if ac_fn_c_try_compile "$LINENO"
18878then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018879
Pablo Galindocc128882021-03-01 16:47:53 +000018880printf "%s\n" "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018881
Pablo Galindocc128882021-03-01 16:47:53 +000018882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18883printf "%s\n" "yes" >&6; }
18884else $as_nop
18885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18886printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018887
18888fi
Pablo Galindocc128882021-03-01 16:47:53 +000018889rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018890
Pablo Galindocc128882021-03-01 16:47:53 +000018891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
18892printf %s "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18894/* end confdefs.h. */
18895#include <curses.h>
18896int
Pablo Galindocc128882021-03-01 16:47:53 +000018897main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018898{
18899
18900#ifndef typeahead
18901void *x=typeahead
18902#endif
18903
18904 ;
18905 return 0;
18906}
18907_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018908if ac_fn_c_try_compile "$LINENO"
18909then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018910
Pablo Galindocc128882021-03-01 16:47:53 +000018911printf "%s\n" "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018912
Pablo Galindocc128882021-03-01 16:47:53 +000018913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18914printf "%s\n" "yes" >&6; }
18915else $as_nop
18916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18917printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018918
18919fi
Pablo Galindocc128882021-03-01 16:47:53 +000018920rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018921
Pablo Galindocc128882021-03-01 16:47:53 +000018922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
18923printf %s "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18925/* end confdefs.h. */
18926#include <curses.h>
18927int
Pablo Galindocc128882021-03-01 16:47:53 +000018928main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018929{
18930
18931#ifndef use_env
18932void *x=use_env
18933#endif
18934
18935 ;
18936 return 0;
18937}
18938_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000018939if ac_fn_c_try_compile "$LINENO"
18940then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018941
Pablo Galindocc128882021-03-01 16:47:53 +000018942printf "%s\n" "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018943
Pablo Galindocc128882021-03-01 16:47:53 +000018944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18945printf "%s\n" "yes" >&6; }
18946else $as_nop
18947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18948printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018949
18950fi
Pablo Galindocc128882021-03-01 16:47:53 +000018951rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020018952# last curses configure check
18953CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018954
Pablo Galindocc128882021-03-01 16:47:53 +000018955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
18956printf "%s\n" "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018957
18958if test "x$cross_compiling" = xyes; then
18959 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Pablo Galindocc128882021-03-01 16:47:53 +000018960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
18961printf %s "checking for /dev/ptmx... " >&6; }
18962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
18963printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018964 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
18965 fi
18966 if test "${ac_cv_file__dev_ptc+set}" != set; then
Pablo Galindocc128882021-03-01 16:47:53 +000018967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
18968printf %s "checking for /dev/ptc... " >&6; }
18969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
18970printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018971 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
18972 fi
18973fi
18974
Pablo Galindocc128882021-03-01 16:47:53 +000018975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
18976printf %s "checking for /dev/ptmx... " >&6; }
18977if test ${ac_cv_file__dev_ptmx+y}
18978then :
18979 printf %s "(cached) " >&6
18980else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018981 test "$cross_compiling" = yes &&
18982 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18983if test -r "/dev/ptmx"; then
18984 ac_cv_file__dev_ptmx=yes
18985else
18986 ac_cv_file__dev_ptmx=no
18987fi
18988fi
Pablo Galindocc128882021-03-01 16:47:53 +000018989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
18990printf "%s\n" "$ac_cv_file__dev_ptmx" >&6; }
18991if test "x$ac_cv_file__dev_ptmx" = xyes
18992then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000018993
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018994fi
18995
18996if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018997
Pablo Galindocc128882021-03-01 16:47:53 +000018998printf "%s\n" "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018999
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019000fi
Pablo Galindocc128882021-03-01 16:47:53 +000019001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
19002printf %s "checking for /dev/ptc... " >&6; }
19003if test ${ac_cv_file__dev_ptc+y}
19004then :
19005 printf %s "(cached) " >&6
19006else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019007 test "$cross_compiling" = yes &&
19008 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19009if test -r "/dev/ptc"; then
19010 ac_cv_file__dev_ptc=yes
19011else
19012 ac_cv_file__dev_ptc=no
19013fi
19014fi
Pablo Galindocc128882021-03-01 16:47:53 +000019015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
19016printf "%s\n" "$ac_cv_file__dev_ptc" >&6; }
19017if test "x$ac_cv_file__dev_ptc" = xyes
19018then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000019019
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020019020fi
19021
19022if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000019023
Pablo Galindocc128882021-03-01 16:47:53 +000019024printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000019025
Neal Norwitz865400f2003-03-21 01:42:58 +000019026fi
19027
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000019028if test $ac_sys_system = Darwin
19029then
19030 LIBS="$LIBS -framework CoreFoundation"
19031fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000019032
Pablo Galindocc128882021-03-01 16:47:53 +000019033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
19034printf %s "checking for %zd printf() format support... " >&6; }
19035if test ${ac_cv_have_size_t_format+y}
19036then :
19037 printf %s "(cached) " >&6
19038else $as_nop
19039 if test "$cross_compiling" = yes
19040then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000019041 ac_cv_have_size_t_format="cross -- assuming yes"
19042
Pablo Galindocc128882021-03-01 16:47:53 +000019043else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019045/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019046
Thomas Wouters477c8d52006-05-27 19:21:47 +000019047#include <stdio.h>
19048#include <stddef.h>
19049#include <string.h>
19050
Christian Heimes2c181612007-12-17 20:04:13 +000019051#ifdef HAVE_SYS_TYPES_H
19052#include <sys/types.h>
19053#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000019054
19055#ifdef HAVE_SSIZE_T
19056typedef ssize_t Py_ssize_t;
19057#elif SIZEOF_VOID_P == SIZEOF_LONG
19058typedef long Py_ssize_t;
19059#else
19060typedef int Py_ssize_t;
19061#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000019062
Christian Heimes2c181612007-12-17 20:04:13 +000019063int main()
19064{
19065 char buffer[256];
19066
Thomas Wouters477c8d52006-05-27 19:21:47 +000019067 if(sprintf(buffer, "%zd", (size_t)123) < 0)
19068 return 1;
19069
Thomas Wouters89f507f2006-12-13 04:49:30 +000019070 if (strcmp(buffer, "123"))
19071 return 1;
19072
19073 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
19074 return 1;
19075
19076 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000019077 return 1;
19078
19079 return 0;
19080}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019081
Thomas Wouters477c8d52006-05-27 19:21:47 +000019082_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019083if ac_fn_c_try_run "$LINENO"
19084then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019085 ac_cv_have_size_t_format=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019086else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019087 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019091fi
19092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019093fi
Pablo Galindocc128882021-03-01 16:47:53 +000019094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
19095printf "%s\n" "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000019096if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019097
Pablo Galindocc128882021-03-01 16:47:53 +000019098printf "%s\n" "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019099
19100fi
19101
Matthias Kloseb9621712010-04-24 17:59:49 +000019102ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000019103#ifdef HAVE_SYS_TYPES_H
19104#include <sys/types.h>
19105#endif
19106#ifdef HAVE_SYS_SOCKET_H
19107#include <sys/socket.h>
19108#endif
19109
Matthias Kloseb9621712010-04-24 17:59:49 +000019110"
Pablo Galindocc128882021-03-01 16:47:53 +000019111if test "x$ac_cv_type_socklen_t" = xyes
19112then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000019113
Pablo Galindocc128882021-03-01 16:47:53 +000019114else $as_nop
Guido van Rossum95713eb2000-05-18 20:53:31 +000019115
Pablo Galindocc128882021-03-01 16:47:53 +000019116printf "%s\n" "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000019117
19118fi
19119
Michael W. Hudson54241132001-12-07 15:38:26 +000019120
Pablo Galindocc128882021-03-01 16:47:53 +000019121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
19122printf %s "checking for broken mbstowcs... " >&6; }
19123if test ${ac_cv_broken_mbstowcs+y}
19124then :
19125 printf %s "(cached) " >&6
19126else $as_nop
19127 if test "$cross_compiling" = yes
19128then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019129 ac_cv_broken_mbstowcs=no
Pablo Galindocc128882021-03-01 16:47:53 +000019130else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019132/* end confdefs.h. */
19133
Stefan Krah19c21392012-11-22 23:47:32 +010019134#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000019135#include<stdlib.h>
19136int main() {
19137 size_t len = -1;
19138 const char *str = "text";
19139 len = mbstowcs(NULL, str, 0);
19140 return (len != 4);
19141}
19142
19143_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019144if ac_fn_c_try_run "$LINENO"
19145then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019146 ac_cv_broken_mbstowcs=no
Pablo Galindocc128882021-03-01 16:47:53 +000019147else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019148 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000019149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19151 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019152fi
19153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019154fi
19155
Pablo Galindocc128882021-03-01 16:47:53 +000019156{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
19157printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000019158if test "$ac_cv_broken_mbstowcs" = yes
19159then
19160
Pablo Galindocc128882021-03-01 16:47:53 +000019161printf "%s\n" "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000019162
19163fi
19164
Antoine Pitroub52ec782009-01-25 16:34:23 +000019165# Check for --with-computed-gotos
Pablo Galindocc128882021-03-01 16:47:53 +000019166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
19167printf %s "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019168
19169# Check whether --with-computed-gotos was given.
Pablo Galindocc128882021-03-01 16:47:53 +000019170if test ${with_computed_gotos+y}
19171then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000019172 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000019173if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000019174then
19175
Pablo Galindocc128882021-03-01 16:47:53 +000019176printf "%s\n" "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000019177
Pablo Galindocc128882021-03-01 16:47:53 +000019178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19179printf "%s\n" "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019180fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000019181if test "$withval" = no
19182then
19183
Pablo Galindocc128882021-03-01 16:47:53 +000019184printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000019185
Pablo Galindocc128882021-03-01 16:47:53 +000019186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187printf "%s\n" "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019188fi
19189
Pablo Galindocc128882021-03-01 16:47:53 +000019190else $as_nop
19191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
19192printf "%s\n" "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000019193fi
19194
Antoine Pitroub52ec782009-01-25 16:34:23 +000019195
Pablo Galindocc128882021-03-01 16:47:53 +000019196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
19197printf %s "checking whether $CC supports computed gotos... " >&6; }
19198if test ${ac_cv_computed_gotos+y}
19199then :
19200 printf %s "(cached) " >&6
19201else $as_nop
19202 if test "$cross_compiling" = yes
19203then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019204 if test "${with_computed_gotos+set}" = set; then
19205 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
19206 else
19207 ac_cv_computed_gotos=no
19208 fi
Pablo Galindocc128882021-03-01 16:47:53 +000019209else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19211/* end confdefs.h. */
19212
19213int main(int argc, char **argv)
19214{
19215 static void *targets[1] = { &&LABEL1 };
19216 goto LABEL2;
19217LABEL1:
19218 return 0;
19219LABEL2:
19220 goto *targets[0];
19221 return 1;
19222}
19223
19224_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019225if ac_fn_c_try_run "$LINENO"
19226then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019227 ac_cv_computed_gotos=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019228else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019229 ac_cv_computed_gotos=no
19230fi
19231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19232 conftest.$ac_objext conftest.beam conftest.$ac_ext
19233fi
19234
19235fi
19236
Pablo Galindocc128882021-03-01 16:47:53 +000019237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
19238printf "%s\n" "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010019239case "$ac_cv_computed_gotos" in yes*)
19240
Pablo Galindocc128882021-03-01 16:47:53 +000019241printf "%s\n" "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010019242
19243esac
19244
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019245case $ac_sys_system in
19246AIX*)
19247
Pablo Galindocc128882021-03-01 16:47:53 +000019248printf "%s\n" "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019249 ;;
19250esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019251
Michael W. Hudson54241132001-12-07 15:38:26 +000019252
Mark Dickinsonb2153e92010-05-05 22:31:36 +000019253
19254
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000019255for h in `(cd $srcdir;echo Python/thread_*.h)`
19256do
19257 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
19258done
19259
Michael W. Hudson54241132001-12-07 15:38:26 +000019260
Ned Deily8d02f912020-06-25 10:46:44 -040019261SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Pablo Galindocc128882021-03-01 16:47:53 +000019262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
19263printf %s "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019264for dir in $SRCDIRS; do
19265 if test ! -d $dir; then
19266 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000019267 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019268done
Pablo Galindocc128882021-03-01 16:47:53 +000019269{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
19270printf "%s\n" "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000019271
Stefan Krah1919b7e2012-03-21 18:25:23 +010019272# Availability of -O2:
Pablo Galindocc128882021-03-01 16:47:53 +000019273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
19274printf %s "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019275saved_cflags="$CFLAGS"
19276CFLAGS="-O2"
19277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19278/* end confdefs.h. */
19279
19280int
Pablo Galindocc128882021-03-01 16:47:53 +000019281main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010019282{
19283
19284
19285 ;
19286 return 0;
19287}
19288_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019289if ac_fn_c_try_compile "$LINENO"
19290then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019291 have_O2=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019292else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019293 have_O2=no
19294fi
Pablo Galindocc128882021-03-01 16:47:53 +000019295rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
19297printf "%s\n" "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019298CFLAGS="$saved_cflags"
19299
19300# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
19301# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Pablo Galindocc128882021-03-01 16:47:53 +000019302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
19303printf %s "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019304saved_cflags="$CFLAGS"
19305CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
19306if test "$have_O2" = no; then
19307 CFLAGS=""
19308fi
Pablo Galindocc128882021-03-01 16:47:53 +000019309if test "$cross_compiling" = yes
19310then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019311 have_glibc_memmove_bug=undefined
Pablo Galindocc128882021-03-01 16:47:53 +000019312else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19314/* end confdefs.h. */
19315
19316#include <stdio.h>
19317#include <stdlib.h>
19318#include <string.h>
19319void foo(void *p, void *q) { memmove(p, q, 19); }
19320int main() {
19321 char a[32] = "123456789000000000";
19322 foo(&a[9], a);
19323 if (strcmp(a, "123456789123456789000000000") != 0)
19324 return 1;
19325 foo(a, &a[9]);
19326 if (strcmp(a, "123456789000000000") != 0)
19327 return 1;
19328 return 0;
19329}
19330
19331_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019332if ac_fn_c_try_run "$LINENO"
19333then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019334 have_glibc_memmove_bug=no
Pablo Galindocc128882021-03-01 16:47:53 +000019335else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019336 have_glibc_memmove_bug=yes
19337fi
19338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19339 conftest.$ac_objext conftest.beam conftest.$ac_ext
19340fi
19341
19342CFLAGS="$saved_cflags"
Pablo Galindocc128882021-03-01 16:47:53 +000019343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
19344printf "%s\n" "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019345if test "$have_glibc_memmove_bug" = yes; then
19346
Pablo Galindocc128882021-03-01 16:47:53 +000019347printf "%s\n" "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019348
19349fi
19350
19351if test "$have_gcc_asm_for_x87" = yes; then
19352 # Some versions of gcc miscompile inline asm:
19353 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
19354 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
19355 case $CC in
19356 *gcc*)
Pablo Galindocc128882021-03-01 16:47:53 +000019357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
19358printf %s "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019359 saved_cflags="$CFLAGS"
19360 CFLAGS="-O2"
Pablo Galindocc128882021-03-01 16:47:53 +000019361 if test "$cross_compiling" = yes
19362then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019363 have_ipa_pure_const_bug=undefined
Pablo Galindocc128882021-03-01 16:47:53 +000019364else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19366/* end confdefs.h. */
19367
19368 __attribute__((noinline)) int
19369 foo(int *p) {
19370 int r;
19371 asm ( "movl \$6, (%1)\n\t"
19372 "xorl %0, %0\n\t"
19373 : "=r" (r) : "r" (p) : "memory"
19374 );
19375 return r;
19376 }
19377 int main() {
19378 int p = 8;
19379 if ((foo(&p) ? : p) != 6)
19380 return 1;
19381 return 0;
19382 }
19383
19384_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019385if ac_fn_c_try_run "$LINENO"
19386then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019387 have_ipa_pure_const_bug=no
Pablo Galindocc128882021-03-01 16:47:53 +000019388else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019389 have_ipa_pure_const_bug=yes
19390fi
19391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19392 conftest.$ac_objext conftest.beam conftest.$ac_ext
19393fi
19394
19395 CFLAGS="$saved_cflags"
Pablo Galindocc128882021-03-01 16:47:53 +000019396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
19397printf "%s\n" "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019398 if test "$have_ipa_pure_const_bug" = yes; then
19399
Pablo Galindocc128882021-03-01 16:47:53 +000019400printf "%s\n" "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019401
19402 fi
19403 ;;
19404 esac
19405fi
19406
Victor Stinner4f5366e2015-01-09 02:13:19 +010019407# Check for stdatomic.h
Pablo Galindocc128882021-03-01 16:47:53 +000019408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
19409printf %s "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19411/* end confdefs.h. */
19412
19413
19414 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020019415 atomic_int int_var;
19416 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019417 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020019418 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
19419 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
19420 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019421 return 0;
19422 }
19423
19424
19425_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019426if ac_fn_c_try_link "$LINENO"
19427then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019428 have_stdatomic_h=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019429else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019430 have_stdatomic_h=no
19431fi
Pablo Galindocc128882021-03-01 16:47:53 +000019432rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019433 conftest$ac_exeext conftest.$ac_ext
19434
Pablo Galindocc128882021-03-01 16:47:53 +000019435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
19436printf "%s\n" "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019437
19438if test "$have_stdatomic_h" = yes; then
19439
Pablo Galindocc128882021-03-01 16:47:53 +000019440printf "%s\n" "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019441
19442fi
19443
Victor Stinner52a327c2020-12-23 03:41:08 +010019444# Check for GCC >= 4.7 and clang __atomic builtin functions
Pablo Galindocc128882021-03-01 16:47:53 +000019445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
19446printf %s "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19448/* end confdefs.h. */
19449
19450
Victor Stinner52a327c2020-12-23 03:41:08 +010019451 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019452 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010019453 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
19454 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019455 return 0;
19456 }
19457
19458
19459_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019460if ac_fn_c_try_link "$LINENO"
19461then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019462 have_builtin_atomic=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019463else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019464 have_builtin_atomic=no
19465fi
Pablo Galindocc128882021-03-01 16:47:53 +000019466rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019467 conftest$ac_exeext conftest.$ac_ext
19468
Pablo Galindocc128882021-03-01 16:47:53 +000019469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
19470printf "%s\n" "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019471
19472if test "$have_builtin_atomic" = yes; then
19473
Pablo Galindocc128882021-03-01 16:47:53 +000019474printf "%s\n" "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019475
19476fi
19477
Ned Deily322f5ba2013-11-21 23:01:59 -080019478# ensurepip option
Pablo Galindocc128882021-03-01 16:47:53 +000019479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
19480printf %s "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019481
19482# Check whether --with-ensurepip was given.
Pablo Galindocc128882021-03-01 16:47:53 +000019483if test ${with_ensurepip+y}
19484then :
Ned Deily322f5ba2013-11-21 23:01:59 -080019485 withval=$with_ensurepip;
Pablo Galindocc128882021-03-01 16:47:53 +000019486else $as_nop
Ned Deily322f5ba2013-11-21 23:01:59 -080019487 with_ensurepip=upgrade
19488fi
19489
19490case $with_ensurepip in #(
19491 yes|upgrade) :
19492 ENSUREPIP=upgrade ;; #(
19493 install) :
19494 ENSUREPIP=install ;; #(
19495 no) :
19496 ENSUREPIP=no ;; #(
19497 *) :
19498 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
19499esac
Pablo Galindocc128882021-03-01 16:47:53 +000019500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
19501printf "%s\n" "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019502
19503
Victor Stinner35a97c02015-03-08 02:59:09 +010019504# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Pablo Galindocc128882021-03-01 16:47:53 +000019505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
19506printf %s "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19508/* end confdefs.h. */
19509
19510
19511 #include <dirent.h>
19512
19513 int main() {
19514 struct dirent entry;
19515 return entry.d_type == DT_UNKNOWN;
19516 }
19517
19518
19519_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019520if ac_fn_c_try_link "$LINENO"
19521then :
Victor Stinner35a97c02015-03-08 02:59:09 +010019522 have_dirent_d_type=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019523else $as_nop
Victor Stinner35a97c02015-03-08 02:59:09 +010019524 have_dirent_d_type=no
19525fi
Pablo Galindocc128882021-03-01 16:47:53 +000019526rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner35a97c02015-03-08 02:59:09 +010019527 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000019528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
19529printf "%s\n" "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019530
19531if test "$have_dirent_d_type" = yes; then
19532
Pablo Galindocc128882021-03-01 16:47:53 +000019533printf "%s\n" "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010019534
19535fi
19536
Victor Stinner9eb57c52015-03-19 22:21:49 +010019537# check if the Linux getrandom() syscall is available
Pablo Galindocc128882021-03-01 16:47:53 +000019538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
19539printf %s "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19541/* end confdefs.h. */
19542
19543
Victor Stinner1b80b242016-04-12 22:34:58 +020019544 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019545 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020019546 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019547
19548 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010019549 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020019550 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020019551 const int flags = GRND_NONBLOCK;
19552 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020019553 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010019554 return 0;
19555 }
19556
19557
19558_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019559if ac_fn_c_try_link "$LINENO"
19560then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010019561 have_getrandom_syscall=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019562else $as_nop
Victor Stinner9eb57c52015-03-19 22:21:49 +010019563 have_getrandom_syscall=no
19564fi
Pablo Galindocc128882021-03-01 16:47:53 +000019565rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner9eb57c52015-03-19 22:21:49 +010019566 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000019567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
19568printf "%s\n" "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019569
19570if test "$have_getrandom_syscall" = yes; then
19571
Pablo Galindocc128882021-03-01 16:47:53 +000019572printf "%s\n" "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010019573
19574fi
19575
Victor Stinner3abf44e2015-09-18 15:38:37 +020019576# check if the getrandom() function is available
19577# the test was written for the Solaris function of <sys/random.h>
Pablo Galindocc128882021-03-01 16:47:53 +000019578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
19579printf %s "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19581/* end confdefs.h. */
19582
19583
19584 #include <sys/random.h>
19585
19586 int main() {
19587 char buffer[1];
19588 const size_t buflen = sizeof(buffer);
19589 const int flags = 0;
19590 /* ignore the result, Python checks for ENOSYS at runtime */
19591 (void)getrandom(buffer, buflen, flags);
19592 return 0;
19593 }
19594
19595
19596_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019597if ac_fn_c_try_link "$LINENO"
19598then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020019599 have_getrandom=yes
Pablo Galindocc128882021-03-01 16:47:53 +000019600else $as_nop
Victor Stinner3abf44e2015-09-18 15:38:37 +020019601 have_getrandom=no
19602fi
Pablo Galindocc128882021-03-01 16:47:53 +000019603rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner3abf44e2015-09-18 15:38:37 +020019604 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000019605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
19606printf "%s\n" "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019607
19608if test "$have_getrandom" = yes; then
19609
Pablo Galindocc128882021-03-01 16:47:53 +000019610printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020019611
19612fi
19613
Neil Schemenauer5741c452019-02-08 10:48:46 -080019614# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
19615# shm_* may only be available if linking against librt
19616save_LIBS="$LIBS"
19617save_includes_default="$ac_includes_default"
Pablo Galindocc128882021-03-01 16:47:53 +000019618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
19619printf %s "checking for library containing shm_open... " >&6; }
19620if test ${ac_cv_search_shm_open+y}
19621then :
19622 printf %s "(cached) " >&6
19623else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019624 ac_func_search_save_LIBS=$LIBS
19625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19626/* end confdefs.h. */
19627
19628/* Override any GCC internal prototype to avoid an error.
19629 Use char because int might match the return type of a GCC
19630 builtin and then its argument prototype would still apply. */
Neil Schemenauer5741c452019-02-08 10:48:46 -080019631char shm_open ();
19632int
Pablo Galindocc128882021-03-01 16:47:53 +000019633main (void)
Neil Schemenauer5741c452019-02-08 10:48:46 -080019634{
19635return shm_open ();
19636 ;
19637 return 0;
19638}
19639_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019640for ac_lib in '' rt
19641do
Neil Schemenauer5741c452019-02-08 10:48:46 -080019642 if test -z "$ac_lib"; then
19643 ac_res="none required"
19644 else
19645 ac_res=-l$ac_lib
19646 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19647 fi
Pablo Galindocc128882021-03-01 16:47:53 +000019648 if ac_fn_c_try_link "$LINENO"
19649then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019650 ac_cv_search_shm_open=$ac_res
19651fi
Pablo Galindocc128882021-03-01 16:47:53 +000019652rm -f core conftest.err conftest.$ac_objext conftest.beam \
Neil Schemenauer5741c452019-02-08 10:48:46 -080019653 conftest$ac_exeext
Pablo Galindocc128882021-03-01 16:47:53 +000019654 if test ${ac_cv_search_shm_open+y}
19655then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019656 break
19657fi
19658done
Pablo Galindocc128882021-03-01 16:47:53 +000019659if test ${ac_cv_search_shm_open+y}
19660then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019661
Pablo Galindocc128882021-03-01 16:47:53 +000019662else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019663 ac_cv_search_shm_open=no
19664fi
19665rm conftest.$ac_ext
19666LIBS=$ac_func_search_save_LIBS
19667fi
Pablo Galindocc128882021-03-01 16:47:53 +000019668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
19669printf "%s\n" "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080019670ac_res=$ac_cv_search_shm_open
Pablo Galindocc128882021-03-01 16:47:53 +000019671if test "$ac_res" != no
19672then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019673 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19674
19675fi
19676
19677if test "$ac_cv_search_shm_open" = "-lrt"; then
19678
Pablo Galindocc128882021-03-01 16:47:53 +000019679printf "%s\n" "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019680
19681fi
Pablo Galindocc128882021-03-01 16:47:53 +000019682ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
19683if test "x$ac_cv_header_sys_mman_h" = xyes
19684then :
19685 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019686
19687fi
19688
Neil Schemenauer5741c452019-02-08 10:48:46 -080019689# temporarily override ac_includes_default for AC_CHECK_FUNCS below
19690ac_includes_default="\
19691${ac_includes_default}
19692#ifndef __cplusplus
19693# ifdef HAVE_SYS_MMAN_H
19694# include <sys/mman.h>
19695# endif
19696#endif
19697"
Pablo Galindocc128882021-03-01 16:47:53 +000019698ac_fn_c_check_func "$LINENO" "shm_open" "ac_cv_func_shm_open"
19699if test "x$ac_cv_func_shm_open" = xyes
19700then :
19701 printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019702
19703fi
Pablo Galindocc128882021-03-01 16:47:53 +000019704ac_fn_c_check_func "$LINENO" "shm_unlink" "ac_cv_func_shm_unlink"
19705if test "x$ac_cv_func_shm_unlink" = xyes
19706then :
19707 printf "%s\n" "#define HAVE_SHM_UNLINK 1" >>confdefs.h
19708
19709fi
Neil Schemenauer5741c452019-02-08 10:48:46 -080019710
19711# we don't want to link with librt always, restore LIBS
19712LIBS="$save_LIBS"
19713ac_includes_default="$save_includes_default"
19714
Christian Heimesff5be6e2018-01-20 13:19:21 +010019715# Check for usable OpenSSL
19716
19717 found=false
19718
19719# Check whether --with-openssl was given.
Pablo Galindocc128882021-03-01 16:47:53 +000019720if test ${with_openssl+y}
19721then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019722 withval=$with_openssl;
19723 case "$withval" in
19724 "" | y | ye | yes | n | no)
19725 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
19726 ;;
19727 *) ssldirs="$withval"
19728 ;;
19729 esac
19730
Pablo Galindocc128882021-03-01 16:47:53 +000019731else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019732
19733 # if pkg-config is installed and openssl has installed a .pc file,
19734 # then use that information and don't search ssldirs
19735 if test -n "$ac_tool_prefix"; then
19736 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19737set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +000019738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19739printf %s "checking for $ac_word... " >&6; }
19740if test ${ac_cv_prog_PKG_CONFIG+y}
19741then :
19742 printf %s "(cached) " >&6
19743else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019744 if test -n "$PKG_CONFIG"; then
19745 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
19746else
19747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19748for as_dir in $PATH
19749do
19750 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +000019751 case $as_dir in #(((
19752 '') as_dir=./ ;;
19753 */) ;;
19754 *) as_dir=$as_dir/ ;;
19755 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019756 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +000019757 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019758 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Pablo Galindocc128882021-03-01 16:47:53 +000019759 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019760 break 2
19761 fi
19762done
19763 done
19764IFS=$as_save_IFS
19765
19766fi
19767fi
19768PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
19769if test -n "$PKG_CONFIG"; then
Pablo Galindocc128882021-03-01 16:47:53 +000019770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19771printf "%s\n" "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019772else
Pablo Galindocc128882021-03-01 16:47:53 +000019773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19774printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019775fi
19776
19777
19778fi
19779if test -z "$ac_cv_prog_PKG_CONFIG"; then
19780 ac_ct_PKG_CONFIG=$PKG_CONFIG
19781 # Extract the first word of "pkg-config", so it can be a program name with args.
19782set dummy pkg-config; ac_word=$2
Pablo Galindocc128882021-03-01 16:47:53 +000019783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19784printf %s "checking for $ac_word... " >&6; }
19785if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y}
19786then :
19787 printf %s "(cached) " >&6
19788else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019789 if test -n "$ac_ct_PKG_CONFIG"; then
19790 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
19791else
19792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19793for as_dir in $PATH
19794do
19795 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +000019796 case $as_dir in #(((
19797 '') as_dir=./ ;;
19798 */) ;;
19799 *) as_dir=$as_dir/ ;;
19800 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019801 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc128882021-03-01 16:47:53 +000019802 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019803 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Pablo Galindocc128882021-03-01 16:47:53 +000019804 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019805 break 2
19806 fi
19807done
19808 done
19809IFS=$as_save_IFS
19810
19811fi
19812fi
19813ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
19814if test -n "$ac_ct_PKG_CONFIG"; then
Pablo Galindocc128882021-03-01 16:47:53 +000019815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
19816printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019817else
Pablo Galindocc128882021-03-01 16:47:53 +000019818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19819printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019820fi
19821
19822 if test "x$ac_ct_PKG_CONFIG" = x; then
19823 PKG_CONFIG=""
19824 else
19825 case $cross_compiling:$ac_tool_warned in
19826yes:)
Pablo Galindocc128882021-03-01 16:47:53 +000019827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19828printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010019829ac_tool_warned=yes ;;
19830esac
19831 PKG_CONFIG=$ac_ct_PKG_CONFIG
19832 fi
19833else
19834 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
19835fi
19836
19837 if test x"$PKG_CONFIG" != x""; then
19838 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
19839 if test $? = 0; then
19840 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
19841 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
19842 found=true
19843 fi
19844 fi
19845
19846 # no such luck; use some default ssldirs
19847 if ! $found; then
19848 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
19849 fi
19850
19851
19852fi
19853
19854
19855
19856 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
19857 # an 'openssl' subdirectory
19858
19859 if ! $found; then
19860 OPENSSL_INCLUDES=
19861 for ssldir in $ssldirs; do
Pablo Galindocc128882021-03-01 16:47:53 +000019862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
19863printf %s "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019864 if test -f "$ssldir/include/openssl/ssl.h"; then
19865 OPENSSL_INCLUDES="-I$ssldir/include"
19866 OPENSSL_LDFLAGS="-L$ssldir/lib"
19867 OPENSSL_LIBS="-lssl -lcrypto"
19868 found=true
Pablo Galindocc128882021-03-01 16:47:53 +000019869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19870printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019871 break
19872 else
Pablo Galindocc128882021-03-01 16:47:53 +000019873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19874printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019875 fi
19876 done
19877
19878 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
19879 # it will just work!
19880 fi
19881
19882 # try the preprocessor and linker with our new flags,
19883 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
19884
Pablo Galindocc128882021-03-01 16:47:53 +000019885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
19886printf %s "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019887 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
19888 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
19889
19890 save_LIBS="$LIBS"
19891 save_LDFLAGS="$LDFLAGS"
19892 save_CPPFLAGS="$CPPFLAGS"
19893 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
19894 LIBS="$OPENSSL_LIBS $LIBS"
19895 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
19896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19897/* end confdefs.h. */
19898#include <openssl/ssl.h>
19899int
Pablo Galindocc128882021-03-01 16:47:53 +000019900main (void)
Christian Heimesff5be6e2018-01-20 13:19:21 +010019901{
19902SSL_new(NULL)
19903 ;
19904 return 0;
19905}
19906_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019907if ac_fn_c_try_link "$LINENO"
19908then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019909
Pablo Galindocc128882021-03-01 16:47:53 +000019910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19911printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019912 have_openssl=yes
19913
Pablo Galindocc128882021-03-01 16:47:53 +000019914else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019915
Pablo Galindocc128882021-03-01 16:47:53 +000019916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19917printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019918 have_openssl=no
19919
19920fi
Pablo Galindocc128882021-03-01 16:47:53 +000019921rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimesff5be6e2018-01-20 13:19:21 +010019922 conftest$ac_exeext conftest.$ac_ext
19923 CPPFLAGS="$save_CPPFLAGS"
19924 LDFLAGS="$save_LDFLAGS"
19925 LIBS="$save_LIBS"
19926
19927
19928
19929
19930
19931
19932if test "$have_openssl" = yes; then
Pablo Galindocc128882021-03-01 16:47:53 +000019933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
19934printf %s "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019935
19936 save_LIBS="$LIBS"
19937 save_LDFLAGS="$LDFLAGS"
19938 save_CPPFLAGS="$CPPFLAGS"
19939 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
19940 LIBS="$OPENSSL_LIBS $LIBS"
19941 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
19942
19943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19944/* end confdefs.h. */
19945
19946 #include <openssl/x509_vfy.h>
19947
19948int
Pablo Galindocc128882021-03-01 16:47:53 +000019949main (void)
Christian Heimesff5be6e2018-01-20 13:19:21 +010019950{
19951
19952 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
19953 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
19954 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
19955 X509_VERIFY_PARAM_set_hostflags(p, 0);
19956
19957 ;
19958 return 0;
19959}
19960
19961_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000019962if ac_fn_c_try_link "$LINENO"
19963then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019964
19965 ac_cv_has_x509_verify_param_set1_host=yes
19966
Pablo Galindocc128882021-03-01 16:47:53 +000019967else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019968
19969 ac_cv_has_x509_verify_param_set1_host=no
19970
19971fi
Pablo Galindocc128882021-03-01 16:47:53 +000019972rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimesff5be6e2018-01-20 13:19:21 +010019973 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc128882021-03-01 16:47:53 +000019974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
19975printf "%s\n" "$ac_cv_has_x509_verify_param_set1_host" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019976 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
19977
Pablo Galindocc128882021-03-01 16:47:53 +000019978printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
Christian Heimesff5be6e2018-01-20 13:19:21 +010019979
19980 fi
19981
19982 CPPFLAGS="$save_CPPFLAGS"
19983 LDFLAGS="$save_LDFLAGS"
19984 LIBS="$save_LIBS"
19985fi
19986
Christian Heimes892d66e2018-01-29 14:10:18 +010019987# ssl module default cipher suite string
19988
19989
19990
Pablo Galindocc128882021-03-01 16:47:53 +000019991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
19992printf %s "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010019993
19994# Check whether --with-ssl-default-suites was given.
Pablo Galindocc128882021-03-01 16:47:53 +000019995if test ${with_ssl_default_suites+y}
19996then :
Christian Heimes892d66e2018-01-29 14:10:18 +010019997 withval=$with_ssl_default_suites;
Pablo Galindocc128882021-03-01 16:47:53 +000019998{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
19999printf "%s\n" "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010020000case "$withval" in
20001 python)
Pablo Galindocc128882021-03-01 16:47:53 +000020002 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020003
20004 ;;
20005 openssl)
Pablo Galindocc128882021-03-01 16:47:53 +000020006 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020007
20008 ;;
20009 *)
Pablo Galindocc128882021-03-01 16:47:53 +000020010 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020011
Pablo Galindocc128882021-03-01 16:47:53 +000020012 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHER_STRING \"$withval\"" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020013
20014 ;;
20015esac
20016
Pablo Galindocc128882021-03-01 16:47:53 +000020017else $as_nop
Christian Heimes892d66e2018-01-29 14:10:18 +010020018
Pablo Galindocc128882021-03-01 16:47:53 +000020019{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: python" >&5
20020printf "%s\n" "python" >&6; }
20021printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010020022
20023
20024fi
20025
20026
Christian Heimes9b60e552020-05-15 23:54:53 +020020027# builtin hash modules
20028default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
20029
Pablo Galindocc128882021-03-01 16:47:53 +000020030printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020031
Pablo Galindocc128882021-03-01 16:47:53 +000020032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
20033printf %s "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020020034
20035# Check whether --with-builtin-hashlib-hashes was given.
Pablo Galindocc128882021-03-01 16:47:53 +000020036if test ${with_builtin_hashlib_hashes+y}
20037then :
Christian Heimes9b60e552020-05-15 23:54:53 +020020038 withval=$with_builtin_hashlib_hashes;
20039case "$withval" in
20040 yes)
20041 withval=$default_hashlib_hashes
20042 ;;
20043 no)
20044 withval=""
20045 ;;
20046esac
Pablo Galindocc128882021-03-01 16:47:53 +000020047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
20048printf "%s\n" "$withval" >&6; }
20049printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$withval\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020050
20051
Pablo Galindocc128882021-03-01 16:47:53 +000020052else $as_nop
Christian Heimes9b60e552020-05-15 23:54:53 +020020053
Pablo Galindocc128882021-03-01 16:47:53 +000020054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
20055printf "%s\n" "$default_hashlib_hashes" >&6; };
20056printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$default_hashlib_hashes\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020020057
20058
20059fi
20060
20061
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020062# --with-experimental-isolated-subinterpreters
20063
Pablo Galindocc128882021-03-01 16:47:53 +000020064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
20065printf %s "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020066
20067# Check whether --with-experimental-isolated-subinterpreters was given.
Pablo Galindocc128882021-03-01 16:47:53 +000020068if test ${with_experimental_isolated_subinterpreters+y}
20069then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020070 withval=$with_experimental_isolated_subinterpreters;
20071if test "$withval" != no
20072then
Pablo Galindocc128882021-03-01 16:47:53 +000020073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20074printf "%s\n" "yes" >&6; };
20075 printf "%s\n" "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020076
20077else
Pablo Galindocc128882021-03-01 16:47:53 +000020078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20079printf "%s\n" "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020080fi
Pablo Galindocc128882021-03-01 16:47:53 +000020081else $as_nop
20082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20083printf "%s\n" "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020084fi
20085
20086
Victor Stinner801bb0b2021-02-17 11:14:42 +010020087# --with-static-libpython
20088STATIC_LIBPYTHON=1
Pablo Galindocc128882021-03-01 16:47:53 +000020089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
20090printf %s "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020091
20092# Check whether --with-static-libpython was given.
Pablo Galindocc128882021-03-01 16:47:53 +000020093if test ${with_static_libpython+y}
20094then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010020095 withval=$with_static_libpython;
20096if test "$withval" = no
20097then
Pablo Galindocc128882021-03-01 16:47:53 +000020098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20099printf "%s\n" "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020100 STATIC_LIBPYTHON=0
20101else
Pablo Galindocc128882021-03-01 16:47:53 +000020102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20103printf "%s\n" "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020104fi
Pablo Galindocc128882021-03-01 16:47:53 +000020105else $as_nop
20106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20107printf "%s\n" "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020108fi
20109
20110LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050020111if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010020112 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
20113 if test "$STATIC_LIBPYTHON" = 1; then
20114 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20115 fi
20116else
20117 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20118fi
20119
20120
20121
pxinwr277ce302020-12-30 20:50:39 +080020122# Check whether to disable test modules. Once set, setup.py will not build
20123# test extension modules and "make install" will not install test suites.
Pablo Galindocc128882021-03-01 16:47:53 +000020124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
20125printf %s "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020126# Check whether --enable-test-modules was given.
Pablo Galindocc128882021-03-01 16:47:53 +000020127if test ${enable_test_modules+y}
20128then :
pxinwr277ce302020-12-30 20:50:39 +080020129 enableval=$enable_test_modules;
20130fi
20131
20132if test "$enable_test_modules" = no; then
20133 TEST_MODULES=no
Pablo Galindocc128882021-03-01 16:47:53 +000020134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20135printf "%s\n" "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020136else
20137 TEST_MODULES=yes
Pablo Galindocc128882021-03-01 16:47:53 +000020138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20139printf "%s\n" "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020140fi
20141
20142
Christian Heimes892d66e2018-01-29 14:10:18 +010020143
Guido van Rossum627b2d71993-12-24 10:39:16 +000020144# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020020145ac_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 +000020146
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020147ac_config_files="$ac_config_files Modules/ld_so_aix"
20148
Martin v. Löwis11437992002-04-12 09:54:03 +000020149cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020150# This file is a shell script that caches the results of configure
20151# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020152# scripts and configure runs, see configure's option --config-cache.
20153# It is not useful on other systems. If it contains results you don't
20154# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020155#
Martin v. Löwis11437992002-04-12 09:54:03 +000020156# config.status only pays attention to the cache file if you give it
20157# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020158#
Skip Montanaro6dead952003-09-25 14:50:04 +000020159# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020160# loading this file, other *unset* `ac_cv_foo' will be assigned the
20161# following values.
20162
20163_ACEOF
20164
Guido van Rossumf78abae1997-01-21 22:02:36 +000020165# The following way of writing the cache mishandles newlines in values,
20166# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020167# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020168# Ultrix sh set writes to stderr and can't be redirected directly,
20169# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020170(
20171 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20172 eval ac_val=\$$ac_var
20173 case $ac_val in #(
20174 *${as_nl}*)
20175 case $ac_var in #(
Pablo Galindocc128882021-03-01 16:47:53 +000020176 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20177printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020178 esac
20179 case $ac_var in #(
20180 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000020181 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20182 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020183 esac ;;
20184 esac
20185 done
20186
Martin v. Löwis11437992002-04-12 09:54:03 +000020187 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020188 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20189 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000020190 # `set' does not quote correctly, so add quotes: double-quote
20191 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000020192 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020193 "s/'/'\\\\''/g;
20194 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020195 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000020196 *)
20197 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020198 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020199 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020200 esac |
20201 sort
20202) |
Martin v. Löwis11437992002-04-12 09:54:03 +000020203 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020204 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000020205 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020206 :clear
Pablo Galindocc128882021-03-01 16:47:53 +000020207 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000020208 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020209 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20210 :end' >>confcache
20211if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20212 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020020213 if test "x$cache_file" != "x/dev/null"; then
Pablo Galindocc128882021-03-01 16:47:53 +000020214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20215printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020020216 if test ! -f "$cache_file" || test -h "$cache_file"; then
20217 cat confcache >"$cache_file"
20218 else
20219 case $cache_file in #(
20220 */* | ?:*)
20221 mv -f confcache "$cache_file"$$ &&
20222 mv -f "$cache_file"$$ "$cache_file" ;; #(
20223 *)
20224 mv -f confcache "$cache_file" ;;
20225 esac
20226 fi
20227 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020228 else
Pablo Galindocc128882021-03-01 16:47:53 +000020229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20230printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020231 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020232fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020233rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020234
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020235test "x$prefix" = xNONE && prefix=$ac_default_prefix
20236# Let make expand exec_prefix.
20237test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020238
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020239DEFS=-DHAVE_CONFIG_H
20240
Skip Montanaro6dead952003-09-25 14:50:04 +000020241ac_libobjs=
20242ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020243U=
Skip Montanaro6dead952003-09-25 14:50:04 +000020244for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20245 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Pablo Galindocc128882021-03-01 16:47:53 +000020247 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020248 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20249 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000020250 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20251 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000020252done
20253LIBOBJS=$ac_libobjs
20254
20255LTLIBOBJS=$ac_ltlibobjs
20256
20257
Martin v. Löwis11437992002-04-12 09:54:03 +000020258
Matthias Kloseb9621712010-04-24 17:59:49 +000020259
Victor Stinnere0be4232011-10-25 13:06:09 +020020260: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000020261ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000020262ac_clean_files_save=$ac_clean_files
20263ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Pablo Galindocc128882021-03-01 16:47:53 +000020264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20265printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000020266as_write_fail=0
20267cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020268#! $SHELL
20269# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020270# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020271# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020272# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020273
Martin v. Löwis11437992002-04-12 09:54:03 +000020274debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020275ac_cs_recheck=false
20276ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000020277
Matthias Kloseb9621712010-04-24 17:59:49 +000020278SHELL=\${CONFIG_SHELL-$SHELL}
20279export SHELL
20280_ASEOF
20281cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20282## -------------------- ##
20283## M4sh Initialization. ##
20284## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020286# Be more Bourne compatible
20287DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindocc128882021-03-01 16:47:53 +000020288as_nop=:
20289if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20290then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020291 emulate sh
20292 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000020293 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000020294 # is contrary to our usage. Disable this feature.
20295 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020296 setopt NO_GLOB_SUBST
Pablo Galindocc128882021-03-01 16:47:53 +000020297else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020298 case `(set -o) 2>/dev/null` in #(
20299 *posix*) :
20300 set -o posix ;; #(
20301 *) :
20302 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020303esac
Michael W. Hudson54241132001-12-07 15:38:26 +000020304fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000020305
20306
Pablo Galindocc128882021-03-01 16:47:53 +000020307
20308# Reset variables that may have inherited troublesome values from
20309# the environment.
20310
20311# IFS needs to be set, to space, tab, and newline, in precisely that order.
20312# (If _AS_PATH_WALK were called with IFS unset, it would have the
20313# side effect of setting IFS to empty, thus disabling word splitting.)
20314# Quoting is to prevent editors from complaining about space-tab.
Matthias Kloseb9621712010-04-24 17:59:49 +000020315as_nl='
20316'
20317export as_nl
Pablo Galindocc128882021-03-01 16:47:53 +000020318IFS=" "" $as_nl"
20319
20320PS1='$ '
20321PS2='> '
20322PS4='+ '
20323
20324# Ensure predictable behavior from utilities with locale-dependent output.
20325LC_ALL=C
20326export LC_ALL
20327LANGUAGE=C
20328export LANGUAGE
20329
20330# We cannot yet rely on "unset" to work, but we need these variables
20331# to be unset--not just set to an empty or harmless value--now, to
20332# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
20333# also avoids known problems related to "unset" and subshell syntax
20334# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
20335for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
20336do eval test \${$as_var+y} \
20337 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20338done
20339
20340# Ensure that fds 0, 1, and 2 are open.
20341if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
20342if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
20343if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020344
20345# The user is always right.
Pablo Galindocc128882021-03-01 16:47:53 +000020346if ${PATH_SEPARATOR+false} :; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020347 PATH_SEPARATOR=:
20348 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20349 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20350 PATH_SEPARATOR=';'
20351 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020355# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020020356as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000020357case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020358 *[\\/]* ) as_myself=$0 ;;
20359 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000020360for as_dir in $PATH
20361do
20362 IFS=$as_save_IFS
Pablo Galindocc128882021-03-01 16:47:53 +000020363 case $as_dir in #(((
20364 '') as_dir=./ ;;
20365 */) ;;
20366 *) as_dir=$as_dir/ ;;
20367 esac
20368 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000020369 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000020371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020372 ;;
20373esac
20374# We did not find ourselves, most probably we were run as `sh COMMAND'
20375# in which case we are not to be found in the path.
20376if test "x$as_myself" = x; then
20377 as_myself=$0
20378fi
20379if test ! -f "$as_myself"; then
Pablo Galindocc128882021-03-01 16:47:53 +000020380 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020381 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020382fi
20383
Matthias Kloseb9621712010-04-24 17:59:49 +000020384
20385
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020386# as_fn_error STATUS ERROR [LINENO LOG_FD]
20387# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000020388# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20389# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020390# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000020391as_fn_error ()
20392{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020393 as_status=$1; test $as_status -eq 0 && as_status=1
20394 if test "$4"; then
20395 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc128882021-03-01 16:47:53 +000020396 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000020397 fi
Pablo Galindocc128882021-03-01 16:47:53 +000020398 printf "%s\n" "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020399 as_fn_exit $as_status
20400} # as_fn_error
20401
20402
Pablo Galindocc128882021-03-01 16:47:53 +000020403
Matthias Kloseb9621712010-04-24 17:59:49 +000020404# as_fn_set_status STATUS
20405# -----------------------
20406# Set $? to STATUS, without forking.
20407as_fn_set_status ()
20408{
20409 return $1
20410} # as_fn_set_status
20411
20412# as_fn_exit STATUS
20413# -----------------
20414# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20415as_fn_exit ()
20416{
20417 set +e
20418 as_fn_set_status $1
20419 exit $1
20420} # as_fn_exit
20421
20422# as_fn_unset VAR
20423# ---------------
20424# Portably unset VAR.
20425as_fn_unset ()
20426{
20427 { eval $1=; unset $1;}
20428}
20429as_unset=as_fn_unset
Pablo Galindocc128882021-03-01 16:47:53 +000020430
Matthias Kloseb9621712010-04-24 17:59:49 +000020431# as_fn_append VAR VALUE
20432# ----------------------
20433# Append the text in VALUE to the end of the definition contained in VAR. Take
20434# advantage of any shell optimizations that allow amortized linear growth over
20435# repeated appends, instead of the typical quadratic growth present in naive
20436# implementations.
Pablo Galindocc128882021-03-01 16:47:53 +000020437if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
20438then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020439 eval 'as_fn_append ()
20440 {
20441 eval $1+=\$2
20442 }'
Pablo Galindocc128882021-03-01 16:47:53 +000020443else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020444 as_fn_append ()
20445 {
20446 eval $1=\$$1\$2
20447 }
20448fi # as_fn_append
20449
20450# as_fn_arith ARG...
20451# ------------------
20452# Perform arithmetic evaluation on the ARGs, and store the result in the
20453# global $as_val. Take advantage of shells that can avoid forks. The arguments
20454# must be portable across $(()) and expr.
Pablo Galindocc128882021-03-01 16:47:53 +000020455if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
20456then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020457 eval 'as_fn_arith ()
20458 {
20459 as_val=$(( $* ))
20460 }'
Pablo Galindocc128882021-03-01 16:47:53 +000020461else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020462 as_fn_arith ()
20463 {
20464 as_val=`expr "$@" || test $? -eq 1`
20465 }
20466fi # as_fn_arith
20467
20468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020469if expr a : '\(a\)' >/dev/null 2>&1 &&
20470 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20471 as_expr=expr
20472else
20473 as_expr=false
20474fi
20475
20476if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20477 as_basename=basename
20478else
20479 as_basename=false
20480fi
20481
Matthias Kloseb9621712010-04-24 17:59:49 +000020482if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20483 as_dirname=dirname
20484else
20485 as_dirname=false
20486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020488as_me=`$as_basename -- "$0" ||
20489$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20490 X"$0" : 'X\(//\)$' \| \
20491 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc128882021-03-01 16:47:53 +000020492printf "%s\n" X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020493 sed '/^.*\/\([^/][^/]*\)\/*$/{
20494 s//\1/
20495 q
20496 }
20497 /^X\/\(\/\/\)$/{
20498 s//\1/
20499 q
20500 }
20501 /^X\/\(\/\).*/{
20502 s//\1/
20503 q
20504 }
20505 s/.*/./; q'`
20506
Matthias Kloseb9621712010-04-24 17:59:49 +000020507# Avoid depending upon Character Ranges.
20508as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20509as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20510as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20511as_cr_digits='0123456789'
20512as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020513
Pablo Galindocc128882021-03-01 16:47:53 +000020514
20515# Determine whether it's possible to make 'echo' print without a newline.
20516# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
20517# for compatibility with existing Makefiles.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020518ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000020519case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020520-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000020521 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020522 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000020523 xy) ECHO_C='\c';;
20524 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20525 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020526 esac;;
20527*)
20528 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000020529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020530
Pablo Galindocc128882021-03-01 16:47:53 +000020531# For backward compatibility with old third-party macros, we provide
20532# the shell variables $as_echo and $as_echo_n. New code should use
20533# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
20534as_echo='printf %s\n'
20535as_echo_n='printf %s'
20536
Martin v. Löwis11437992002-04-12 09:54:03 +000020537rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020538if test -d conf$$.dir; then
20539 rm -f conf$$.dir/conf$$.file
20540else
20541 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000020542 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000020544if (echo >conf$$.file) 2>/dev/null; then
20545 if ln -s conf$$.file conf$$ 2>/dev/null; then
20546 as_ln_s='ln -s'
20547 # ... but there are two gotchas:
20548 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20549 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020550 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000020551 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020552 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020553 elif ln conf$$.file conf$$ 2>/dev/null; then
20554 as_ln_s=ln
20555 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020556 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020557 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020558else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020559 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000020560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020561rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20562rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000020563
Matthias Kloseb9621712010-04-24 17:59:49 +000020564
20565# as_fn_mkdir_p
20566# -------------
20567# Create "$as_dir" as a directory, including parents if necessary.
20568as_fn_mkdir_p ()
20569{
20570
20571 case $as_dir in #(
20572 -*) as_dir=./$as_dir;;
20573 esac
20574 test -d "$as_dir" || eval $as_mkdir_p || {
20575 as_dirs=
20576 while :; do
20577 case $as_dir in #(
Pablo Galindocc128882021-03-01 16:47:53 +000020578 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000020579 *) as_qdir=$as_dir;;
20580 esac
20581 as_dirs="'$as_qdir' $as_dirs"
20582 as_dir=`$as_dirname -- "$as_dir" ||
20583$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20584 X"$as_dir" : 'X\(//\)[^/]' \| \
20585 X"$as_dir" : 'X\(//\)$' \| \
20586 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc128882021-03-01 16:47:53 +000020587printf "%s\n" X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000020588 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20589 s//\1/
20590 q
20591 }
20592 /^X\(\/\/\)[^/].*/{
20593 s//\1/
20594 q
20595 }
20596 /^X\(\/\/\)$/{
20597 s//\1/
20598 q
20599 }
20600 /^X\(\/\).*/{
20601 s//\1/
20602 q
20603 }
20604 s/.*/./; q'`
20605 test -d "$as_dir" && break
20606 done
20607 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020608 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000020609
20610
20611} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000020612if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020613 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000020614else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020615 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020616 as_mkdir_p=false
20617fi
20618
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020619
20620# as_fn_executable_p FILE
20621# -----------------------
20622# Test if FILE is an executable regular file.
20623as_fn_executable_p ()
20624{
20625 test -f "$1" && test -x "$1"
20626} # as_fn_executable_p
20627as_test_x='test -x'
20628as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000020629
20630# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020631as_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 +000020632
20633# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020634as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020635
20636
Martin v. Löwis11437992002-04-12 09:54:03 +000020637exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000020638## ----------------------------------- ##
20639## Main body of $CONFIG_STATUS script. ##
20640## ----------------------------------- ##
20641_ASEOF
20642test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020643
Matthias Kloseb9621712010-04-24 17:59:49 +000020644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20645# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000020646# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020647# values after options handling.
20648ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010020649This file was extended by python $as_me 3.10, which was
Pablo Galindocc128882021-03-01 16:47:53 +000020650generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020651
20652 CONFIG_FILES = $CONFIG_FILES
20653 CONFIG_HEADERS = $CONFIG_HEADERS
20654 CONFIG_LINKS = $CONFIG_LINKS
20655 CONFIG_COMMANDS = $CONFIG_COMMANDS
20656 $ $0 $@
20657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020658on `(hostname || uname -n) 2>/dev/null | sed 1q`
20659"
20660
Martin v. Löwis11437992002-04-12 09:54:03 +000020661_ACEOF
20662
Matthias Kloseb9621712010-04-24 17:59:49 +000020663case $ac_config_files in *"
20664"*) set x $ac_config_files; shift; ac_config_files=$*;;
20665esac
20666
20667case $ac_config_headers in *"
20668"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20669esac
20670
20671
20672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020673# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010020674config_files="$ac_config_files"
20675config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000020676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020677_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020678
Matthias Kloseb9621712010-04-24 17:59:49 +000020679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020680ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000020681\`$as_me' instantiates files and other configuration actions
20682from templates according to the current configuration. Unless the files
20683and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000020684
Matthias Kloseb9621712010-04-24 17:59:49 +000020685Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000020686
20687 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020688 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000020689 --config print configuration, then exit
20690 -q, --quiet, --silent
20691 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020692 -d, --debug don't remove temporary files
20693 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000020694 --file=FILE[:TEMPLATE]
20695 instantiate the configuration file FILE
20696 --header=FILE[:TEMPLATE]
20697 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020698
20699Configuration files:
20700$config_files
20701
20702Configuration headers:
20703$config_headers
20704
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070020705Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020707_ACEOF
Pablo Galindocc128882021-03-01 16:47:53 +000020708ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
20709ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Matthias Kloseb9621712010-04-24 17:59:49 +000020710cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Pablo Galindocc128882021-03-01 16:47:53 +000020711ac_cs_config='$ac_cs_config_escaped'
Martin v. Löwis11437992002-04-12 09:54:03 +000020712ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010020713python config.status 3.10
Pablo Galindocc128882021-03-01 16:47:53 +000020714configured by $0, generated by GNU Autoconf 2.71,
Matthias Kloseb9621712010-04-24 17:59:49 +000020715 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000020716
Pablo Galindocc128882021-03-01 16:47:53 +000020717Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020718This config.status script is free software; the Free Software Foundation
20719gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020720
20721ac_pwd='$ac_pwd'
20722srcdir='$srcdir'
20723INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010020724MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000020725test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000020726_ACEOF
20727
Matthias Kloseb9621712010-04-24 17:59:49 +000020728cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20729# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000020730ac_need_defaults=:
20731while test $# != 0
20732do
20733 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020734 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020735 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20736 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020737 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020739 --*=)
20740 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20741 ac_optarg=
20742 ac_shift=:
20743 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020744 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020745 ac_option=$1
20746 ac_optarg=$2
20747 ac_shift=shift
20748 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020749 esac
20750
Skip Montanaro6dead952003-09-25 14:50:04 +000020751 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000020753 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20754 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020755 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Pablo Galindocc128882021-03-01 16:47:53 +000020756 printf "%s\n" "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020757 --config | --confi | --conf | --con | --co | --c )
Pablo Galindocc128882021-03-01 16:47:53 +000020758 printf "%s\n" "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020759 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000020760 debug=: ;;
20761 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020762 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020763 case $ac_optarg in
Pablo Galindocc128882021-03-01 16:47:53 +000020764 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020765 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020766 esac
20767 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020768 ac_need_defaults=false;;
20769 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020770 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020771 case $ac_optarg in
Pablo Galindocc128882021-03-01 16:47:53 +000020772 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020773 esac
20774 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020776 --he | --h)
20777 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020778 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020779Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020780 --help | --hel | -h )
Pablo Galindocc128882021-03-01 16:47:53 +000020781 printf "%s\n" "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020782 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20783 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20784 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020785
20786 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020787 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020788Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020789
Matthias Kloseb9621712010-04-24 17:59:49 +000020790 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020791 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020792
20793 esac
20794 shift
20795done
20796
Skip Montanaro6dead952003-09-25 14:50:04 +000020797ac_configure_extra_args=
20798
20799if $ac_cs_silent; then
20800 exec 6>/dev/null
20801 ac_configure_extra_args="$ac_configure_extra_args --silent"
20802fi
20803
20804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020805cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000020806if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020807 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000020808 shift
Pablo Galindocc128882021-03-01 16:47:53 +000020809 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000020810 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020811 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000020812 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000020813fi
20814
Martin v. Löwis11437992002-04-12 09:54:03 +000020815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020817exec 5>>config.log
20818{
20819 echo
20820 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20821## Running $as_me. ##
20822_ASBOX
Pablo Galindocc128882021-03-01 16:47:53 +000020823 printf "%s\n" "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020824} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020828_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020829
Matthias Kloseb9621712010-04-24 17:59:49 +000020830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831
20832# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000020833for ac_config_target in $ac_config_targets
20834do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020835 case $ac_config_target in
20836 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20837 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
20838 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000020839 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
20840 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020841 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000020842 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020020843 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010020844 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020845 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020846
Victor Stinnere0be4232011-10-25 13:06:09 +020020847 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 esac
20849done
20850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020851
Martin v. Löwis11437992002-04-12 09:54:03 +000020852# If the user did not use the arguments to specify the items to instantiate,
20853# then the envvar interface is used. Set only those that are not.
20854# We use the long form for the default assignment because of an extremely
20855# bizarre bug on SunOS 4.1.3.
20856if $ac_need_defaults; then
Pablo Galindocc128882021-03-01 16:47:53 +000020857 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
20858 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000020859fi
20860
Skip Montanaro6dead952003-09-25 14:50:04 +000020861# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020862# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000020863# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020864# Hook for its removal unless debugging.
20865# Note that there is a small window in which the directory will not be cleaned:
20866# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000020867$debug ||
20868{
Victor Stinnere0be4232011-10-25 13:06:09 +020020869 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020870 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020020871 : "${ac_tmp:=$tmp}"
20872 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020873' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000020874 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000020875}
Martin v. Löwis11437992002-04-12 09:54:03 +000020876# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020877
Martin v. Löwis11437992002-04-12 09:54:03 +000020878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020879 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020020880 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000020881} ||
20882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020883 tmp=./conf$$-$RANDOM
20884 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020885} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020020886ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000020887
Matthias Kloseb9621712010-04-24 17:59:49 +000020888# Set up the scripts for CONFIG_FILES section.
20889# No need to generate them if there are no CONFIG_FILES.
20890# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020891if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020892
Matthias Kloseb9621712010-04-24 17:59:49 +000020893
20894ac_cr=`echo X | tr X '\015'`
20895# On cygwin, bash can eat \r inside `` if the user requested igncr.
20896# But we know of no other shell where ac_cr would be empty at this
20897# point, so we can use a bashism as a fallback.
20898if test "x$ac_cr" = x; then
20899 eval ac_cr=\$\'\\r\'
20900fi
20901ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20902if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020903 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000020904else
20905 ac_cs_awk_cr=$ac_cr
20906fi
20907
Victor Stinnere0be4232011-10-25 13:06:09 +020020908echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000020909_ACEOF
20910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020911
Matthias Kloseb9621712010-04-24 17:59:49 +000020912{
20913 echo "cat >conf$$subs.awk <<_ACEOF" &&
20914 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20915 echo "_ACEOF"
20916} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020917 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20918ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919ac_delim='%!_!# '
20920for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000020921 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020922 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020923
Matthias Kloseb9621712010-04-24 17:59:49 +000020924 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20925 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020926 break
20927 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020928 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020929 else
20930 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000020931 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932done
Matthias Kloseb9621712010-04-24 17:59:49 +000020933rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020934
Matthias Kloseb9621712010-04-24 17:59:49 +000020935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020020936cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020938sed -n '
20939h
20940s/^/S["/; s/!.*/"]=/
20941p
20942g
20943s/^[^!]*!//
20944:repl
20945t repl
20946s/'"$ac_delim"'$//
20947t delim
20948:nl
20949h
20950s/\(.\{148\}\)..*/\1/
20951t more1
20952s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20953p
20954n
20955b repl
20956:more1
20957s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20958p
20959g
20960s/.\{148\}//
20961t nl
20962:delim
20963h
20964s/\(.\{148\}\)..*/\1/
20965t more2
20966s/["\\]/\\&/g; s/^/"/; s/$/"/
20967p
20968b
20969:more2
20970s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20971p
20972g
20973s/.\{148\}//
20974t delim
20975' <conf$$subs.awk | sed '
20976/^[^""]/{
20977 N
20978 s/\n//
20979}
20980' >>$CONFIG_STATUS || ac_write_fail=1
20981rm -f conf$$subs.awk
20982cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20983_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020020984cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000020985 for (key in S) S_is_set[key] = 1
20986 FS = ""
20987
20988}
20989{
20990 line = $ 0
20991 nfields = split(line, field, "@")
20992 substed = 0
20993 len = length(field[1])
20994 for (i = 2; i < nfields; i++) {
20995 key = field[i]
20996 keylen = length(key)
20997 if (S_is_set[key]) {
20998 value = S[key]
20999 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21000 len += length(value) + length(field[++i])
21001 substed = 1
21002 } else
21003 len += 1 + keylen
21004 }
21005
21006 print line
21007}
21008
21009_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21012if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21013 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21014else
21015 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020021016fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021017 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021018_ACEOF
21019
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021020# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
21021# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022# trailing colons and then remove the whole line if VPATH becomes empty
21023# (actually we leave an empty line to preserve line numbers).
21024if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021025 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
21026h
21027s///
21028s/^/:/
21029s/[ ]*$/:/
21030s/:\$(srcdir):/:/g
21031s/:\${srcdir}:/:/g
21032s/:@srcdir@:/:/g
21033s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021035x
21036s/\(=[ ]*\).*/\1/
21037G
21038s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021039s/^[^=]*=[ ]*$//
21040}'
21041fi
21042
Matthias Kloseb9621712010-04-24 17:59:49 +000021043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000021044fi # test -n "$CONFIG_FILES"
21045
Matthias Kloseb9621712010-04-24 17:59:49 +000021046# Set up the scripts for CONFIG_HEADERS section.
21047# No need to generate them if there are no CONFIG_HEADERS.
21048# This happens for instance with `./config.status Makefile'.
21049if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020021050cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000021051BEGIN {
21052_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021053
Matthias Kloseb9621712010-04-24 17:59:49 +000021054# Transform confdefs.h into an awk script `defines.awk', embedded as
21055# here-document in config.status, that substitutes the proper values into
21056# config.h.in to produce config.h.
21057
21058# Create a delimiter string that does not exist in confdefs.h, to ease
21059# handling of long lines.
21060ac_delim='%!_!# '
21061for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020021062 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
21063 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000021064 break
21065 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021066 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021067 else
21068 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21069 fi
21070done
21071
21072# For the awk script, D is an array of macro values keyed by name,
21073# likewise P contains macro parameters if any. Preserve backslash
21074# newline sequences.
21075
21076ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21077sed -n '
21078s/.\{148\}/&'"$ac_delim"'/g
21079t rset
21080:rset
21081s/^[ ]*#[ ]*define[ ][ ]*/ /
21082t def
21083d
21084:def
21085s/\\$//
21086t bsnl
21087s/["\\]/\\&/g
21088s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21089D["\1"]=" \3"/p
21090s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21091d
21092:bsnl
21093s/["\\]/\\&/g
21094s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21095D["\1"]=" \3\\\\\\n"\\/p
21096t cont
21097s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21098t cont
21099d
21100:cont
21101n
21102s/.\{148\}/&'"$ac_delim"'/g
21103t clear
21104:clear
21105s/\\$//
21106t bsnlc
21107s/["\\]/\\&/g; s/^/"/; s/$/"/p
21108d
21109:bsnlc
21110s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21111b cont
21112' <confdefs.h | sed '
21113s/'"$ac_delim"'/"\\\
21114"/g' >>$CONFIG_STATUS || ac_write_fail=1
21115
21116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21117 for (key in D) D_is_set[key] = 1
21118 FS = ""
21119}
21120/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21121 line = \$ 0
21122 split(line, arg, " ")
21123 if (arg[1] == "#") {
21124 defundef = arg[2]
21125 mac1 = arg[3]
21126 } else {
21127 defundef = substr(arg[1], 2)
21128 mac1 = arg[2]
21129 }
21130 split(mac1, mac2, "(") #)
21131 macro = mac2[1]
21132 prefix = substr(line, 1, index(line, defundef) - 1)
21133 if (D_is_set[macro]) {
21134 # Preserve the white space surrounding the "#".
21135 print prefix "define", macro P[macro] D[macro]
21136 next
21137 } else {
21138 # Replace #undef with comments. This is necessary, for example,
21139 # in the case of _POSIX_SOURCE, which is predefined and required
21140 # on some systems where configure will not decide to define it.
21141 if (defundef == "undef") {
21142 print "/*", prefix defundef, macro, "*/"
21143 next
21144 }
21145 }
21146}
21147{ print }
21148_ACAWK
21149_ACEOF
21150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021151 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021152fi # test -n "$CONFIG_HEADERS"
21153
21154
21155eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
21156shift
21157for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021158do
21159 case $ac_tag in
21160 :[FHLC]) ac_mode=$ac_tag; continue;;
21161 esac
21162 case $ac_mode$ac_tag in
21163 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020021164 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021165 :[FH]-) ac_tag=-:-;;
21166 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21167 esac
21168 ac_save_IFS=$IFS
21169 IFS=:
21170 set x $ac_tag
21171 IFS=$ac_save_IFS
21172 shift
21173 ac_file=$1
21174 shift
21175
21176 case $ac_mode in
21177 :L) ac_source=$1;;
21178 :[FH])
21179 ac_file_inputs=
21180 for ac_f
21181 do
21182 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020021183 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021184 *) # Look for the file first in the build tree, then in the source tree
21185 # (if the path is not absolute). The absolute path cannot be DOS-style,
21186 # because $ac_f cannot contain `:'.
21187 test -f "$ac_f" ||
21188 case $ac_f in
21189 [\\/$]*) false;;
21190 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21191 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020021192 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021193 esac
Pablo Galindocc128882021-03-01 16:47:53 +000021194 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000021195 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021196 done
21197
21198 # Let's still pretend it is `configure' which instantiates (i.e., don't
21199 # use $as_me), people would be surprised to read:
21200 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000021201 configure_input='Generated from '`
Pablo Galindocc128882021-03-01 16:47:53 +000021202 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000021203 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021204 if test x"$ac_file" != x-; then
21205 configure_input="$ac_file. $configure_input"
Pablo Galindocc128882021-03-01 16:47:53 +000021206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21207printf "%s\n" "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021208 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000021209 # Neutralize special characters interpreted by sed in replacement strings.
21210 case $configure_input in #(
21211 *\&* | *\|* | *\\* )
Pablo Galindocc128882021-03-01 16:47:53 +000021212 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000021213 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21214 *) ac_sed_conf_input=$configure_input;;
21215 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021216
21217 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020021218 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21219 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220 esac
21221 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021222 esac
21223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021224 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021225$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021226 X"$ac_file" : 'X\(//\)[^/]' \| \
21227 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021228 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc128882021-03-01 16:47:53 +000021229printf "%s\n" X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21231 s//\1/
21232 q
21233 }
21234 /^X\(\/\/\)[^/].*/{
21235 s//\1/
21236 q
21237 }
21238 /^X\(\/\/\)$/{
21239 s//\1/
21240 q
21241 }
21242 /^X\(\/\).*/{
21243 s//\1/
21244 q
21245 }
21246 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000021247 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000021248 ac_builddir=.
21249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021250case "$ac_dir" in
21251.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21252*)
Pablo Galindocc128882021-03-01 16:47:53 +000021253 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021254 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindocc128882021-03-01 16:47:53 +000021255 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021256 case $ac_top_builddir_sub in
21257 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21258 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21259 esac ;;
21260esac
21261ac_abs_top_builddir=$ac_pwd
21262ac_abs_builddir=$ac_pwd$ac_dir_suffix
21263# for backward compatibility:
21264ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000021265
21266case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021267 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000021268 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021269 ac_top_srcdir=$ac_top_builddir_sub
21270 ac_abs_top_srcdir=$ac_pwd ;;
21271 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000021272 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 ac_top_srcdir=$srcdir
21274 ac_abs_top_srcdir=$srcdir ;;
21275 *) # Relative name.
21276 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21277 ac_top_srcdir=$ac_top_build_prefix$srcdir
21278 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021279esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021280ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000021281
Martin v. Löwis11437992002-04-12 09:54:03 +000021282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021283 case $ac_mode in
21284 :F)
21285 #
21286 # CONFIG_FILE
21287 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021288
21289 case $INSTALL in
21290 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021291 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021292 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010021293 ac_MKDIR_P=$MKDIR_P
21294 case $MKDIR_P in
21295 [\\/$]* | ?:[\\/]* ) ;;
21296 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21297 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000021298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021299
Matthias Kloseb9621712010-04-24 17:59:49 +000021300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021301# If the template does not know about datarootdir, expand it.
21302# FIXME: This hack should be removed a few years after 2.60.
21303ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000021304ac_sed_dataroot='
21305/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021306 p
21307 q
21308}
21309/@datadir@/p
21310/@docdir@/p
21311/@infodir@/p
21312/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000021313/@mandir@/p'
21314case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021315*datarootdir*) ac_datarootdir_seen=yes;;
21316*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Pablo Galindocc128882021-03-01 16:47:53 +000021317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21318printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021321 ac_datarootdir_hack='
21322 s&@datadir@&$datadir&g
21323 s&@docdir@&$docdir&g
21324 s&@infodir@&$infodir&g
21325 s&@localedir@&$localedir&g
21326 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000021327 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021328esac
21329_ACEOF
21330
21331# Neutralize VPATH when `$srcdir' = `.'.
21332# Shell code in configure.ac might set extrasub.
21333# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000021334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21335ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000021336$extrasub
21337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000021339:t
21340/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000021341s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021342s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000021343s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021344s&@srcdir@&$ac_srcdir&;t t
21345s&@abs_srcdir@&$ac_abs_srcdir&;t t
21346s&@top_srcdir@&$ac_top_srcdir&;t t
21347s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21348s&@builddir@&$ac_builddir&;t t
21349s&@abs_builddir@&$ac_abs_builddir&;t t
21350s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21351s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010021352s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021353$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000021354"
Victor Stinnere0be4232011-10-25 13:06:09 +020021355eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21356 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021358test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020021359 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21360 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21361 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Pablo Galindocc128882021-03-01 16:47:53 +000021362 { 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 +020021363which seems to be undefined. Please make sure it is defined" >&5
Pablo Galindocc128882021-03-01 16:47:53 +000021364printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021365which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021366
Victor Stinnere0be4232011-10-25 13:06:09 +020021367 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000021368 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020021369 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21370 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000021371 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021372 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373 ;;
21374 :H)
21375 #
21376 # CONFIG_HEADER
21377 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021378 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000021379 {
Pablo Galindocc128882021-03-01 16:47:53 +000021380 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021381 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21382 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021383 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020021384 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Pablo Galindocc128882021-03-01 16:47:53 +000021385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21386printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021387 else
Matthias Kloseb9621712010-04-24 17:59:49 +000021388 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020021389 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021390 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021391 fi
21392 else
Pablo Galindocc128882021-03-01 16:47:53 +000021393 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021394 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021395 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021397 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000021398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021399
21400 esac
21401
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000021402
21403 case $ac_file$ac_mode in
21404 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
21405
21406 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021407done # for ac_tag
21408
Guido van Rossum627b2d71993-12-24 10:39:16 +000021409
Matthias Kloseb9621712010-04-24 17:59:49 +000021410as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000021411_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021412ac_clean_files=$ac_clean_files_save
21413
Matthias Kloseb9621712010-04-24 17:59:49 +000021414test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021415 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021416
Martin v. Löwis11437992002-04-12 09:54:03 +000021417
21418# configure is writing to config.log, and then calls config.status.
21419# config.status does its own redirection, appending to config.log.
21420# Unfortunately, on DOS this fails, as config.log is still kept open
21421# by configure, so config.status won't be able to write to it; its
21422# output is simply discarded. So we exec the FD to /dev/null,
21423# effectively closing config.log, so it can be properly (re)opened and
21424# appended to by config.status. When coming back to configure, we
21425# need to make the FD available again.
21426if test "$no_create" != yes; then
21427 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021428 ac_config_status_args=
21429 test "$silent" = yes &&
21430 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021431 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021432 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 exec 5>>config.log
21434 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21435 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021436 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000021437fi
21438if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Pablo Galindocc128882021-03-01 16:47:53 +000021439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21440printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021441fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021442
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021443
Christian Heimes75ed8902013-11-20 01:11:18 +010021444echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021445if test ! -f Modules/Setup.local
21446then
21447 echo "# Edit this file for local setup changes" >Modules/Setup.local
21448fi
21449
Christian Heimes75ed8902013-11-20 01:11:18 +010021450echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021451$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020021452 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020021453 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021454mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070021455
21456if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
21457 echo "" >&6
21458 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070021459 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 +000021460 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070021461 echo "" >&6
21462 echo "" >&6
21463fi
Pablo Galindocc128882021-03-01 16:47:53 +000021464