blob: 6bf76b51b46e7b7b802f35242c295eb5717869dc [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 Galindocc115e52021-08-02 20:06:40 +01003# Generated by GNU Autoconf 2.71 for python 3.10.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Pablo Galindocc115e52021-08-02 20:06:40 +01008# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindocc115e52021-08-02 20:06:40 +010020as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Pablo Galindocc115e52021-08-02 20:06:40 +010029else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Pablo Galindocc115e52021-08-02 20:06:40 +010039
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
Matthias Kloseb9621712010-04-24 17:59:49 +000047as_nl='
48'
49export as_nl
Pablo Galindocc115e52021-08-02 20:06:40 +010050IFS=" "" $as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
Pablo Galindocc115e52021-08-02 20:06:40 +010078if ${PATH_SEPARATOR+false} :; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000087# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020088as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000089case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000090 *[\\/]* ) as_myself=$0 ;;
91 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000092for as_dir in $PATH
93do
94 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +010095 case $as_dir in #(((
96 '') as_dir=./ ;;
97 */) ;;
98 *) as_dir=$as_dir/ ;;
99 esac
100 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Pablo Galindocc115e52021-08-02 20:06:40 +0100112 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000117# Use a proper internal environment variable to ensure we don't fall
118 # into an infinite loop, continuously re-executing ourselves.
119 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120 _as_can_reexec=no; export _as_can_reexec;
121 # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129 *v*x* | *x*v* ) as_opts=-vx ;;
130 *v* ) as_opts=-v ;;
131 *x* ) as_opts=-x ;;
132 * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
Pablo Galindocc115e52021-08-02 20:06:40 +0100137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000139 fi
140 # We don't want this to propagate to other subprocesses.
141 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000142if test "x$CONFIG_SHELL" = x; then
Pablo Galindocc115e52021-08-02 20:06:40 +0100143 as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000146 emulate sh
147 NULLCMD=:
148 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149 # is contrary to our usage. Disable this feature.
150 alias -g '\${1+\"\$@\"}'='\"\$@\"'
151 setopt NO_GLOB_SUBST
Pablo Galindocc115e52021-08-02 20:06:40 +0100152else \$as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000153 case \`(set -o) 2>/dev/null\` in #(
154 *posix*) :
155 set -o posix ;; #(
156 *) :
157 ;;
158esac
159fi
160"
161 as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Pablo Galindocc115e52021-08-02 20:06:40 +0100172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000174
Pablo Galindocc115e52021-08-02 20:06:40 +0100175else \$as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000176 exitcode=1; echo positional parameters were not saved.
177fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000178test x\$exitcode = x0 || exit 1
Pablo Galindocc115e52021-08-02 20:06:40 +0100179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000181test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000182 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186test \$(( 1 + 1 )) = 2 || exit 1"
Pablo Galindocc115e52021-08-02 20:06:40 +0100187 if (eval "$as_required") 2>/dev/null
188then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000189 as_have_required=yes
Pablo Galindocc115e52021-08-02 20:06:40 +0100190else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000191 as_have_required=no
192fi
Pablo Galindocc115e52021-08-02 20:06:40 +0100193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000195
Pablo Galindocc115e52021-08-02 20:06:40 +0100196else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198as_found=false
199for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200do
201 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +0100202 case $as_dir in #(((
203 '') as_dir=./ ;;
204 */) ;;
205 *) as_dir=$as_dir/ ;;
206 esac
Matthias Kloseb9621712010-04-24 17:59:49 +0000207 as_found=:
208 case $as_dir in #(
209 /*)
210 for as_base in sh bash ksh sh5; do
211 # Try only shells that exist, to save several forks.
Pablo Galindocc115e52021-08-02 20:06:40 +0100212 as_shell=$as_dir$as_base
Matthias Kloseb9621712010-04-24 17:59:49 +0000213 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Pablo Galindocc115e52021-08-02 20:06:40 +0100214 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000216 CONFIG_SHELL=$as_shell as_have_required=yes
Pablo Galindocc115e52021-08-02 20:06:40 +0100217 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000219 break 2
220fi
221fi
222 done;;
223 esac
224 as_found=false
225done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100226IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +0100227if $as_found
228then :
229
230else $as_nop
231 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
235fi
236fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000237
238
Pablo Galindocc115e52021-08-02 20:06:40 +0100239 if test "x$CONFIG_SHELL" != x
240then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
Pablo Galindocc115e52021-08-02 20:06:40 +0100258printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
Pablo Galindocc115e52021-08-02 20:06:40 +0100262 if test x$as_have_required = xno
263then :
264 printf "%s\n" "$0: This script requires a shell more modern than all"
265 printf "%s\n" "$0: the shells that I found on your system."
266 if test ${ZSH_VERSION+y} ; then
267 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Matthias Kloseb9621712010-04-24 17:59:49 +0000269 else
Pablo Galindocc115e52021-08-02 20:06:40 +0100270 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
Pablo Galindocc115e52021-08-02 20:06:40 +0100298
Matthias Kloseb9621712010-04-24 17:59:49 +0000299# as_fn_set_status STATUS
300# -----------------------
301# Set $? to STATUS, without forking.
302as_fn_set_status ()
303{
304 return $1
305} # as_fn_set_status
306
307# as_fn_exit STATUS
308# -----------------
309# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310as_fn_exit ()
311{
312 set +e
313 as_fn_set_status $1
314 exit $1
315} # as_fn_exit
Pablo Galindocc115e52021-08-02 20:06:40 +0100316# as_fn_nop
317# ---------
318# Do nothing but, unlike ":", preserve the value of $?.
319as_fn_nop ()
320{
321 return $?
322}
323as_nop=as_fn_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
325# as_fn_mkdir_p
326# -------------
327# Create "$as_dir" as a directory, including parents if necessary.
328as_fn_mkdir_p ()
329{
330
331 case $as_dir in #(
332 -*) as_dir=./$as_dir;;
333 esac
334 test -d "$as_dir" || eval $as_mkdir_p || {
335 as_dirs=
336 while :; do
337 case $as_dir in #(
Pablo Galindocc115e52021-08-02 20:06:40 +0100338 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +0000339 *) as_qdir=$as_dir;;
340 esac
341 as_dirs="'$as_qdir' $as_dirs"
342 as_dir=`$as_dirname -- "$as_dir" ||
343$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
344 X"$as_dir" : 'X\(//\)[^/]' \| \
345 X"$as_dir" : 'X\(//\)$' \| \
346 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc115e52021-08-02 20:06:40 +0100347printf "%s\n" X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +0000348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
349 s//\1/
350 q
351 }
352 /^X\(\/\/\)[^/].*/{
353 s//\1/
354 q
355 }
356 /^X\(\/\/\)$/{
357 s//\1/
358 q
359 }
360 /^X\(\/\).*/{
361 s//\1/
362 q
363 }
364 s/.*/./; q'`
365 test -d "$as_dir" && break
366 done
367 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200368 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000369
370
371} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000372
373# as_fn_executable_p FILE
374# -----------------------
375# Test if FILE is an executable regular file.
376as_fn_executable_p ()
377{
378 test -f "$1" && test -x "$1"
379} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000380# as_fn_append VAR VALUE
381# ----------------------
382# Append the text in VALUE to the end of the definition contained in VAR. Take
383# advantage of any shell optimizations that allow amortized linear growth over
384# repeated appends, instead of the typical quadratic growth present in naive
385# implementations.
Pablo Galindocc115e52021-08-02 20:06:40 +0100386if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
387then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000388 eval 'as_fn_append ()
389 {
390 eval $1+=\$2
391 }'
Pablo Galindocc115e52021-08-02 20:06:40 +0100392else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000393 as_fn_append ()
394 {
395 eval $1=\$$1\$2
396 }
397fi # as_fn_append
398
399# as_fn_arith ARG...
400# ------------------
401# Perform arithmetic evaluation on the ARGs, and store the result in the
402# global $as_val. Take advantage of shells that can avoid forks. The arguments
403# must be portable across $(()) and expr.
Pablo Galindocc115e52021-08-02 20:06:40 +0100404if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
405then :
Matthias Kloseb9621712010-04-24 17:59:49 +0000406 eval 'as_fn_arith ()
407 {
408 as_val=$(( $* ))
409 }'
Pablo Galindocc115e52021-08-02 20:06:40 +0100410else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000411 as_fn_arith ()
412 {
413 as_val=`expr "$@" || test $? -eq 1`
414 }
415fi # as_fn_arith
416
Pablo Galindocc115e52021-08-02 20:06:40 +0100417# as_fn_nop
418# ---------
419# Do nothing but, unlike ":", preserve the value of $?.
420as_fn_nop ()
421{
422 return $?
423}
424as_nop=as_fn_nop
Matthias Kloseb9621712010-04-24 17:59:49 +0000425
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200426# as_fn_error STATUS ERROR [LINENO LOG_FD]
427# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000428# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
429# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200430# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000431as_fn_error ()
432{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200433 as_status=$1; test $as_status -eq 0 && as_status=1
434 if test "$4"; then
435 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +0100436 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000437 fi
Pablo Galindocc115e52021-08-02 20:06:40 +0100438 printf "%s\n" "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000439 as_fn_exit $as_status
440} # as_fn_error
441
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442if expr a : '\(a\)' >/dev/null 2>&1 &&
443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
444 as_expr=expr
445else
446 as_expr=false
447fi
448
449if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
450 as_basename=basename
451else
452 as_basename=false
453fi
454
Matthias Kloseb9621712010-04-24 17:59:49 +0000455if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
456 as_dirname=dirname
457else
458 as_dirname=false
459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000461as_me=`$as_basename -- "$0" ||
462$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
463 X"$0" : 'X\(//\)$' \| \
464 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc115e52021-08-02 20:06:40 +0100465printf "%s\n" X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466 sed '/^.*\/\([^/][^/]*\)\/*$/{
467 s//\1/
468 q
469 }
470 /^X\/\(\/\/\)$/{
471 s//\1/
472 q
473 }
474 /^X\/\(\/\).*/{
475 s//\1/
476 q
477 }
478 s/.*/./; q'`
479
Matthias Kloseb9621712010-04-24 17:59:49 +0000480# Avoid depending upon Character Ranges.
481as_cr_letters='abcdefghijklmnopqrstuvwxyz'
482as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
483as_cr_Letters=$as_cr_letters$as_cr_LETTERS
484as_cr_digits='0123456789'
485as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486
487
Matthias Kloseb9621712010-04-24 17:59:49 +0000488 as_lineno_1=$LINENO as_lineno_1a=$LINENO
489 as_lineno_2=$LINENO as_lineno_2a=$LINENO
490 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
491 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
492 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493 sed -n '
494 p
495 /[$]LINENO/=
496 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000498 s/[$]LINENO.*/&-/
499 t lineno
500 b
501 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503 :loop
504 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000505 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000506 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000508 chmod +x "$as_me.lineno" ||
Pablo Galindocc115e52021-08-02 20:06:40 +0100509 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000510
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000511 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
512 # already done that, so ensure we don't try to do so again and fall
513 # in an infinite loop. This has already happened in practice.
514 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000515 # Don't try to exec as it changes $[0], causing all sort of problems
516 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517 # original and so on. Autoconf is especially sensitive to this).
518 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000519 # Exit status is that of the last command.
520 exit
521}
522
Pablo Galindocc115e52021-08-02 20:06:40 +0100523
524# Determine whether it's possible to make 'echo' print without a newline.
525# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
526# for compatibility with existing Makefiles.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000528case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000529-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 xy) ECHO_C='\c';;
533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
534 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000535 esac;;
536*)
537 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000538esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000539
Pablo Galindocc115e52021-08-02 20:06:40 +0100540# For backward compatibility with old third-party macros, we provide
541# the shell variables $as_echo and $as_echo_n. New code should use
542# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
543as_echo='printf %s\n'
544as_echo_n='printf %s'
545
546
Martin v. Löwis11437992002-04-12 09:54:03 +0000547rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000548if test -d conf$$.dir; then
549 rm -f conf$$.dir/conf$$.file
550else
551 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000552 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000554if (echo >conf$$.file) 2>/dev/null; then
555 if ln -s conf$$.file conf$$ 2>/dev/null; then
556 as_ln_s='ln -s'
557 # ... but there are two gotchas:
558 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
559 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000560 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000561 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000562 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000563 elif ln conf$$.file conf$$ 2>/dev/null; then
564 as_ln_s=ln
565 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000566 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000568else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000569 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000573
Skip Montanaro6dead952003-09-25 14:50:04 +0000574if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000575 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000576else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000577 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000578 as_mkdir_p=false
579fi
580
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000581as_test_x='test -x'
582as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000583
584# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000585as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000586
587# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000588as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000589
590
Matthias Kloseb9621712010-04-24 17:59:49 +0000591test -n "$DJDIR" || exec 7<&0 </dev/null
592exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000593
594# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200595# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# so uname gets run too.
597ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
598
Martin v. Löwis11437992002-04-12 09:54:03 +0000599#
600# Initializations.
601#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000602ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000603ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000604ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000605LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000606cross_compiling=no
607subdirs=
608MFLAGS=
609MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000610
Martin v. Löwis11437992002-04-12 09:54:03 +0000611# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000612PACKAGE_NAME='python'
613PACKAGE_TARNAME='python'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100614PACKAGE_VERSION='3.10'
615PACKAGE_STRING='python 3.10'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700616PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000617PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000618
619ac_unique_file="Include/object.h"
620# Factoring default headers for most tests.
621ac_includes_default="\
Pablo Galindocc115e52021-08-02 20:06:40 +0100622#include <stddef.h>
623#ifdef HAVE_STDIO_H
624# include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000625#endif
Pablo Galindocc115e52021-08-02 20:06:40 +0100626#ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000627# include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000628#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000629#ifdef HAVE_STRING_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000630# include <string.h>
631#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000632#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000633# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000634#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000635#ifdef HAVE_STDINT_H
636# include <stdint.h>
637#endif
Pablo Galindocc115e52021-08-02 20:06:40 +0100638#ifdef HAVE_STRINGS_H
639# include <strings.h>
640#endif
641#ifdef HAVE_SYS_TYPES_H
642# include <sys/types.h>
643#endif
644#ifdef HAVE_SYS_STAT_H
645# include <sys/stat.h>
646#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000647#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000648# include <unistd.h>
649#endif"
650
Pablo Galindocc115e52021-08-02 20:06:40 +0100651ac_header_c_list=
Matthias Kloseb9621712010-04-24 17:59:49 +0000652ac_subst_vars='LTLIBOBJS
pxinwr277ce302020-12-30 20:50:39 +0800653TEST_MODULES
Victor Stinner801bb0b2021-02-17 11:14:42 +0100654LIBRARY_DEPS
655STATIC_LIBPYTHON
Christian Heimes32eba612021-03-19 10:29:25 +0100656OPENSSL_RPATH
Christian Heimesff5be6e2018-01-20 13:19:21 +0100657OPENSSL_LDFLAGS
658OPENSSL_LIBS
659OPENSSL_INCLUDES
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100660PKG_CONFIG
Ned Deily322f5ba2013-11-21 23:01:59 -0800661ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000663THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100664WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100665LIBPL
666PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100667PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200668BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200669LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700670EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200671ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000672SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000673LIBC
674LIBM
675HAVE_GETHOSTBYNAME
676HAVE_GETHOSTBYNAME_R
677HAVE_GETHOSTBYNAME_R_3_ARG
678HAVE_GETHOSTBYNAME_R_5_ARG
679HAVE_GETHOSTBYNAME_R_6_ARG
680LIBOBJS
681TRUE
682MACHDEP_OBJS
683DYNLOADFILE
684DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700685DTRACE_OBJS
686DTRACE_HEADERS
687DFLAGS
688DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700689TCLTK_LIBS
690TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000691LIBFFI_INCLUDEDIR
Paul Ganssle62972d92020-05-16 04:20:06 -0400692TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000693SHLIBS
694CFLAGSFORSHARED
695LINKFORSHARED
696CCSHARED
697BLDSHARED
698LDCXXSHARED
699LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700700SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701LIBTOOL_CRUFT
702OTHER_LIBTOOL_OPT
Pablo Galindocc115e52021-08-02 20:06:40 +0100703EGREP
Matthias Kloseb9621712010-04-24 17:59:49 +0000704UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100705LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700706CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200708CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000709OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700710LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700711LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700712LLVM_PROF_ERR
713LLVM_PROF_FILE
714LLVM_PROF_MERGER
715PGO_PROF_USE_FLAG
716PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200717LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200718LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700719PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700720DEF_MAKE_RULE
721DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000722ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000723LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100724MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000725INSTALL_DATA
726INSTALL_SCRIPT
727INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200728ac_ct_READELF
729READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000730ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200731ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000732AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000733GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200734EXPORTSFROM
735EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000736LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000737LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000738RUNSHARED
739INSTSONAME
740LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000741PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000742BLDLIBRARY
743DLLLIBRARY
744LDLIBRARY
745LIBRARY
746BUILDEXEEXT
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200747NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200748MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200749PLATFORM_TRIPLET
750MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200751ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000752MAINCC
753CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700754SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200755GREP
756CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000757OBJEXT
758EXEEXT
759ac_ct_CC
760CPPFLAGS
761LDFLAGS
762CFLAGS
763CC
764EXPORT_MACOSX_DEPLOYMENT_TARGET
765CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200766_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000767MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000768FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000769FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800770FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000771FRAMEWORKALTINSTALLLAST
772FRAMEWORKALTINSTALLFIRST
773FRAMEWORKINSTALLLAST
774FRAMEWORKINSTALLFIRST
775PYTHONFRAMEWORKINSTALLDIR
776PYTHONFRAMEWORKPREFIX
777PYTHONFRAMEWORKDIR
778PYTHONFRAMEWORKIDENTIFIER
779PYTHONFRAMEWORK
Ned Deily0cb33da2021-05-02 04:48:29 -0400780LIPO_INTEL64_FLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000781LIPO_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 Galindoba421752021-05-03 20:33:17 +0100821runstatedir
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 Heimes32eba612021-03-19 10:29:25 +0100886with_openssl_rpath
Christian Heimes892d66e2018-01-29 14:10:18 +0100887with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200888with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200889with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100890with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800891enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000892'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 ac_precious_vars='build_alias
894host_alias
895target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100896MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897CC
898CFLAGS
899LDFLAGS
900LIBS
901CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800902CPP
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +0100903PROFILE_TASK'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000907ac_init_help=
908ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000909ac_unrecognized_opts=
910ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911# The variables have the same names as the options, with
912# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000913cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916no_recursion=
917prefix=NONE
918program_prefix=NONE
919program_suffix=NONE
920program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925x_includes=NONE
926x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000927
928# Installation directory options.
929# These are left unexpanded so users can "make install exec_prefix=/foo"
930# and all the variables that are supposed to be based on exec_prefix
931# by default will actually change.
932# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934bindir='${exec_prefix}/bin'
935sbindir='${exec_prefix}/sbin'
936libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937datarootdir='${prefix}/share'
938datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939sysconfdir='${prefix}/etc'
940sharedstatedir='${prefix}/com'
941localstatedir='${prefix}/var'
Pablo Galindoba421752021-05-03 20:33:17 +0100942runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943includedir='${prefix}/include'
944oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
946infodir='${datarootdir}/info'
947htmldir='${docdir}'
948dvidir='${docdir}'
949pdfdir='${docdir}'
950psdir='${docdir}'
951libdir='${exec_prefix}/lib'
952localedir='${datarootdir}/locale'
953mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000958do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 # If the previous option needs an argument, assign it.
960 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 ac_prev=
963 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000964 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000966 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200967 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
968 *=) ac_optarg= ;;
969 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 case $ac_dashdash$ac_option in
973 --)
974 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -bindir | --bindir | --bindi | --bind | --bin | --bi)
977 ac_prev=bindir ;;
978 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980
981 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 -cache-file | --cache-file | --cache-fil | --cache-fi \
987 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
988 ac_prev=cache_file ;;
989 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
990 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 cache_file=$ac_optarg ;;
992
993 --config-cache | -C)
994 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000996 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000998 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1002 | --dataroo | --dataro | --datar)
1003 ac_prev=datarootdir ;;
1004 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1005 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1006 datarootdir=$ac_optarg ;;
1007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001009 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc115e52021-08-02 20:06:40 +01001012 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001013 ac_useropt_orig=$ac_useropt
Pablo Galindocc115e52021-08-02 20:06:40 +01001014 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001015 case $ac_user_opts in
1016 *"
1017"enable_$ac_useropt"
1018"*) ;;
1019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1020 ac_unrecognized_sep=', ';;
1021 esac
1022 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023
1024 -docdir | --docdir | --docdi | --doc | --do)
1025 ac_prev=docdir ;;
1026 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1027 docdir=$ac_optarg ;;
1028
1029 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1030 ac_prev=dvidir ;;
1031 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1032 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001035 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001037 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc115e52021-08-02 20:06:40 +01001038 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001039 ac_useropt_orig=$ac_useropt
Pablo Galindocc115e52021-08-02 20:06:40 +01001040 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001041 case $ac_user_opts in
1042 *"
1043"enable_$ac_useropt"
1044"*) ;;
1045 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1046 ac_unrecognized_sep=', ';;
1047 esac
1048 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1051 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1052 | --exec | --exe | --ex)
1053 ac_prev=exec_prefix ;;
1054 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1055 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1056 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 # Obsolete; use --with-gas.
1061 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -help | --help | --hel | --he | -h)
1064 ac_init_help=long ;;
1065 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1066 ac_init_help=recursive ;;
1067 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1068 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001075 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1076 ac_prev=htmldir ;;
1077 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1078 | --ht=*)
1079 htmldir=$ac_optarg ;;
1080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -includedir | --includedir | --includedi | --included | --include \
1082 | --includ | --inclu | --incl | --inc)
1083 ac_prev=includedir ;;
1084 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1085 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
1088 -infodir | --infodir | --infodi | --infod | --info | --inf)
1089 ac_prev=infodir ;;
1090 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
1093 -libdir | --libdir | --libdi | --libd)
1094 ac_prev=libdir ;;
1095 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
1098 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1099 | --libexe | --libex | --libe)
1100 ac_prev=libexecdir ;;
1101 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1102 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001105 -localedir | --localedir | --localedi | --localed | --locale)
1106 ac_prev=localedir ;;
1107 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1108 localedir=$ac_optarg ;;
1109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001111 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112 ac_prev=localstatedir ;;
1113 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001114 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116
1117 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1118 ac_prev=mandir ;;
1119 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123 # Obsolete; use --without-fp.
1124 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 no_create=yes ;;
1129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1131 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1132 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1135 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1136 | --oldin | --oldi | --old | --ol | --o)
1137 ac_prev=oldincludedir ;;
1138 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1139 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1140 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1144 ac_prev=prefix ;;
1145 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1149 | --program-pre | --program-pr | --program-p)
1150 ac_prev=program_prefix ;;
1151 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1152 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1156 | --program-suf | --program-su | --program-s)
1157 ac_prev=program_suffix ;;
1158 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1159 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -program-transform-name | --program-transform-name \
1163 | --program-transform-nam | --program-transform-na \
1164 | --program-transform-n | --program-transform- \
1165 | --program-transform | --program-transfor \
1166 | --program-transfo | --program-transf \
1167 | --program-trans | --program-tran \
1168 | --progr-tra | --program-tr | --program-t)
1169 ac_prev=program_transform_name ;;
1170 -program-transform-name=* | --program-transform-name=* \
1171 | --program-transform-nam=* | --program-transform-na=* \
1172 | --program-transform-n=* | --program-transform-=* \
1173 | --program-transform=* | --program-transfor=* \
1174 | --program-transfo=* | --program-transf=* \
1175 | --program-trans=* | --program-tran=* \
1176 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001179 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1180 ac_prev=pdfdir ;;
1181 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1182 pdfdir=$ac_optarg ;;
1183
1184 -psdir | --psdir | --psdi | --psd | --ps)
1185 ac_prev=psdir ;;
1186 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1187 psdir=$ac_optarg ;;
1188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1190 | -silent | --silent | --silen | --sile | --sil)
1191 silent=yes ;;
1192
Pablo Galindoba421752021-05-03 20:33:17 +01001193 -runstatedir | --runstatedir | --runstatedi | --runstated \
1194 | --runstate | --runstat | --runsta | --runst | --runs \
1195 | --run | --ru | --r)
1196 ac_prev=runstatedir ;;
1197 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1198 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1199 | --run=* | --ru=* | --r=*)
1200 runstatedir=$ac_optarg ;;
1201
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001202 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1203 ac_prev=sbindir ;;
1204 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1205 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001207
1208 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1209 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1210 | --sharedst | --shareds | --shared | --share | --shar \
1211 | --sha | --sh)
1212 ac_prev=sharedstatedir ;;
1213 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1214 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1215 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1216 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001218
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219 -site | --site | --sit)
1220 ac_prev=site ;;
1221 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1225 ac_prev=srcdir ;;
1226 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001229 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1230 | --syscon | --sysco | --sysc | --sys | --sy)
1231 ac_prev=sysconfdir ;;
1232 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1233 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001235
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1242 verbose=yes ;;
1243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 -version | --version | --versio | --versi | --vers | -V)
1245 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc115e52021-08-02 20:06:40 +01001251 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 ac_useropt_orig=$ac_useropt
Pablo Galindocc115e52021-08-02 20:06:40 +01001253 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 case $ac_user_opts in
1255 *"
1256"with_$ac_useropt"
1257"*) ;;
1258 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1259 ac_unrecognized_sep=', ';;
1260 esac
1261 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262
1263 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001265 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc115e52021-08-02 20:06:40 +01001267 as_fn_error $? "invalid package name: \`$ac_useropt'"
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 ac_useropt_orig=$ac_useropt
Pablo Galindocc115e52021-08-02 20:06:40 +01001269 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 case $ac_user_opts in
1271 *"
1272"with_$ac_useropt"
1273"*) ;;
1274 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1275 ac_unrecognized_sep=', ';;
1276 esac
1277 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279 --x)
1280 # Obsolete; use --with-x.
1281 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282
1283 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1284 | --x-incl | --x-inc | --x-in | --x-i)
1285 ac_prev=x_includes ;;
1286 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1287 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001289
1290 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1291 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1292 ac_prev=x_libraries ;;
1293 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1294 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001295 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001297 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1298Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 ;;
1300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 *=*)
1302 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1303 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001304 case $ac_envvar in #(
1305 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001307 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001309 export $ac_envvar ;;
1310
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001311 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 # FIXME: should be removed in autoconf 3.0.
Pablo Galindocc115e52021-08-02 20:06:40 +01001313 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Pablo Galindocc115e52021-08-02 20:06:40 +01001315 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001316 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001317 ;;
1318
1319 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320done
1321
Guido van Rossum7f43da71994-08-01 12:15:30 +00001322if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001323 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001324 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001325fi
1326
Matthias Kloseb9621712010-04-24 17:59:49 +00001327if test -n "$ac_unrecognized_opts"; then
1328 case $enable_option_checking in
1329 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Pablo Galindocc115e52021-08-02 20:06:40 +01001331 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 esac
1333fi
1334
1335# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1337 datadir sysconfdir sharedstatedir localstatedir includedir \
1338 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindoba421752021-05-03 20:33:17 +01001339 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 # Remove trailing slashes.
1343 case $ac_val in
1344 */ )
1345 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1346 eval $ac_var=\$ac_val;;
1347 esac
1348 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001349 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 [\\/$]* | ?:[\\/]* ) continue;;
1351 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001353 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001354done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355
Martin v. Löwis11437992002-04-12 09:54:03 +00001356# There might be people who depend on the old broken behavior: `$host'
1357# used to hold the argument of --host etc.
1358# FIXME: To remove some day.
1359build=$build_alias
1360host=$host_alias
1361target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362
Martin v. Löwis11437992002-04-12 09:54:03 +00001363# FIXME: To remove some day.
1364if test "x$host_alias" != x; then
1365 if test "x$build_alias" = x; then
1366 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001367 elif test "x$build_alias" != "x$host_alias"; then
1368 cross_compiling=yes
1369 fi
1370fi
1371
1372ac_tool_prefix=
1373test -n "$host_alias" && ac_tool_prefix=$host_alias-
1374
1375test "$silent" = yes && exec 6>/dev/null
1376
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378ac_pwd=`pwd` && test -n "$ac_pwd" &&
1379ac_ls_di=`ls -di .` &&
1380ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384
1385
Guido van Rossum627b2d71993-12-24 10:39:16 +00001386# Find the source files, if location was not specified.
1387if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001388 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001389 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 ac_confdir=`$as_dirname -- "$as_myself" ||
1391$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1392 X"$as_myself" : 'X\(//\)[^/]' \| \
1393 X"$as_myself" : 'X\(//\)$' \| \
1394 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc115e52021-08-02 20:06:40 +01001395printf "%s\n" X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1397 s//\1/
1398 q
1399 }
1400 /^X\(\/\/\)[^/].*/{
1401 s//\1/
1402 q
1403 }
1404 /^X\(\/\/\)$/{
1405 s//\1/
1406 q
1407 }
1408 /^X\(\/\).*/{
1409 s//\1/
1410 q
1411 }
1412 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001413 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001415 srcdir=..
1416 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001417else
1418 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001420if test ! -r "$srcdir/$ac_unique_file"; then
1421 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001422 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001424ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1425ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001426 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001427 pwd)`
1428# When building in place, set srcdir=.
1429if test "$ac_abs_confdir" = "$ac_pwd"; then
1430 srcdir=.
1431fi
1432# Remove unnecessary trailing slashes from srcdir.
1433# Double slashes in file names in object file debugging info
1434# mess up M-x gdb in Emacs.
1435case $srcdir in
1436*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1437esac
1438for ac_var in $ac_precious_vars; do
1439 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1440 eval ac_env_${ac_var}_value=\$${ac_var}
1441 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1442 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1443done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001444
Martin v. Löwis11437992002-04-12 09:54:03 +00001445#
1446# Report the --help message.
1447#
1448if test "$ac_init_help" = "long"; then
1449 # Omit some internal or obsolete options to make the list less imposing.
1450 # This message is too long to be a string in the A/UX 3.1 sh.
1451 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001452\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001453
1454Usage: $0 [OPTION]... [VAR=VALUE]...
1455
1456To assign environment variables (e.g., CC, CFLAGS...), specify them as
1457VAR=VALUE. See below for descriptions of some of the useful variables.
1458
1459Defaults for the options are specified in brackets.
1460
1461Configuration:
1462 -h, --help display this help and exit
1463 --help=short display options specific to this package
1464 --help=recursive display the short help of all the included packages
1465 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001466 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 --cache-file=FILE cache test results in FILE [disabled]
1468 -C, --config-cache alias for \`--cache-file=config.cache'
1469 -n, --no-create do not create output files
1470 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1471
Martin v. Löwis11437992002-04-12 09:54:03 +00001472Installation directories:
1473 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001477
1478By default, \`make install' will install all the files in
1479\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1480an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1481for instance \`--prefix=\$HOME'.
1482
1483For better control, use the options below.
1484
1485Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 --bindir=DIR user executables [EPREFIX/bin]
1487 --sbindir=DIR system admin executables [EPREFIX/sbin]
1488 --libexecdir=DIR program executables [EPREFIX/libexec]
1489 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1490 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1491 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Pablo Galindoba421752021-05-03 20:33:17 +01001492 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 --libdir=DIR object code libraries [EPREFIX/lib]
1494 --includedir=DIR C header files [PREFIX/include]
1495 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1496 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1497 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1498 --infodir=DIR info documentation [DATAROOTDIR/info]
1499 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1500 --mandir=DIR man documentation [DATAROOTDIR/man]
1501 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1502 --htmldir=DIR html documentation [DOCDIR]
1503 --dvidir=DIR dvi documentation [DOCDIR]
1504 --pdfdir=DIR pdf documentation [DOCDIR]
1505 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001506_ACEOF
1507
1508 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001509
1510System types:
1511 --build=BUILD configure for building on BUILD [guessed]
1512 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001513_ACEOF
1514fi
1515
1516if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001517 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001518 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001519 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 cat <<\_ACEOF
1521
1522Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001523 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001524 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1525 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001526 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001527 create a universal binary build. SDKDIR specifies
1528 which macOS SDK should be used to perform the build,
1529 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001531 create a Python.framework rather than a traditional
1532 Unix install. optional INSTALLDIR specifies the
1533 installation path. see Mac/README.rst (default is
1534 no)
1535 --enable-shared enable building a shared Python library (default is
1536 no)
1537 --enable-profiling enable C-level code profiling with gprof (default is
1538 no)
1539 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1540 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001541 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 support loadable extensions in _sqlite module, see
1543 Doc/library/sqlite3.rst (default is no)
1544 --enable-ipv6 enable ipv6 (with ipv4) support, see
1545 Doc/library/socket.rst (default is yes if supported)
1546 --enable-big-digits[=15|30]
1547 use big digits (30 or 15 bits) for Python longs
1548 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001549 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
1551Optional Packages:
1552 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1553 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001554 --with-universal-archs=ARCH
Ned Deily0cb33da2021-05-02 04:48:29 -04001555 specify the kind of macOS universal binary that
1556 should be created. This option is only valid when
Anthony Shaw2de064e2020-01-14 17:40:10 +11001557 --enable-universalsdk is set; options are:
Ned Deily0cb33da2021-05-02 04:48:29 -04001558 ("universal2", "intel-64", "intel-32", "intel",
1559 "32-bit", "64-bit", "3-way", or "all") see
1560 Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001561 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001562 specify the name for the python framework on macOS
1563 only valid when --enable-framework is set. see
1564 Mac/README.rst (default is 'Python')
1565 --with-cxx-main[=COMPILER]
1566 compile main() and link Python executable with C++
1567 compiler specified in COMPILER (default is $CXX)
1568 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1569 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001570 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001571 (default is no)
1572 --with-assertions build with C assertions enabled (default is no)
1573 --with-lto enable Link-Time-Optimization in any build (default
1574 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001575 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 select hash algorithm for use in Python/pyhash.c
1577 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001578 --with-tzpath=<list of absolute paths separated by pathsep>
1579 Select the default time zone search path for zoneinfo.TZPATH
1580
Charles-François Natalid30b0222014-05-08 23:08:51 +01001581 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001582 enable AddressSanitizer memory error detector,
1583 'asan' (default is no)
1584 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1585 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001586 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001587 enable UndefinedBehaviorSanitizer undefined
1588 behaviour detector, 'ubsan' (default is no)
1589 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001590 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001591 library, see Doc/library/pyexpat.rst (default is no)
1592 --with-system-ffi build _ctypes module using an installed ffi library,
1593 see Doc/library/ctypes.rst (default is
1594 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001595 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001596 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001597 --with-decimal-contextvar
1598 build _decimal module using a coroutine-local rather
1599 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001600 --with-tcltk-includes='-I...'
1601 override search for Tcl and Tk include files
1602 --with-tcltk-libs='-L...'
1603 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001604 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001605 override order to check db backends for dbm; a valid
1606 value is a colon separated string with the backend
1607 names `ndbm', `gdbm' and `bdb'.
1608 --with-doc-strings enable documentation strings (default is yes)
1609 --with-pymalloc enable specialized mallocs (default is yes)
1610 --with-c-locale-coercion
1611 enable C locale coercion to a UTF-8 based locale
1612 (default is yes)
1613 --with-valgrind enable Valgrind support (default is no)
1614 --with-dtrace enable DTrace support (default is no)
1615 --with-libm=STRING override libm math library to STRING (default is
1616 system-dependent)
1617 --with-libc=STRING override libc C library to STRING (default is
1618 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001619 --with-platlibdir=DIRNAME
1620 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001621 --with-wheel-pkg-dir=PATH
1622 Directory of wheel packages used by ensurepip
1623 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001624 --with(out)-readline[=editline]
1625 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001626 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001627 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001628 --with-ensurepip[=install|upgrade|no]
1629 "install" or "upgrade" using bundled pip (default is
1630 upgrade)
Christian Heimes5d6e8c12021-03-27 14:44:04 +01001631 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes32eba612021-03-19 10:29:25 +01001632 --with-openssl-rpath=[DIR|auto|no]
1633 Set runtime library directory (rpath) for OpenSSL
1634 libraries, no (default): don't set rpath, auto:
1635 auto-detect rpath from --with-openssl and
1636 pkg-config, DIR: set an explicit rpath
Christian Heimes892d66e2018-01-29 14:10:18 +01001637 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001638 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001639 Python's preferred selection (default), openssl:
1640 leave OpenSSL's defaults untouched, STRING: use a
Christian Heimese9832522021-05-01 20:53:10 +02001641 custom string, python and STRING also set TLS 1.2 as
1642 minimum TLS version
Christian Heimes9b60e552020-05-15 23:54:53 +02001643 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1644 builtin hash modules, md5, sha1, sha256, sha512,
1645 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001646 --with-experimental-isolated-subinterpreters
1647 better isolate subinterpreters, experimental build
1648 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001649 --without-static-libpython
1650 do not build libpythonMAJOR.MINOR.a and do not
1651 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001652
1653Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001654 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 CC C compiler command
1656 CFLAGS C compiler flags
1657 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1658 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001662 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001663 PROFILE_TASK
1664 Python args for PGO generation task
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666Use these variables to override the choices made by `configure' or to help
1667it to find libraries and programs with nonstandard names/locations.
1668
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001669Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001670_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001671ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001672fi
1673
1674if test "$ac_init_help" = "recursive"; then
1675 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001676 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 test -d "$ac_dir" ||
1678 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1679 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001680 ac_builddir=.
1681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001682case "$ac_dir" in
1683.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1684*)
Pablo Galindocc115e52021-08-02 20:06:40 +01001685 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001686 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindocc115e52021-08-02 20:06:40 +01001687 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001688 case $ac_top_builddir_sub in
1689 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1690 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1691 esac ;;
1692esac
1693ac_abs_top_builddir=$ac_pwd
1694ac_abs_builddir=$ac_pwd$ac_dir_suffix
1695# for backward compatibility:
1696ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001697
1698case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001700 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701 ac_top_srcdir=$ac_top_builddir_sub
1702 ac_abs_top_srcdir=$ac_pwd ;;
1703 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001704 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001705 ac_top_srcdir=$srcdir
1706 ac_abs_top_srcdir=$srcdir ;;
1707 *) # Relative name.
1708 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1709 ac_top_srcdir=$ac_top_build_prefix$srcdir
1710 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001711esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001712ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001714 cd "$ac_dir" || { ac_status=$?; continue; }
Pablo Galindocc115e52021-08-02 20:06:40 +01001715 # Check for configure.gnu first; this name is used for a wrapper for
1716 # Metaconfig's "Configure" on case-insensitive file systems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001717 if test -f "$ac_srcdir/configure.gnu"; then
1718 echo &&
1719 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1720 elif test -f "$ac_srcdir/configure"; then
1721 echo &&
1722 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 else
Pablo Galindocc115e52021-08-02 20:06:40 +01001724 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001725 fi || ac_status=$?
1726 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 done
1728fi
1729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001730test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001731if $ac_init_version; then
1732 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001733python configure 3.10
Pablo Galindocc115e52021-08-02 20:06:40 +01001734generated by GNU Autoconf 2.71
Martin v. Löwis11437992002-04-12 09:54:03 +00001735
Pablo Galindocc115e52021-08-02 20:06:40 +01001736Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001737This configure script is free software; the Free Software Foundation
1738gives unlimited permission to copy, distribute and modify it.
1739_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001740 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001742
1743## ------------------------ ##
1744## Autoconf initialization. ##
1745## ------------------------ ##
1746
1747# ac_fn_c_try_compile LINENO
1748# --------------------------
1749# Try to compile conftest.$ac_ext, and return whether this succeeded.
1750ac_fn_c_try_compile ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +01001753 rm -f conftest.$ac_objext conftest.beam
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 if { { ac_try="$ac_compile"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc115e52021-08-02 20:06:40 +01001760printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 (eval "$ac_compile") 2>conftest.err
1762 ac_status=$?
1763 if test -s conftest.err; then
1764 grep -v '^ *+' conftest.err >conftest.er1
1765 cat conftest.er1 >&5
1766 mv -f conftest.er1 conftest.err
1767 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01001768 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 test $ac_status = 0; } && {
1770 test -z "$ac_c_werror_flag" ||
1771 test ! -s conftest.err
Pablo Galindocc115e52021-08-02 20:06:40 +01001772 } && test -s conftest.$ac_objext
1773then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 ac_retval=0
Pablo Galindocc115e52021-08-02 20:06:40 +01001775else $as_nop
1776 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001777sed 's/^/| /' conftest.$ac_ext >&5
1778
1779 ac_retval=1
1780fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001781 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 as_fn_set_status $ac_retval
1783
1784} # ac_fn_c_try_compile
1785
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001786# ac_fn_c_try_cpp LINENO
1787# ----------------------
1788# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1789ac_fn_c_try_cpp ()
1790{
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792 if { { ac_try="$ac_cpp conftest.$ac_ext"
1793case "(($ac_try" in
1794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1795 *) ac_try_echo=$ac_try;;
1796esac
1797eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc115e52021-08-02 20:06:40 +01001798printf "%s\n" "$ac_try_echo"; } >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001799 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1800 ac_status=$?
1801 if test -s conftest.err; then
1802 grep -v '^ *+' conftest.err >conftest.er1
1803 cat conftest.er1 >&5
1804 mv -f conftest.er1 conftest.err
1805 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01001806 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001807 test $ac_status = 0; } > conftest.i && {
1808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1809 test ! -s conftest.err
Pablo Galindocc115e52021-08-02 20:06:40 +01001810 }
1811then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001812 ac_retval=0
Pablo Galindocc115e52021-08-02 20:06:40 +01001813else $as_nop
1814 printf "%s\n" "$as_me: failed program was:" >&5
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001815sed 's/^/| /' conftest.$ac_ext >&5
1816
1817 ac_retval=1
1818fi
1819 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1820 as_fn_set_status $ac_retval
1821
1822} # ac_fn_c_try_cpp
1823
Matthias Kloseb9621712010-04-24 17:59:49 +00001824# ac_fn_c_try_link LINENO
1825# -----------------------
1826# Try to link conftest.$ac_ext, and return whether this succeeded.
1827ac_fn_c_try_link ()
1828{
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +01001830 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 if { { ac_try="$ac_link"
1832case "(($ac_try" in
1833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1834 *) ac_try_echo=$ac_try;;
1835esac
1836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc115e52021-08-02 20:06:40 +01001837printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 (eval "$ac_link") 2>conftest.err
1839 ac_status=$?
1840 if test -s conftest.err; then
1841 grep -v '^ *+' conftest.err >conftest.er1
1842 cat conftest.er1 >&5
1843 mv -f conftest.er1 conftest.err
1844 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01001845 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001846 test $ac_status = 0; } && {
1847 test -z "$ac_c_werror_flag" ||
1848 test ! -s conftest.err
1849 } && test -s conftest$ac_exeext && {
1850 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001851 test -x conftest$ac_exeext
Pablo Galindocc115e52021-08-02 20:06:40 +01001852 }
1853then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001854 ac_retval=0
Pablo Galindocc115e52021-08-02 20:06:40 +01001855else $as_nop
1856 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001857sed 's/^/| /' conftest.$ac_ext >&5
1858
1859 ac_retval=1
1860fi
1861 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1862 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1863 # interfere with the next link command; also delete a directory that is
1864 # left behind by Apple's compiler. We do this before executing the actions.
1865 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001867 as_fn_set_status $ac_retval
1868
1869} # ac_fn_c_try_link
1870
Pablo Galindocc115e52021-08-02 20:06:40 +01001871# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +00001872# -------------------------------------------------------
Pablo Galindocc115e52021-08-02 20:06:40 +01001873# Tests whether HEADER exists and can be compiled using the include files in
1874# INCLUDES, setting the cache variable VAR accordingly.
1875ac_fn_c_check_header_compile ()
Matthias Kloseb9621712010-04-24 17:59:49 +00001876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +01001878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1879printf %s "checking for $2... " >&6; }
1880if eval test \${$3+y}
1881then :
1882 printf %s "(cached) " >&6
1883else $as_nop
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001885/* end confdefs.h. */
1886$4
1887#include <$2>
1888_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01001889if ac_fn_c_try_compile "$LINENO"
1890then :
1891 eval "$3=yes"
1892else $as_nop
1893 eval "$3=no"
Matthias Kloseb9621712010-04-24 17:59:49 +00001894fi
Pablo Galindocc115e52021-08-02 20:06:40 +01001895rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001896fi
1897eval ac_res=\$$3
Pablo Galindocc115e52021-08-02 20:06:40 +01001898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001901
Pablo Galindocc115e52021-08-02 20:06:40 +01001902} # ac_fn_c_check_header_compile
Matthias Kloseb9621712010-04-24 17:59:49 +00001903
1904# ac_fn_c_try_run LINENO
1905# ----------------------
Pablo Galindocc115e52021-08-02 20:06:40 +01001906# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1907# executables *can* be run.
Matthias Kloseb9621712010-04-24 17:59:49 +00001908ac_fn_c_try_run ()
1909{
1910 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1911 if { { ac_try="$ac_link"
1912case "(($ac_try" in
1913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1914 *) ac_try_echo=$ac_try;;
1915esac
1916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc115e52021-08-02 20:06:40 +01001917printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001918 (eval "$ac_link") 2>&5
1919 ac_status=$?
Pablo Galindocc115e52021-08-02 20:06:40 +01001920 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1922 { { case "(($ac_try" in
1923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1924 *) ac_try_echo=$ac_try;;
1925esac
1926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Pablo Galindocc115e52021-08-02 20:06:40 +01001927printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 (eval "$ac_try") 2>&5
1929 ac_status=$?
Pablo Galindocc115e52021-08-02 20:06:40 +01001930 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1931 test $ac_status = 0; }; }
1932then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 ac_retval=0
Pablo Galindocc115e52021-08-02 20:06:40 +01001934else $as_nop
1935 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1936 printf "%s\n" "$as_me: failed program was:" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00001937sed 's/^/| /' conftest.$ac_ext >&5
1938
1939 ac_retval=$ac_status
1940fi
1941 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001942 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 as_fn_set_status $ac_retval
1944
1945} # ac_fn_c_try_run
1946
Matthias Kloseb9621712010-04-24 17:59:49 +00001947# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1948# -------------------------------------------
1949# Tests whether TYPE exists after having included INCLUDES, setting cache
1950# variable VAR accordingly.
1951ac_fn_c_check_type ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +01001954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1955printf %s "checking for $2... " >&6; }
1956if eval test \${$3+y}
1957then :
1958 printf %s "(cached) " >&6
1959else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 eval "$3=no"
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$4
1964int
Pablo Galindocc115e52021-08-02 20:06:40 +01001965main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001966{
1967if (sizeof ($2))
1968 return 0;
1969 ;
1970 return 0;
1971}
1972_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01001973if ac_fn_c_try_compile "$LINENO"
1974then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976/* end confdefs.h. */
1977$4
1978int
Pablo Galindocc115e52021-08-02 20:06:40 +01001979main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00001980{
1981if (sizeof (($2)))
1982 return 0;
1983 ;
1984 return 0;
1985}
1986_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01001987if ac_fn_c_try_compile "$LINENO"
1988then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
Pablo Galindocc115e52021-08-02 20:06:40 +01001990else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00001991 eval "$3=yes"
1992fi
Pablo Galindocc115e52021-08-02 20:06:40 +01001993rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001994fi
Pablo Galindocc115e52021-08-02 20:06:40 +01001995rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001996fi
1997eval ac_res=\$$3
Pablo Galindocc115e52021-08-02 20:06:40 +01001998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002} # ac_fn_c_check_type
2003
Matthias Kloseb9621712010-04-24 17:59:49 +00002004# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2005# --------------------------------------------
2006# Tries to find the compile-time value of EXPR in a program that includes
2007# INCLUDES, setting VAR accordingly. Returns whether the value could be
2008# computed
2009ac_fn_c_compute_int ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 if test "$cross_compiling" = yes; then
2013 # Depending upon the size, compute the lo and hi bounds.
2014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
Pablo Galindocc115e52021-08-02 20:06:40 +01002018main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002019{
2020static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002028if ac_fn_c_try_compile "$LINENO"
2029then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002030 ac_lo=0 ac_mid=0
2031 while :; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
Pablo Galindocc115e52021-08-02 20:06:40 +01002036main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002037{
2038static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002039test_array [0] = 0;
2040return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
2042 ;
2043 return 0;
2044}
2045_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002046if ac_fn_c_try_compile "$LINENO"
2047then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002048 ac_hi=$ac_mid; break
Pablo Galindocc115e52021-08-02 20:06:40 +01002049else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002050 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2051 if test $ac_lo -le $ac_mid; then
2052 ac_lo= ac_hi=
2053 break
2054 fi
2055 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2056fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002057rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002058 done
Pablo Galindocc115e52021-08-02 20:06:40 +01002059else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
Pablo Galindocc115e52021-08-02 20:06:40 +01002064main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002065{
2066static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002067test_array [0] = 0;
2068return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002069
2070 ;
2071 return 0;
2072}
2073_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002074if ac_fn_c_try_compile "$LINENO"
2075then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002076 ac_hi=-1 ac_mid=-1
2077 while :; do
2078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2079/* end confdefs.h. */
2080$4
2081int
Pablo Galindocc115e52021-08-02 20:06:40 +01002082main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002083{
2084static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002085test_array [0] = 0;
2086return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002087
2088 ;
2089 return 0;
2090}
2091_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002092if ac_fn_c_try_compile "$LINENO"
2093then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002094 ac_lo=$ac_mid; break
Pablo Galindocc115e52021-08-02 20:06:40 +01002095else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002096 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2097 if test $ac_mid -le $ac_hi; then
2098 ac_lo= ac_hi=
2099 break
2100 fi
2101 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2102fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002103rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002104 done
Pablo Galindocc115e52021-08-02 20:06:40 +01002105else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002106 ac_lo= ac_hi=
2107fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002108rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002109fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002110rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002111# Binary search between lo and hi bounds.
2112while test "x$ac_lo" != "x$ac_hi"; do
2113 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
Pablo Galindocc115e52021-08-02 20:06:40 +01002118main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002119{
2120static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002121test_array [0] = 0;
2122return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002123
2124 ;
2125 return 0;
2126}
2127_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002128if ac_fn_c_try_compile "$LINENO"
2129then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002130 ac_hi=$ac_mid
Pablo Galindocc115e52021-08-02 20:06:40 +01002131else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002132 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2133fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002134rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002135done
2136case $ac_lo in #((
2137?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2138'') ac_retval=1 ;;
2139esac
2140 else
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
Pablo Galindocc115e52021-08-02 20:06:40 +01002144static long int longval (void) { return $2; }
2145static unsigned long int ulongval (void) { return $2; }
Matthias Kloseb9621712010-04-24 17:59:49 +00002146#include <stdio.h>
2147#include <stdlib.h>
2148int
Pablo Galindocc115e52021-08-02 20:06:40 +01002149main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002150{
2151
2152 FILE *f = fopen ("conftest.val", "w");
2153 if (! f)
2154 return 1;
2155 if (($2) < 0)
2156 {
2157 long int i = longval ();
2158 if (i != ($2))
2159 return 1;
2160 fprintf (f, "%ld", i);
2161 }
2162 else
2163 {
2164 unsigned long int i = ulongval ();
2165 if (i != ($2))
2166 return 1;
2167 fprintf (f, "%lu", i);
2168 }
2169 /* Do not output a trailing newline, as this causes \r\n confusion
2170 on some platforms. */
2171 return ferror (f) || fclose (f) != 0;
2172
2173 ;
2174 return 0;
2175}
2176_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002177if ac_fn_c_try_run "$LINENO"
2178then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Pablo Galindocc115e52021-08-02 20:06:40 +01002180else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 ac_retval=1
2182fi
2183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2184 conftest.$ac_objext conftest.beam conftest.$ac_ext
2185rm -f conftest.val
2186
2187 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002188 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 as_fn_set_status $ac_retval
2190
2191} # ac_fn_c_compute_int
2192
2193# ac_fn_c_check_func LINENO FUNC VAR
2194# ----------------------------------
2195# Tests whether FUNC exists, setting the cache variable VAR accordingly
2196ac_fn_c_check_func ()
2197{
2198 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +01002199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2200printf %s "checking for $2... " >&6; }
2201if eval test \${$3+y}
2202then :
2203 printf %s "(cached) " >&6
2204else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206/* end confdefs.h. */
2207/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2208 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2209#define $2 innocuous_$2
2210
2211/* System header to define __stub macros and hopefully few prototypes,
Pablo Galindocc115e52021-08-02 20:06:40 +01002212 which can conflict with char $2 (); below. */
Matthias Kloseb9621712010-04-24 17:59:49 +00002213
Pablo Galindocc115e52021-08-02 20:06:40 +01002214#include <limits.h>
Matthias Kloseb9621712010-04-24 17:59:49 +00002215#undef $2
2216
2217/* Override any GCC internal prototype to avoid an error.
2218 Use char because int might match the return type of a GCC
2219 builtin and then its argument prototype would still apply. */
2220#ifdef __cplusplus
2221extern "C"
2222#endif
2223char $2 ();
2224/* The GNU C library defines this for functions which it implements
2225 to always fail with ENOSYS. Some functions are actually named
2226 something starting with __ and the normal name is an alias. */
2227#if defined __stub_$2 || defined __stub___$2
2228choke me
2229#endif
2230
2231int
Pablo Galindocc115e52021-08-02 20:06:40 +01002232main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002233{
2234return $2 ();
2235 ;
2236 return 0;
2237}
2238_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002239if ac_fn_c_try_link "$LINENO"
2240then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002241 eval "$3=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +01002242else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002243 eval "$3=no"
2244fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002245rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00002246 conftest$ac_exeext conftest.$ac_ext
2247fi
2248eval ac_res=\$$3
Pablo Galindocc115e52021-08-02 20:06:40 +01002249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2250printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002251 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002252
2253} # ac_fn_c_check_func
2254
Pablo Galindocc115e52021-08-02 20:06:40 +01002255# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2256# ------------------------------------------------------------------
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002257# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
Pablo Galindocc115e52021-08-02 20:06:40 +01002258# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2259ac_fn_check_decl ()
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002260{
2261 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2262 as_decl_name=`echo $2|sed 's/ *(.*//'`
Pablo Galindocc115e52021-08-02 20:06:40 +01002263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2264printf %s "checking whether $as_decl_name is declared... " >&6; }
2265if eval test \${$3+y}
2266then :
2267 printf %s "(cached) " >&6
2268else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002269 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
Pablo Galindocc115e52021-08-02 20:06:40 +01002270 eval ac_save_FLAGS=\$$6
2271 as_fn_append $6 " $5"
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$4
2275int
Pablo Galindocc115e52021-08-02 20:06:40 +01002276main (void)
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002277{
2278#ifndef $as_decl_name
2279#ifdef __cplusplus
2280 (void) $as_decl_use;
2281#else
2282 (void) $as_decl_name;
2283#endif
2284#endif
2285
2286 ;
2287 return 0;
2288}
2289_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002290if ac_fn_c_try_compile "$LINENO"
2291then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002292 eval "$3=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +01002293else $as_nop
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002294 eval "$3=no"
2295fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002296rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2297 eval $6=\$ac_save_FLAGS
2298
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002299fi
2300eval ac_res=\$$3
Pablo Galindocc115e52021-08-02 20:06:40 +01002301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2302printf "%s\n" "$ac_res" >&6; }
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002303 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2304
Pablo Galindocc115e52021-08-02 20:06:40 +01002305} # ac_fn_check_decl
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002306
Matthias Kloseb9621712010-04-24 17:59:49 +00002307# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2308# ----------------------------------------------------
2309# Tries to find if the field MEMBER exists in type AGGR, after including
2310# INCLUDES, setting cache variable VAR accordingly.
2311ac_fn_c_check_member ()
2312{
2313 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +01002314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2315printf %s "checking for $2.$3... " >&6; }
2316if eval test \${$4+y}
2317then :
2318 printf %s "(cached) " >&6
2319else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$5
2323int
Pablo Galindocc115e52021-08-02 20:06:40 +01002324main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002325{
2326static $2 ac_aggr;
2327if (ac_aggr.$3)
2328return 0;
2329 ;
2330 return 0;
2331}
2332_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002333if ac_fn_c_try_compile "$LINENO"
2334then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002335 eval "$4=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +01002336else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h. */
2339$5
2340int
Pablo Galindocc115e52021-08-02 20:06:40 +01002341main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00002342{
2343static $2 ac_aggr;
2344if (sizeof ac_aggr.$3)
2345return 0;
2346 ;
2347 return 0;
2348}
2349_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01002350if ac_fn_c_try_compile "$LINENO"
2351then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002352 eval "$4=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +01002353else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00002354 eval "$4=no"
2355fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002356rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002357fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002358rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00002359fi
2360eval ac_res=\$$4
Pablo Galindocc115e52021-08-02 20:06:40 +01002361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2362printf "%s\n" "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002363 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002364
2365} # ac_fn_c_check_member
Pablo Galindocc115e52021-08-02 20:06:40 +01002366ac_configure_args_raw=
2367for ac_arg
2368do
2369 case $ac_arg in
2370 *\'*)
2371 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2372 esac
2373 as_fn_append ac_configure_args_raw " '$ac_arg'"
2374done
2375
2376case $ac_configure_args_raw in
2377 *$as_nl*)
2378 ac_safe_unquote= ;;
2379 *)
2380 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2381 ac_unsafe_a="$ac_unsafe_z#~"
2382 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2383 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2384esac
2385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002387This file contains any messages produced by compilers while
2388running configure, to aid debugging if configure makes a mistake.
2389
Pablo Galindod4fe0982020-05-19 03:33:01 +01002390It was created by python $as_me 3.10, which was
Pablo Galindocc115e52021-08-02 20:06:40 +01002391generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
Pablo Galindocc115e52021-08-02 20:06:40 +01002393 $ $0$ac_configure_args_raw
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002397{
2398cat <<_ASUNAME
2399## --------- ##
2400## Platform. ##
2401## --------- ##
2402
2403hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2404uname -m = `(uname -m) 2>/dev/null || echo unknown`
2405uname -r = `(uname -r) 2>/dev/null || echo unknown`
2406uname -s = `(uname -s) 2>/dev/null || echo unknown`
2407uname -v = `(uname -v) 2>/dev/null || echo unknown`
2408
2409/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2410/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2411
2412/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2413/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2414/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002416/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2417/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2418/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2419
2420_ASUNAME
2421
2422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2423for as_dir in $PATH
2424do
2425 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +01002426 case $as_dir in #(((
2427 '') as_dir=./ ;;
2428 */) ;;
2429 *) as_dir=$as_dir/ ;;
2430 esac
2431 printf "%s\n" "PATH: $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002434
2435} >&5
2436
2437cat >&5 <<_ACEOF
2438
2439
2440## ----------- ##
2441## Core tests. ##
2442## ----------- ##
2443
2444_ACEOF
2445
2446
2447# Keep a trace of the command line.
2448# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002449# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002450# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002451# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002452ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002453ac_configure_args0=
2454ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002455ac_must_keep_next=false
2456for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002457do
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 for ac_arg
2459 do
2460 case $ac_arg in
2461 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2462 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2463 | -silent | --silent | --silen | --sile | --sil)
2464 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 *\'*)
Pablo Galindocc115e52021-08-02 20:06:40 +01002466 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 esac
2468 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002470 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002472 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002473 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002475 case $ac_arg in
2476 *=* | --config-cache | -C | -disable-* | --disable-* \
2477 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2478 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2479 | -with-* | --with-* | -without-* | --without-* | --x)
2480 case "$ac_configure_args0 " in
2481 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2482 esac
2483 ;;
2484 -* ) ac_must_keep_next=true ;;
2485 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 ;;
2489 esac
2490 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002491done
Matthias Kloseb9621712010-04-24 17:59:49 +00002492{ ac_configure_args0=; unset ac_configure_args0;}
2493{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002494
2495# When interrupted or exit'd, cleanup temporary files, and complete
2496# config.log. We remove comments because anyway the quotes in there
2497# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498# WARNING: Use '\'' to represent an apostrophe within the trap.
2499# 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 +00002500trap 'exit_status=$?
Pablo Galindocc115e52021-08-02 20:06:40 +01002501 # Sanitize IFS.
2502 IFS=" "" $as_nl"
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 # Save into config.log some information that might help in debugging.
2504 {
2505 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002506
Pablo Galindocc115e52021-08-02 20:06:40 +01002507 printf "%s\n" "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002508## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 echo
2511 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512(
2513 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2514 eval ac_val=\$$ac_var
2515 case $ac_val in #(
2516 *${as_nl}*)
2517 case $ac_var in #(
Pablo Galindocc115e52021-08-02 20:06:40 +01002518 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2519printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 esac
2521 case $ac_var in #(
2522 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2524 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac ;;
2526 esac
2527 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2530 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 "s/'\''/'\''\\\\'\'''\''/g;
2533 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2534 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002535 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002537 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac |
2539 sort
2540)
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002542
Pablo Galindocc115e52021-08-02 20:06:40 +01002543 printf "%s\n" "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002544## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002545## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 echo
2547 for ac_var in $ac_subst_vars
2548 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 eval ac_val=\$$ac_var
2550 case $ac_val in
Pablo Galindocc115e52021-08-02 20:06:40 +01002551 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 esac
Pablo Galindocc115e52021-08-02 20:06:40 +01002553 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 done | sort
2555 echo
2556
2557 if test -n "$ac_subst_files"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01002558 printf "%s\n" "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002560## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002561 echo
2562 for ac_var in $ac_subst_files
2563 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 eval ac_val=\$$ac_var
2565 case $ac_val in
Pablo Galindocc115e52021-08-02 20:06:40 +01002566 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 esac
Pablo Galindocc115e52021-08-02 20:06:40 +01002568 printf "%s\n" "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002569 done | sort
2570 echo
2571 fi
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 if test -s confdefs.h; then
Pablo Galindocc115e52021-08-02 20:06:40 +01002574 printf "%s\n" "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002575## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 echo
2580 fi
2581 test "$ac_signal" != 0 &&
Pablo Galindocc115e52021-08-02 20:06:40 +01002582 printf "%s\n" "$as_me: caught signal $ac_signal"
2583 printf "%s\n" "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 rm -f core *.core core.conftest.* &&
2586 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002589for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002591done
2592ac_signal=0
2593
2594# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002596
Pablo Galindocc115e52021-08-02 20:06:40 +01002597printf "%s\n" "/* confdefs.h */" > confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599# Predefined preprocessor variables.
2600
Pablo Galindocc115e52021-08-02 20:06:40 +01002601printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002602
Pablo Galindocc115e52021-08-02 20:06:40 +01002603printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002604
Pablo Galindocc115e52021-08-02 20:06:40 +01002605printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002606
Pablo Galindocc115e52021-08-02 20:06:40 +01002607printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002608
Pablo Galindocc115e52021-08-02 20:06:40 +01002609printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002610
Pablo Galindocc115e52021-08-02 20:06:40 +01002611printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +00002612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613
2614# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002615# Prefer an explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616if test -n "$CONFIG_SITE"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01002617 ac_site_files="$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618elif test "x$prefix" != xNONE; then
Pablo Galindocc115e52021-08-02 20:06:40 +01002619 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620else
Pablo Galindocc115e52021-08-02 20:06:40 +01002621 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622fi
Pablo Galindocc115e52021-08-02 20:06:40 +01002623
2624for ac_site_file in $ac_site_files
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625do
Pablo Galindocc115e52021-08-02 20:06:40 +01002626 case $ac_site_file in #(
2627 */*) :
2628 ;; #(
2629 *) :
2630 ac_site_file=./$ac_site_file ;;
2631esac
2632 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2634printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002636 . "$ac_site_file" \
Pablo Galindocc115e52021-08-02 20:06:40 +01002637 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2638printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002639as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002640See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002641 fi
2642done
2643
2644if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 # Some versions of bash will fail to source /dev/null (special files
2646 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2647 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01002648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2649printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2652 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 esac
2654 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002655else
Pablo Galindocc115e52021-08-02 20:06:40 +01002656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2657printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 >$cache_file
2659fi
2660
Pablo Galindocc115e52021-08-02 20:06:40 +01002661# Test code for whether the C compiler supports C89 (global declarations)
2662ac_c_conftest_c89_globals='
2663/* Does the compiler advertise C89 conformance?
2664 Do not test the value of __STDC__, because some compilers set it to 0
2665 while being otherwise adequately conformant. */
2666#if !defined __STDC__
2667# error "Compiler does not advertise C89 conformance"
2668#endif
2669
2670#include <stddef.h>
2671#include <stdarg.h>
2672struct stat;
2673/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2674struct buf { int x; };
2675struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2676static char *e (p, i)
2677 char **p;
2678 int i;
2679{
2680 return p[i];
2681}
2682static char *f (char * (*g) (char **, int), char **p, ...)
2683{
2684 char *s;
2685 va_list v;
2686 va_start (v,p);
2687 s = g (p, va_arg (v,int));
2688 va_end (v);
2689 return s;
2690}
2691
2692/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2693 function prototypes and stuff, but not \xHH hex character constants.
2694 These do not provoke an error unfortunately, instead are silently treated
2695 as an "x". The following induces an error, until -std is added to get
2696 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2697 array size at least. It is necessary to write \x00 == 0 to get something
2698 that is true only with -std. */
2699int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2700
2701/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2702 inside strings and character constants. */
2703#define FOO(x) '\''x'\''
2704int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2705
2706int test (int i, double x);
2707struct s1 {int (*f) (int a);};
2708struct s2 {int (*f) (double a);};
2709int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2710 int, int);'
2711
2712# Test code for whether the C compiler supports C89 (body of main).
2713ac_c_conftest_c89_main='
2714ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2715'
2716
2717# Test code for whether the C compiler supports C99 (global declarations)
2718ac_c_conftest_c99_globals='
2719// Does the compiler advertise C99 conformance?
2720#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2721# error "Compiler does not advertise C99 conformance"
2722#endif
2723
2724#include <stdbool.h>
2725extern int puts (const char *);
2726extern int printf (const char *, ...);
2727extern int dprintf (int, const char *, ...);
2728extern void *malloc (size_t);
2729
2730// Check varargs macros. These examples are taken from C99 6.10.3.5.
2731// dprintf is used instead of fprintf to avoid needing to declare
2732// FILE and stderr.
2733#define debug(...) dprintf (2, __VA_ARGS__)
2734#define showlist(...) puts (#__VA_ARGS__)
2735#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2736static void
2737test_varargs_macros (void)
2738{
2739 int x = 1234;
2740 int y = 5678;
2741 debug ("Flag");
2742 debug ("X = %d\n", x);
2743 showlist (The first, second, and third items.);
2744 report (x>y, "x is %d but y is %d", x, y);
2745}
2746
2747// Check long long types.
2748#define BIG64 18446744073709551615ull
2749#define BIG32 4294967295ul
2750#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2751#if !BIG_OK
2752 #error "your preprocessor is broken"
2753#endif
2754#if BIG_OK
2755#else
2756 #error "your preprocessor is broken"
2757#endif
2758static long long int bignum = -9223372036854775807LL;
2759static unsigned long long int ubignum = BIG64;
2760
2761struct incomplete_array
2762{
2763 int datasize;
2764 double data[];
2765};
2766
2767struct named_init {
2768 int number;
2769 const wchar_t *name;
2770 double average;
2771};
2772
2773typedef const char *ccp;
2774
2775static inline int
2776test_restrict (ccp restrict text)
2777{
2778 // See if C++-style comments work.
2779 // Iterate through items via the restricted pointer.
2780 // Also check for declarations in for loops.
2781 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2782 continue;
2783 return 0;
2784}
2785
2786// Check varargs and va_copy.
2787static bool
2788test_varargs (const char *format, ...)
2789{
2790 va_list args;
2791 va_start (args, format);
2792 va_list args_copy;
2793 va_copy (args_copy, args);
2794
2795 const char *str = "";
2796 int number = 0;
2797 float fnumber = 0;
2798
2799 while (*format)
2800 {
2801 switch (*format++)
2802 {
2803 case '\''s'\'': // string
2804 str = va_arg (args_copy, const char *);
2805 break;
2806 case '\''d'\'': // int
2807 number = va_arg (args_copy, int);
2808 break;
2809 case '\''f'\'': // float
2810 fnumber = va_arg (args_copy, double);
2811 break;
2812 default:
2813 break;
2814 }
2815 }
2816 va_end (args_copy);
2817 va_end (args);
2818
2819 return *str && number && fnumber;
2820}
2821'
2822
2823# Test code for whether the C compiler supports C99 (body of main).
2824ac_c_conftest_c99_main='
2825 // Check bool.
2826 _Bool success = false;
2827 success |= (argc != 0);
2828
2829 // Check restrict.
2830 if (test_restrict ("String literal") == 0)
2831 success = true;
2832 char *restrict newvar = "Another string";
2833
2834 // Check varargs.
2835 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2836 test_varargs_macros ();
2837
2838 // Check flexible array members.
2839 struct incomplete_array *ia =
2840 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2841 ia->datasize = 10;
2842 for (int i = 0; i < ia->datasize; ++i)
2843 ia->data[i] = i * 1.234;
2844
2845 // Check named initializers.
2846 struct named_init ni = {
2847 .number = 34,
2848 .name = L"Test wide string",
2849 .average = 543.34343,
2850 };
2851
2852 ni.number = 58;
2853
2854 int dynamic_array[ni.number];
2855 dynamic_array[0] = argv[0][0];
2856 dynamic_array[ni.number - 1] = 543;
2857
2858 // work around unused variable warnings
2859 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2860 || dynamic_array[ni.number - 1] != 543);
2861'
2862
2863# Test code for whether the C compiler supports C11 (global declarations)
2864ac_c_conftest_c11_globals='
2865// Does the compiler advertise C11 conformance?
2866#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2867# error "Compiler does not advertise C11 conformance"
2868#endif
2869
2870// Check _Alignas.
2871char _Alignas (double) aligned_as_double;
2872char _Alignas (0) no_special_alignment;
2873extern char aligned_as_int;
2874char _Alignas (0) _Alignas (int) aligned_as_int;
2875
2876// Check _Alignof.
2877enum
2878{
2879 int_alignment = _Alignof (int),
2880 int_array_alignment = _Alignof (int[100]),
2881 char_alignment = _Alignof (char)
2882};
2883_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2884
2885// Check _Noreturn.
2886int _Noreturn does_not_return (void) { for (;;) continue; }
2887
2888// Check _Static_assert.
2889struct test_static_assert
2890{
2891 int x;
2892 _Static_assert (sizeof (int) <= sizeof (long int),
2893 "_Static_assert does not work in struct");
2894 long int y;
2895};
2896
2897// Check UTF-8 literals.
2898#define u8 syntax error!
2899char const utf8_literal[] = u8"happens to be ASCII" "another string";
2900
2901// Check duplicate typedefs.
2902typedef long *long_ptr;
2903typedef long int *long_ptr;
2904typedef long_ptr long_ptr;
2905
2906// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2907struct anonymous
2908{
2909 union {
2910 struct { int i; int j; };
2911 struct { int k; long int l; } w;
2912 };
2913 int m;
2914} v1;
2915'
2916
2917# Test code for whether the C compiler supports C11 (body of main).
2918ac_c_conftest_c11_main='
2919 _Static_assert ((offsetof (struct anonymous, i)
2920 == offsetof (struct anonymous, w.k)),
2921 "Anonymous union alignment botch");
2922 v1.i = 2;
2923 v1.w.k = 5;
2924 ok |= v1.i != 5;
2925'
2926
2927# Test code for whether the C compiler supports C11 (complete).
2928ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2929${ac_c_conftest_c99_globals}
2930${ac_c_conftest_c11_globals}
2931
2932int
2933main (int argc, char **argv)
2934{
2935 int ok = 0;
2936 ${ac_c_conftest_c89_main}
2937 ${ac_c_conftest_c99_main}
2938 ${ac_c_conftest_c11_main}
2939 return ok;
2940}
2941"
2942
2943# Test code for whether the C compiler supports C99 (complete).
2944ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2945${ac_c_conftest_c99_globals}
2946
2947int
2948main (int argc, char **argv)
2949{
2950 int ok = 0;
2951 ${ac_c_conftest_c89_main}
2952 ${ac_c_conftest_c99_main}
2953 return ok;
2954}
2955"
2956
2957# Test code for whether the C compiler supports C89 (complete).
2958ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2959
2960int
2961main (int argc, char **argv)
2962{
2963 int ok = 0;
2964 ${ac_c_conftest_c89_main}
2965 return ok;
2966}
2967"
2968
2969as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2970as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2971as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2972as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2973as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2974as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2975as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2976as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2977as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2978as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
2979as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
2980as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2981
2982# Auxiliary files required by this configure script.
2983ac_aux_files="install-sh config.guess config.sub"
2984
2985# Locations in which to look for auxiliary files.
2986ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2987
2988# Search for a directory containing all of the required auxiliary files,
2989# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2990# If we don't find one directory that contains all the files we need,
2991# we report the set of missing files from the *first* directory in
2992# $ac_aux_dir_candidates and give up.
2993ac_missing_aux_files=""
2994ac_first_candidate=:
2995printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2997as_found=false
2998for as_dir in $ac_aux_dir_candidates
2999do
3000 IFS=$as_save_IFS
3001 case $as_dir in #(((
3002 '') as_dir=./ ;;
3003 */) ;;
3004 *) as_dir=$as_dir/ ;;
3005 esac
3006 as_found=:
3007
3008 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
3009 ac_aux_dir_found=yes
3010 ac_install_sh=
3011 for ac_aux in $ac_aux_files
3012 do
3013 # As a special case, if "install-sh" is required, that requirement
3014 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3015 # and $ac_install_sh is set appropriately for whichever one is found.
3016 if test x"$ac_aux" = x"install-sh"
3017 then
3018 if test -f "${as_dir}install-sh"; then
3019 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
3020 ac_install_sh="${as_dir}install-sh -c"
3021 elif test -f "${as_dir}install.sh"; then
3022 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
3023 ac_install_sh="${as_dir}install.sh -c"
3024 elif test -f "${as_dir}shtool"; then
3025 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
3026 ac_install_sh="${as_dir}shtool install -c"
3027 else
3028 ac_aux_dir_found=no
3029 if $ac_first_candidate; then
3030 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3031 else
3032 break
3033 fi
3034 fi
3035 else
3036 if test -f "${as_dir}${ac_aux}"; then
3037 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3038 else
3039 ac_aux_dir_found=no
3040 if $ac_first_candidate; then
3041 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3042 else
3043 break
3044 fi
3045 fi
3046 fi
3047 done
3048 if test "$ac_aux_dir_found" = yes; then
3049 ac_aux_dir="$as_dir"
3050 break
3051 fi
3052 ac_first_candidate=false
3053
3054 as_found=false
3055done
3056IFS=$as_save_IFS
3057if $as_found
3058then :
3059
3060else $as_nop
3061 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3062fi
3063
3064
3065# These three variables are undocumented and unsupported,
3066# and are intended to be withdrawn in a future Autoconf release.
3067# They can cause serious problems if a builder's source tree is in a directory
3068# whose full name contains unusual characters.
3069if test -f "${ac_aux_dir}config.guess"; then
3070 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3071fi
3072if test -f "${ac_aux_dir}config.sub"; then
3073 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3074fi
3075if test -f "$ac_aux_dir/configure"; then
3076 ac_configure="$SHELL ${ac_aux_dir}configure"
3077fi
3078
Martin v. Löwis11437992002-04-12 09:54:03 +00003079# Check that the precious variables saved in the cache have kept the same
3080# value.
3081ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00003083 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3084 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003085 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3086 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00003087 case $ac_old_set,$ac_new_set in
3088 set,)
Pablo Galindocc115e52021-08-02 20:06:40 +01003089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3090printf "%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 +00003091 ac_cache_corrupted=: ;;
3092 ,set)
Pablo Galindocc115e52021-08-02 20:06:40 +01003093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3094printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 ac_cache_corrupted=: ;;
3096 ,);;
3097 *)
3098 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003099 # differences in whitespace do not lead to failure.
3100 ac_old_val_w=`echo x $ac_old_val`
3101 ac_new_val_w=`echo x $ac_new_val`
3102 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01003103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3104printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003105 ac_cache_corrupted=:
3106 else
Pablo Galindocc115e52021-08-02 20:06:40 +01003107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3108printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
Matthias Kloseb9621712010-04-24 17:59:49 +00003109 eval $ac_var=\$ac_old_val
3110 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01003111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3112printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3114printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 fi;;
3116 esac
3117 # Pass precious variables to config.status.
3118 if test "$ac_new_set" = set; then
3119 case $ac_new_val in
Pablo Galindocc115e52021-08-02 20:06:40 +01003120 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 *) ac_arg=$ac_var=$ac_new_val ;;
3122 esac
3123 case " $ac_configure_args " in
3124 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00003125 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 esac
3127 fi
3128done
3129if $ac_cache_corrupted; then
Pablo Galindocc115e52021-08-02 20:06:40 +01003130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3133printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3134 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3135 and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003137## -------------------- ##
3138## Main body of script. ##
3139## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140
Guido van Rossum7f43da71994-08-01 12:15:30 +00003141ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003142ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00003143ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3144ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3145ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003146
Guido van Rossum627b2d71993-12-24 10:39:16 +00003147
Michael W. Hudson54241132001-12-07 15:38:26 +00003148
Trent Nelson4d4ec652012-10-16 08:51:24 -04003149
Christian Heimesff5be6e2018-01-20 13:19:21 +01003150
3151
Martin Panterc5ee3ca2016-09-12 01:32:03 +00003152if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04003153 # If we're building out-of-tree, we need to make sure the following
3154 # resources get picked up before their $srcdir counterparts.
3155 # Objects/ -> typeslots.inc
Victor Stinner94faa072021-03-23 20:47:40 +01003156 # Include/ -> Python.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04003157 # Python/ -> importlib.h
3158 # (A side effect of this is that these resources will automatically be
3159 # regenerated when building out-of-tree, regardless of whether or not
3160 # the $srcdir counterpart is up-to-date. This is an acceptable trade
3161 # off.)
3162 BASECPPFLAGS="-IObjects -IInclude -IPython"
3163else
3164 BASECPPFLAGS=""
3165fi
3166
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003167
3168
3169
3170
Victor Stinner9ed34a82017-05-02 22:35:58 +02003171if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003172then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003173# Extract the first word of "git", so it can be a program name with args.
3174set dummy git; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +01003175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3176printf %s "checking for $ac_word... " >&6; }
3177if test ${ac_cv_prog_HAS_GIT+y}
3178then :
3179 printf %s "(cached) " >&6
3180else $as_nop
Ned Deily5c4b0d02017-03-04 00:19:55 -05003181 if test -n "$HAS_GIT"; then
3182 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003183else
3184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3185for as_dir in $PATH
3186do
3187 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +01003188 case $as_dir in #(((
3189 '') as_dir=./ ;;
3190 */) ;;
3191 *) as_dir=$as_dir/ ;;
3192 esac
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003193 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +01003194 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05003195 ac_cv_prog_HAS_GIT="found"
Pablo Galindocc115e52021-08-02 20:06:40 +01003196 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003197 break 2
3198 fi
3199done
3200 done
3201IFS=$as_save_IFS
3202
Ned Deily5c4b0d02017-03-04 00:19:55 -05003203 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003204fi
3205fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003206HAS_GIT=$ac_cv_prog_HAS_GIT
3207if test -n "$HAS_GIT"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01003208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
3209printf "%s\n" "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003210else
Pablo Galindocc115e52021-08-02 20:06:40 +01003211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3212printf "%s\n" "no" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003213fi
3214
3215
3216else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003217HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003218fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05003219if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003220then
Xiang Zhang4c855572018-08-20 22:36:19 +08003221 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
3222 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
3223 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003224else
Ned Deily5c4b0d02017-03-04 00:19:55 -05003225 GITVERSION=""
3226 GITTAG=""
3227 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05003228fi
3229
3230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003232
3233
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003234
3235
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003236
Pablo Galindocc115e52021-08-02 20:06:40 +01003237 # Make sure we can run config.sub.
3238$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3239 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3240
3241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3242printf %s "checking build system type... " >&6; }
3243if test ${ac_cv_build+y}
3244then :
3245 printf %s "(cached) " >&6
3246else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003247 ac_build_alias=$build_alias
3248test "x$ac_build_alias" = x &&
Pablo Galindocc115e52021-08-02 20:06:40 +01003249 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003250test "x$ac_build_alias" = x &&
3251 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Pablo Galindocc115e52021-08-02 20:06:40 +01003252ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3253 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003254
3255fi
Pablo Galindocc115e52021-08-02 20:06:40 +01003256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3257printf "%s\n" "$ac_cv_build" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003258case $ac_cv_build in
3259*-*-*) ;;
3260*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3261esac
3262build=$ac_cv_build
3263ac_save_IFS=$IFS; IFS='-'
3264set x $ac_cv_build
3265shift
3266build_cpu=$1
3267build_vendor=$2
3268shift; shift
3269# Remember, the first character of IFS is used to create $*,
3270# except with old shells:
3271build_os=$*
3272IFS=$ac_save_IFS
3273case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3274
3275
Pablo Galindocc115e52021-08-02 20:06:40 +01003276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3277printf %s "checking host system type... " >&6; }
3278if test ${ac_cv_host+y}
3279then :
3280 printf %s "(cached) " >&6
3281else $as_nop
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003282 if test "x$host_alias" = x; then
3283 ac_cv_host=$ac_cv_build
3284else
Pablo Galindocc115e52021-08-02 20:06:40 +01003285 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3286 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003287fi
3288
3289fi
Pablo Galindocc115e52021-08-02 20:06:40 +01003290{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3291printf "%s\n" "$ac_cv_host" >&6; }
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01003292case $ac_cv_host in
3293*-*-*) ;;
3294*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3295esac
3296host=$ac_cv_host
3297ac_save_IFS=$IFS; IFS='-'
3298set x $ac_cv_host
3299shift
3300host_cpu=$1
3301host_vendor=$2
3302shift; shift
3303# Remember, the first character of IFS is used to create $*,
3304# except with old shells:
3305host_os=$*
3306IFS=$ac_save_IFS
3307case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3308
3309
3310
doko@python.orga10e4a92013-01-25 18:45:12 +01003311
3312
Ned Deilyfcbc2462014-08-22 13:32:49 -07003313# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
3314rm -f pybuilddir.txt
3315
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003316for ac_prog in python$PACKAGE_VERSION python3 python
3317do
3318 # Extract the first word of "$ac_prog", so it can be a program name with args.
3319set dummy $ac_prog; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +01003320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3321printf %s "checking for $ac_word... " >&6; }
3322if test ${ac_cv_prog_PYTHON_FOR_REGEN+y}
3323then :
3324 printf %s "(cached) " >&6
3325else $as_nop
Victor Stinnera5c62a82017-05-03 18:21:48 +02003326 if test -n "$PYTHON_FOR_REGEN"; then
3327 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003328else
3329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3330for as_dir in $PATH
3331do
3332 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +01003333 case $as_dir in #(((
3334 '') as_dir=./ ;;
3335 */) ;;
3336 *) as_dir=$as_dir/ ;;
3337 esac
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003338 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +01003339 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02003340 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Pablo Galindocc115e52021-08-02 20:06:40 +01003341 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 +02003342 break 2
3343 fi
3344done
3345 done
3346IFS=$as_save_IFS
3347
3348fi
3349fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02003350PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
3351if test -n "$PYTHON_FOR_REGEN"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01003352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
3353printf "%s\n" "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003354else
Pablo Galindocc115e52021-08-02 20:06:40 +01003355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3356printf "%s\n" "no" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003357fi
3358
3359
Victor Stinnera5c62a82017-05-03 18:21:48 +02003360 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003361done
Victor Stinnera5c62a82017-05-03 18:21:48 +02003362test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003363
Xavier de Gayefd0d5932016-07-26 12:48:08 +02003364
3365
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003366if test "$cross_compiling" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01003367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3368printf %s "checking for python interpreter for cross build... " >&6; }
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003369 if test -z "$PYTHON_FOR_BUILD"; then
3370 for interp in python$PACKAGE_VERSION python3 python; do
3371 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003372 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 +02003373 break
3374 fi
3375 interp=
3376 done
3377 if test x$interp = x; then
3378 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3379 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01003380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3381printf "%s\n" "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003382 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 +02003383 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003384elif test "$cross_compiling" = maybe; then
3385 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003386else
3387 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3388fi
3389
3390
Martin v. Löwis11437992002-04-12 09:54:03 +00003391
Benjamin Petersond23f8222009-04-05 19:13:16 +00003392if test "$prefix" != "/"; then
3393 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3394fi
3395
3396
Martin v. Löwis11437992002-04-12 09:54:03 +00003397
3398
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003399# We don't use PACKAGE_ variables, and they cause conflicts
3400# with other autoconf-based packages that include Python.h
3401grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3402rm confdefs.h
3403mv confdefs.h.new confdefs.h
3404
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003405
Pablo Galindod4fe0982020-05-19 03:33:01 +01003406VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003407
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003408# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003409
3410SOVERSION=1.0
3411
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003412# The later defininition of _XOPEN_SOURCE disables certain features
3413# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3414
Pablo Galindocc115e52021-08-02 20:06:40 +01003415printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003416
3417
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003418# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3419# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3420# them.
3421
Pablo Galindocc115e52021-08-02 20:06:40 +01003422printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003423
3424
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003425# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3426# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3427# them.
3428
Pablo Galindocc115e52021-08-02 20:06:40 +01003429printf "%s\n" "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003430
3431
Martin v. Löwisd6320502004-08-12 13:45:08 +00003432# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003433# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3434# them.
3435
Pablo Galindocc115e52021-08-02 20:06:40 +01003436printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003437
3438
3439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003441
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003442# Arguments passed to configure.
3443
3444CONFIG_ARGS="$ac_configure_args"
3445
Pablo Galindocc115e52021-08-02 20:06:40 +01003446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3447printf %s "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448# Check whether --enable-universalsdk was given.
Pablo Galindocc115e52021-08-02 20:06:40 +01003449if test ${enable_universalsdk+y}
3450then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003452 case $enableval in
3453 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003454 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003455 # information
3456 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003457 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003458 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003459 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3460 if test ! -d "${enableval}"
3461 then
3462 enableval=/
3463 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003464 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003465 ;;
3466 esac
3467 case $enableval in
3468 no)
3469 UNIVERSALSDK=
3470 enable_universalsdk=
3471 ;;
3472 *)
3473 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003474 if test ! -d "${UNIVERSALSDK}"
3475 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003476 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003477 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003478 ;;
3479 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003480
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003481
Pablo Galindocc115e52021-08-02 20:06:40 +01003482else $as_nop
Thomas Wouters477c8d52006-05-27 19:21:47 +00003483
3484 UNIVERSALSDK=
3485 enable_universalsdk=
3486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003488
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003489if test -n "${UNIVERSALSDK}"
3490then
Pablo Galindocc115e52021-08-02 20:06:40 +01003491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3492printf "%s\n" "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003493else
Pablo Galindocc115e52021-08-02 20:06:40 +01003494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3495printf "%s\n" "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003496fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003498
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003499
Ned Deily87adb6e2013-10-18 21:09:56 -07003500ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003501
Ned Deilycbfb9a52012-06-23 16:02:19 -07003502# For backward compatibility reasons we prefer to select '32-bit' if available,
3503# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003504UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003505if test "`uname -s`" = "Darwin"
3506then
3507 if test -n "${UNIVERSALSDK}"
3508 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003509 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003510 then
3511 UNIVERSAL_ARCHS="intel"
3512 fi
3513 fi
3514fi
3515
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003516
Ned Deily0cb33da2021-05-02 04:48:29 -04003517
Pablo Galindocc115e52021-08-02 20:06:40 +01003518{ 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 Galindocc115e52021-08-02 20:06:40 +01003522if 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 Galindocc115e52021-08-02 20:06:40 +01003531 { 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 Galindocc115e52021-08-02 20:06:40 +01003534 { 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 Galindocc115e52021-08-02 20:06:40 +01003540if 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 Galindocc115e52021-08-02 20:06:40 +01003547else $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 Galindocc115e52021-08-02 20:06:40 +01003556if 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 Galindocc115e52021-08-02 20:06:40 +01003646else $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 Galindocc115e52021-08-02 20:06:40 +01003681printf "%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 Galindocc115e52021-08-02 20:06:40 +01003690{ 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 Galindocc115e52021-08-02 20:06:40 +01003741{ 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 Galindocc115e52021-08-02 20:06:40 +01003791printf "%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 Galindocc115e52021-08-02 20:06:40 +01003799printf "%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 Galindocc115e52021-08-02 20:06:40 +01003857printf "%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 Galindocc115e52021-08-02 20:06:40 +01003865printf "%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 Galindocc115e52021-08-02 20:06:40 +01003869printf "%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 Galindocc115e52021-08-02 20:06:40 +01003884printf "%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 Galindocc115e52021-08-02 20:06:40 +01003948 { 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 Galindocc115e52021-08-02 20:06:40 +01003957 { 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 Galindocc115e52021-08-02 20:06:40 +01003967 { 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 Galindocc115e52021-08-02 20:06:40 +01003977
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 Galindocc115e52021-08-02 20:06:40 +01003994{ 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 Galindocc115e52021-08-02 20:06:40 +01004007 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 Galindocc115e52021-08-02 20:06:40 +01004013 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 Galindocc115e52021-08-02 20:06:40 +01004015 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 Galindocc115e52021-08-02 20:06:40 +01004026 { 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 Galindocc115e52021-08-02 20:06:40 +01004029 { 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 Galindocc115e52021-08-02 20:06:40 +01004039{ 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 Galindocc115e52021-08-02 20:06:40 +01004052 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 Galindocc115e52021-08-02 20:06:40 +01004058 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 Galindocc115e52021-08-02 20:06:40 +01004060 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 Galindocc115e52021-08-02 20:06:40 +01004071 { 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 Galindocc115e52021-08-02 20:06:40 +01004074 { 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 Galindocc115e52021-08-02 20:06:40 +01004083{ 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 Galindocc115e52021-08-02 20:06:40 +01004097{ 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 Galindocc115e52021-08-02 20:06:40 +01004110 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 Galindocc115e52021-08-02 20:06:40 +01004116 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 Galindocc115e52021-08-02 20:06:40 +01004118 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 Galindocc115e52021-08-02 20:06:40 +01004129 { 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 Galindocc115e52021-08-02 20:06:40 +01004132 { 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 Galindocc115e52021-08-02 20:06:40 +01004142{ 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 Galindocc115e52021-08-02 20:06:40 +01004156 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 Galindocc115e52021-08-02 20:06:40 +01004162 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 Galindocc115e52021-08-02 20:06:40 +01004168 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 Galindocc115e52021-08-02 20:06:40 +01004184 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 Galindocc115e52021-08-02 20:06:40 +01004191 { 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 Galindocc115e52021-08-02 20:06:40 +01004194 { 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 Galindocc115e52021-08-02 20:06:40 +01004206{ 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 Galindocc115e52021-08-02 20:06:40 +01004219 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 Galindocc115e52021-08-02 20:06:40 +01004225 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 Galindocc115e52021-08-02 20:06:40 +01004227 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 Galindocc115e52021-08-02 20:06:40 +01004238 { 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 Galindocc115e52021-08-02 20:06:40 +01004241 { 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 Galindocc115e52021-08-02 20:06:40 +01004255{ 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 Galindocc115e52021-08-02 20:06:40 +01004268 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 Galindocc115e52021-08-02 20:06:40 +01004274 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 Galindocc115e52021-08-02 20:06:40 +01004276 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 Galindocc115e52021-08-02 20:06:40 +01004287 { 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 Galindocc115e52021-08-02 20:06:40 +01004290 { 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 Galindocc115e52021-08-02 20:06:40 +01004303{ 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 Galindocc115e52021-08-02 20:06:40 +01004312if 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 Galindocc115e52021-08-02 20:06:40 +01004356fi
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 Galindocc115e52021-08-02 20:06:40 +01004424printf "%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 Galindocc115e52021-08-02 20:06:40 +01004427for 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 Galindocc115e52021-08-02 20:06:40 +01004434printf "%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 Galindocc115e52021-08-02 20:06:40 +01004444 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 Galindocc115e52021-08-02 20:06:40 +01004452main (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 Galindocc115e52021-08-02 20:06:40 +01004464{ 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 Galindocc115e52021-08-02 20:06:40 +01004487printf "%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 Galindocc115e52021-08-02 20:06:40 +01004490 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 Galindocc115e52021-08-02 20:06:40 +01004509 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 Galindocc115e52021-08-02 20:06:40 +01004525else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004526 ac_file=''
4527fi
Pablo Galindocc115e52021-08-02 20:06:40 +01004528if 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 Galindocc115e52021-08-02 20:06:40 +01004535{ { 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 Galindocc115e52021-08-02 20:06:40 +01004539else $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 Galindocc115e52021-08-02 20:06:40 +01004543{ 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 Galindocc115e52021-08-02 20:06:40 +01004551{ 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 Galindocc115e52021-08-02 20:06:40 +01004559printf "%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 Galindocc115e52021-08-02 20:06:40 +01004562 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 Galindocc115e52021-08-02 20:06:40 +01004578else $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 Galindocc115e52021-08-02 20:06:40 +01004585{ 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 Galindocc115e52021-08-02 20:06:40 +01004595main (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 Galindocc115e52021-08-02 20:06:40 +01004607{ 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 Galindocc115e52021-08-02 20:06:40 +01004616printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004617 (eval "$ac_link") 2>&5
4618 ac_status=$?
Pablo Galindocc115e52021-08-02 20:06:40 +01004619 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 Galindocc115e52021-08-02 20:06:40 +01004627printf "%s\n" "$ac_try_echo"; } >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004628 (eval "$ac_try") 2>&5
4629 ac_status=$?
Pablo Galindocc115e52021-08-02 20:06:40 +01004630 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 Galindocc115e52021-08-02 20:06:40 +01004637 { { 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 Galindocc115e52021-08-02 20:06:40 +01004645{ 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 Galindocc115e52021-08-02 20:06:40 +01004650{ 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 Galindocc115e52021-08-02 20:06:40 +01004660main (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 Galindocc115e52021-08-02 20:06:40 +01004674printf "%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 Galindocc115e52021-08-02 20:06:40 +01004677 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 Galindocc115e52021-08-02 20:06:40 +01004688else $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 Galindocc115e52021-08-02 20:06:40 +01004692{ { 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 Galindocc115e52021-08-02 20:06:40 +01004699{ 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 Galindocc115e52021-08-02 20:06:40 +01004703{ 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 Galindocc115e52021-08-02 20:06:40 +01004713main (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 Galindocc115e52021-08-02 20:06:40 +01004723if ac_fn_c_try_compile "$LINENO"
4724then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 ac_compiler_gnu=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01004726else $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 Galindocc115e52021-08-02 20:06:40 +01004729rm -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 Galindocc115e52021-08-02 20:06:40 +01004733{ 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 Galindocc115e52021-08-02 20:06:40 +01004742ac_test_CFLAGS=${CFLAGS+y}
Martin v. Löwis11437992002-04-12 09:54:03 +00004743ac_save_CFLAGS=$CFLAGS
Pablo Galindocc115e52021-08-02 20:06:40 +01004744{ 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 Galindocc115e52021-08-02 20:06:40 +01004758main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00004759{
4760
4761 ;
4762 return 0;
4763}
4764_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01004765if ac_fn_c_try_compile "$LINENO"
4766then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004767 ac_cv_prog_cc_g=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01004768else $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 Galindocc115e52021-08-02 20:06:40 +01004774main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004775{
4776
4777 ;
4778 return 0;
4779}
4780_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01004781if ac_fn_c_try_compile "$LINENO"
4782then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783
Pablo Galindocc115e52021-08-02 20:06:40 +01004784else $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 Galindocc115e52021-08-02 20:06:40 +01004791main (void)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792{
4793
4794 ;
4795 return 0;
4796}
4797_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01004798if 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 Galindocc115e52021-08-02 20:06:40 +01004802rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004803fi
Pablo Galindocc115e52021-08-02 20:06:40 +01004804rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805fi
Pablo Galindocc115e52021-08-02 20:06:40 +01004806rm -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 Galindocc115e52021-08-02 20:06:40 +01004809{ 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 Galindocc115e52021-08-02 20:06:40 +01004826ac_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 Galindocc115e52021-08-02 20:06:40 +01004931$ac_c_conftest_c89_program
Skip Montanaro6dead952003-09-25 14:50:04 +00004932_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01004933for 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 Galindocc115e52021-08-02 20:06:40 +01004936 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 Galindocc115e52021-08-02 20:06:40 +01004940rm -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
Pablo Galindoba421752021-05-03 20:33:17 +01004945fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01004946
Pablo Galindocc115e52021-08-02 20:06:40 +01004947if 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 Galindocc115e52021-08-02 20:06:40 +01004977{ 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 Galindocc115e52021-08-02 20:06:40 +01004984 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 Galindocc115e52021-08-02 20:06:40 +01005000#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005001 Syntax error
5002_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01005003if ac_fn_c_try_cpp "$LINENO"
5004then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005005
Pablo Galindocc115e52021-08-02 20:06:40 +01005006else $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 Galindocc115e52021-08-02 20:06:40 +01005018if ac_fn_c_try_cpp "$LINENO"
5019then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005020 # Broken: success on invalid input.
5021continue
Pablo Galindocc115e52021-08-02 20:06:40 +01005022else $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 Galindocc115e52021-08-02 20:06:40 +01005032if $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 Galindocc115e52021-08-02 20:06:40 +01005045{ 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 Galindocc115e52021-08-02 20:06:40 +01005056#include <limits.h>
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005057 Syntax error
5058_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01005059if ac_fn_c_try_cpp "$LINENO"
5060then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005061
Pablo Galindocc115e52021-08-02 20:06:40 +01005062else $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 Galindocc115e52021-08-02 20:06:40 +01005074if ac_fn_c_try_cpp "$LINENO"
5075then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005076 # Broken: success on invalid input.
5077continue
Pablo Galindocc115e52021-08-02 20:06:40 +01005078else $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 Galindocc115e52021-08-02 20:06:40 +01005088if $ac_preproc_ok
5089then :
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005090
Pablo Galindocc115e52021-08-02 20:06:40 +01005091else $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 Galindocc115e52021-08-02 20:06:40 +01005104{ 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 Galindocc115e52021-08-02 20:06:40 +01005117 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 Galindocc115e52021-08-02 20:06:40 +01005125 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 Galindocc115e52021-08-02 20:06:40 +01005134 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 Galindocc115e52021-08-02 20:06:40 +01005140 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 Galindocc115e52021-08-02 20:06:40 +01005168{ 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 Galindocc115e52021-08-02 20:06:40 +01005173{ 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 Galindocc115e52021-08-02 20:06:40 +01005192 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 Galindocc115e52021-08-02 20:06:40 +01005200 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 Galindocc115e52021-08-02 20:06:40 +01005209 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 Galindocc115e52021-08-02 20:06:40 +01005215 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 Galindocc115e52021-08-02 20:06:40 +01005243{ 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 Galindocc115e52021-08-02 20:06:40 +01005251{ 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 Galindocc115e52021-08-02 20:06:40 +01005255if 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 Galindocc115e52021-08-02 20:06:40 +01005271else $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 Galindocc115e52021-08-02 20:06:40 +01005278{ 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 Galindocc115e52021-08-02 20:06:40 +01005288{ 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 Galindocc115e52021-08-02 20:06:40 +01005303 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 Galindocc115e52021-08-02 20:06:40 +01005309 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 Galindocc115e52021-08-02 20:06:40 +01005323 { 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 Galindocc115e52021-08-02 20:06:40 +01005326 { 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 Galindocc115e52021-08-02 20:06:40 +01005336{ 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 Galindocc115e52021-08-02 20:06:40 +01005351 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 Galindocc115e52021-08-02 20:06:40 +01005357 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 Galindocc115e52021-08-02 20:06:40 +01005371 { 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 Galindocc115e52021-08-02 20:06:40 +01005374 { 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 Galindocc115e52021-08-02 20:06:40 +01005383{ 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 Galindocc115e52021-08-02 20:06:40 +01005396{ 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 Galindocc115e52021-08-02 20:06:40 +01005411 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 Galindocc115e52021-08-02 20:06:40 +01005417 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 Galindocc115e52021-08-02 20:06:40 +01005431 { 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 Galindocc115e52021-08-02 20:06:40 +01005434 { 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 Galindocc115e52021-08-02 20:06:40 +01005444{ 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 Galindocc115e52021-08-02 20:06:40 +01005459 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 Galindocc115e52021-08-02 20:06:40 +01005465 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 Galindocc115e52021-08-02 20:06:40 +01005479 { 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 Galindocc115e52021-08-02 20:06:40 +01005482 { 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 Galindocc115e52021-08-02 20:06:40 +01005491{ 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 Galindocc115e52021-08-02 20:06:40 +01005504{ 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 Galindocc115e52021-08-02 20:06:40 +01005519 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 Galindocc115e52021-08-02 20:06:40 +01005525 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 Galindocc115e52021-08-02 20:06:40 +01005539 { 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 Galindocc115e52021-08-02 20:06:40 +01005542 { 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 Galindocc115e52021-08-02 20:06:40 +01005552{ 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 Galindocc115e52021-08-02 20:06:40 +01005567 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 Galindocc115e52021-08-02 20:06:40 +01005573 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 Galindocc115e52021-08-02 20:06:40 +01005587 { 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 Galindocc115e52021-08-02 20:06:40 +01005590 { 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 Galindocc115e52021-08-02 20:06:40 +01005599{ 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 Galindocc115e52021-08-02 20:06:40 +01005612{ 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 Galindocc115e52021-08-02 20:06:40 +01005627 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 Galindocc115e52021-08-02 20:06:40 +01005633 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 Galindocc115e52021-08-02 20:06:40 +01005647 { 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 Galindocc115e52021-08-02 20:06:40 +01005650 { 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 Galindocc115e52021-08-02 20:06:40 +01005660{ 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 Galindocc115e52021-08-02 20:06:40 +01005675 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 Galindocc115e52021-08-02 20:06:40 +01005681 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 Galindocc115e52021-08-02 20:06:40 +01005695 { 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 Galindocc115e52021-08-02 20:06:40 +01005698 { 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 Galindocc115e52021-08-02 20:06:40 +01005707{ 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 Galindocc115e52021-08-02 20:06:40 +01005730{ 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 Galindocc115e52021-08-02 20:06:40 +01005743 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 Galindocc115e52021-08-02 20:06:40 +01005749 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 Galindocc115e52021-08-02 20:06:40 +01005751 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 Galindocc115e52021-08-02 20:06:40 +01005762 { 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 Galindocc115e52021-08-02 20:06:40 +01005765 { 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 Galindocc115e52021-08-02 20:06:40 +01005779{ 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 Galindocc115e52021-08-02 20:06:40 +01005792 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 Galindocc115e52021-08-02 20:06:40 +01005798 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 Galindocc115e52021-08-02 20:06:40 +01005800 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 Galindocc115e52021-08-02 20:06:40 +01005811 { 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 Galindocc115e52021-08-02 20:06:40 +01005814 { 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 Galindocc115e52021-08-02 20:06:40 +01005827{ 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 Galindocc115e52021-08-02 20:06:40 +01005842 { 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 Galindocc115e52021-08-02 20:06:40 +01005847printf "%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 Galindocc115e52021-08-02 20:06:40 +01005858{ 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 Galindocc115e52021-08-02 20:06:40 +01006008 { 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 Galindocc115e52021-08-02 20:06:40 +01006011 { 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 Galindocc115e52021-08-02 20:06:40 +01006029{ 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 Galindocc115e52021-08-02 20:06:40 +01006038main (void)
Martin v. Löwis48e14d32011-05-09 07:37:45 +02006039{
6040
6041 ;
6042 return 0;
6043}
6044_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01006045if 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 Galindocc115e52021-08-02 20:06:40 +01006048 { 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 Galindocc115e52021-08-02 20:06:40 +01006052 { 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 Galindocc115e52021-08-02 20:06:40 +01006055rm -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 Galindocc115e52021-08-02 20:06:40 +01006062ac_header= ac_cache=
6063for ac_item in $ac_header_c_list
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064do
Pablo Galindocc115e52021-08-02 20:06:40 +01006065 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 Galindocc115e52021-08-02 20:06:40 +01006070 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 Galindocc115e52021-08-02 20:06:40 +01006080
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 Galindocc115e52021-08-02 20:06:40 +01006097 { 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 Galindocc115e52021-08-02 20:06:40 +01006109main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +00006110{
6111
6112 ;
6113 return 0;
6114}
6115_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01006116if ac_fn_c_try_compile "$LINENO"
6117then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 ac_cv_safe_to_define___extensions__=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01006119else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 ac_cv_safe_to_define___extensions__=no
6121fi
Pablo Galindocc115e52021-08-02 20:06:40 +01006122rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006123fi
Pablo Galindocc115e52021-08-02 20:06:40 +01006124{ 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 Galindocc115e52021-08-02 20:06:40 +01006127 { 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 Galindocc115e52021-08-02 20:06:40 +01006139 #include <wchar.h>
6140 mbstate_t x;
6141int
6142main (void)
6143{
Matthias Kloseb9621712010-04-24 17:59:49 +00006144
Pablo Galindocc115e52021-08-02 20:06:40 +01006145 ;
6146 return 0;
6147}
6148_ACEOF
6149if ac_fn_c_try_compile "$LINENO"
6150then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006151
Pablo Galindocc115e52021-08-02 20:06:40 +01006152else $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 Galindocc115e52021-08-02 20:06:40 +01006233{ 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 Galindocc115e52021-08-02 20:06:40 +01006247 { 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 Galindocc115e52021-08-02 20:06:40 +01006254printf "%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 Galindocc115e52021-08-02 20:06:40 +01006257 { 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 Galindocc115e52021-08-02 20:06:40 +01006266 { 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 Galindocc115e52021-08-02 20:06:40 +01006280{ 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 Galindocc115e52021-08-02 20:06:40 +01006284if 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 Galindocc115e52021-08-02 20:06:40 +01006294{ 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 Galindocc115e52021-08-02 20:06:40 +01006300{ 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 Galindocc115e52021-08-02 20:06:40 +01006308 { 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 Galindocc115e52021-08-02 20:06:40 +01006312 { 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 Galindocc115e52021-08-02 20:06:40 +01006326{ 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 Galindocc115e52021-08-02 20:06:40 +01006332{ 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 Galindocc115e52021-08-02 20:06:40 +01006372{ 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 Galindocc115e52021-08-02 20:06:40 +01006384{ 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 Galindocc115e52021-08-02 20:06:40 +01006393{ 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 Galindocc115e52021-08-02 20:06:40 +01006401{ 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 Galindocc115e52021-08-02 20:06:40 +01006410{ 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 Galindocc115e52021-08-02 20:06:40 +01006422{ 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 Galindocc115e52021-08-02 20:06:40 +01006425{ 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 Galindocc115e52021-08-02 20:06:40 +01006428if 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 Galindocc115e52021-08-02 20:06:40 +01006443{ 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 Galindocc115e52021-08-02 20:06:40 +01006446{ 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 Galindocc115e52021-08-02 20:06:40 +01006449if 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 Galindocc115e52021-08-02 20:06:40 +01006461if ac_fn_c_try_link "$LINENO"
6462then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02006463
Pablo Galindocc115e52021-08-02 20:06:40 +01006464else $as_nop
doko@ubuntu.comba015832012-06-30 16:52:05 +02006465 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466fi
Pablo Galindocc115e52021-08-02 20:06:40 +01006467rm -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 Galindocc115e52021-08-02 20:06:40 +01006473{ 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 Galindocc115e52021-08-02 20:06:40 +01006481{ 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 Galindocc115e52021-08-02 20:06:40 +01006503printf "%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 Galindocc115e52021-08-02 20:06:40 +01006567{ 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 Galindocc115e52021-08-02 20:06:40 +01006576{ 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 Galindocc115e52021-08-02 20:06:40 +01006589 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 Galindocc115e52021-08-02 20:06:40 +01006595 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 Galindocc115e52021-08-02 20:06:40 +01006597 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 Galindocc115e52021-08-02 20:06:40 +01006608 { 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 Galindocc115e52021-08-02 20:06:40 +01006611 { 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 Galindocc115e52021-08-02 20:06:40 +01006625{ 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 Galindocc115e52021-08-02 20:06:40 +01006638 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 Galindocc115e52021-08-02 20:06:40 +01006644 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 Galindocc115e52021-08-02 20:06:40 +01006646 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 Galindocc115e52021-08-02 20:06:40 +01006657 { 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 Galindocc115e52021-08-02 20:06:40 +01006660 { 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 Galindocc115e52021-08-02 20:06:40 +01006673{ 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 Galindocc115e52021-08-02 20:06:40 +01006694{ 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 Galindocc115e52021-08-02 20:06:40 +01006707 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 Galindocc115e52021-08-02 20:06:40 +01006713 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 Galindocc115e52021-08-02 20:06:40 +01006715 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 Galindocc115e52021-08-02 20:06:40 +01006726 { 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 Galindocc115e52021-08-02 20:06:40 +01006729 { 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 Galindocc115e52021-08-02 20:06:40 +01006743{ 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 Galindocc115e52021-08-02 20:06:40 +01006756 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 Galindocc115e52021-08-02 20:06:40 +01006762 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 Galindocc115e52021-08-02 20:06:40 +01006764 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 Galindocc115e52021-08-02 20:06:40 +01006775 { 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 Galindocc115e52021-08-02 20:06:40 +01006778 { 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 Galindocc115e52021-08-02 20:06:40 +01006791{ 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 Galindocc115e52021-08-02 20:06:40 +01006817
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 Galindocc115e52021-08-02 20:06:40 +01006832{ 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 Galindocc115e52021-08-02 20:06:40 +01006835if 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 Galindocc115e52021-08-02 20:06:40 +01006843 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 Galindocc115e52021-08-02 20:06:40 +01006860 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 Galindocc115e52021-08-02 20:06:40 +01006862 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 Galindocc115e52021-08-02 20:06:40 +01006866 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 Galindocc115e52021-08-02 20:06:40 +01006874 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 Galindocc115e52021-08-02 20:06:40 +01006879 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 Galindocc115e52021-08-02 20:06:40 +01006895 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 Galindocc115e52021-08-02 20:06:40 +01006905{ 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 Galindocc115e52021-08-02 20:06:40 +01006916
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 Galindocc115e52021-08-02 20:06:40 +01006920 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 Galindocc115e52021-08-02 20:06:40 +01006928 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 Galindocc115e52021-08-02 20:06:40 +01006935 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 Galindocc115e52021-08-02 20:06:40 +01006940 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 Galindocc115e52021-08-02 20:06:40 +01006951 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 Galindocc115e52021-08-02 20:06:40 +01006961{ 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 Galindocc115e52021-08-02 20:06:40 +01006979{ 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 Galindocc115e52021-08-02 20:06:40 +01006983if test ${with_pydebug+y}
6984then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 withval=$with_pydebug;
6986if test "$withval" != no
6987then
6988
Pablo Galindocc115e52021-08-02 20:06:40 +01006989printf "%s\n" "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990
Pablo Galindocc115e52021-08-02 20:06:40 +01006991 { 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 Galindocc115e52021-08-02 20:06:40 +01006995else { 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 Galindocc115e52021-08-02 20:06:40 +01006998else $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 Galindocc115e52021-08-02 20:06:40 +01007006{ 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 Galindocc115e52021-08-02 20:06:40 +01007010if test ${with_trace_refs+y}
7011then :
Victor Stinnerf4e47032019-04-25 00:56:28 +02007012 withval=$with_trace_refs;
Pablo Galindocc115e52021-08-02 20:06:40 +01007013else $as_nop
Victor Stinnerf4e47032019-04-25 00:56:28 +02007014 with_trace_refs=no
7015fi
7016
Pablo Galindocc115e52021-08-02 20:06:40 +01007017{ 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 Galindocc115e52021-08-02 20:06:40 +01007023printf "%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 Galindocc115e52021-08-02 20:06:40 +01007030{ 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 Galindocc115e52021-08-02 20:06:40 +01007034if 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 Galindocc115e52021-08-02 20:06:40 +01007044 { 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 Galindocc115e52021-08-02 20:06:40 +01007048 { 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 Galindocc115e52021-08-02 20:06:40 +01007051 { 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 Galindocc115e52021-08-02 20:06:40 +01007059{ 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 Galindocc115e52021-08-02 20:06:40 +01007062if 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 Galindocc115e52021-08-02 20:06:40 +01007068 { 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 Galindocc115e52021-08-02 20:06:40 +01007072 { 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 Galindocc115e52021-08-02 20:06:40 +01007075else $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 Galindocc115e52021-08-02 20:06:40 +01007090 { 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 Galindocc115e52021-08-02 20:06:40 +01007103main (void)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007104{
7105
7106 ;
7107 return 0;
7108}
7109_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007110if ac_fn_c_try_compile "$LINENO"
7111then :
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007112 ax_cv_check_cflags___fno_semantic_interposition=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01007113else $as_nop
Petr Viktorinc6d7e822020-10-22 18:11:53 +02007114 ax_cv_check_cflags___fno_semantic_interposition=no
7115fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007116rm -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 Galindocc115e52021-08-02 20:06:40 +01007119{ 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 Galindocc115e52021-08-02 20:06:40 +01007127else $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 Galindocc115e52021-08-02 20:06:40 +01007142{ 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 Galindocc115e52021-08-02 20:06:40 +01007148{ 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 Galindocc115e52021-08-02 20:06:40 +01007172{ 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 Galindocc115e52021-08-02 20:06:40 +01007176if 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 Galindocc115e52021-08-02 20:06:40 +01007182 { 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 Galindocc115e52021-08-02 20:06:40 +01007186 { 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 Galindocc115e52021-08-02 20:06:40 +01007189else $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 Galindocc115e52021-08-02 20:06:40 +01007201{ 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 Galindocc115e52021-08-02 20:06:40 +01007216 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 Galindocc115e52021-08-02 20:06:40 +01007222 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 Galindocc115e52021-08-02 20:06:40 +01007236 { 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 Galindocc115e52021-08-02 20:06:40 +01007239 { 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 Galindocc115e52021-08-02 20:06:40 +01007249{ 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 Galindocc115e52021-08-02 20:06:40 +01007264 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 Galindocc115e52021-08-02 20:06:40 +01007270 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 Galindocc115e52021-08-02 20:06:40 +01007284 { 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 Galindocc115e52021-08-02 20:06:40 +01007287 { 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 Galindocc115e52021-08-02 20:06:40 +01007296{ 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
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07007315 # The Apple-supplied ar in Xcode or the Command Line Tools is apparently sufficient
7316 found_llvm_ar=`/usr/bin/xcrun -find ar 2>/dev/null`
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007317 if test -n "${found_llvm_ar}"
7318 then
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07007319 LLVM_AR='/usr/bin/xcrun ar'
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007320 LLVM_AR_FOUND=found
Pablo Galindocc115e52021-08-02 20:06:40 +01007321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
7322printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007323 fi
7324 fi
7325 if test $LLVM_AR_FOUND = not-found
7326 then
7327 LLVM_PROFR_ERR=yes
7328 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
7329 else
7330 LLVM_AR_ERR=no
7331 fi
7332 AR="${LLVM_AR}"
7333 case $ac_sys_system in
7334 Darwin*)
7335 # Any changes made here should be reflected in the GCC+Darwin case below
7336 LTOFLAGS="-flto -Wl,-export_dynamic"
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07007337 LTOCFLAGS="-flto"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007338 ;;
7339 *)
7340 LTOFLAGS="-flto"
7341 ;;
7342 esac
7343 ;;
7344 *gcc*)
7345 case $ac_sys_system in
7346 Darwin*)
7347 LTOFLAGS="-flto -Wl,-export_dynamic"
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07007348 LTOCFLAGS="-flto"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007349 ;;
7350 *)
7351 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
7352 ;;
7353 esac
7354 ;;
7355 esac
7356
7357 if test "$ac_cv_prog_cc_g" = "yes"
7358 then
7359 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
7360 # to get debug symbols.
7361 LTOFLAGS="$LTOFLAGS -g"
7362 fi
7363
Miss Islington (bot)25a9cf12021-05-24 21:18:53 -07007364 CFLAGS_NODIST="$CFLAGS_NODIST ${LTOCFLAGS-$LTOFLAGS}"
stratakiscf10a752018-12-19 18:19:01 +01007365 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02007366fi
7367
7368# Enable PGO flags.
7369
7370
7371
7372
7373
7374
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007375if test -n "$ac_tool_prefix"; then
7376 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
7377set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +01007378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7379printf %s "checking for $ac_word... " >&6; }
7380if test ${ac_cv_path_LLVM_PROFDATA+y}
7381then :
7382 printf %s "(cached) " >&6
7383else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007384 case $LLVM_PROFDATA in
7385 [\\/]* | ?:[\\/]*)
7386 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
7387 ;;
7388 *)
7389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7390for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07007391do
7392 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +01007393 case $as_dir in #(((
7394 '') as_dir=./ ;;
7395 */) ;;
7396 *) as_dir=$as_dir/ ;;
7397 esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007398 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +01007399 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7400 ac_cv_path_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7401 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Brett Cannon7188a3e2015-09-18 15:13:44 -07007402 break 2
7403 fi
7404done
7405 done
7406IFS=$as_save_IFS
7407
Gregory P. Smith799520c2016-09-07 16:10:00 -07007408 ;;
7409esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07007410fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007411LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
7412if test -n "$LLVM_PROFDATA"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01007413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
7414printf "%s\n" "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007415else
Pablo Galindocc115e52021-08-02 20:06:40 +01007416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417printf "%s\n" "no" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07007418fi
7419
7420
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007421fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07007422if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007423 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
7424 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07007425set dummy llvm-profdata; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +01007426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7427printf %s "checking for $ac_word... " >&6; }
7428if test ${ac_cv_path_ac_pt_LLVM_PROFDATA+y}
7429then :
7430 printf %s "(cached) " >&6
7431else $as_nop
Gregory P. Smith799520c2016-09-07 16:10:00 -07007432 case $ac_pt_LLVM_PROFDATA in
7433 [\\/]* | ?:[\\/]*)
7434 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
7435 ;;
7436 *)
7437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438for as_dir in ${llvm_path}
7439do
7440 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +01007441 case $as_dir in #(((
7442 '') as_dir=./ ;;
7443 */) ;;
7444 *) as_dir=$as_dir/ ;;
7445 esac
Gregory P. Smith799520c2016-09-07 16:10:00 -07007446 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +01007447 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7448 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext"
7449 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 -07007450 break 2
7451 fi
7452done
7453 done
7454IFS=$as_save_IFS
7455
Gregory P. Smith799520c2016-09-07 16:10:00 -07007456 ;;
7457esac
7458fi
7459ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
7460if test -n "$ac_pt_LLVM_PROFDATA"; then
Pablo Galindocc115e52021-08-02 20:06:40 +01007461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
7462printf "%s\n" "$ac_pt_LLVM_PROFDATA" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007463else
Pablo Galindocc115e52021-08-02 20:06:40 +01007464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465printf "%s\n" "no" >&6; }
Gregory P. Smith799520c2016-09-07 16:10:00 -07007466fi
7467
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007468 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07007469 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007470 else
7471 case $cross_compiling:$ac_tool_warned in
7472yes:)
Pablo Galindocc115e52021-08-02 20:06:40 +01007473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7474printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersonf3095b02019-09-13 15:30:36 +01007475ac_tool_warned=yes ;;
7476esac
7477 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07007478 fi
7479else
7480 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
7481fi
7482
7483
7484if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
7485then
7486 LLVM_PROF_FOUND="found"
7487else
7488 LLVM_PROF_FOUND="not-found"
7489fi
7490if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
7491then
7492 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
7493 if test -n "${found_llvm_profdata}"
7494 then
7495 # llvm-profdata isn't directly in $PATH in some cases.
7496 # https://apple.stackexchange.com/questions/197053/
7497 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
7498 LLVM_PROF_FOUND=found
Pablo Galindocc115e52021-08-02 20:06:40 +01007499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
7500printf "%s\n" "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
Gregory P. Smith799520c2016-09-07 16:10:00 -07007501 fi
7502fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007503LLVM_PROF_ERR=no
7504case $CC in
7505 *clang*)
7506 # Any changes made here should be reflected in the GCC+Darwin case below
7507 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7508 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007509 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007510 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
7511 if test $LLVM_PROF_FOUND = not-found
7512 then
7513 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007514 if test "${REQUIRE_PGO}" = "yes"
7515 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007516 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 -07007517 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007518 fi
7519 ;;
7520 *gcc*)
7521 case $ac_sys_system in
7522 Darwin*)
7523 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
7524 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07007525 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007526 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07007527 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07007528 then
7529 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07007530 if test "${REQUIRE_PGO}" = "yes"
7531 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00007532 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 -07007533 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07007534 fi
7535 ;;
7536 *)
7537 PGO_PROF_GEN_FLAG="-fprofile-generate"
7538 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
7539 LLVM_PROF_MERGER="true"
7540 LLVM_PROF_FILE=""
7541 ;;
7542 esac
7543 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007544 *icc*)
7545 PGO_PROF_GEN_FLAG="-prof-gen"
7546 PGO_PROF_USE_FLAG="-prof-use"
7547 LLVM_PROF_MERGER="true"
7548 LLVM_PROF_FILE=""
7549 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07007550esac
7551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
7553# merged with this chunk of code?
7554
7555# Optimizer/debugger flags
7556# ------------------------
7557# (The following bit of code is complicated enough - please keep things
7558# indented properly. Just pretend you're editing Python code. ;-)
7559
7560# There are two parallel sets of case statements below, one that checks to
7561# see if OPT was set and one that does BASECFLAGS setting based upon
7562# compiler and platform. BASECFLAGS tweaks need to be made even if the
7563# user set OPT.
7564
Victor Stinner23a683a2019-04-12 21:27:37 +02007565case $CC in
7566 *clang*)
7567 cc_is_clang=1
7568 ;;
7569 *)
7570 if $CC --version 2>&1 | grep -q clang
7571 then
7572 cc_is_clang=1
7573 else
7574 cc_is_clang=
7575 fi
7576esac
7577
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578# tweak OPT based on compiler and platform, only if the user didn't set
7579# it on the command line
7580
Victor Stinner9ed34a82017-05-02 22:35:58 +02007581
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00007582if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583then
7584 case $GCC in
7585 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586 # For gcc 4.x we need to use -fwrapv so lets check if its supported
7587 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
7588 WRAP="-fwrapv"
7589 fi
Stefan Krah962055d2011-09-14 15:14:08 +02007590
Victor Stinner35f3d242017-04-21 12:35:24 +02007591 if test -n "${cc_is_clang}"
7592 then
7593 # Clang also needs -fwrapv
7594 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02007595 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
7596 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02007597 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02007598 fi
7599
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600 case $ac_cv_prog_cc_g in
7601 yes)
7602 if test "$Py_DEBUG" = 'true' ; then
7603 # Optimization messes up debuggers, so turn it off for
7604 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007605 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02007606 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007607 else
Victor Stinner28205b22017-04-21 11:24:34 +02007608 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01007609 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610 else
Victor Stinner28205b22017-04-21 11:24:34 +02007611 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612 fi
7613 ;;
7614 *)
Victor Stinner28205b22017-04-21 11:24:34 +02007615 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616 ;;
7617 esac
Victor Stinner28205b22017-04-21 11:24:34 +02007618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619 case $ac_sys_system in
7620 SCO_SV*) OPT="$OPT -m486 -DSCO5"
7621 ;;
7622 esac
7623 ;;
7624
7625 *)
7626 OPT="-O"
7627 ;;
7628 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629fi
7630
7631
7632
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007633
stratakiscf10a752018-12-19 18:19:01 +01007634
Ronald Oussoren41761932020-11-08 10:05:27 +01007635# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636UNIVERSAL_ARCH_FLAGS=
7637
7638
7639# tweak BASECFLAGS based on compiler and platform
7640case $GCC in
7641yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007642 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007643
Pablo Galindocc115e52021-08-02 20:06:40 +01007644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7645printf %s "checking for -Wextra... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007646 ac_save_cc="$CC"
7647 CC="$CC -Wextra -Werror"
Pablo Galindocc115e52021-08-02 20:06:40 +01007648 if test ${ac_cv_extra_warnings+y}
7649then :
7650 printf %s "(cached) " >&6
7651else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7653/* end confdefs.h. */
7654
7655
7656int
Pablo Galindocc115e52021-08-02 20:06:40 +01007657main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007658{
7659
7660 ;
7661 return 0;
7662}
7663
7664_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007665if ac_fn_c_try_compile "$LINENO"
7666then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007667
7668 ac_cv_extra_warnings=yes
7669
Pablo Galindocc115e52021-08-02 20:06:40 +01007670else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007671
7672 ac_cv_extra_warnings=no
7673
7674fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007675rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007676fi
7677
7678 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01007679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7680printf "%s\n" "$ac_cv_extra_warnings" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007681
7682 if test $ac_cv_extra_warnings = yes
7683 then
7684 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7685 fi
7686
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007687 # Python doesn't violate C99 aliasing rules, but older versions of
7688 # GCC produce warnings for legal Python code. Enable
7689 # -fno-strict-aliasing on versions of GCC that support but produce
7690 # warnings. See Issue3326
Pablo Galindocc115e52021-08-02 20:06:40 +01007691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7692printf %s "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693 ac_save_cc="$CC"
7694 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007695 save_CFLAGS="$CFLAGS"
Pablo Galindocc115e52021-08-02 20:06:40 +01007696 if test ${ac_cv_no_strict_aliasing+y}
7697then :
7698 printf %s "(cached) " >&6
7699else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007702
Matthias Kloseb159a552010-04-25 21:00:44 +00007703
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007704int
Pablo Galindocc115e52021-08-02 20:06:40 +01007705main (void)
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007706{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007707
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007708 ;
7709 return 0;
7710}
Matthias Kloseb159a552010-04-25 21:00:44 +00007711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007713if ac_fn_c_try_compile "$LINENO"
7714then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007715
7716 CC="$ac_save_cc -fstrict-aliasing"
7717 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007719/* end confdefs.h. */
7720
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007721 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007722int
Pablo Galindocc115e52021-08-02 20:06:40 +01007723main (void)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007724{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007725double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007726 ;
7727 return 0;
7728}
Matthias Kloseb159a552010-04-25 21:00:44 +00007729
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007730_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007731if ac_fn_c_try_compile "$LINENO"
7732then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007733
7734 ac_cv_no_strict_aliasing=no
7735
Pablo Galindocc115e52021-08-02 20:06:40 +01007736else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007737
7738 ac_cv_no_strict_aliasing=yes
7739
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007740fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007741rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007742
Pablo Galindocc115e52021-08-02 20:06:40 +01007743else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +00007744
7745 ac_cv_no_strict_aliasing=no
7746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007748rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007749fi
7750
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007751 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01007753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7754printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007755 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756 then
7757 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7758 fi
7759
Zachary Ware5af85642015-12-21 12:09:17 -06007760 # ICC doesn't recognize the option, but only emits a warning
7761 ## XXX does it emit an unused result warning and can it be disabled?
7762 case "$CC" in
7763 *icc*)
7764 ac_cv_disable_unused_result_warning=no
7765 ;;
7766 *)
Pablo Galindocc115e52021-08-02 20:06:40 +01007767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7768printf %s "checking if we can turn off $CC unused result warning... " >&6; }
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007769 ac_save_cc="$CC"
7770 CC="$CC -Wunused-result -Werror"
7771 save_CFLAGS="$CFLAGS"
Pablo Galindocc115e52021-08-02 20:06:40 +01007772 if test ${ac_cv_disable_unused_result_warning+y}
7773then :
7774 printf %s "(cached) " >&6
7775else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7777/* end confdefs.h. */
7778
7779
7780int
Pablo Galindocc115e52021-08-02 20:06:40 +01007781main (void)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007782{
7783
7784 ;
7785 return 0;
7786}
7787
7788_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007789if ac_fn_c_try_compile "$LINENO"
7790then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007791
7792 ac_cv_disable_unused_result_warning=yes
7793
Pablo Galindocc115e52021-08-02 20:06:40 +01007794else $as_nop
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007795
7796 ac_cv_disable_unused_result_warning=no
7797
7798fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007799rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007800fi
7801
7802 CFLAGS="$save_CFLAGS"
7803 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01007804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7805printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007806 ;;
7807 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007808
7809 if test $ac_cv_disable_unused_result_warning = yes
7810 then
7811 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007812 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7813 fi
7814
Pablo Galindocc115e52021-08-02 20:06:40 +01007815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7816printf %s "checking if we can turn off $CC unused parameter warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007817 ac_save_cc="$CC"
7818 CC="$CC -Wunused-parameter -Werror"
Pablo Galindocc115e52021-08-02 20:06:40 +01007819 if test ${ac_cv_disable_unused_parameter_warning+y}
7820then :
7821 printf %s "(cached) " >&6
7822else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7824/* end confdefs.h. */
7825
7826
7827int
Pablo Galindocc115e52021-08-02 20:06:40 +01007828main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007829{
7830
7831 ;
7832 return 0;
7833}
7834
7835_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007836if ac_fn_c_try_compile "$LINENO"
7837then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007838
7839 ac_cv_disable_unused_parameter_warning=yes
7840
Pablo Galindocc115e52021-08-02 20:06:40 +01007841else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007842
7843 ac_cv_disable_unused_parameter_warning=no
7844
7845fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007846rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007847fi
7848
7849 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01007850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7851printf "%s\n" "$ac_cv_disable_unused_parameter_warning" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007852
7853 if test $ac_cv_disable_unused_parameter_warning = yes
7854 then
7855 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7856 fi
7857
Pablo Galindocc115e52021-08-02 20:06:40 +01007858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7859printf %s "checking if we can turn off $CC missing field initializers warning... " >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007860 ac_save_cc="$CC"
7861 CC="$CC -Wmissing-field-initializers -Werror"
Pablo Galindocc115e52021-08-02 20:06:40 +01007862 if test ${ac_cv_disable_missing_field_initializers+y}
7863then :
7864 printf %s "(cached) " >&6
7865else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7867/* end confdefs.h. */
7868
7869
7870int
Pablo Galindocc115e52021-08-02 20:06:40 +01007871main (void)
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007872{
7873
7874 ;
7875 return 0;
7876}
7877
7878_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007879if ac_fn_c_try_compile "$LINENO"
7880then :
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007881
7882 ac_cv_disable_missing_field_initializers=yes
7883
Pablo Galindocc115e52021-08-02 20:06:40 +01007884else $as_nop
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007885
7886 ac_cv_disable_missing_field_initializers=no
7887
7888fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007889rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007890fi
7891
7892 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01007893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7894printf "%s\n" "$ac_cv_disable_missing_field_initializers" >&6; }
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007895
7896 if test $ac_cv_disable_missing_field_initializers = yes
7897 then
7898 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007899 fi
7900
Pablo Galindocc115e52021-08-02 20:06:40 +01007901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7902printf %s "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007903 ac_save_cc="$CC"
7904 CC="$CC -Wsign-compare"
7905 save_CFLAGS="$CFLAGS"
Pablo Galindocc115e52021-08-02 20:06:40 +01007906 if test ${ac_cv_enable_sign_compare_warning+y}
7907then :
7908 printf %s "(cached) " >&6
7909else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7911/* end confdefs.h. */
7912
7913
7914int
Pablo Galindocc115e52021-08-02 20:06:40 +01007915main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007916{
7917
7918 ;
7919 return 0;
7920}
7921
7922_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007923if ac_fn_c_try_compile "$LINENO"
7924then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007925
7926 ac_cv_enable_sign_compare_warning=yes
7927
Pablo Galindocc115e52021-08-02 20:06:40 +01007928else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007929
7930 ac_cv_enable_sign_compare_warning=no
7931
7932fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007933rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007934fi
7935
7936 CFLAGS="$save_CFLAGS"
7937 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01007938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7939printf "%s\n" "$ac_cv_enable_sign_compare_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007940
7941 if test $ac_cv_enable_sign_compare_warning = yes
7942 then
7943 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7944 fi
7945
Pablo Galindocc115e52021-08-02 20:06:40 +01007946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7947printf %s "checking if we can turn on $CC unreachable code warning... " >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007948 ac_save_cc="$CC"
7949 CC="$CC -Wunreachable-code"
7950 save_CFLAGS="$CFLAGS"
Pablo Galindocc115e52021-08-02 20:06:40 +01007951 if test ${ac_cv_enable_unreachable_code_warning+y}
7952then :
7953 printf %s "(cached) " >&6
7954else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7956/* end confdefs.h. */
7957
7958
7959int
Pablo Galindocc115e52021-08-02 20:06:40 +01007960main (void)
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007961{
7962
7963 ;
7964 return 0;
7965}
7966
7967_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01007968if ac_fn_c_try_compile "$LINENO"
7969then :
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007970
7971 ac_cv_enable_unreachable_code_warning=yes
7972
Pablo Galindocc115e52021-08-02 20:06:40 +01007973else $as_nop
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007974
7975 ac_cv_enable_unreachable_code_warning=no
7976
7977fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007978rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007979fi
7980
7981 CFLAGS="$save_CFLAGS"
7982 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007983
7984 # Don't enable unreachable code warning in debug mode, since it usually
7985 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007986 # Issue #24324: Unfortunately, the unreachable code warning does not work
7987 # correctly on gcc and has been silently removed from the compiler.
7988 # It is supported on clang but on OS X systems gcc may be an alias
7989 # for clang. Try to determine if the compiler is not really gcc and,
7990 # if so, only then enable the warning.
7991 if test $ac_cv_enable_unreachable_code_warning = yes && \
7992 test "$Py_DEBUG" != "true" && \
7993 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007994 then
7995 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007996 else
7997 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007998 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01007999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
8000printf "%s\n" "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01008001
Pablo Galindocc115e52021-08-02 20:06:40 +01008002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
8003printf %s "checking if we can turn on $CC strict-prototypes warning... " >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008004 ac_save_cc="$CC"
8005 CC="$CC -Werror -Wstrict-prototypes"
Pablo Galindocc115e52021-08-02 20:06:40 +01008006 if test ${ac_cv_enable_enable_strict_prototypes_warning+y}
8007then :
8008 printf %s "(cached) " >&6
8009else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8011/* end confdefs.h. */
8012
8013
8014int
Pablo Galindocc115e52021-08-02 20:06:40 +01008015main (void)
INADA Naokie3364842018-06-05 20:40:53 +09008016{
8017
8018 ;
8019 return 0;
8020}
8021
8022_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008023if ac_fn_c_try_compile "$LINENO"
8024then :
INADA Naokie3364842018-06-05 20:40:53 +09008025
8026 ac_cv_enable_strict_prototypes_warning=yes
8027
Pablo Galindocc115e52021-08-02 20:06:40 +01008028else $as_nop
INADA Naokie3364842018-06-05 20:40:53 +09008029
8030 ac_cv_enable_strict_prototypes_warning=no
8031
8032fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008033rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
INADA Naokie3364842018-06-05 20:40:53 +09008034fi
8035
8036 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01008037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
8038printf "%s\n" "$ac_cv_enable_strict_prototypes_warning" >&6; }
INADA Naokie3364842018-06-05 20:40:53 +09008039
8040 if test $ac_cv_enable_strict_prototypes_warning = yes
8041 then
8042 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
8043 fi
8044
Pablo Galindocc115e52021-08-02 20:06:40 +01008045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
8046printf %s "checking if we can make implicit function declaration an error in $CC... " >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008047 ac_save_cc="$CC"
8048 CC="$CC -Werror=implicit-function-declaration"
Pablo Galindocc115e52021-08-02 20:06:40 +01008049 if test ${ac_cv_enable_implicit_function_declaration_error+y}
8050then :
8051 printf %s "(cached) " >&6
8052else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8054/* end confdefs.h. */
8055
8056
8057int
Pablo Galindocc115e52021-08-02 20:06:40 +01008058main (void)
Victor Stinner193ee0a2017-02-06 14:24:00 +01008059{
8060
8061 ;
8062 return 0;
8063}
8064
8065_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008066if ac_fn_c_try_compile "$LINENO"
8067then :
Victor Stinner193ee0a2017-02-06 14:24:00 +01008068
8069 ac_cv_enable_implicit_function_declaration_error=yes
8070
Pablo Galindocc115e52021-08-02 20:06:40 +01008071else $as_nop
Victor Stinner193ee0a2017-02-06 14:24:00 +01008072
8073 ac_cv_enable_implicit_function_declaration_error=no
8074
8075fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008076rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner193ee0a2017-02-06 14:24:00 +01008077fi
8078
8079 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01008080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
8081printf "%s\n" "$ac_cv_enable_implicit_function_declaration_error" >&6; }
Victor Stinner193ee0a2017-02-06 14:24:00 +01008082
8083 if test $ac_cv_enable_implicit_function_declaration_error = yes
8084 then
8085 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
8086 fi
8087
Pablo Galindocc115e52021-08-02 20:06:40 +01008088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
8089printf %s "checking if we can use visibility in $CC... " >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008090 ac_save_cc="$CC"
8091 CC="$CC -fvisibility=hidden"
Pablo Galindocc115e52021-08-02 20:06:40 +01008092 if test ${ac_cv_enable_visibility+y}
8093then :
8094 printf %s "(cached) " >&6
8095else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8097/* end confdefs.h. */
8098
8099
8100int
Pablo Galindocc115e52021-08-02 20:06:40 +01008101main (void)
Vinay Sajip0b60f642019-10-15 08:26:12 +01008102{
8103
8104 ;
8105 return 0;
8106}
8107
8108_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008109if ac_fn_c_try_compile "$LINENO"
8110then :
Vinay Sajip0b60f642019-10-15 08:26:12 +01008111
8112 ac_cv_enable_visibility=yes
8113
Pablo Galindocc115e52021-08-02 20:06:40 +01008114else $as_nop
Vinay Sajip0b60f642019-10-15 08:26:12 +01008115
8116 ac_cv_enable_visibility=no
8117
8118fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008119rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Vinay Sajip0b60f642019-10-15 08:26:12 +01008120fi
8121
8122 CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +01008123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
8124printf "%s\n" "$ac_cv_enable_visibility" >&6; }
Vinay Sajip0b60f642019-10-15 08:26:12 +01008125
8126 if test $ac_cv_enable_visibility = yes
8127 then
8128 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
8129 fi
8130
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008131 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
8132 # support. Without this, treatment of subnormals doesn't follow
8133 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01008134 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008135 alpha*)
8136 BASECFLAGS="$BASECFLAGS -mieee"
8137 ;;
8138 esac
8139
8140 case $ac_sys_system in
8141 SCO_SV*)
8142 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
8143 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008144
Ned Deily87adb6e2013-10-18 21:09:56 -07008145 Darwin*)
8146 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
8147 # used to be here, but non-Apple gcc doesn't accept them.
8148 if test "${CC}" = gcc
8149 then
Pablo Galindocc115e52021-08-02 20:06:40 +01008150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
8151printf %s "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008152 case "${UNIVERSALSDK}" in
8153 */MacOSX10.4u.sdk)
8154 # Build using 10.4 SDK, force usage of gcc when the
8155 # compiler is gcc, otherwise the user will get very
8156 # confusing error messages when building on OSX 10.6
8157 CC=gcc-4.0
8158 CPP=cpp-4.0
8159 ;;
8160 esac
Pablo Galindocc115e52021-08-02 20:06:40 +01008161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8162printf "%s\n" "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07008163 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008164
Ned Deily0cb33da2021-05-02 04:48:29 -04008165 LIPO_INTEL64_FLAGS=""
Ned Deily87adb6e2013-10-18 21:09:56 -07008166 if test "${enable_universalsdk}"
8167 then
8168 case "$UNIVERSAL_ARCHS" in
8169 32-bit)
8170 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
8171 LIPO_32BIT_FLAGS=""
8172 ARCH_RUN_32BIT=""
8173 ;;
8174 64-bit)
8175 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
8176 LIPO_32BIT_FLAGS=""
8177 ARCH_RUN_32BIT="true"
8178 ;;
8179 all)
8180 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
8181 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8182 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8183 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01008184 universal2)
8185 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
8186 LIPO_32BIT_FLAGS=""
Ned Deily0cb33da2021-05-02 04:48:29 -04008187 LIPO_INTEL64_FLAGS="-extract x86_64"
Ronald Oussoren41761932020-11-08 10:05:27 +01008188 ARCH_RUN_32BIT="true"
Ned Deily0cb33da2021-05-02 04:48:29 -04008189 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008190 intel)
8191 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
8192 LIPO_32BIT_FLAGS="-extract i386"
8193 ARCH_RUN_32BIT="/usr/bin/arch -i386"
8194 ;;
8195 intel-32)
8196 UNIVERSAL_ARCH_FLAGS="-arch i386"
8197 LIPO_32BIT_FLAGS=""
8198 ARCH_RUN_32BIT=""
8199 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05008200 intel-64)
8201 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
8202 LIPO_32BIT_FLAGS=""
8203 ARCH_RUN_32BIT="true"
8204 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07008205 3-way)
8206 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
8207 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
8208 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
8209 ;;
8210 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01008211 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 -07008212 ;;
8213 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008214
Ned Deily87adb6e2013-10-18 21:09:56 -07008215 if test "${UNIVERSALSDK}" != "/"
8216 then
Ned Deily8c9bb722018-01-30 07:42:14 -05008217 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
8218 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008219 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05008220 else
8221 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
8222 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07008223 fi
8224 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008225
Ned Deily87adb6e2013-10-18 21:09:56 -07008226 # Calculate an appropriate deployment target for this build:
8227 # The deployment target value is used explicitly to enable certain
8228 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07008229 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07008230 # component of the string returned by distutils.get_platform().
8231 #
8232 # Use the value from:
8233 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
8234 # 2. the operating system version of the build machine if >= 10.6
8235 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
8236 # below to pick either 10.3, 10.4, or 10.5 as the target.
8237 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008238
Pablo Galindocc115e52021-08-02 20:06:40 +01008239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
8240printf %s "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07008241 cur_target_major=`sw_vers -productVersion | \
8242 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8243 cur_target_minor=`sw_vers -productVersion | \
8244 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8245 cur_target="${cur_target_major}.${cur_target_minor}"
8246 if test ${cur_target_major} -eq 10 && \
8247 test ${cur_target_minor} -ge 3 && \
8248 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07008249 then
Ned Deily36820b62014-06-25 13:44:22 -07008250 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07008251 cur_target=10.3
8252 if test ${enable_universalsdk}
8253 then
8254 case "$UNIVERSAL_ARCHS" in
8255 all|3-way|intel|64-bit)
8256 # These configurations were first supported in 10.5
8257 cur_target='10.5'
8258 ;;
8259 esac
8260 else
8261 if test `/usr/bin/arch` = "i386"
8262 then
8263 # 10.4 was the first release to support Intel archs
8264 cur_target="10.4"
8265 fi
8266 fi
8267 fi
8268 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008269
Ned Deily87adb6e2013-10-18 21:09:56 -07008270 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
8271 # environment with a value that is the same as what we'll use
8272 # in the Makefile to ensure that we'll get the same compiler
8273 # environment during configure and build time.
8274 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
8275 export MACOSX_DEPLOYMENT_TARGET
8276 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Pablo Galindocc115e52021-08-02 20:06:40 +01008277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
8278printf "%s\n" "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008279
Pablo Galindocc115e52021-08-02 20:06:40 +01008280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
8281printf %s "checking if specified universal architectures work... " >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8283/* end confdefs.h. */
8284#include <stdio.h>
8285int
Pablo Galindocc115e52021-08-02 20:06:40 +01008286main (void)
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008287{
8288printf("%d", 42);
8289 ;
8290 return 0;
8291}
8292_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008293if ac_fn_c_try_link "$LINENO"
8294then :
8295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8296printf "%s\n" "yes" >&6; }
8297else $as_nop
8298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8299printf "%s\n" "no" >&6; }
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008300 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
8301
8302fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008303rm -f core conftest.err conftest.$ac_objext conftest.beam \
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01008304 conftest$ac_exeext conftest.$ac_ext
8305
Ned Deily87adb6e2013-10-18 21:09:56 -07008306 # end of Darwin* tests
8307 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008308 esac
8309 ;;
8310
8311*)
8312 case $ac_sys_system in
8313 OpenUNIX*|UnixWare*)
8314 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
8315 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008316 SCO_SV*)
8317 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
8318 ;;
8319 esac
8320 ;;
8321esac
8322
Zachary Ware5af85642015-12-21 12:09:17 -06008323case "$CC" in
8324*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02008325 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06008326 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
8327 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02008328*xlc*)
8329 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
8330 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06008331esac
8332
T. Woutersddbfa2c2017-05-23 01:30:49 +02008333if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008334 :
8335else
8336 OPT="-DNDEBUG $OPT"
8337fi
8338
8339if test "$ac_arch_flags"
8340then
8341 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
8342fi
8343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008344# On some compilers, pthreads are available without further options
8345# (e.g. MacOS X). On some of these systems, the compiler will not
8346# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
8347# So we have to see first whether pthreads are available without
8348# options before we can check whether -Kpthread improves anything.
Pablo Galindocc115e52021-08-02 20:06:40 +01008349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
8350printf %s "checking whether pthreads are available without options... " >&6; }
8351if test ${ac_cv_pthread_is_default+y}
8352then :
8353 printf %s "(cached) " >&6
8354else $as_nop
8355 if test "$cross_compiling" = yes
8356then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008357 ac_cv_pthread_is_default=no
Pablo Galindocc115e52021-08-02 20:06:40 +01008358else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008360/* end confdefs.h. */
8361
Stefan Krah7dba5942012-11-22 22:49:11 +01008362#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008363#include <pthread.h>
8364
8365void* routine(void* p){return NULL;}
8366
8367int main(){
8368 pthread_t p;
8369 if(pthread_create(&p,NULL,routine,NULL)!=0)
8370 return 1;
8371 (void)pthread_detach(p);
8372 return 0;
8373}
8374
8375_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008376if ac_fn_c_try_run "$LINENO"
8377then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008378
8379 ac_cv_pthread_is_default=yes
8380 ac_cv_kthread=no
8381 ac_cv_pthread=no
8382
Pablo Galindocc115e52021-08-02 20:06:40 +01008383else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008385fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8387 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008388fi
8389
8390
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008391fi
8392
Pablo Galindocc115e52021-08-02 20:06:40 +01008393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
8394printf "%s\n" "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008395
8396
8397if test $ac_cv_pthread_is_default = yes
8398then
8399 ac_cv_kpthread=no
8400else
8401# -Kpthread, if available, provides the right #defines
8402# and linker options to make pthread_create available
8403# Some compilers won't report that they do not support -Kpthread,
8404# so we need to run a program to see whether it really made the
8405# function available.
Pablo Galindocc115e52021-08-02 20:06:40 +01008406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
8407printf %s "checking whether $CC accepts -Kpthread... " >&6; }
8408if test ${ac_cv_kpthread+y}
8409then :
8410 printf %s "(cached) " >&6
8411else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008412 ac_save_cc="$CC"
8413CC="$CC -Kpthread"
Pablo Galindocc115e52021-08-02 20:06:40 +01008414if test "$cross_compiling" = yes
8415then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008416 ac_cv_kpthread=no
Pablo Galindocc115e52021-08-02 20:06:40 +01008417else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008419/* end confdefs.h. */
8420
Stefan Krah7dba5942012-11-22 22:49:11 +01008421#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008422#include <pthread.h>
8423
8424void* routine(void* p){return NULL;}
8425
8426int main(){
8427 pthread_t p;
8428 if(pthread_create(&p,NULL,routine,NULL)!=0)
8429 return 1;
8430 (void)pthread_detach(p);
8431 return 0;
8432}
8433
8434_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008435if ac_fn_c_try_run "$LINENO"
8436then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008437 ac_cv_kpthread=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01008438else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8442 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008443fi
8444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008445CC="$ac_save_cc"
8446fi
8447
Pablo Galindocc115e52021-08-02 20:06:40 +01008448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
8449printf "%s\n" "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008450fi
8451
8452if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
8453then
8454# -Kthread, if available, provides the right #defines
8455# and linker options to make pthread_create available
8456# Some compilers won't report that they do not support -Kthread,
8457# so we need to run a program to see whether it really made the
8458# function available.
Pablo Galindocc115e52021-08-02 20:06:40 +01008459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
8460printf %s "checking whether $CC accepts -Kthread... " >&6; }
8461if test ${ac_cv_kthread+y}
8462then :
8463 printf %s "(cached) " >&6
8464else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008465 ac_save_cc="$CC"
8466CC="$CC -Kthread"
Pablo Galindocc115e52021-08-02 20:06:40 +01008467if test "$cross_compiling" = yes
8468then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008469 ac_cv_kthread=no
Pablo Galindocc115e52021-08-02 20:06:40 +01008470else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008472/* end confdefs.h. */
8473
Stefan Krah7dba5942012-11-22 22:49:11 +01008474#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008475#include <pthread.h>
8476
8477void* routine(void* p){return NULL;}
8478
8479int main(){
8480 pthread_t p;
8481 if(pthread_create(&p,NULL,routine,NULL)!=0)
8482 return 1;
8483 (void)pthread_detach(p);
8484 return 0;
8485}
8486
8487_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008488if ac_fn_c_try_run "$LINENO"
8489then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008490 ac_cv_kthread=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01008491else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008496fi
8497
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008498CC="$ac_save_cc"
8499fi
8500
Pablo Galindocc115e52021-08-02 20:06:40 +01008501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
8502printf "%s\n" "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008503fi
8504
8505if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
8506then
8507# -pthread, if available, provides the right #defines
8508# and linker options to make pthread_create available
8509# Some compilers won't report that they do not support -pthread,
8510# so we need to run a program to see whether it really made the
8511# function available.
Pablo Galindocc115e52021-08-02 20:06:40 +01008512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
8513printf %s "checking whether $CC accepts -pthread... " >&6; }
8514if test ${ac_cv_pthread+y}
8515then :
8516 printf %s "(cached) " >&6
8517else $as_nop
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008518 ac_save_cc="$CC"
8519CC="$CC -pthread"
Pablo Galindocc115e52021-08-02 20:06:40 +01008520if test "$cross_compiling" = yes
8521then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008522 ac_cv_pthread=no
Pablo Galindocc115e52021-08-02 20:06:40 +01008523else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008525/* end confdefs.h. */
8526
Stefan Krah7dba5942012-11-22 22:49:11 +01008527#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008528#include <pthread.h>
8529
8530void* routine(void* p){return NULL;}
8531
8532int main(){
8533 pthread_t p;
8534 if(pthread_create(&p,NULL,routine,NULL)!=0)
8535 return 1;
8536 (void)pthread_detach(p);
8537 return 0;
8538}
8539
8540_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01008541if ac_fn_c_try_run "$LINENO"
8542then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008543 ac_cv_pthread=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01008544else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008549fi
8550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008551CC="$ac_save_cc"
8552fi
8553
Pablo Galindocc115e52021-08-02 20:06:40 +01008554{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
8555printf "%s\n" "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008556fi
8557
8558# If we have set a CC compiler flag for thread support then
8559# check if it works for CXX, too.
8560ac_cv_cxx_thread=no
8561if test ! -z "$CXX"
8562then
Pablo Galindocc115e52021-08-02 20:06:40 +01008563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
8564printf %s "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008565ac_save_cxx="$CXX"
8566
8567if test "$ac_cv_kpthread" = "yes"
8568then
8569 CXX="$CXX -Kpthread"
8570 ac_cv_cxx_thread=yes
8571elif test "$ac_cv_kthread" = "yes"
8572then
8573 CXX="$CXX -Kthread"
8574 ac_cv_cxx_thread=yes
8575elif test "$ac_cv_pthread" = "yes"
8576then
8577 CXX="$CXX -pthread"
8578 ac_cv_cxx_thread=yes
8579fi
8580
8581if test $ac_cv_cxx_thread = yes
8582then
8583 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
8584 $CXX -c conftest.$ac_ext 2>&5
8585 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
8586 && test -s conftest$ac_exeext && ./conftest$ac_exeext
8587 then
8588 ac_cv_cxx_thread=yes
8589 else
8590 ac_cv_cxx_thread=no
8591 fi
8592 rm -fr conftest*
8593fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008594{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
8595printf "%s\n" "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008596fi
8597CXX="$ac_save_cxx"
8598
8599
8600# checks for header files
Pablo Galindocc115e52021-08-02 20:06:40 +01008601# Autoupdate added the next two lines to ensure that your configure
8602# script's behavior did not change. They are probably safe to remove.
8603
8604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8605printf %s "checking for egrep... " >&6; }
8606if test ${ac_cv_path_EGREP+y}
8607then :
8608 printf %s "(cached) " >&6
8609else $as_nop
8610 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8611 then ac_cv_path_EGREP="$GREP -E"
8612 else
8613 if test -z "$EGREP"; then
8614 ac_path_EGREP_found=false
8615 # Loop through the user's path and test for each of PROGNAME-LIST
8616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8617for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8618do
8619 IFS=$as_save_IFS
8620 case $as_dir in #(((
8621 '') as_dir=./ ;;
8622 */) ;;
8623 *) as_dir=$as_dir/ ;;
8624 esac
8625 for ac_prog in egrep
8626 do
8627 for ac_exec_ext in '' $ac_executable_extensions; do
8628 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
8629 as_fn_executable_p "$ac_path_EGREP" || continue
8630# Check for GNU ac_path_EGREP and select it if it is found.
8631 # Check for GNU $ac_path_EGREP
8632case `"$ac_path_EGREP" --version 2>&1` in
8633*GNU*)
8634 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8635*)
8636 ac_count=0
8637 printf %s 0123456789 >"conftest.in"
8638 while :
8639 do
8640 cat "conftest.in" "conftest.in" >"conftest.tmp"
8641 mv "conftest.tmp" "conftest.in"
8642 cp "conftest.in" "conftest.nl"
8643 printf "%s\n" 'EGREP' >> "conftest.nl"
8644 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8645 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8646 as_fn_arith $ac_count + 1 && ac_count=$as_val
8647 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8648 # Best one so far, save it but keep looking for a better one
8649 ac_cv_path_EGREP="$ac_path_EGREP"
8650 ac_path_EGREP_max=$ac_count
8651 fi
8652 # 10*(2^10) chars as input seems more than enough
8653 test $ac_count -gt 10 && break
8654 done
8655 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8656esac
8657
8658 $ac_path_EGREP_found && break 3
8659 done
8660 done
8661 done
8662IFS=$as_save_IFS
8663 if test -z "$ac_cv_path_EGREP"; then
8664 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8665 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008666else
Pablo Galindocc115e52021-08-02 20:06:40 +01008667 ac_cv_path_EGREP=$EGREP
Pablo Galindoba421752021-05-03 20:33:17 +01008668fi
Pablo Galindoba421752021-05-03 20:33:17 +01008669
Pablo Galindocc115e52021-08-02 20:06:40 +01008670 fi
Pablo Galindoba421752021-05-03 20:33:17 +01008671fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8673printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8674 EGREP="$ac_cv_path_EGREP"
8675
8676
8677
8678ac_fn_c_check_header_compile "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default"
8679if test "x$ac_cv_header_asm_types_h" = xyes
8680then :
8681 printf "%s\n" "#define HAVE_ASM_TYPES_H 1" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +01008682
8683fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008684ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
8685if test "x$ac_cv_header_crypt_h" = xyes
8686then :
8687 printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +01008688
8689fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008690ac_fn_c_check_header_compile "$LINENO" "conio.h" "ac_cv_header_conio_h" "$ac_includes_default"
8691if test "x$ac_cv_header_conio_h" = xyes
8692then :
8693 printf "%s\n" "#define HAVE_CONIO_H 1" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +01008694
8695fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008696ac_fn_c_check_header_compile "$LINENO" "direct.h" "ac_cv_header_direct_h" "$ac_includes_default"
8697if test "x$ac_cv_header_direct_h" = xyes
8698then :
8699 printf "%s\n" "#define HAVE_DIRECT_H 1" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +01008700
8701fi
Pablo Galindocc115e52021-08-02 20:06:40 +01008702ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
8703if test "x$ac_cv_header_dlfcn_h" = xyes
8704then :
8705 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +01008706
Pablo Galindocc115e52021-08-02 20:06:40 +01008707fi
8708ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
8709if test "x$ac_cv_header_errno_h" = xyes
8710then :
8711 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
8712
8713fi
8714ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
8715if test "x$ac_cv_header_fcntl_h" = xyes
8716then :
8717 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
8718
8719fi
8720ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default"
8721if test "x$ac_cv_header_grp_h" = xyes
8722then :
8723 printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
8724
8725fi
8726ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
8727if test "x$ac_cv_header_ieeefp_h" = xyes
8728then :
8729 printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h
8730
8731fi
8732ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default"
8733if test "x$ac_cv_header_io_h" = xyes
8734then :
8735 printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h
8736
8737fi
8738ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
8739if test "x$ac_cv_header_langinfo_h" = xyes
8740then :
8741 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
8742
8743fi
8744ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
8745if test "x$ac_cv_header_libintl_h" = xyes
8746then :
8747 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
8748
8749fi
8750ac_fn_c_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default"
8751if test "x$ac_cv_header_process_h" = xyes
8752then :
8753 printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h
8754
8755fi
8756ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8757if test "x$ac_cv_header_pthread_h" = xyes
8758then :
8759 printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
8760
8761fi
8762ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
8763if test "x$ac_cv_header_sched_h" = xyes
8764then :
8765 printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
8766
8767fi
8768ac_fn_c_check_header_compile "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
8769if test "x$ac_cv_header_shadow_h" = xyes
8770then :
8771 printf "%s\n" "#define HAVE_SHADOW_H 1" >>confdefs.h
8772
8773fi
8774ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
8775if test "x$ac_cv_header_signal_h" = xyes
8776then :
8777 printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
8778
8779fi
8780ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
8781if test "x$ac_cv_header_stropts_h" = xyes
8782then :
8783 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
8784
8785fi
8786ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
8787if test "x$ac_cv_header_termios_h" = xyes
8788then :
8789 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
8790
8791fi
8792ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
8793if test "x$ac_cv_header_utime_h" = xyes
8794then :
8795 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
8796
8797fi
8798ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
8799if test "x$ac_cv_header_poll_h" = xyes
8800then :
8801 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
8802
8803fi
8804ac_fn_c_check_header_compile "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default"
8805if test "x$ac_cv_header_sys_devpoll_h" = xyes
8806then :
8807 printf "%s\n" "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h
8808
8809fi
8810ac_fn_c_check_header_compile "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
8811if test "x$ac_cv_header_sys_epoll_h" = xyes
8812then :
8813 printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h
8814
8815fi
8816ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
8817if test "x$ac_cv_header_sys_poll_h" = xyes
8818then :
8819 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
8820
8821fi
8822ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
8823if test "x$ac_cv_header_sys_audioio_h" = xyes
8824then :
8825 printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h
8826
8827fi
8828ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
8829if test "x$ac_cv_header_sys_xattr_h" = xyes
8830then :
8831 printf "%s\n" "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
8832
8833fi
8834ac_fn_c_check_header_compile "$LINENO" "sys/bsdtty.h" "ac_cv_header_sys_bsdtty_h" "$ac_includes_default"
8835if test "x$ac_cv_header_sys_bsdtty_h" = xyes
8836then :
8837 printf "%s\n" "#define HAVE_SYS_BSDTTY_H 1" >>confdefs.h
8838
8839fi
8840ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
8841if test "x$ac_cv_header_sys_event_h" = xyes
8842then :
8843 printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h
8844
8845fi
8846ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
8847if test "x$ac_cv_header_sys_file_h" = xyes
8848then :
8849 printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
8850
8851fi
8852ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
8853if test "x$ac_cv_header_sys_ioctl_h" = xyes
8854then :
8855 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
8856
8857fi
8858ac_fn_c_check_header_compile "$LINENO" "sys/kern_control.h" "ac_cv_header_sys_kern_control_h" "$ac_includes_default"
8859if test "x$ac_cv_header_sys_kern_control_h" = xyes
8860then :
8861 printf "%s\n" "#define HAVE_SYS_KERN_CONTROL_H 1" >>confdefs.h
8862
8863fi
8864ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
8865if test "x$ac_cv_header_sys_loadavg_h" = xyes
8866then :
8867 printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h
8868
8869fi
8870ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default"
8871if test "x$ac_cv_header_sys_lock_h" = xyes
8872then :
8873 printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h
8874
8875fi
8876ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
8877if test "x$ac_cv_header_sys_mkdev_h" = xyes
8878then :
8879 printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h
8880
8881fi
8882ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
8883if test "x$ac_cv_header_sys_modem_h" = xyes
8884then :
8885 printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h
8886
8887fi
8888ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
8889if test "x$ac_cv_header_sys_param_h" = xyes
8890then :
8891 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
8892
8893fi
8894ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
8895if test "x$ac_cv_header_sys_random_h" = xyes
8896then :
8897 printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
8898
8899fi
8900ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
8901if test "x$ac_cv_header_sys_select_h" = xyes
8902then :
8903 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
8904
8905fi
8906ac_fn_c_check_header_compile "$LINENO" "sys/sendfile.h" "ac_cv_header_sys_sendfile_h" "$ac_includes_default"
8907if test "x$ac_cv_header_sys_sendfile_h" = xyes
8908then :
8909 printf "%s\n" "#define HAVE_SYS_SENDFILE_H 1" >>confdefs.h
8910
8911fi
8912ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
8913if test "x$ac_cv_header_sys_socket_h" = xyes
8914then :
8915 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
8916
8917fi
8918ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
8919if test "x$ac_cv_header_sys_statvfs_h" = xyes
8920then :
8921 printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h
8922
8923fi
8924ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
8925if test "x$ac_cv_header_sys_stat_h" = xyes
8926then :
8927 printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
8928
8929fi
8930ac_fn_c_check_header_compile "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default"
8931if test "x$ac_cv_header_sys_syscall_h" = xyes
8932then :
8933 printf "%s\n" "#define HAVE_SYS_SYSCALL_H 1" >>confdefs.h
8934
8935fi
8936ac_fn_c_check_header_compile "$LINENO" "sys/sys_domain.h" "ac_cv_header_sys_sys_domain_h" "$ac_includes_default"
8937if test "x$ac_cv_header_sys_sys_domain_h" = xyes
8938then :
8939 printf "%s\n" "#define HAVE_SYS_SYS_DOMAIN_H 1" >>confdefs.h
8940
8941fi
8942ac_fn_c_check_header_compile "$LINENO" "sys/termio.h" "ac_cv_header_sys_termio_h" "$ac_includes_default"
8943if test "x$ac_cv_header_sys_termio_h" = xyes
8944then :
8945 printf "%s\n" "#define HAVE_SYS_TERMIO_H 1" >>confdefs.h
8946
8947fi
8948ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
8949if test "x$ac_cv_header_sys_time_h" = xyes
8950then :
8951 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
8952
8953fi
8954ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default"
8955if test "x$ac_cv_header_sys_times_h" = xyes
8956then :
8957 printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h
8958
8959fi
8960ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
8961if test "x$ac_cv_header_sys_types_h" = xyes
8962then :
8963 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
8964
8965fi
8966ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
8967if test "x$ac_cv_header_sys_uio_h" = xyes
8968then :
8969 printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
8970
8971fi
8972ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
8973if test "x$ac_cv_header_sys_un_h" = xyes
8974then :
8975 printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
8976
8977fi
8978ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
8979if test "x$ac_cv_header_sys_utsname_h" = xyes
8980then :
8981 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
8982
8983fi
8984ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
8985if test "x$ac_cv_header_sys_wait_h" = xyes
8986then :
8987 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8988
8989fi
8990ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default"
8991if test "x$ac_cv_header_pty_h" = xyes
8992then :
8993 printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h
8994
8995fi
8996ac_fn_c_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default"
8997if test "x$ac_cv_header_libutil_h" = xyes
8998then :
8999 printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h
9000
9001fi
9002ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
9003if test "x$ac_cv_header_sys_resource_h" = xyes
9004then :
9005 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
9006
9007fi
9008ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
9009if test "x$ac_cv_header_netpacket_packet_h" = xyes
9010then :
9011 printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h
9012
9013fi
9014ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
9015if test "x$ac_cv_header_sysexits_h" = xyes
9016then :
9017 printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
9018
9019fi
9020ac_fn_c_check_header_compile "$LINENO" "bluetooth.h" "ac_cv_header_bluetooth_h" "$ac_includes_default"
9021if test "x$ac_cv_header_bluetooth_h" = xyes
9022then :
9023 printf "%s\n" "#define HAVE_BLUETOOTH_H 1" >>confdefs.h
9024
9025fi
9026ac_fn_c_check_header_compile "$LINENO" "linux/tipc.h" "ac_cv_header_linux_tipc_h" "$ac_includes_default"
9027if test "x$ac_cv_header_linux_tipc_h" = xyes
9028then :
9029 printf "%s\n" "#define HAVE_LINUX_TIPC_H 1" >>confdefs.h
9030
9031fi
9032ac_fn_c_check_header_compile "$LINENO" "linux/random.h" "ac_cv_header_linux_random_h" "$ac_includes_default"
9033if test "x$ac_cv_header_linux_random_h" = xyes
9034then :
9035 printf "%s\n" "#define HAVE_LINUX_RANDOM_H 1" >>confdefs.h
9036
9037fi
9038ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default"
9039if test "x$ac_cv_header_spawn_h" = xyes
9040then :
9041 printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h
9042
9043fi
9044ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
9045if test "x$ac_cv_header_util_h" = xyes
9046then :
9047 printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h
9048
9049fi
9050ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default"
9051if test "x$ac_cv_header_alloca_h" = xyes
9052then :
9053 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
9054
9055fi
9056ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default"
9057if test "x$ac_cv_header_endian_h" = xyes
9058then :
9059 printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h
9060
9061fi
9062ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default"
9063if test "x$ac_cv_header_sys_endian_h" = xyes
9064then :
9065 printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h
9066
9067fi
9068ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9069if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9070then :
9071 printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h
9072
9073fi
9074ac_fn_c_check_header_compile "$LINENO" "linux/memfd.h" "ac_cv_header_linux_memfd_h" "$ac_includes_default"
9075if test "x$ac_cv_header_linux_memfd_h" = xyes
9076then :
9077 printf "%s\n" "#define HAVE_LINUX_MEMFD_H 1" >>confdefs.h
9078
9079fi
9080ac_fn_c_check_header_compile "$LINENO" "linux/wait.h" "ac_cv_header_linux_wait_h" "$ac_includes_default"
9081if test "x$ac_cv_header_linux_wait_h" = xyes
9082then :
9083 printf "%s\n" "#define HAVE_LINUX_WAIT_H 1" >>confdefs.h
9084
9085fi
9086ac_fn_c_check_header_compile "$LINENO" "sys/memfd.h" "ac_cv_header_sys_memfd_h" "$ac_includes_default"
9087if test "x$ac_cv_header_sys_memfd_h" = xyes
9088then :
9089 printf "%s\n" "#define HAVE_SYS_MEMFD_H 1" >>confdefs.h
9090
9091fi
9092ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
9093if test "x$ac_cv_header_sys_mman_h" = xyes
9094then :
9095 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
9096
9097fi
9098ac_fn_c_check_header_compile "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default"
9099if test "x$ac_cv_header_sys_eventfd_h" = xyes
9100then :
9101 printf "%s\n" "#define HAVE_SYS_EVENTFD_H 1" >>confdefs.h
9102
9103fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009105ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009106for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Pablo Galindocc115e52021-08-02 20:06:40 +01009107 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9109printf %s "checking for $ac_hdr that defines DIR... " >&6; }
9110if eval test \${$as_ac_Header+y}
9111then :
9112 printf %s "(cached) " >&6
9113else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009115/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009116#include <sys/types.h>
9117#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00009118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119int
Pablo Galindocc115e52021-08-02 20:06:40 +01009120main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009121{
9122if ((DIR *) 0)
9123return 0;
9124 ;
9125 return 0;
9126}
9127_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01009128if ac_fn_c_try_compile "$LINENO"
9129then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 eval "$as_ac_Header=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +01009131else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009133fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009134rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009136eval ac_res=\$$as_ac_Header
Pablo Galindocc115e52021-08-02 20:06:40 +01009137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9138printf "%s\n" "$ac_res" >&6; }
9139if eval test \"x\$"$as_ac_Header"\" = x"yes"
9140then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 cat >>confdefs.h <<_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01009142#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
9144
9145ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00009146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009148done
9149# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9150if test $ac_header_dirent = dirent.h; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9152printf %s "checking for library containing opendir... " >&6; }
9153if test ${ac_cv_search_opendir+y}
9154then :
9155 printf %s "(cached) " >&6
9156else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009157 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161/* Override any GCC internal prototype to avoid an error.
9162 Use char because int might match the return type of a GCC
9163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009164char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009165int
Pablo Galindocc115e52021-08-02 20:06:40 +01009166main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ;
9170 return 0;
9171}
9172_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01009173for ac_lib in '' dir
9174do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175 if test -z "$ac_lib"; then
9176 ac_res="none required"
9177 else
9178 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009179 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009181 if ac_fn_c_try_link "$LINENO"
9182then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009184fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009185rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009186 conftest$ac_exeext
Pablo Galindocc115e52021-08-02 20:06:40 +01009187 if test ${ac_cv_search_opendir+y}
9188then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191done
Pablo Galindocc115e52021-08-02 20:06:40 +01009192if test ${ac_cv_search_opendir+y}
9193then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009194
Pablo Galindocc115e52021-08-02 20:06:40 +01009195else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196 ac_cv_search_opendir=no
9197fi
9198rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009199LIBS=$ac_func_search_save_LIBS
9200fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9202printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203ac_res=$ac_cv_search_opendir
Pablo Galindocc115e52021-08-02 20:06:40 +01009204if test "$ac_res" != no
9205then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00009207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009209
Michael W. Hudson54241132001-12-07 15:38:26 +00009210else
Pablo Galindocc115e52021-08-02 20:06:40 +01009211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9212printf %s "checking for library containing opendir... " >&6; }
9213if test ${ac_cv_search_opendir+y}
9214then :
9215 printf %s "(cached) " >&6
9216else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221/* Override any GCC internal prototype to avoid an error.
9222 Use char because int might match the return type of a GCC
9223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009224char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009225int
Pablo Galindocc115e52021-08-02 20:06:40 +01009226main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +00009227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ;
9230 return 0;
9231}
9232_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01009233for ac_lib in '' x
9234do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009235 if test -z "$ac_lib"; then
9236 ac_res="none required"
9237 else
9238 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009239 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009241 if ac_fn_c_try_link "$LINENO"
9242then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009244fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009245rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 conftest$ac_exeext
Pablo Galindocc115e52021-08-02 20:06:40 +01009247 if test ${ac_cv_search_opendir+y}
9248then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009249 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009251done
Pablo Galindocc115e52021-08-02 20:06:40 +01009252if test ${ac_cv_search_opendir+y}
9253then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009254
Pablo Galindocc115e52021-08-02 20:06:40 +01009255else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256 ac_cv_search_opendir=no
9257fi
9258rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009259LIBS=$ac_func_search_save_LIBS
9260fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9262printf "%s\n" "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263ac_res=$ac_cv_search_opendir
Pablo Galindocc115e52021-08-02 20:06:40 +01009264if test "$ac_res" != no
9265then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009267
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009268fi
9269
9270fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00009271
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009272
Pablo Galindocc115e52021-08-02 20:06:40 +01009273ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
9274if test "x$ac_cv_header_sys_mkdev_h" = xyes
9275then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009276
Pablo Galindocc115e52021-08-02 20:06:40 +01009277printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009278
9279fi
9280
Pablo Galindocc115e52021-08-02 20:06:40 +01009281if test $ac_cv_header_sys_mkdev_h = no; then
9282 ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
9283if test "x$ac_cv_header_sys_sysmacros_h" = xyes
9284then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009285
Pablo Galindocc115e52021-08-02 20:06:40 +01009286printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009287
9288fi
9289
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00009290fi
9291
Michael W. Hudson54241132001-12-07 15:38:26 +00009292
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009293# bluetooth/bluetooth.h has been known to not compile with -std=c99.
9294# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
9295SAVE_CFLAGS=$CFLAGS
9296CFLAGS="-std=c99 $CFLAGS"
Pablo Galindocc115e52021-08-02 20:06:40 +01009297ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
9298if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes
9299then :
9300 printf "%s\n" "#define HAVE_BLUETOOTH_BLUETOOTH_H 1" >>confdefs.h
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009301
9302fi
9303
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07009304CFLAGS=$SAVE_CFLAGS
9305
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009306# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
Pablo Galindocc115e52021-08-02 20:06:40 +01009307ac_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 -07009308#ifdef STDC_HEADERS
9309# include <stdlib.h>
9310# include <stddef.h>
9311#else
9312# ifdef HAVE_STDLIB_H
9313# include <stdlib.h>
9314# endif
9315#endif
9316#ifdef HAVE_SYS_SOCKET_H
9317# include <sys/socket.h>
9318#endif
9319
9320"
Pablo Galindocc115e52021-08-02 20:06:40 +01009321if test "x$ac_cv_header_net_if_h" = xyes
9322then :
9323 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009324
9325fi
9326
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07009327
Martin v. Löwis11017b12006-01-14 18:12:57 +00009328# On Linux, netlink.h requires asm/types.h
Pablo Galindocc115e52021-08-02 20:06:40 +01009329ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00009330#ifdef HAVE_ASM_TYPES_H
9331#include <asm/types.h>
9332#endif
9333#ifdef HAVE_SYS_SOCKET_H
9334#include <sys/socket.h>
9335#endif
9336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337"
Pablo Galindocc115e52021-08-02 20:06:40 +01009338if test "x$ac_cv_header_linux_netlink_h" = xyes
9339then :
9340 printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00009341
9342fi
9343
Martin v. Löwis11017b12006-01-14 18:12:57 +00009344
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009345# On Linux, qrtr.h requires asm/types.h
Pablo Galindocc115e52021-08-02 20:06:40 +01009346ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009347#ifdef HAVE_ASM_TYPES_H
9348#include <asm/types.h>
9349#endif
9350#ifdef HAVE_SYS_SOCKET_H
9351#include <sys/socket.h>
9352#endif
9353
9354"
Pablo Galindocc115e52021-08-02 20:06:40 +01009355if test "x$ac_cv_header_linux_qrtr_h" = xyes
9356then :
9357 printf "%s\n" "#define HAVE_LINUX_QRTR_H 1" >>confdefs.h
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009358
9359fi
9360
Bjorn Anderssonbb816512018-09-26 06:47:52 -07009361
Pablo Galindocc115e52021-08-02 20:06:40 +01009362ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
caaveryeffc12f2017-09-06 18:18:10 -04009363#ifdef HAVE_SYS_SOCKET_H
9364#include <sys/socket.h>
9365#endif
9366
9367"
Pablo Galindocc115e52021-08-02 20:06:40 +01009368if test "x$ac_cv_header_linux_vm_sockets_h" = xyes
9369then :
9370 printf "%s\n" "#define HAVE_LINUX_VM_SOCKETS_H 1" >>confdefs.h
caaveryeffc12f2017-09-06 18:18:10 -04009371
9372fi
9373
caaveryeffc12f2017-09-06 18:18:10 -04009374
karl ding360371f2020-04-29 15:31:19 -07009375# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
Pablo Galindocc115e52021-08-02 20:06:40 +01009376ac_fn_c_check_header_compile "$LINENO" "linux/can.h" "ac_cv_header_linux_can_h" "
Charles-François Natali47413c12011-10-06 19:47:44 +02009377#ifdef HAVE_SYS_SOCKET_H
9378#include <sys/socket.h>
9379#endif
9380
9381"
Pablo Galindocc115e52021-08-02 20:06:40 +01009382if test "x$ac_cv_header_linux_can_h" = xyes
9383then :
9384 printf "%s\n" "#define HAVE_LINUX_CAN_H 1" >>confdefs.h
Charles-François Natali47413c12011-10-06 19:47:44 +02009385
9386fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009387ac_fn_c_check_header_compile "$LINENO" "linux/can/bcm.h" "ac_cv_header_linux_can_bcm_h" "
9388#ifdef HAVE_SYS_SOCKET_H
9389#include <sys/socket.h>
9390#endif
Charles-François Natali47413c12011-10-06 19:47:44 +02009391
Pablo Galindocc115e52021-08-02 20:06:40 +01009392"
9393if test "x$ac_cv_header_linux_can_bcm_h" = xyes
9394then :
9395 printf "%s\n" "#define HAVE_LINUX_CAN_BCM_H 1" >>confdefs.h
9396
9397fi
9398ac_fn_c_check_header_compile "$LINENO" "linux/can/j1939.h" "ac_cv_header_linux_can_j1939_h" "
9399#ifdef HAVE_SYS_SOCKET_H
9400#include <sys/socket.h>
9401#endif
9402
9403"
9404if test "x$ac_cv_header_linux_can_j1939_h" = xyes
9405then :
9406 printf "%s\n" "#define HAVE_LINUX_CAN_J1939_H 1" >>confdefs.h
9407
9408fi
9409ac_fn_c_check_header_compile "$LINENO" "linux/can/raw.h" "ac_cv_header_linux_can_raw_h" "
9410#ifdef HAVE_SYS_SOCKET_H
9411#include <sys/socket.h>
9412#endif
9413
9414"
9415if test "x$ac_cv_header_linux_can_raw_h" = xyes
9416then :
9417 printf "%s\n" "#define HAVE_LINUX_CAN_RAW_H 1" >>confdefs.h
9418
9419fi
Charles-François Natali47413c12011-10-06 19:47:44 +02009420
9421
Guido van Rossum627b2d71993-12-24 10:39:16 +00009422# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00009423was_it_defined=no
Pablo Galindocc115e52021-08-02 20:06:40 +01009424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
9425printf %s "checking for clock_t in time.h... " >&6; }
9426
Matthias Kloseb9621712010-04-24 17:59:49 +00009427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009429#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009430
9431_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +01009433 $EGREP "clock_t" >/dev/null 2>&1
9434then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00009435 was_it_defined=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01009436else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
9438
Pablo Galindocc115e52021-08-02 20:06:40 +01009439printf "%s\n" "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009440
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009441
Guido van Rossum627b2d71993-12-24 10:39:16 +00009442fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009443rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009444
Pablo Galindocc115e52021-08-02 20:06:40 +01009445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
9446printf "%s\n" "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00009447
Pablo Galindocc115e52021-08-02 20:06:40 +01009448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
9449printf %s "checking for makedev... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +00009450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009452
Jesus Cea740f53a2010-04-28 11:35:30 +00009453#if defined(MAJOR_IN_MKDEV)
9454#include <sys/mkdev.h>
9455#elif defined(MAJOR_IN_SYSMACROS)
9456#include <sys/sysmacros.h>
9457#else
9458#include <sys/types.h>
9459#endif
9460
Neal Norwitz11690112002-07-30 01:08:28 +00009461int
Pablo Galindocc115e52021-08-02 20:06:40 +01009462main (void)
Neal Norwitz11690112002-07-30 01:08:28 +00009463{
Jesus Cea740f53a2010-04-28 11:35:30 +00009464
9465 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00009466 ;
9467 return 0;
9468}
Matthias Kloseb159a552010-04-25 21:00:44 +00009469
Neal Norwitz11690112002-07-30 01:08:28 +00009470_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01009471if ac_fn_c_try_link "$LINENO"
9472then :
Neal Norwitz11690112002-07-30 01:08:28 +00009473 ac_cv_has_makedev=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01009474else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00009476fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009477rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +01009479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
9480printf "%s\n" "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00009481if test "$ac_cv_has_makedev" = "yes"; then
9482
Pablo Galindocc115e52021-08-02 20:06:40 +01009483printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00009484
9485fi
9486
Christian Heimes985ecdc2013-11-20 11:46:18 +01009487# byte swapping
Pablo Galindocc115e52021-08-02 20:06:40 +01009488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
9489printf %s "checking for le64toh... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9491/* end confdefs.h. */
9492
9493#ifdef HAVE_ENDIAN_H
9494#include <endian.h>
9495#elif defined(HAVE_SYS_ENDIAN_H)
9496#include <sys/endian.h>
9497#endif
9498
9499int
Pablo Galindocc115e52021-08-02 20:06:40 +01009500main (void)
Christian Heimes985ecdc2013-11-20 11:46:18 +01009501{
9502
9503 le64toh(1)
9504 ;
9505 return 0;
9506}
9507
9508_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01009509if ac_fn_c_try_link "$LINENO"
9510then :
Christian Heimes985ecdc2013-11-20 11:46:18 +01009511 ac_cv_has_le64toh=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01009512else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +01009513 ac_cv_has_le64toh=no
9514fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009515rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimes985ecdc2013-11-20 11:46:18 +01009516 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +01009517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
9518printf "%s\n" "$ac_cv_has_le64toh" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +01009519if test "$ac_cv_has_le64toh" = "yes"; then
9520
Pablo Galindocc115e52021-08-02 20:06:40 +01009521printf "%s\n" "#define HAVE_HTOLE64 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +01009522
9523fi
9524
Martin v. Löwis399a6892002-10-04 10:22:02 +00009525use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02009526# Don't use largefile support for GNU/Hurd
9527case $ac_sys_system in GNU*)
9528 use_lfs=no
9529esac
9530
Martin v. Löwis399a6892002-10-04 10:22:02 +00009531if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00009532# Two defines needed to enable largefile support on various platforms
9533# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00009534case $ac_sys_system/$ac_sys_release in
9535AIX*)
9536
Pablo Galindocc115e52021-08-02 20:06:40 +01009537printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
Georg Brandl216e4042011-02-19 08:58:23 +00009538
9539 ;;
9540esac
Guido van Rossum810cc512001-09-09 23:51:39 +00009541
Pablo Galindocc115e52021-08-02 20:06:40 +01009542printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009543
9544
Pablo Galindocc115e52021-08-02 20:06:40 +01009545printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00009546
Martin v. Löwis399a6892002-10-04 10:22:02 +00009547fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009548
Guido van Rossum84e7b241996-08-19 21:59:00 +00009549# Add some code to confdefs.h so that the test for off_t works on SCO
9550cat >> confdefs.h <<\EOF
9551#if defined(SCO_DS)
9552#undef _OFF_T
9553#endif
9554EOF
9555
Guido van Rossumef2255b2000-03-10 22:30:29 +00009556# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00009557ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +01009558if test "x$ac_cv_type_mode_t" = xyes
9559then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009560
Pablo Galindocc115e52021-08-02 20:06:40 +01009561else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009562
Pablo Galindocc115e52021-08-02 20:06:40 +01009563printf "%s\n" "#define mode_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
9565fi
9566
Matthias Kloseb9621712010-04-24 17:59:49 +00009567ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +01009568if test "x$ac_cv_type_off_t" = xyes
9569then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009570
Pablo Galindocc115e52021-08-02 20:06:40 +01009571else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009572
Pablo Galindocc115e52021-08-02 20:06:40 +01009573printf "%s\n" "#define off_t long int" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +01009574
9575fi
9576
9577
Pablo Galindocc115e52021-08-02 20:06:40 +01009578 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9579"
9580if test "x$ac_cv_type_pid_t" = xyes
9581then :
9582
9583else $as_nop
9584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9585/* end confdefs.h. */
9586
9587 #if defined _WIN64 && !defined __CYGWIN__
9588 LLP64
9589 #endif
9590
9591int
9592main (void)
9593{
9594
9595 ;
9596 return 0;
9597}
9598
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +01009599_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +01009600if ac_fn_c_try_compile "$LINENO"
9601then :
9602 ac_pid_type='int'
9603else $as_nop
9604 ac_pid_type='__int64'
9605fi
9606rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9607
9608printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
9609
9610
9611fi
9612
9613
9614
9615printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009616
Matthias Kloseb9621712010-04-24 17:59:49 +00009617ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +01009618if test "x$ac_cv_type_size_t" = xyes
9619then :
Skip Montanaro6dead952003-09-25 14:50:04 +00009620
Pablo Galindocc115e52021-08-02 20:06:40 +01009621else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +00009622
Pablo Galindocc115e52021-08-02 20:06:40 +01009623printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
9625fi
9626
Pablo Galindocc115e52021-08-02 20:06:40 +01009627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9628printf %s "checking for uid_t in sys/types.h... " >&6; }
9629if test ${ac_cv_type_uid_t+y}
9630then :
9631 printf %s "(cached) " >&6
9632else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009634/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009635#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009636
9637_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +01009639 $EGREP "uid_t" >/dev/null 2>&1
9640then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009641 ac_cv_type_uid_t=yes
Pablo Galindocc115e52021-08-02 20:06:40 +01009642else $as_nop
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009643 ac_cv_type_uid_t=no
9644fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009645rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00009646
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009647fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9649printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00009650if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651
Pablo Galindocc115e52021-08-02 20:06:40 +01009652printf "%s\n" "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009653
9654
Pablo Galindocc115e52021-08-02 20:06:40 +01009655printf "%s\n" "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009656
9657fi
9658
Mark Dickinson983bc162012-12-02 12:11:38 +00009659
Matthias Kloseb9621712010-04-24 17:59:49 +00009660ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +01009661if test "x$ac_cv_type_ssize_t" = xyes
9662then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663
Pablo Galindocc115e52021-08-02 20:06:40 +01009664printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00009665
9666fi
9667
Stefan Krah1919b7e2012-03-21 18:25:23 +01009668ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +01009669if test "x$ac_cv_type___uint128_t" = xyes
9670then :
Stefan Krah1919b7e2012-03-21 18:25:23 +01009671
Pablo Galindocc115e52021-08-02 20:06:40 +01009672printf "%s\n" "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +01009673
9674fi
9675
Jack Jansendd19cf82001-12-06 22:36:17 +00009676
Jessica Clarkedec07572021-03-31 11:12:39 +01009677# Sizes and alignments of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00009678# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679# The cast to long int works around a bug in the HP C Compiler
9680# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9681# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9682# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9684printf %s "checking size of int... " >&6; }
9685if test ${ac_cv_sizeof_int+y}
9686then :
9687 printf %s "(cached) " >&6
9688else $as_nop
9689 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
9690then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Pablo Galindocc115e52021-08-02 20:06:40 +01009692else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009693 if test "$ac_cv_type_int" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009694 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9695printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009696as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02009697See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698 else
9699 ac_cv_sizeof_int=0
9700 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702
Martin v. Löwis11437992002-04-12 09:54:03 +00009703fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9705printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706
9707
9708
Pablo Galindocc115e52021-08-02 20:06:40 +01009709printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009710
9711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009712# The cast to long int works around a bug in the HP C Compiler
9713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9715# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9717printf %s "checking size of long... " >&6; }
9718if test ${ac_cv_sizeof_long+y}
9719then :
9720 printf %s "(cached) " >&6
9721else $as_nop
9722 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
9723then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009724
Pablo Galindocc115e52021-08-02 20:06:40 +01009725else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 if test "$ac_cv_type_long" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009727 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9728printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009729as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02009730See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731 else
9732 ac_cv_sizeof_long=0
9733 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9738printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739
9740
9741
Pablo Galindocc115e52021-08-02 20:06:40 +01009742printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009743
9744
Jessica Clarkedec07572021-03-31 11:12:39 +01009745# The cast to long int works around a bug in the HP C Compiler,
9746# see AC_CHECK_SIZEOF for more information.
Pablo Galindocc115e52021-08-02 20:06:40 +01009747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
9748printf %s "checking alignment of long... " >&6; }
9749if test ${ac_cv_alignof_long+y}
9750then :
9751 printf %s "(cached) " >&6
9752else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +01009753 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
Pablo Galindocc115e52021-08-02 20:06:40 +01009754typedef struct { char x; long y; } ac__type_alignof_;"
9755then :
Jessica Clarkedec07572021-03-31 11:12:39 +01009756
Pablo Galindocc115e52021-08-02 20:06:40 +01009757else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +01009758 if test "$ac_cv_type_long" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009759 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9760printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +01009761as_fn_error 77 "cannot compute alignment of long
9762See \`config.log' for more details" "$LINENO" 5; }
9763 else
9764 ac_cv_alignof_long=0
9765 fi
9766fi
9767
9768fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
9770printf "%s\n" "$ac_cv_alignof_long" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +01009771
9772
9773
Pablo Galindocc115e52021-08-02 20:06:40 +01009774printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h
Jessica Clarkedec07572021-03-31 11:12:39 +01009775
9776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777# The cast to long int works around a bug in the HP C Compiler
9778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9780# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9782printf %s "checking size of long long... " >&6; }
9783if test ${ac_cv_sizeof_long_long+y}
9784then :
9785 printf %s "(cached) " >&6
9786else $as_nop
9787 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
9788then :
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009789
Pablo Galindocc115e52021-08-02 20:06:40 +01009790else $as_nop
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009791 if test "$ac_cv_type_long_long" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009792 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9793printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009794as_fn_error 77 "cannot compute sizeof (long long)
9795See \`config.log' for more details" "$LINENO" 5; }
9796 else
9797 ac_cv_sizeof_long_long=0
9798 fi
9799fi
9800
9801fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009802{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9803printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009804
9805
9806
Pablo Galindocc115e52021-08-02 20:06:40 +01009807printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
Benjamin Petersoned4aa832016-09-05 17:44:18 -07009808
9809
9810# The cast to long int works around a bug in the HP C Compiler
9811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9813# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009814{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
9815printf %s "checking size of void *... " >&6; }
9816if test ${ac_cv_sizeof_void_p+y}
9817then :
9818 printf %s "(cached) " >&6
9819else $as_nop
9820 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
9821then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009822
Pablo Galindocc115e52021-08-02 20:06:40 +01009823else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 if test "$ac_cv_type_void_p" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009825 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9826printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009827as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02009828See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829 else
9830 ac_cv_sizeof_void_p=0
9831 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009833
Martin v. Löwis11437992002-04-12 09:54:03 +00009834fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
9836printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837
9838
9839
Pablo Galindocc115e52021-08-02 20:06:40 +01009840printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009841
9842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843# The cast to long int works around a bug in the HP C Compiler
9844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9846# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009847{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9848printf %s "checking size of short... " >&6; }
9849if test ${ac_cv_sizeof_short+y}
9850then :
9851 printf %s "(cached) " >&6
9852else $as_nop
9853 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
9854then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009855
Pablo Galindocc115e52021-08-02 20:06:40 +01009856else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 if test "$ac_cv_type_short" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009858 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9859printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009860as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02009861See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862 else
9863 ac_cv_sizeof_short=0
9864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009866
Martin v. Löwis11437992002-04-12 09:54:03 +00009867fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9869printf "%s\n" "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870
9871
9872
Pablo Galindocc115e52021-08-02 20:06:40 +01009873printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009874
9875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876# The cast to long int works around a bug in the HP C Compiler
9877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9879# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
9881printf %s "checking size of float... " >&6; }
9882if test ${ac_cv_sizeof_float+y}
9883then :
9884 printf %s "(cached) " >&6
9885else $as_nop
9886 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"
9887then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009888
Pablo Galindocc115e52021-08-02 20:06:40 +01009889else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 if test "$ac_cv_type_float" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009891 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9892printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009893as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02009894See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895 else
9896 ac_cv_sizeof_float=0
9897 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899
Martin v. Löwis11437992002-04-12 09:54:03 +00009900fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
9902printf "%s\n" "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903
9904
9905
Pablo Galindocc115e52021-08-02 20:06:40 +01009906printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009907
9908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909# The cast to long int works around a bug in the HP C Compiler
9910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9912# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
9914printf %s "checking size of double... " >&6; }
9915if test ${ac_cv_sizeof_double+y}
9916then :
9917 printf %s "(cached) " >&6
9918else $as_nop
9919 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
9920then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009921
Pablo Galindocc115e52021-08-02 20:06:40 +01009922else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 if test "$ac_cv_type_double" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009924 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9925printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009926as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009927See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928 else
9929 ac_cv_sizeof_double=0
9930 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009932
Martin v. Löwis11437992002-04-12 09:54:03 +00009933fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
9935printf "%s\n" "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936
9937
9938
Pablo Galindocc115e52021-08-02 20:06:40 +01009939printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h
Guido van Rossumef2255b2000-03-10 22:30:29 +00009940
9941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942# The cast to long int works around a bug in the HP C Compiler
9943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9945# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
9947printf %s "checking size of fpos_t... " >&6; }
9948if test ${ac_cv_sizeof_fpos_t+y}
9949then :
9950 printf %s "(cached) " >&6
9951else $as_nop
9952 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"
9953then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009954
Pablo Galindocc115e52021-08-02 20:06:40 +01009955else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 if test "$ac_cv_type_fpos_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009957 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9958printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009959as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009960See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961 else
9962 ac_cv_sizeof_fpos_t=0
9963 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009965
Martin v. Löwis11437992002-04-12 09:54:03 +00009966fi
Pablo Galindocc115e52021-08-02 20:06:40 +01009967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
9968printf "%s\n" "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969
9970
9971
Pablo Galindocc115e52021-08-02 20:06:40 +01009972printf "%s\n" "#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009973
Michael W. Hudson54241132001-12-07 15:38:26 +00009974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975# The cast to long int works around a bug in the HP C Compiler
9976# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9977# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9978# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +01009979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
9980printf %s "checking size of size_t... " >&6; }
9981if test ${ac_cv_sizeof_size_t+y}
9982then :
9983 printf %s "(cached) " >&6
9984else $as_nop
9985 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
9986then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00009987
Pablo Galindocc115e52021-08-02 20:06:40 +01009988else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +01009990 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9991printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009992as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009993See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994 else
9995 ac_cv_sizeof_size_t=0
9996 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00009997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009998
Martin v. Löwis18e16552006-02-15 17:27:45 +00009999fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
10001printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002
10003
10004
Pablo Galindocc115e52021-08-02 20:06:40 +010010005printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +000010006
10007
Jessica Clarkedec07572021-03-31 11:12:39 +010010008# The cast to long int works around a bug in the HP C Compiler,
10009# see AC_CHECK_SIZEOF for more information.
Pablo Galindocc115e52021-08-02 20:06:40 +010010010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5
10011printf %s "checking alignment of size_t... " >&6; }
10012if test ${ac_cv_alignof_size_t+y}
10013then :
10014 printf %s "(cached) " >&6
10015else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +010010016 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
Pablo Galindocc115e52021-08-02 20:06:40 +010010017typedef struct { char x; size_t y; } ac__type_alignof_;"
10018then :
Jessica Clarkedec07572021-03-31 11:12:39 +010010019
Pablo Galindocc115e52021-08-02 20:06:40 +010010020else $as_nop
Jessica Clarkedec07572021-03-31 11:12:39 +010010021 if test "$ac_cv_type_size_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010022 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10023printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Jessica Clarkedec07572021-03-31 11:12:39 +010010024as_fn_error 77 "cannot compute alignment of size_t
10025See \`config.log' for more details" "$LINENO" 5; }
10026 else
10027 ac_cv_alignof_size_t=0
10028 fi
10029fi
10030
10031fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
10033printf "%s\n" "$ac_cv_alignof_size_t" >&6; }
Jessica Clarkedec07572021-03-31 11:12:39 +010010034
10035
10036
Pablo Galindocc115e52021-08-02 20:06:40 +010010037printf "%s\n" "#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t" >>confdefs.h
Jessica Clarkedec07572021-03-31 11:12:39 +010010038
10039
Christian Heimes400adb02008-02-01 08:12:03 +000010040# The cast to long int works around a bug in the HP C Compiler
10041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10043# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010044{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
10045printf %s "checking size of pid_t... " >&6; }
10046if test ${ac_cv_sizeof_pid_t+y}
10047then :
10048 printf %s "(cached) " >&6
10049else $as_nop
10050 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"
10051then :
Christian Heimes400adb02008-02-01 08:12:03 +000010052
Pablo Galindocc115e52021-08-02 20:06:40 +010010053else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010054 if test "$ac_cv_type_pid_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010055 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10056printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010057as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010058See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +000010059 else
10060 ac_cv_sizeof_pid_t=0
10061 fi
10062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010063
Christian Heimes400adb02008-02-01 08:12:03 +000010064fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
10066printf "%s\n" "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010067
10068
10069
Pablo Galindocc115e52021-08-02 20:06:40 +010010070printf "%s\n" "#define SIZEOF_PID_T $ac_cv_sizeof_pid_t" >>confdefs.h
Christian Heimes400adb02008-02-01 08:12:03 +000010071
10072
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010073# The cast to long int works around a bug in the HP C Compiler
10074# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10075# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10076# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
10078printf %s "checking size of uintptr_t... " >&6; }
10079if test ${ac_cv_sizeof_uintptr_t+y}
10080then :
10081 printf %s "(cached) " >&6
10082else $as_nop
10083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"
10084then :
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010085
Pablo Galindocc115e52021-08-02 20:06:40 +010010086else $as_nop
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010087 if test "$ac_cv_type_uintptr_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010088 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10089printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010090as_fn_error 77 "cannot compute sizeof (uintptr_t)
10091See \`config.log' for more details" "$LINENO" 5; }
10092 else
10093 ac_cv_sizeof_uintptr_t=0
10094 fi
10095fi
10096
10097fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
10099printf "%s\n" "$ac_cv_sizeof_uintptr_t" >&6; }
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010100
10101
10102
Pablo Galindocc115e52021-08-02 20:06:40 +010010103printf "%s\n" "#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t" >>confdefs.h
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -070010104
10105
Michael W. Hudson54241132001-12-07 15:38:26 +000010106
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010107
Pablo Galindocc115e52021-08-02 20:06:40 +010010108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
10109printf %s "checking for long double... " >&6; }
10110if test ${ac_cv_type_long_double+y}
10111then :
10112 printf %s "(cached) " >&6
10113else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010114 if test "$GCC" = yes; then
10115 ac_cv_type_long_double=yes
10116 else
10117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10118/* end confdefs.h. */
10119/* The Stardent Vistra knows sizeof (long double), but does
10120 not support it. */
10121 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010122int
Pablo Galindocc115e52021-08-02 20:06:40 +010010123main (void)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010124{
Eitan Adler3055c942018-05-15 22:58:09 -070010125static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
10126 sizeof (double) <= sizeof (long double))];
10127test_array [0] = 0;
10128return test_array [0];
10129
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010130 ;
10131 return 0;
10132}
10133_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010010134if ac_fn_c_try_compile "$LINENO"
10135then :
Eitan Adler3055c942018-05-15 22:58:09 -070010136 ac_cv_type_long_double=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010010137else $as_nop
Eitan Adler3055c942018-05-15 22:58:09 -070010138 ac_cv_type_long_double=no
10139fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010140rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Eitan Adler3055c942018-05-15 22:58:09 -070010141 fi
10142fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
10144printf "%s\n" "$ac_cv_type_long_double" >&6; }
Eitan Adler3055c942018-05-15 22:58:09 -070010145 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010146
Pablo Galindocc115e52021-08-02 20:06:40 +010010147printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010148
Eitan Adler3055c942018-05-15 22:58:09 -070010149 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010150
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010151# The cast to long int works around a bug in the HP C Compiler
10152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10154# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
10156printf %s "checking size of long double... " >&6; }
10157if test ${ac_cv_sizeof_long_double+y}
10158then :
10159 printf %s "(cached) " >&6
10160else $as_nop
10161 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
10162then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010163
Pablo Galindocc115e52021-08-02 20:06:40 +010010164else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 if test "$ac_cv_type_long_double" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010166 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10167printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010168as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +020010169See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010170 else
10171 ac_cv_sizeof_long_double=0
10172 fi
10173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010174
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010175fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
10177printf "%s\n" "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010178
10179
10180
Pablo Galindocc115e52021-08-02 20:06:40 +010010181printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010182
10183
Travis E. Oliphant9b307842007-10-12 22:06:37 +000010184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185# The cast to long int works around a bug in the HP C Compiler
10186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10188# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
10190printf %s "checking size of _Bool... " >&6; }
10191if test ${ac_cv_sizeof__Bool+y}
10192then :
10193 printf %s "(cached) " >&6
10194else $as_nop
10195 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"
10196then :
Thomas Woutersb2137042007-02-01 18:02:27 +000010197
Pablo Galindocc115e52021-08-02 20:06:40 +010010198else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 if test "$ac_cv_type__Bool" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010200 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10201printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010202as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +020010203See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204 else
10205 ac_cv_sizeof__Bool=0
10206 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000010207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208
Thomas Woutersb2137042007-02-01 18:02:27 +000010209fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
10211printf "%s\n" "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212
10213
10214
Pablo Galindocc115e52021-08-02 20:06:40 +010010215printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +000010216
10217
Thomas Woutersb2137042007-02-01 18:02:27 +000010218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010219# The cast to long int works around a bug in the HP C Compiler
10220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10222# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
10224printf %s "checking size of off_t... " >&6; }
10225if test ${ac_cv_sizeof_off_t+y}
10226then :
10227 printf %s "(cached) " >&6
10228else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010230#ifdef HAVE_SYS_TYPES_H
10231#include <sys/types.h>
10232#endif
10233
Pablo Galindocc115e52021-08-02 20:06:40 +010010234"
10235then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010236
Pablo Galindocc115e52021-08-02 20:06:40 +010010237else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 if test "$ac_cv_type_off_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010239 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10240printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010241as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010242See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010243 else
10244 ac_cv_sizeof_off_t=0
10245 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010248fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
10250printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010251
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010252
10253
Pablo Galindocc115e52021-08-02 20:06:40 +010010254printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010255
Michael W. Hudson54241132001-12-07 15:38:26 +000010256
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010257
Pablo Galindocc115e52021-08-02 20:06:40 +010010258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
10259printf %s "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000010260if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010261 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010262
Pablo Galindocc115e52021-08-02 20:06:40 +010010263printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Pablo Galindocc115e52021-08-02 20:06:40 +010010265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10266printf "%s\n" "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010267else
Pablo Galindocc115e52021-08-02 20:06:40 +010010268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269printf "%s\n" "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010270fi
10271
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010272# The cast to long int works around a bug in the HP C Compiler
10273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10275# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10277printf %s "checking size of time_t... " >&6; }
10278if test ${ac_cv_sizeof_time_t+y}
10279then :
10280 printf %s "(cached) " >&6
10281else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010283#ifdef HAVE_SYS_TYPES_H
10284#include <sys/types.h>
10285#endif
10286#ifdef HAVE_TIME_H
10287#include <time.h>
10288#endif
10289
Pablo Galindocc115e52021-08-02 20:06:40 +010010290"
10291then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010292
Pablo Galindocc115e52021-08-02 20:06:40 +010010293else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 if test "$ac_cv_type_time_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010295 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10296printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010297as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010298See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010299 else
10300 ac_cv_sizeof_time_t=0
10301 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010303
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010304fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10306printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010307
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010308
10309
Pablo Galindocc115e52021-08-02 20:06:40 +010010310printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010311
Michael W. Hudson54241132001-12-07 15:38:26 +000010312
10313
Trent Mick635f6fb2000-08-23 21:33:05 +000010314# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010315ac_save_cc="$CC"
10316if test "$ac_cv_kpthread" = "yes"
10317then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010318elif test "$ac_cv_kthread" = "yes"
10319then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010320elif test "$ac_cv_pthread" = "yes"
10321then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010322fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010323
Pablo Galindocc115e52021-08-02 20:06:40 +010010324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
10325printf %s "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010326have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010328/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010329
10330 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010331int
Pablo Galindocc115e52021-08-02 20:06:40 +010010332main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010333{
Guido van Rossum12580492000-09-24 16:47:19 +000010334pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ;
10336 return 0;
10337}
Matthias Kloseb159a552010-04-25 21:00:44 +000010338
Martin v. Löwis11437992002-04-12 09:54:03 +000010339_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010010340if ac_fn_c_try_compile "$LINENO"
10341then :
Trent Mick635f6fb2000-08-23 21:33:05 +000010342 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +000010343fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010344rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
10346printf "%s\n" "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000010347if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10351# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
10353printf %s "checking size of pthread_t... " >&6; }
10354if test ${ac_cv_sizeof_pthread_t+y}
10355then :
10356 printf %s "(cached) " >&6
10357else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010359#ifdef HAVE_PTHREAD_H
10360#include <pthread.h>
10361#endif
10362
Pablo Galindocc115e52021-08-02 20:06:40 +010010363"
10364then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010365
Pablo Galindocc115e52021-08-02 20:06:40 +010010366else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 if test "$ac_cv_type_pthread_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010368 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10369printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010370as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020010371See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010372 else
10373 ac_cv_sizeof_pthread_t=0
10374 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000010375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010376
Trent Mick635f6fb2000-08-23 21:33:05 +000010377fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
10379printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010380
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010381
10382
Pablo Galindocc115e52021-08-02 20:06:40 +010010383printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
Trent Mick635f6fb2000-08-23 21:33:05 +000010384
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010385
Trent Mick635f6fb2000-08-23 21:33:05 +000010386fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010387
10388# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
10389# This checking will be unnecessary after removing deprecated TLS API.
10390# The cast to long int works around a bug in the HP C Compiler
10391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10393# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010010394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
10395printf %s "checking size of pthread_key_t... " >&6; }
10396if test ${ac_cv_sizeof_pthread_key_t+y}
10397then :
10398 printf %s "(cached) " >&6
10399else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010400 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
Pablo Galindocc115e52021-08-02 20:06:40 +010010401"
10402then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010403
Pablo Galindocc115e52021-08-02 20:06:40 +010010404else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010405 if test "$ac_cv_type_pthread_key_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010010406 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10407printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010408as_fn_error 77 "cannot compute sizeof (pthread_key_t)
10409See \`config.log' for more details" "$LINENO" 5; }
10410 else
10411 ac_cv_sizeof_pthread_key_t=0
10412 fi
10413fi
10414
10415fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
10417printf "%s\n" "$ac_cv_sizeof_pthread_key_t" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010418
10419
10420
Pablo Galindocc115e52021-08-02 20:06:40 +010010421printf "%s\n" "#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010422
10423
Pablo Galindocc115e52021-08-02 20:06:40 +010010424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
10425printf %s "checking whether pthread_key_t is compatible with int... " >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010426if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
10427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10428/* end confdefs.h. */
10429#include <pthread.h>
10430int
Pablo Galindocc115e52021-08-02 20:06:40 +010010431main (void)
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010432{
10433pthread_key_t k; k * 1;
10434 ;
10435 return 0;
10436}
10437_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010010438if ac_fn_c_try_compile "$LINENO"
10439then :
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010440 ac_pthread_key_t_is_arithmetic_type=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010010441else $as_nop
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010442 ac_pthread_key_t_is_arithmetic_type=no
10443
10444fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010445rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
10447printf "%s\n" "$ac_pthread_key_t_is_arithmetic_type" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010448 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
10449
Pablo Galindocc115e52021-08-02 20:06:40 +010010450printf "%s\n" "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010451
10452 fi
10453else
Pablo Galindocc115e52021-08-02 20:06:40 +010010454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10455printf "%s\n" "no" >&6; }
Masayuki Yamamoto731e1892017-10-06 19:41:34 +090010456fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010457CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010458
Michael W. Hudson54241132001-12-07 15:38:26 +000010459
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010460case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010461 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010462 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10463 ;;
10464 Darwin/*)
10465 OTHER_LIBTOOL_OPT=""
10466 ;;
10467esac
10468
10469
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010470
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010471case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010472 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010473 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
10474 if test "${enable_universalsdk}"; then
10475 :
10476 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010477 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000010478 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000010479 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010480 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010481 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000010482 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010483 if test ${gcc_version} '<' 4.0
10484 then
10485 LIBTOOL_CRUFT="-lcc_dynamic"
10486 else
10487 LIBTOOL_CRUFT=""
10488 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010489 if test "$cross_compiling" = yes
10490then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010491 ac_osx_32bit=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010010492else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010494/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010495
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010496 #include <unistd.h>
10497 int main(int argc, char*argv[])
10498 {
10499 if (sizeof(long) == 4) {
10500 return 0;
10501 } else {
10502 return 1;
10503 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000010504 }
10505
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010506_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010010507if ac_fn_c_try_run "$LINENO"
10508then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010509 ac_osx_32bit=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010010510else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10514 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010515fi
10516
10517
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010518 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010519 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010520 i386)
10521 MACOSX_DEFAULT_ARCH="i386"
10522 ;;
10523 ppc)
10524 MACOSX_DEFAULT_ARCH="ppc"
10525 ;;
10526 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010527 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010528 ;;
10529 esac
10530 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000010531 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010532 i386)
10533 MACOSX_DEFAULT_ARCH="x86_64"
10534 ;;
10535 ppc)
10536 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +010010537 ;;
10538 arm64)
10539 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010540 ;;
10541 *)
Ronald Oussoren41761932020-11-08 10:05:27 +010010542 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010543 ;;
10544 esac
10545
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000010546 fi
10547
10548 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000010549 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010550 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010551esac
Pablo Galindocc115e52021-08-02 20:06:40 +010010552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
10553printf %s "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010554if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010555then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010556 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010557 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010558 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010559
Pablo Galindocc115e52021-08-02 20:06:40 +010010560printf "%s\n" "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010561
Pablo Galindocc115e52021-08-02 20:06:40 +010010562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10563printf "%s\n" "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000010564 if test $enable_shared = "yes"
10565 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010566 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 +000010567 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010568else
Pablo Galindocc115e52021-08-02 20:06:40 +010010569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10570printf "%s\n" "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010571fi
10572
Pablo Galindocc115e52021-08-02 20:06:40 +010010573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
10574printf %s "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010575case $ac_sys_system/$ac_sys_release in
10576 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010577
Pablo Galindocc115e52021-08-02 20:06:40 +010010578printf "%s\n" "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
Pablo Galindocc115e52021-08-02 20:06:40 +010010580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
10581printf "%s\n" "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010582 ;;
10583 *)
Pablo Galindocc115e52021-08-02 20:06:40 +010010584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10585printf "%s\n" "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000010586 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010587esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010588
Guido van Rossum0a516c91994-09-12 10:58:40 +000010589# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010590
Michael W. Hudson54241132001-12-07 15:38:26 +000010591
10592
10593
10594
Benjamin Peterson99f03762010-04-11 22:15:28 +000010595
Thomas Wouters477c8d52006-05-27 19:21:47 +000010596
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010597# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
10598# -- usually .so, .sl on HP-UX, .dll on Cygwin
Pablo Galindocc115e52021-08-02 20:06:40 +010010599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
10600printf %s "checking the extension of shared libraries... " >&6; }
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070010601if test -z "$SHLIB_SUFFIX"; then
10602 case $ac_sys_system in
10603 hp*|HP*)
10604 case `uname -m` in
10605 ia64) SHLIB_SUFFIX=.so;;
10606 *) SHLIB_SUFFIX=.sl;;
10607 esac
10608 ;;
10609 CYGWIN*) SHLIB_SUFFIX=.dll;;
10610 *) SHLIB_SUFFIX=.so;;
10611 esac
10612fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
10614printf "%s\n" "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010615
Guido van Rossum0a516c91994-09-12 10:58:40 +000010616# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -070010617# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010618# (Shared libraries in this instance are shared modules to be loaded into
10619# Python, as opposed to building Python itself as a shared library.)
Pablo Galindocc115e52021-08-02 20:06:40 +010010620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
10621printf %s "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010622if test -z "$LDSHARED"
10623then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010624 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010625 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +000010626 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +000010627 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010628 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010630 if test "$GCC" = "yes" ; then
10631 LDSHARED='$(CC) -shared'
10632 LDCXXSHARED='$(CXX) -shared'
10633 else
10634 LDSHARED='$(CC) -G'
10635 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +000010636 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010637 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010638 if test "$GCC" = "yes" ; then
10639 LDSHARED='$(CC) -shared'
10640 LDCXXSHARED='$(CXX) -shared'
10641 else
Rob Boehne9d25bd12017-12-06 11:58:17 -060010642 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010643 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +000010644 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +000010645 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010646 LDSHARED='$(CC) -bundle'
10647 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000010648 if test "$enable_framework" ; then
10649 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010650 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10651 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010652 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010653 else
10654 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010655 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +000010656 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010657 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010658 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010659 LDSHARED='$(CC) -bundle'
10660 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000010661 if test "$enable_framework" ; then
10662 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010663 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10664 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010665 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010666 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010667 # No framework, use the Python app as bundle-loader
10668 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010669 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000010670 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010671 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010672 Darwin/*)
10673 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10674 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000010675
Ned Deily36820b62014-06-25 13:44:22 -070010676 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10677 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
10678 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
10679 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
10680 if test ${dep_target_major} -eq 10 && \
10681 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +000010682 then
Ned Deily36820b62014-06-25 13:44:22 -070010683 # building for OS X 10.0 through 10.2
Ned Deily87031782021-05-02 20:28:43 -040010684 as_fn_error $? "MACOSX_DEPLOYMENT_TARGET too old ($MACOSX_DEPLOYMENT_TARGET), only 10.3 or later is supported" "$LINENO" 5
Ned Deily36820b62014-06-25 13:44:22 -070010685 else
10686 # building for OS X 10.3 and later
10687 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
10688 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
10689 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010690 fi
10691 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010692 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010693 LDSHARED='$(CC) -shared'
10694 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010695 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010696 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010697 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010698 LDSHARED='$(CC) -shared'
10699 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +000010700 else
Antoine Pitroud4958c22010-10-13 17:01:10 +000010701 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010702 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010703 OpenBSD*)
10704 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10705 then
Antoine Pitroud4958c22010-10-13 17:01:10 +000010706 LDSHARED='$(CC) -shared $(CCSHARED)'
10707 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010708 else
10709 case `uname -r` in
10710 [01].* | 2.[0-7] | 2.[0-7].*)
10711 LDSHARED="ld -Bshareable ${LDFLAGS}"
10712 ;;
10713 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +000010714 LDSHARED='$(CC) -shared $(CCSHARED)'
10715 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010716 ;;
10717 esac
10718 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010719 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +000010720 LDSHARED='$(CC) -shared'
10721 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010722 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000010723 if test "$GCC" = "yes" ; then
10724 LDSHARED='$(CC) -shared'
10725 LDCXXSHARED='$(CXX) -shared'
10726 else
10727 LDSHARED='$(CC) -G'
10728 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010729 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000010730 SCO_SV*)
10731 LDSHARED='$(CC) -Wl,-G,-Bexport'
10732 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
10733 CYGWIN*)
10734 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
10735 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010736 *) LDSHARED="ld";;
10737 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010738fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
10740printf "%s\n" "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +000010741LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010742BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010743# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010744# library (module) -- this is only needed for a few systems
Pablo Galindocc115e52021-08-02 20:06:40 +010010745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
10746printf %s "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010747if test -z "$CCSHARED"
10748then
Guido van Rossum07397971997-04-29 21:49:50 +000010749 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010750 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010751 then CCSHARED="-fPIC";
10752 elif test `uname -p` = sparc;
10753 then CCSHARED="-xcode=pic32";
10754 else CCSHARED="-Kpic";
10755 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010756 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010757 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010758 else CCSHARED="+z";
10759 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010760 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010761 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010762 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010763 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010764 if test "$GCC" = "yes"
10765 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010766 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010767 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010768 SCO_SV*)
10769 if test "$GCC" = "yes"
10770 then CCSHARED="-fPIC"
10771 else CCSHARED="-Kpic -belf"
10772 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +080010773 VxWorks*)
10774 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +000010775 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010776fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
10778printf "%s\n" "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010779# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010780# the python executable -- this is only needed for a few systems
Pablo Galindocc115e52021-08-02 20:06:40 +010010781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
10782printf %s "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010783if test -z "$LINKFORSHARED"
10784then
Guido van Rossum07397971997-04-29 21:49:50 +000010785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010786 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010787 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010788 LINKFORSHARED="-Wl,-E -Wl,+s";;
10789# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +010010790 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010791 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010792 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000010794 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -040010795
10796 # Issue #18075: the default maximum stack size (8MBytes) is too
10797 # small for the default recursion limit. Increase the stack size
10798 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +020010799 # Note: This matches the value of THREAD_STACK_SIZE in
10800 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -040010801 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
10802
Jack Jansene578a632001-08-15 01:27:14 +000010803 if test "$enable_framework"
10804 then
Jack Jansenda49e192005-01-07 13:08:22 +000010805 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010806 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010807 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010808 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010809 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010810 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010811 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010812 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10813 then
10814 LINKFORSHARED="-Wl,--export-dynamic"
10815 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010816 SunOS/5*) case $CC in
10817 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010818 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010819 then
10820 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010821 fi;;
10822 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010823 CYGWIN*)
10824 if test $enable_shared = "no"
10825 then
10826 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10827 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000010828 QNX*)
10829 # -Wl,-E causes the symbols to be added to the dynamic
10830 # symbol table so that they can be found when a module
10831 # is loaded. -N 2048K causes the stack size to be set
10832 # to 2048 kilobytes so that the stack doesn't overflow
10833 # when running test_compile.py.
10834 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +080010835 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +080010836 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010837 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010838fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
10840printf "%s\n" "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000010841
Michael W. Hudson54241132001-12-07 15:38:26 +000010842
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010843
Pablo Galindocc115e52021-08-02 20:06:40 +010010844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
10845printf %s "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010846if test ! "$LIBRARY" = "$LDLIBRARY"
10847then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010848 case $ac_sys_system in
10849 CYGWIN*)
10850 # Cygwin needs CCSHARED when building extension DLLs
10851 # but not when building the interpreter DLL.
10852 CFLAGSFORSHARED='';;
10853 *)
10854 CFLAGSFORSHARED='$(CCSHARED)'
10855 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010856fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
10858printf "%s\n" "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010859
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010860# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10861# library (with --enable-shared).
10862# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010863# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10864# if it is not required, since it creates a dependency of the shared library
10865# to LIBS. This, in turn, means that applications linking the shared libpython
10866# don't need to link LIBS explicitly. The default should be only changed
10867# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010868
Pablo Galindocc115e52021-08-02 20:06:40 +010010869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
10870printf %s "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010871case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010872 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010873 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010874esac
Pablo Galindocc115e52021-08-02 20:06:40 +010010875{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
10876printf "%s\n" "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010877
10878
Guido van Rossum627b2d71993-12-24 10:39:16 +000010879# checks for libraries
Pablo Galindocc115e52021-08-02 20:06:40 +010010880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
10881printf %s "checking for sendfile in -lsendfile... " >&6; }
10882if test ${ac_cv_lib_sendfile_sendfile+y}
10883then :
10884 printf %s "(cached) " >&6
10885else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010886 ac_check_lib_save_LIBS=$LIBS
10887LIBS="-lsendfile $LIBS"
10888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10889/* end confdefs.h. */
10890
10891/* Override any GCC internal prototype to avoid an error.
10892 Use char because int might match the return type of a GCC
10893 builtin and then its argument prototype would still apply. */
Georg Brandl941f9562011-02-25 15:21:47 +000010894char sendfile ();
10895int
Pablo Galindocc115e52021-08-02 20:06:40 +010010896main (void)
Georg Brandl941f9562011-02-25 15:21:47 +000010897{
10898return sendfile ();
10899 ;
10900 return 0;
10901}
10902_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010010903if ac_fn_c_try_link "$LINENO"
10904then :
Georg Brandl941f9562011-02-25 15:21:47 +000010905 ac_cv_lib_sendfile_sendfile=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010010906else $as_nop
Georg Brandl941f9562011-02-25 15:21:47 +000010907 ac_cv_lib_sendfile_sendfile=no
10908fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010909rm -f core conftest.err conftest.$ac_objext conftest.beam \
Georg Brandl941f9562011-02-25 15:21:47 +000010910 conftest$ac_exeext conftest.$ac_ext
10911LIBS=$ac_check_lib_save_LIBS
10912fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
10914printf "%s\n" "$ac_cv_lib_sendfile_sendfile" >&6; }
10915if test "x$ac_cv_lib_sendfile_sendfile" = xyes
10916then :
10917 printf "%s\n" "#define HAVE_LIBSENDFILE 1" >>confdefs.h
Georg Brandl941f9562011-02-25 15:21:47 +000010918
10919 LIBS="-lsendfile $LIBS"
10920
10921fi
10922
Pablo Galindocc115e52021-08-02 20:06:40 +010010923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10924printf %s "checking for dlopen in -ldl... " >&6; }
10925if test ${ac_cv_lib_dl_dlopen+y}
10926then :
10927 printf %s "(cached) " >&6
10928else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010930LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934/* Override any GCC internal prototype to avoid an error.
10935 Use char because int might match the return type of a GCC
10936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010937char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010938int
Pablo Galindocc115e52021-08-02 20:06:40 +010010939main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 ;
10943 return 0;
10944}
10945_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010010946if ac_fn_c_try_link "$LINENO"
10947then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 ac_cv_lib_dl_dlopen=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010010949else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010951fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010952rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010954LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010955fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010956{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10957printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
10958if test "x$ac_cv_lib_dl_dlopen" = xyes
10959then :
10960 printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010961
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010962 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010963
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010964fi
10965 # Dynamic linking for SunOS/Solaris and SYSV
Pablo Galindocc115e52021-08-02 20:06:40 +010010966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10967printf %s "checking for shl_load in -ldld... " >&6; }
10968if test ${ac_cv_lib_dld_shl_load+y}
10969then :
10970 printf %s "(cached) " >&6
10971else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010973LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977/* Override any GCC internal prototype to avoid an error.
10978 Use char because int might match the return type of a GCC
10979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010980char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010981int
Pablo Galindocc115e52021-08-02 20:06:40 +010010982main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000010983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 ;
10986 return 0;
10987}
10988_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010010989if ac_fn_c_try_link "$LINENO"
10990then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 ac_cv_lib_dld_shl_load=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010010992else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010994fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010995rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010998fi
Pablo Galindocc115e52021-08-02 20:06:40 +010010999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
11000printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
11001if test "x$ac_cv_lib_dld_shl_load" = xyes
11002then :
11003 printf "%s\n" "#define HAVE_LIBDLD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011005 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011006
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011007fi
11008 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011009
Michael Felt0d3ccb42017-12-30 22:39:20 +010011010# checks for uuid.h location
Pablo Galindocc115e52021-08-02 20:06:40 +010011011ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11012if test "x$ac_cv_header_uuid_uuid_h" = xyes
11013then :
11014 printf "%s\n" "#define HAVE_UUID_UUID_H 1" >>confdefs.h
11015
11016fi
11017ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11018if test "x$ac_cv_header_uuid_h" = xyes
11019then :
11020 printf "%s\n" "#define HAVE_UUID_H 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010011021
11022fi
11023
Michael Felt0d3ccb42017-12-30 22:39:20 +010011024
Pablo Galindocc115e52021-08-02 20:06:40 +010011025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
11026printf %s "checking for uuid_generate_time_safe... " >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030011027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11028/* end confdefs.h. */
11029#include <uuid/uuid.h>
11030int
Pablo Galindocc115e52021-08-02 20:06:40 +010011031main (void)
Berker Peksag9a10ff42017-11-08 23:09:16 +030011032{
11033
11034#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +030011035void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +030011036#endif
11037
11038 ;
11039 return 0;
11040}
11041_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011042if ac_fn_c_try_compile "$LINENO"
11043then :
Berker Peksag9a10ff42017-11-08 23:09:16 +030011044
Pablo Galindocc115e52021-08-02 20:06:40 +010011045printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
Berker Peksag9a10ff42017-11-08 23:09:16 +030011046
Pablo Galindocc115e52021-08-02 20:06:40 +010011047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11048printf "%s\n" "yes" >&6; }
11049else $as_nop
11050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11051printf "%s\n" "no" >&6; }
Berker Peksag9a10ff42017-11-08 23:09:16 +030011052
11053fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011054rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Berker Peksag9a10ff42017-11-08 23:09:16 +030011055
Michael Felt0d3ccb42017-12-30 22:39:20 +010011056# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +000011057# FreeBSD and OpenBSD provides support as well
Pablo Galindocc115e52021-08-02 20:06:40 +010011058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
11059printf %s "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11061/* end confdefs.h. */
11062#include <uuid.h>
11063int
Pablo Galindocc115e52021-08-02 20:06:40 +010011064main (void)
Michael Felt0d3ccb42017-12-30 22:39:20 +010011065{
11066
11067#ifndef uuid_create
11068void *x = uuid_create
11069#endif
11070
11071 ;
11072 return 0;
11073}
11074_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011075if ac_fn_c_try_compile "$LINENO"
11076then :
Michael Felt0d3ccb42017-12-30 22:39:20 +010011077
Pablo Galindocc115e52021-08-02 20:06:40 +010011078printf "%s\n" "#define HAVE_UUID_CREATE 1" >>confdefs.h
Michael Felt0d3ccb42017-12-30 22:39:20 +010011079
Pablo Galindocc115e52021-08-02 20:06:40 +010011080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11081printf "%s\n" "yes" >&6; }
11082else $as_nop
11083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084printf "%s\n" "no" >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +010011085
11086fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011087rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael Felt0d3ccb42017-12-30 22:39:20 +010011088
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011089# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
11090# stream in big-endian byte-order
Pablo Galindocc115e52021-08-02 20:06:40 +010011091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
11092printf %s "checking for uuid_enc_be... " >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11094/* end confdefs.h. */
11095#include <uuid.h>
11096int
Pablo Galindocc115e52021-08-02 20:06:40 +010011097main (void)
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011098{
11099
11100#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040011101void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011102#endif
11103
11104 ;
11105 return 0;
11106}
11107_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011108if ac_fn_c_try_compile "$LINENO"
11109then :
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011110
Pablo Galindocc115e52021-08-02 20:06:40 +010011111printf "%s\n" "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011112
Pablo Galindocc115e52021-08-02 20:06:40 +010011113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11114printf "%s\n" "yes" >&6; }
11115else $as_nop
11116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117printf "%s\n" "no" >&6; }
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011118
11119fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011120rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka17d88302018-05-25 01:45:09 +030011121
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011122# 'Real Time' functions on Solaris
11123# posix4 on Solaris 2.6
11124# pthread (first!) on Linux
Pablo Galindocc115e52021-08-02 20:06:40 +010011125{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
11126printf %s "checking for library containing sem_init... " >&6; }
11127if test ${ac_cv_search_sem_init+y}
11128then :
11129 printf %s "(cached) " >&6
11130else $as_nop
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011131 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000011132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135/* Override any GCC internal prototype to avoid an error.
11136 Use char because int might match the return type of a GCC
11137 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011138char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011139int
Pablo Galindocc115e52021-08-02 20:06:40 +010011140main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 ;
11144 return 0;
11145}
11146_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011147for ac_lib in '' pthread rt posix4
11148do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149 if test -z "$ac_lib"; then
11150 ac_res="none required"
11151 else
11152 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011153 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011155 if ac_fn_c_try_link "$LINENO"
11156then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000011158fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011159rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 conftest$ac_exeext
Pablo Galindocc115e52021-08-02 20:06:40 +010011161 if test ${ac_cv_search_sem_init+y}
11162then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011163 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011165done
Pablo Galindocc115e52021-08-02 20:06:40 +010011166if test ${ac_cv_search_sem_init+y}
11167then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011168
Pablo Galindocc115e52021-08-02 20:06:40 +010011169else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170 ac_cv_search_sem_init=no
11171fi
11172rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011173LIBS=$ac_func_search_save_LIBS
11174fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
11176printf "%s\n" "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011177ac_res=$ac_cv_search_sem_init
Pablo Galindocc115e52021-08-02 20:06:40 +010011178if test "$ac_res" != no
11179then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011181
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011182fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020011183
Martin v. Löwis519adae2003-09-20 10:47:47 +000011184
Martin v. Löwis19d17342003-06-14 21:03:05 +000011185# check if we need libintl for locale functions
Pablo Galindocc115e52021-08-02 20:06:40 +010011186{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
11187printf %s "checking for textdomain in -lintl... " >&6; }
11188if test ${ac_cv_lib_intl_textdomain+y}
11189then :
11190 printf %s "(cached) " >&6
11191else $as_nop
Martin v. Löwis19d17342003-06-14 21:03:05 +000011192 ac_check_lib_save_LIBS=$LIBS
11193LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197/* Override any GCC internal prototype to avoid an error.
11198 Use char because int might match the return type of a GCC
11199 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011200char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011201int
Pablo Galindocc115e52021-08-02 20:06:40 +010011202main (void)
Martin v. Löwis19d17342003-06-14 21:03:05 +000011203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011205 ;
11206 return 0;
11207}
11208_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011209if ac_fn_c_try_link "$LINENO"
11210then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011211 ac_cv_lib_intl_textdomain=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011212else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000011214fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011215rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011217LIBS=$ac_check_lib_save_LIBS
11218fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011219{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
11220printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; }
11221if test "x$ac_cv_lib_intl_textdomain" = xyes
11222then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000011223
Pablo Galindocc115e52021-08-02 20:06:40 +010011224printf "%s\n" "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000011225
Brett Cannonc6d936e2009-06-07 20:09:53 +000011226 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000011227fi
11228
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011229
11230# checks for system dependent C++ extensions support
11231case "$ac_sys_system" in
Pablo Galindocc115e52021-08-02 20:06:40 +010011232 AIX*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
11233printf %s "checking for genuine AIX C++ extensions support... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011235/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011236
Georg Brandl59e87bd2011-02-15 19:48:59 +000011237 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011238int
Pablo Galindocc115e52021-08-02 20:06:40 +010011239main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011240{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011241loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 ;
11243 return 0;
11244}
Matthias Kloseb159a552010-04-25 21:00:44 +000011245
Martin v. Löwis11437992002-04-12 09:54:03 +000011246_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011247if ac_fn_c_try_link "$LINENO"
11248then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011249
Matthias Kloseb159a552010-04-25 21:00:44 +000011250
Pablo Galindocc115e52021-08-02 20:06:40 +010011251printf "%s\n" "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
Pablo Galindocc115e52021-08-02 20:06:40 +010011253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11254printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011255
Pablo Galindocc115e52021-08-02 20:06:40 +010011256else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000011257
Pablo Galindocc115e52021-08-02 20:06:40 +010011258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11259printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011260
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011261fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011262rm -f core conftest.err conftest.$ac_objext conftest.beam \
Michael Felt39afa2d2019-12-15 15:17:53 +010011263 conftest$ac_exeext conftest.$ac_ext
11264# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
11265# of the AIX system used to build/package Python executable. This tag serves
11266# as a baseline for bdist module packages
Pablo Galindocc115e52021-08-02 20:06:40 +010011267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
11268printf %s "checking for the system builddate... " >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011269 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
11270
Pablo Galindocc115e52021-08-02 20:06:40 +010011271printf "%s\n" "#define AIX_BUILDDATE $AIX_BUILDDATE" >>confdefs.h
Michael Felt39afa2d2019-12-15 15:17:53 +010011272
Pablo Galindocc115e52021-08-02 20:06:40 +010011273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
11274printf "%s\n" "$AIX_BUILDDATE" >&6; }
Michael Felt39afa2d2019-12-15 15:17:53 +010011275 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011276 *) ;;
11277esac
11278
Christian Heimes985ecdc2013-11-20 11:46:18 +010011279# check for systems that require aligned memory access
Pablo Galindocc115e52021-08-02 20:06:40 +010011280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
11281printf %s "checking aligned memory access is required... " >&6; }
11282if test ${ac_cv_aligned_required+y}
11283then :
11284 printf %s "(cached) " >&6
11285else $as_nop
11286 if test "$cross_compiling" = yes
11287then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011288 ac_cv_aligned_required=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011289else $as_nop
Christian Heimes985ecdc2013-11-20 11:46:18 +010011290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291/* end confdefs.h. */
11292
11293int main()
11294{
11295 char s[16];
11296 int i, *p1, *p2;
11297 for (i=0; i < 16; i++)
11298 s[i] = i;
11299 p1 = (int*)(s+1);
11300 p2 = (int*)(s+2);
11301 if (*p1 == *p2)
11302 return 1;
11303 return 0;
11304}
Christian Heimes985ecdc2013-11-20 11:46:18 +010011305_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011306if ac_fn_c_try_run "$LINENO"
11307then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011308 ac_cv_aligned_required=no
Pablo Galindocc115e52021-08-02 20:06:40 +010011309else $as_nop
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011310 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010011311fi
11312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11313 conftest.$ac_objext conftest.beam conftest.$ac_ext
11314fi
11315
11316
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011317fi
11318
Pablo Galindocc115e52021-08-02 20:06:40 +010011319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
11320printf "%s\n" "$ac_cv_aligned_required" >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070011321if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010011322
Pablo Galindocc115e52021-08-02 20:06:40 +010011323printf "%s\n" "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011324
11325fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010011326
11327# str, bytes and memoryview hash algorithm
11328
11329
Pablo Galindocc115e52021-08-02 20:06:40 +010011330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
11331printf %s "checking for --with-hash-algorithm... " >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011332
11333# Check whether --with-hash_algorithm was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011334if test ${with_hash_algorithm+y}
11335then :
Christian Heimes985ecdc2013-11-20 11:46:18 +010011336 withval=$with_hash_algorithm;
Pablo Galindocc115e52021-08-02 20:06:40 +010011337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11338printf "%s\n" "$withval" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011339case "$withval" in
11340 siphash24)
Pablo Galindocc115e52021-08-02 20:06:40 +010011341 printf "%s\n" "#define Py_HASH_ALGORITHM 1" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011342
11343 ;;
11344 fnv)
Pablo Galindocc115e52021-08-02 20:06:40 +010011345 printf "%s\n" "#define Py_HASH_ALGORITHM 2" >>confdefs.h
Christian Heimes985ecdc2013-11-20 11:46:18 +010011346
11347 ;;
11348 *)
11349 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
11350 ;;
11351esac
11352
Pablo Galindocc115e52021-08-02 20:06:40 +010011353else $as_nop
11354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5
11355printf "%s\n" "default" >&6; }
Christian Heimes985ecdc2013-11-20 11:46:18 +010011356fi
11357
11358
Paul Ganssle62972d92020-05-16 04:20:06 -040011359validate_tzpath() {
11360 # Checks that each element of hte path is an absolute path
11361 if test -z "$1"; then
11362 # Empty string is allowed: it indicates no system TZPATH
11363 return 0
11364 fi
11365
11366 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050011367 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040011368 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
11369 return 1;
11370 fi
11371}
11372
11373TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
Pablo Galindocc115e52021-08-02 20:06:40 +010011374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
11375printf %s "checking for --with-tzpath... " >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011376
11377# Check whether --with-tzpath was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011378if test ${with_tzpath+y}
11379then :
Paul Ganssle62972d92020-05-16 04:20:06 -040011380 withval=$with_tzpath;
11381case "$withval" in
11382 yes)
11383 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
11384 ;;
11385 *)
11386 validate_tzpath "$withval"
11387 TZPATH="$withval"
Pablo Galindocc115e52021-08-02 20:06:40 +010011388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
11389printf "%s\n" "\"$withval\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011390 ;;
11391esac
11392
Pablo Galindocc115e52021-08-02 20:06:40 +010011393else $as_nop
Paul Ganssle62972d92020-05-16 04:20:06 -040011394 validate_tzpath "$TZPATH"
Pablo Galindocc115e52021-08-02 20:06:40 +010011395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
11396printf "%s\n" "\"$TZPATH\"" >&6; }
Paul Ganssle62972d92020-05-16 04:20:06 -040011397fi
11398
11399
11400
Pablo Galindocc115e52021-08-02 20:06:40 +010011401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
11402printf %s "checking for --with-address-sanitizer... " >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011403
11404# Check whether --with-address_sanitizer was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011405if test ${with_address_sanitizer+y}
11406then :
Charles-François Natalid30b0222014-05-08 23:08:51 +010011407 withval=$with_address_sanitizer;
Pablo Galindocc115e52021-08-02 20:06:40 +010011408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11409printf "%s\n" "$withval" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011410BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
11411LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080011412# ASan works by controlling memory allocation, our own malloc interferes.
11413with_pymalloc="no"
11414
Pablo Galindocc115e52021-08-02 20:06:40 +010011415else $as_nop
11416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011418fi
11419
11420
Pablo Galindocc115e52021-08-02 20:06:40 +010011421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
11422printf %s "checking for --with-memory-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011423
11424# Check whether --with-memory_sanitizer was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011425if test ${with_memory_sanitizer+y}
11426then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011427 withval=$with_memory_sanitizer;
Pablo Galindocc115e52021-08-02 20:06:40 +010011428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11429printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011430BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
11431LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
11432# MSan works by controlling memory allocation, our own malloc interferes.
11433with_pymalloc="no"
11434
Pablo Galindocc115e52021-08-02 20:06:40 +010011435else $as_nop
11436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437printf "%s\n" "no" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011438fi
11439
11440
Pablo Galindocc115e52021-08-02 20:06:40 +010011441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
11442printf %s "checking for --with-undefined-behavior-sanitizer... " >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011443
11444# Check whether --with-undefined_behavior_sanitizer was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011445if test ${with_undefined_behavior_sanitizer+y}
11446then :
Gregory P. Smith1584a002018-11-12 12:07:14 -080011447 withval=$with_undefined_behavior_sanitizer;
Pablo Galindocc115e52021-08-02 20:06:40 +010011448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11449printf "%s\n" "$withval" >&6; }
Gregory P. Smith1584a002018-11-12 12:07:14 -080011450BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
11451LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010011452
Pablo Galindocc115e52021-08-02 20:06:40 +010011453else $as_nop
11454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455printf "%s\n" "no" >&6; }
Charles-François Natalid30b0222014-05-08 23:08:51 +010011456fi
11457
11458
Guido van Rossum70c7f481998-03-26 18:44:10 +000011459# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Pablo Galindocc115e52021-08-02 20:06:40 +010011460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
11461printf %s "checking for t_open in -lnsl... " >&6; }
11462if test ${ac_cv_lib_nsl_t_open+y}
11463then :
11464 printf %s "(cached) " >&6
11465else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011467LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471/* Override any GCC internal prototype to avoid an error.
11472 Use char because int might match the return type of a GCC
11473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011475int
Pablo Galindocc115e52021-08-02 20:06:40 +010011476main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 ;
11480 return 0;
11481}
11482_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011483if ac_fn_c_try_link "$LINENO"
11484then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 ac_cv_lib_nsl_t_open=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011486else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011488fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011489rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011491LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011492fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
11494printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; }
11495if test "x$ac_cv_lib_nsl_t_open" = xyes
11496then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011497 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011498fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011499 # SVR4
Pablo Galindocc115e52021-08-02 20:06:40 +010011500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
11501printf %s "checking for socket in -lsocket... " >&6; }
11502if test ${ac_cv_lib_socket_socket+y}
11503then :
11504 printf %s "(cached) " >&6
11505else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011507LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511/* Override any GCC internal prototype to avoid an error.
11512 Use char because int might match the return type of a GCC
11513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011514char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011515int
Pablo Galindocc115e52021-08-02 20:06:40 +010011516main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ;
11520 return 0;
11521}
11522_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011523if ac_fn_c_try_link "$LINENO"
11524then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 ac_cv_lib_socket_socket=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011526else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011528fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011529rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011531LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011532fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
11534printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
11535if test "x$ac_cv_lib_socket_socket" = xyes
11536then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011537 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011538fi
11539 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011540
Pablo Galindocc115e52021-08-02 20:06:40 +010011541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
11542printf %s "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544# Check whether --with-libs was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011545if test ${with_libs+y}
11546then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011547 withval=$with_libs;
Pablo Galindocc115e52021-08-02 20:06:40 +010011548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
11549printf "%s\n" "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000011550LIBS="$withval $LIBS"
11551
Pablo Galindocc115e52021-08-02 20:06:40 +010011552else $as_nop
11553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554printf "%s\n" "no" >&6; }
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080011555fi
11556
11557
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010011558PKG_PROG_PKG_CONFIG
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011559
11560# Check for use of the system expat library
Pablo Galindocc115e52021-08-02 20:06:40 +010011561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
11562printf %s "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011563
11564# Check whether --with-system_expat was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011565if test ${with_system_expat+y}
11566then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011567 withval=$with_system_expat;
Pablo Galindocc115e52021-08-02 20:06:40 +010011568else $as_nop
Benjamin Peterson79263252010-10-31 16:50:44 +000011569 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011570fi
11571
11572
Pablo Galindocc115e52021-08-02 20:06:40 +010011573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
11574printf "%s\n" "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011575
11576# Check for use of the system libffi library
Pablo Galindocc115e52021-08-02 20:06:40 +010011577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
11578printf %s "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011579
11580# Check whether --with-system_ffi was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011581if test ${with_system_ffi+y}
11582then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011583 withval=$with_system_ffi;
11584fi
11585
11586
Zachary Waref40d4dd2016-09-17 01:25:24 -050011587if test "$ac_sys_system" = "Darwin"
11588then
11589 case "$with_system_ffi" in
11590 "")
11591 with_system_ffi="no"
11592 ;;
11593 yes|no)
11594 ;;
11595 *)
11596 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
11597 ;;
11598 esac
Pablo Galindocc115e52021-08-02 20:06:40 +010011599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
11600printf "%s\n" "$with_system_ffi" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011601else
Pablo Galindocc115e52021-08-02 20:06:40 +010011602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11603printf "%s\n" "yes" >&6; }
Zachary Waref40d4dd2016-09-17 01:25:24 -050011604 if test "$with_system_ffi" != ""
11605 then
Pablo Galindocc115e52021-08-02 20:06:40 +010011606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
11607printf "%s\n" "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
Zachary Waref40d4dd2016-09-17 01:25:24 -050011608 fi
11609 with_system_ffi="yes"
11610fi
Zachary Ware935043d2016-09-09 17:01:21 -070011611
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000011612if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000011613 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
11614else
11615 LIBFFI_INCLUDEDIR=""
11616fi
11617
11618
Stefan Krah60187b52012-03-23 19:06:27 +010011619# Check for use of the system libmpdec library
Pablo Galindocc115e52021-08-02 20:06:40 +010011620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
11621printf %s "checking for --with-system-libmpdec... " >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011622
11623# Check whether --with-system_libmpdec was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011624if test ${with_system_libmpdec+y}
11625then :
Stefan Krah60187b52012-03-23 19:06:27 +010011626 withval=$with_system_libmpdec;
Pablo Galindocc115e52021-08-02 20:06:40 +010011627else $as_nop
Stefan Krah60187b52012-03-23 19:06:27 +010011628 with_system_libmpdec="no"
11629fi
11630
11631
Pablo Galindocc115e52021-08-02 20:06:40 +010011632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
11633printf "%s\n" "$with_system_libmpdec" >&6; }
Stefan Krah60187b52012-03-23 19:06:27 +010011634
Stefan Krah815280e2020-02-29 19:43:42 +010011635# Check whether _decimal should use a coroutine-local or thread-local context
Pablo Galindocc115e52021-08-02 20:06:40 +010011636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
11637printf %s "checking for --with-decimal-contextvar... " >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011638
11639# Check whether --with-decimal_contextvar was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011640if test ${with_decimal_contextvar+y}
11641then :
Stefan Krah815280e2020-02-29 19:43:42 +010011642 withval=$with_decimal_contextvar;
Pablo Galindocc115e52021-08-02 20:06:40 +010011643else $as_nop
Stefan Krah815280e2020-02-29 19:43:42 +010011644 with_decimal_contextvar="yes"
11645fi
11646
11647
11648if test "$with_decimal_contextvar" != "no"
11649then
11650
Pablo Galindocc115e52021-08-02 20:06:40 +010011651printf "%s\n" "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
Stefan Krah815280e2020-02-29 19:43:42 +010011652
11653fi
11654
Pablo Galindocc115e52021-08-02 20:06:40 +010011655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
11656printf "%s\n" "$with_decimal_contextvar" >&6; }
Stefan Krah815280e2020-02-29 19:43:42 +010011657
Benjamin Peterson076ed002010-10-31 17:11:02 +000011658# Check for support for loadable sqlite extensions
Pablo Galindocc115e52021-08-02 20:06:40 +010011659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
11660printf %s "checking for --enable-loadable-sqlite-extensions... " >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011661# Check whether --enable-loadable-sqlite-extensions was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011662if test ${enable_loadable_sqlite_extensions+y}
11663then :
Benjamin Peterson076ed002010-10-31 17:11:02 +000011664 enableval=$enable_loadable_sqlite_extensions;
Pablo Galindocc115e52021-08-02 20:06:40 +010011665else $as_nop
Benjamin Peterson076ed002010-10-31 17:11:02 +000011666 enable_loadable_sqlite_extensions="no"
11667fi
11668
11669
Pablo Galindocc115e52021-08-02 20:06:40 +010011670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
11671printf "%s\n" "$enable_loadable_sqlite_extensions" >&6; }
Benjamin Peterson076ed002010-10-31 17:11:02 +000011672
Ned Deilyd819b932013-09-06 01:07:05 -070011673# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
11674
11675
Pablo Galindocc115e52021-08-02 20:06:40 +010011676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
11677printf %s "checking for --with-tcltk-includes... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011678
11679# Check whether --with-tcltk-includes was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011680if test ${with_tcltk_includes+y}
11681then :
Ned Deilyd819b932013-09-06 01:07:05 -070011682 withval=$with_tcltk_includes;
Pablo Galindocc115e52021-08-02 20:06:40 +010011683else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011684 with_tcltk_includes="default"
11685fi
11686
Pablo Galindocc115e52021-08-02 20:06:40 +010011687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
11688printf "%s\n" "$with_tcltk_includes" >&6; }
11689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
11690printf %s "checking for --with-tcltk-libs... " >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011691
11692# Check whether --with-tcltk-libs was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011693if test ${with_tcltk_libs+y}
11694then :
Ned Deilyd819b932013-09-06 01:07:05 -070011695 withval=$with_tcltk_libs;
Pablo Galindocc115e52021-08-02 20:06:40 +010011696else $as_nop
Ned Deilyd819b932013-09-06 01:07:05 -070011697 with_tcltk_libs="default"
11698fi
11699
Pablo Galindocc115e52021-08-02 20:06:40 +010011700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
11701printf "%s\n" "$with_tcltk_libs" >&6; }
Ned Deilyd819b932013-09-06 01:07:05 -070011702if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
11703then
11704 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
11705 then
11706 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
11707 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010011708 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
11709 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
11710 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
11711 else
11712 TCLTK_INCLUDES=""
11713 TCLTK_LIBS=""
11714 fi
Ned Deilyd819b932013-09-06 01:07:05 -070011715else
11716 TCLTK_INCLUDES="$with_tcltk_includes"
11717 TCLTK_LIBS="$with_tcltk_libs"
11718fi
11719
Matthias Klose55708cc2009-04-30 08:06:49 +000011720# Check for --with-dbmliborder
Pablo Galindocc115e52021-08-02 20:06:40 +010011721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
11722printf %s "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011723
11724# Check whether --with-dbmliborder was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010011725if test ${with_dbmliborder+y}
11726then :
Matthias Klose55708cc2009-04-30 08:06:49 +000011727 withval=$with_dbmliborder;
11728if test x$with_dbmliborder = xyes
11729then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011730as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011731else
11732 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
11733 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
11734 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011735 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000011736 fi
11737 done
11738fi
11739fi
11740
Pablo Galindocc115e52021-08-02 20:06:40 +010011741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
11742printf "%s\n" "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000011743
Martin v. Löwis11437992002-04-12 09:54:03 +000011744# Templates for things AC_DEFINEd more than once.
11745# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011746
11747
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011748if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011749then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011750 # Defining _REENTRANT on system with POSIX threads should not hurt.
Pablo Galindocc115e52021-08-02 20:06:40 +010011751 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011752
11753 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020011754 if test "$ac_sys_system" = "SunOS"; then
11755 CFLAGS="$CFLAGS -D_REENTRANT"
11756 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000011757elif test "$ac_cv_kpthread" = "yes"
11758then
11759 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011760 if test "$ac_cv_cxx_thread" = "yes"; then
11761 CXX="$CXX -Kpthread"
11762 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011763 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011764elif test "$ac_cv_kthread" = "yes"
11765then
11766 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011767 if test "$ac_cv_cxx_thread" = "yes"; then
11768 CXX="$CXX -Kthread"
11769 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011770 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011771elif test "$ac_cv_pthread" = "yes"
11772then
11773 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011774 if test "$ac_cv_cxx_thread" = "yes"; then
11775 CXX="$CXX -pthread"
11776 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011777 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011778else
Martin v. Löwis130fb172001-07-19 11:00:41 +000011779 if test ! -z "$withval" -a -d "$withval"
11780 then LDFLAGS="$LDFLAGS -L$withval"
11781 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011782
11783 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011784 # define _POSIX_THREADS in unistd.h. Some apparently don't
11785 # (e.g. gnu pth with pthread emulation)
Pablo Galindocc115e52021-08-02 20:06:40 +010011786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
11787printf %s "checking for _POSIX_THREADS in unistd.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011789/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011790
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011791#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011792#ifdef _POSIX_THREADS
11793yes
11794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011795
11796_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +010011798 $EGREP "yes" >/dev/null 2>&1
11799then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011800 unistd_defines_pthreads=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011801else $as_nop
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011802 unistd_defines_pthreads=no
11803fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011804rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011805
Pablo Galindocc115e52021-08-02 20:06:40 +010011806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
11807printf "%s\n" "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011808
Pablo Galindocc115e52021-08-02 20:06:40 +010011809 printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011810
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011811 # Just looking for pthread_create in libpthread is not enough:
11812 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11813 # So we really have to include pthread.h, and then link.
11814 _libs=$LIBS
11815 LIBS="$LIBS -lpthread"
Pablo Galindocc115e52021-08-02 20:06:40 +010011816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
11817printf %s "checking for pthread_create in -lpthread... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011819/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011820
11821#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011822#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011823
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011824void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011825int
Pablo Galindocc115e52021-08-02 20:06:40 +010011826main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011827{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011828
11829pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 ;
11831 return 0;
11832}
11833_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011834if ac_fn_c_try_link "$LINENO"
11835then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011836
Pablo Galindocc115e52021-08-02 20:06:40 +010011837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11838printf "%s\n" "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011839 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011840
Pablo Galindocc115e52021-08-02 20:06:40 +010011841else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011842
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011843 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Pablo Galindocc115e52021-08-02 20:06:40 +010011845if test "x$ac_cv_func_pthread_detach" = xyes
11846then :
Guido van Rossumad678af1998-10-02 14:42:15 +000011847
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011848 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011849
Pablo Galindocc115e52021-08-02 20:06:40 +010011850else $as_nop
Guido van Rossumad678af1998-10-02 14:42:15 +000011851
Pablo Galindocc115e52021-08-02 20:06:40 +010011852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
11853printf %s "checking for pthread_create in -lpthreads... " >&6; }
11854if test ${ac_cv_lib_pthreads_pthread_create+y}
11855then :
11856 printf %s "(cached) " >&6
11857else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011858 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011859LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011863/* Override any GCC internal prototype to avoid an error.
11864 Use char because int might match the return type of a GCC
11865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011866char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011867int
Pablo Galindocc115e52021-08-02 20:06:40 +010011868main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011870return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 ;
11872 return 0;
11873}
11874_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011875if ac_fn_c_try_link "$LINENO"
11876then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 ac_cv_lib_pthreads_pthread_create=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011878else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011880fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011881rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011883LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011884fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
11886printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; }
11887if test "x$ac_cv_lib_pthreads_pthread_create" = xyes
11888then :
Greg Steinadf63d62000-07-05 10:38:09 +000011889
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011890 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011891 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011892
Pablo Galindocc115e52021-08-02 20:06:40 +010011893else $as_nop
Greg Steinadf63d62000-07-05 10:38:09 +000011894
Pablo Galindocc115e52021-08-02 20:06:40 +010011895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
11896printf %s "checking for pthread_create in -lc_r... " >&6; }
11897if test ${ac_cv_lib_c_r_pthread_create+y}
11898then :
11899 printf %s "(cached) " >&6
11900else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011902LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011906/* Override any GCC internal prototype to avoid an error.
11907 Use char because int might match the return type of a GCC
11908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011909char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011910int
Pablo Galindocc115e52021-08-02 20:06:40 +010011911main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011913return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 ;
11915 return 0;
11916}
11917_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011918if ac_fn_c_try_link "$LINENO"
11919then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 ac_cv_lib_c_r_pthread_create=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011921else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011923fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011924rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011926LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011927fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011928{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
11929printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; }
11930if test "x$ac_cv_lib_c_r_pthread_create" = xyes
11931then :
Guido van Rossum49545951997-12-02 19:28:29 +000011932
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011933 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011934 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011935
Pablo Galindocc115e52021-08-02 20:06:40 +010011936else $as_nop
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011937
Pablo Galindocc115e52021-08-02 20:06:40 +010011938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
11939printf %s "checking for __pthread_create_system in -lpthread... " >&6; }
11940if test ${ac_cv_lib_pthread___pthread_create_system+y}
11941then :
11942 printf %s "(cached) " >&6
11943else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011945LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011949/* Override any GCC internal prototype to avoid an error.
11950 Use char because int might match the return type of a GCC
11951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011952char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011953int
Pablo Galindocc115e52021-08-02 20:06:40 +010011954main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011956return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011957 ;
11958 return 0;
11959}
11960_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010011961if ac_fn_c_try_link "$LINENO"
11962then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 ac_cv_lib_pthread___pthread_create_system=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010011964else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011966fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011967rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011969LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011970fi
Pablo Galindocc115e52021-08-02 20:06:40 +010011971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11972printf "%s\n" "$ac_cv_lib_pthread___pthread_create_system" >&6; }
11973if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes
11974then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011975
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011976 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011977 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011978
Pablo Galindocc115e52021-08-02 20:06:40 +010011979else $as_nop
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011980
Pablo Galindocc115e52021-08-02 20:06:40 +010011981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
11982printf %s "checking for pthread_create in -lcma... " >&6; }
11983if test ${ac_cv_lib_cma_pthread_create+y}
11984then :
11985 printf %s "(cached) " >&6
11986else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011988LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011992/* Override any GCC internal prototype to avoid an error.
11993 Use char because int might match the return type of a GCC
11994 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011995char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011996int
Pablo Galindocc115e52021-08-02 20:06:40 +010011997main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000011998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012000 ;
12001 return 0;
12002}
12003_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010012004if ac_fn_c_try_link "$LINENO"
12005then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 ac_cv_lib_cma_pthread_create=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010012007else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012009fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012010rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012012LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012013fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
12015printf "%s\n" "$ac_cv_lib_cma_pthread_create" >&6; }
12016if test "x$ac_cv_lib_cma_pthread_create" = xyes
12017then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000012018
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012019 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012020 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012021
Pablo Galindocc115e52021-08-02 20:06:40 +010012022else $as_nop
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012023
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012024 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
12025
Guido van Rossum2d38f911996-06-26 19:47:01 +000012026fi
12027
Guido van Rossum627b2d71993-12-24 10:39:16 +000012028
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012029fi
12030
Guido van Rossum0be3e491997-05-22 20:33:33 +000012031fi
12032
Guido van Rossum49545951997-12-02 19:28:29 +000012033fi
12034
Guido van Rossumb93a8621998-05-07 13:27:32 +000012035fi
12036
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012037fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012038rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012040
Pablo Galindocc115e52021-08-02 20:06:40 +010012041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
12042printf %s "checking for usconfig in -lmpc... " >&6; }
12043if test ${ac_cv_lib_mpc_usconfig+y}
12044then :
12045 printf %s "(cached) " >&6
12046else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012048LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052/* Override any GCC internal prototype to avoid an error.
12053 Use char because int might match the return type of a GCC
12054 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012055char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012056int
Pablo Galindocc115e52021-08-02 20:06:40 +010012057main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 ;
12061 return 0;
12062}
12063_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010012064if ac_fn_c_try_link "$LINENO"
12065then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 ac_cv_lib_mpc_usconfig=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010012067else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012069fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012070rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012072LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012073fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
12075printf "%s\n" "$ac_cv_lib_mpc_usconfig" >&6; }
12076if test "x$ac_cv_lib_mpc_usconfig" = xyes
12077then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000012078
Martin v. Löwis130fb172001-07-19 11:00:41 +000012079 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020012080
Guido van Rossum627b2d71993-12-24 10:39:16 +000012081fi
12082
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012083
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012084fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012086if test "$posix_threads" = "yes"; then
12087 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012088
Pablo Galindocc115e52021-08-02 20:06:40 +010012089printf "%s\n" "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012090
12091 fi
12092
12093 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12094 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020012095 SunOS/5.6)
Pablo Galindocc115e52021-08-02 20:06:40 +010012096printf "%s\n" "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012097
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012098 ;;
12099 SunOS/5.8)
Pablo Galindocc115e52021-08-02 20:06:40 +010012100printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012101
12102 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020012103 AIX/*)
Pablo Galindocc115e52021-08-02 20:06:40 +010012104printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000012105
12106 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012107 esac
12108
Pablo Galindocc115e52021-08-02 20:06:40 +010012109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12110printf %s "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
12111 if test ${ac_cv_pthread_system_supported+y}
12112then :
12113 printf %s "(cached) " >&6
12114else $as_nop
12115 if test "$cross_compiling" = yes
12116then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012117 ac_cv_pthread_system_supported=no
Pablo Galindocc115e52021-08-02 20:06:40 +010012118else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012120/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010012121
12122 #include <stdio.h>
12123 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012124 void *foo(void *parm) {
12125 return NULL;
12126 }
12127 main() {
12128 pthread_attr_t attr;
12129 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110012130 if (pthread_attr_init(&attr)) return (-1);
12131 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
12132 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
12133 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012134 }
12135_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010012136if ac_fn_c_try_run "$LINENO"
12137then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012138 ac_cv_pthread_system_supported=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010012139else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12143 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012144fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146
Guido van Rossum627b2d71993-12-24 10:39:16 +000012147fi
12148
Pablo Galindocc115e52021-08-02 20:06:40 +010012149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
12150printf "%s\n" "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012151 if test "$ac_cv_pthread_system_supported" = "yes"; then
12152
Pablo Galindocc115e52021-08-02 20:06:40 +010012153printf "%s\n" "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012154
12155 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012156
12157 for ac_func in pthread_sigmask
Matthias Kloseb9621712010-04-24 17:59:49 +000012158do :
12159 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Pablo Galindocc115e52021-08-02 20:06:40 +010012160if test "x$ac_cv_func_pthread_sigmask" = xyes
12161then :
12162 printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012163 case $ac_sys_system in
12164 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012165
Pablo Galindocc115e52021-08-02 20:06:40 +010012166printf "%s\n" "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000012167
12168 ;;
12169 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012170fi
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010012171
Pablo Galindocc115e52021-08-02 20:06:40 +010012172done
12173 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
12174if test "x$ac_cv_func_pthread_getcpuclockid" = xyes
12175then :
12176 printf "%s\n" "#define HAVE_PTHREAD_GETCPUCLOCKID 1" >>confdefs.h
pdoxe14679c2017-10-05 00:01:56 -070012177
12178fi
pdoxe14679c2017-10-05 00:01:56 -070012179
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012180fi
12181
12182
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012183# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012184
Pablo Galindocc115e52021-08-02 20:06:40 +010012185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
12186printf %s "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187# Check whether --enable-ipv6 was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010012188if test ${enable_ipv6+y}
12189then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012190 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012191 no)
Pablo Galindocc115e52021-08-02 20:06:40 +010012192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12193printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012194 ipv6=no
12195 ;;
Pablo Galindocc115e52021-08-02 20:06:40 +010012196 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12197printf "%s\n" "yes" >&6; }
12198 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012199
12200 ipv6=yes
12201 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 esac
Pablo Galindocc115e52021-08-02 20:06:40 +010012203else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012206/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012207 /* AF_INET6 available check */
12208#include <sys/types.h>
12209#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012210int
Pablo Galindocc115e52021-08-02 20:06:40 +010012211main (void)
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012212{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010012213int domain = AF_INET6;
12214 ;
12215 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012216}
Martin v. Löwis11437992002-04-12 09:54:03 +000012217_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010012218if ac_fn_c_try_compile "$LINENO"
12219then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012220
Pablo Galindocc115e52021-08-02 20:06:40 +010012221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12222printf "%s\n" "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012223 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000012224
Pablo Galindocc115e52021-08-02 20:06:40 +010012225else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012226
Pablo Galindocc115e52021-08-02 20:06:40 +010012227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12228printf "%s\n" "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012229 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012230
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012231fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012232rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012234if test "$ipv6" = "yes"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010012235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
12236printf %s "checking if RFC2553 API is available... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012239
12240 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012241#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012242int
Pablo Galindocc115e52021-08-02 20:06:40 +010012243main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000012244{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012245struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000012246 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ;
12248 return 0;
12249}
Matthias Kloseb159a552010-04-25 21:00:44 +000012250
Martin v. Löwis11437992002-04-12 09:54:03 +000012251_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010012252if ac_fn_c_try_compile "$LINENO"
12253then :
Matthias Kloseb159a552010-04-25 21:00:44 +000012254
Pablo Galindocc115e52021-08-02 20:06:40 +010012255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12256printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012257 ipv6=yes
12258
Pablo Galindocc115e52021-08-02 20:06:40 +010012259else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000012260
Pablo Galindocc115e52021-08-02 20:06:40 +010012261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012263 ipv6=no
12264
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012265fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012266rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012267fi
12268
12269if test "$ipv6" = "yes"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010012270 printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012271
12272fi
12273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274fi
12275
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012276
12277ipv6type=unknown
12278ipv6lib=none
12279ipv6trylibc=no
12280
12281if test "$ipv6" = "yes"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010012282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
12283printf %s "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000012284 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12285 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012286 case $i in
12287 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012289/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012290
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012291#include <netinet/in.h>
12292#ifdef IPV6_INRIA_VERSION
12293yes
12294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012295_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +010012297 $EGREP "yes" >/dev/null 2>&1
12298then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012299 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012300fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012301rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012302
12303 ;;
12304 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012306/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012307
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012308#include <netinet/in.h>
12309#ifdef __KAME__
12310yes
12311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012312_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +010012314 $EGREP "yes" >/dev/null 2>&1
12315then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012316 ipv6type=$i;
12317 ipv6lib=inet6
12318 ipv6libdir=/usr/local/v6/lib
12319 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012320fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012321rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012322
12323 ;;
12324 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012327
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012328#include <features.h>
12329#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12330yes
12331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012332_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +010012334 $EGREP "yes" >/dev/null 2>&1
12335then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012336 ipv6type=$i;
12337 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012338fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012339rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012340
12341 ;;
12342 linux-inet6)
12343 if test -d /usr/inet6; then
12344 ipv6type=$i
12345 ipv6lib=inet6
12346 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012347 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012348 fi
12349 ;;
12350 solaris)
12351 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000012352 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012353 ipv6type=$i
12354 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012355 fi
12356 fi
12357 ;;
12358 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012360/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012361
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012362#include <sys/param.h>
12363#ifdef _TOSHIBA_INET6
12364yes
12365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012366_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012367if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +010012368 $EGREP "yes" >/dev/null 2>&1
12369then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012370 ipv6type=$i;
12371 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012372 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012373fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012374rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012375
12376 ;;
12377 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012379/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012380
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012381#include </usr/local/v6/include/sys/v6config.h>
12382#ifdef __V6D__
12383yes
12384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012385_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +010012387 $EGREP "yes" >/dev/null 2>&1
12388then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012389 ipv6type=$i;
12390 ipv6lib=v6;
12391 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012392 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012393fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012394rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012395
12396 ;;
12397 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012400
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012401#include <sys/param.h>
12402#ifdef _ZETA_MINAMI_INET6
12403yes
12404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012405_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Pablo Galindocc115e52021-08-02 20:06:40 +010012407 $EGREP "yes" >/dev/null 2>&1
12408then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012409 ipv6type=$i;
12410 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012411 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012412fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012413rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012414
12415 ;;
12416 esac
12417 if test "$ipv6type" != "unknown"; then
12418 break
12419 fi
12420 done
Pablo Galindocc115e52021-08-02 20:06:40 +010012421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
12422printf "%s\n" "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012423fi
12424
12425if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12426 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12427 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12428 echo "using lib$ipv6lib"
12429 else
12430 if test $ipv6trylibc = "yes"; then
12431 echo "using libc"
12432 else
12433 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12434 echo "You need to fetch lib$ipv6lib.a from appropriate"
12435 echo 'ipv6 kit and compile beforehand.'
12436 exit 1
12437 fi
12438 fi
12439fi
12440
Pablo Galindocc115e52021-08-02 20:06:40 +010012441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
12442printf %s "checking for CAN_RAW_FD_FRAMES... " >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12444/* end confdefs.h. */
12445 /* CAN_RAW_FD_FRAMES available check */
12446#include <linux/can/raw.h>
12447int
Pablo Galindocc115e52021-08-02 20:06:40 +010012448main (void)
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012449{
12450int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
12451 ;
12452 return 0;
12453}
12454_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010012455if ac_fn_c_try_compile "$LINENO"
12456then :
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012457
12458
Pablo Galindocc115e52021-08-02 20:06:40 +010012459printf "%s\n" "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012460
Pablo Galindocc115e52021-08-02 20:06:40 +010012461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12462printf "%s\n" "yes" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012463
Pablo Galindocc115e52021-08-02 20:06:40 +010012464else $as_nop
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012465
Pablo Galindocc115e52021-08-02 20:06:40 +010012466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12467printf "%s\n" "no" >&6; }
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012468
12469fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012470rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Larry Hastingsa6cc5512015-04-13 17:48:40 -040012471
Pablo Galindocc115e52021-08-02 20:06:40 +010012472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
12473printf %s "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12475/* end confdefs.h. */
12476
12477#include <linux/can/raw.h>
12478int
Pablo Galindocc115e52021-08-02 20:06:40 +010012479main (void)
Zackery Spytz97e0de02020-04-09 06:03:49 -060012480{
12481int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
12482 ;
12483 return 0;
12484}
12485_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010012486if ac_fn_c_try_compile "$LINENO"
12487then :
Zackery Spytz97e0de02020-04-09 06:03:49 -060012488
12489
Pablo Galindocc115e52021-08-02 20:06:40 +010012490printf "%s\n" "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
Zackery Spytz97e0de02020-04-09 06:03:49 -060012491
Pablo Galindocc115e52021-08-02 20:06:40 +010012492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12493printf "%s\n" "yes" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012494
Pablo Galindocc115e52021-08-02 20:06:40 +010012495else $as_nop
Zackery Spytz97e0de02020-04-09 06:03:49 -060012496
Pablo Galindocc115e52021-08-02 20:06:40 +010012497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12498printf "%s\n" "no" >&6; }
Zackery Spytz97e0de02020-04-09 06:03:49 -060012499
12500fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012501rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz97e0de02020-04-09 06:03:49 -060012502
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012503# Check for --with-doc-strings
Pablo Galindocc115e52021-08-02 20:06:40 +010012504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
12505printf %s "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507# Check whether --with-doc-strings was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010012508if test ${with_doc_strings+y}
12509then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510 withval=$with_doc_strings;
12511fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012512
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012513
12514if test -z "$with_doc_strings"
12515then with_doc_strings="yes"
12516fi
12517if test "$with_doc_strings" != "no"
12518then
12519
Pablo Galindocc115e52021-08-02 20:06:40 +010012520printf "%s\n" "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012521
12522fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
12524printf "%s\n" "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012525
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000012526# Check for Python-specific malloc support
Pablo Galindocc115e52021-08-02 20:06:40 +010012527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
12528printf %s "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530# Check whether --with-pymalloc was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010012531if test ${with_pymalloc+y}
12532then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533 withval=$with_pymalloc;
12534fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012535
Neil Schemenauera35c6882001-02-27 04:45:05 +000012536
Neil Schemenauer16c22972002-03-22 15:34:49 +000012537if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012538then
12539 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000012540fi
12541if test "$with_pymalloc" != "no"
12542then
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Pablo Galindocc115e52021-08-02 20:06:40 +010012544printf "%s\n" "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000012545
12546fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
12548printf "%s\n" "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000012549
Nick Coghlan6ea41862017-06-11 13:16:15 +100012550# Check for --with-c-locale-coercion
Pablo Galindocc115e52021-08-02 20:06:40 +010012551{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
12552printf %s "checking for --with-c-locale-coercion... " >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012553
12554# Check whether --with-c-locale-coercion was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010012555if test ${with_c_locale_coercion+y}
12556then :
Nick Coghlan6ea41862017-06-11 13:16:15 +100012557 withval=$with_c_locale_coercion;
12558fi
12559
12560
12561if test -z "$with_c_locale_coercion"
12562then
12563 with_c_locale_coercion="yes"
12564fi
12565if test "$with_c_locale_coercion" != "no"
12566then
12567
Pablo Galindocc115e52021-08-02 20:06:40 +010012568printf "%s\n" "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
Nick Coghlan6ea41862017-06-11 13:16:15 +100012569
12570fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
12572printf "%s\n" "$with_c_locale_coercion" >&6; }
Nick Coghlan6ea41862017-06-11 13:16:15 +100012573
Benjamin Peterson05159c42009-12-03 03:01:27 +000012574# Check for Valgrind support
Pablo Galindocc115e52021-08-02 20:06:40 +010012575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
12576printf %s "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012577
12578# Check whether --with-valgrind was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010012579if test ${with_valgrind+y}
12580then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012581 withval=$with_valgrind;
Pablo Galindocc115e52021-08-02 20:06:40 +010012582else $as_nop
Benjamin Peterson05159c42009-12-03 03:01:27 +000012583 with_valgrind=no
12584fi
12585
Pablo Galindocc115e52021-08-02 20:06:40 +010012586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
12587printf "%s\n" "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000012588if test "$with_valgrind" != no; then
Pablo Galindocc115e52021-08-02 20:06:40 +010012589 ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
12590if test "x$ac_cv_header_valgrind_valgrind_h" = xyes
12591then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000012592
Pablo Galindocc115e52021-08-02 20:06:40 +010012593printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000012594
Pablo Galindocc115e52021-08-02 20:06:40 +010012595else $as_nop
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012596 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000012597
12598fi
12599
Jeffrey Yasskin39370832010-05-03 19:29:34 +000012600 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000012601fi
12602
Łukasz Langaa785c872016-09-09 17:37:37 -070012603# Check for DTrace support
Pablo Galindocc115e52021-08-02 20:06:40 +010012604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
12605printf %s "checking for --with-dtrace... " >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012606
12607# Check whether --with-dtrace was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010012608if test ${with_dtrace+y}
12609then :
Łukasz Langaa785c872016-09-09 17:37:37 -070012610 withval=$with_dtrace;
Pablo Galindocc115e52021-08-02 20:06:40 +010012611else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012612 with_dtrace=no
12613fi
12614
Pablo Galindocc115e52021-08-02 20:06:40 +010012615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
12616printf "%s\n" "$with_dtrace" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012617
12618
12619
12620
12621
12622DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070012623DTRACE_HEADERS=
12624DTRACE_OBJS=
12625
12626if test "$with_dtrace" = "yes"
12627then
12628 # Extract the first word of "dtrace", so it can be a program name with args.
12629set dummy dtrace; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +010012630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12631printf %s "checking for $ac_word... " >&6; }
12632if test ${ac_cv_path_DTRACE+y}
12633then :
12634 printf %s "(cached) " >&6
12635else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012636 case $DTRACE in
12637 [\\/]* | ?:[\\/]*)
12638 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
12639 ;;
12640 *)
12641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12642for as_dir in $PATH
12643do
12644 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +010012645 case $as_dir in #(((
12646 '') as_dir=./ ;;
12647 */) ;;
12648 *) as_dir=$as_dir/ ;;
12649 esac
Łukasz Langaa785c872016-09-09 17:37:37 -070012650 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +010012651 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
12652 ac_cv_path_DTRACE="$as_dir$ac_word$ac_exec_ext"
12653 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Łukasz Langaa785c872016-09-09 17:37:37 -070012654 break 2
12655 fi
12656done
12657 done
12658IFS=$as_save_IFS
12659
12660 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
12661 ;;
12662esac
12663fi
12664DTRACE=$ac_cv_path_DTRACE
12665if test -n "$DTRACE"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010012666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
12667printf "%s\n" "$DTRACE" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012668else
Pablo Galindocc115e52021-08-02 20:06:40 +010012669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670printf "%s\n" "no" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012671fi
12672
12673
12674 if test "$DTRACE" = "not found"; then
12675 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
12676 fi
12677
Pablo Galindocc115e52021-08-02 20:06:40 +010012678printf "%s\n" "#define WITH_DTRACE 1" >>confdefs.h
Łukasz Langaa785c872016-09-09 17:37:37 -070012679
12680 DTRACE_HEADERS="Include/pydtrace_probes.h"
12681
12682 # On OS X, DTrace providers do not need to be explicitly compiled and
12683 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
12684 # generation flag '-G'. We check for presence of this flag, rather than
12685 # hardcoding support by OS, in the interest of robustness.
Pablo Galindocc115e52021-08-02 20:06:40 +010012686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
12687printf %s "checking whether DTrace probes require linking... " >&6; }
12688if test ${ac_cv_dtrace_link+y}
12689then :
12690 printf %s "(cached) " >&6
12691else $as_nop
Łukasz Langaa785c872016-09-09 17:37:37 -070012692 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010012693 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010012694 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070012695 ac_cv_dtrace_link=yes
12696
12697fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
12699printf "%s\n" "$ac_cv_dtrace_link" >&6; }
Łukasz Langaa785c872016-09-09 17:37:37 -070012700 if test "$ac_cv_dtrace_link" = "yes"; then
12701 DTRACE_OBJS="Python/pydtrace.o"
12702 fi
12703fi
12704
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012705# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012706
Guido van Rossum98935bf2001-09-05 19:13:16 +000012707DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012708
Guido van Rossume97ee181999-12-20 21:27:22 +000012709# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060012710# platforms have dlopen(), but don't want to use it.
Pablo Galindocc115e52021-08-02 20:06:40 +010012711ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12712if test "x$ac_cv_func_dlopen" = xyes
12713then :
12714 printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012715
Guido van Rossume97ee181999-12-20 21:27:22 +000012716fi
12717
Michael W. Hudson54241132001-12-07 15:38:26 +000012718
Guido van Rossume97ee181999-12-20 21:27:22 +000012719# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12720# loading of modules.
12721
Pablo Galindocc115e52021-08-02 20:06:40 +010012722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
12723printf %s "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012724if test -z "$DYNLOADFILE"
12725then
12726 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000012727 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012728 *)
12729 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12730 # out any dynamic loading
12731 if test "$ac_cv_func_dlopen" = yes
12732 then DYNLOADFILE="dynload_shlib.o"
12733 else DYNLOADFILE="dynload_stub.o"
12734 fi
12735 ;;
12736 esac
12737fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
12739printf "%s\n" "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000012740if test "$DYNLOADFILE" != "dynload_stub.o"
12741then
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Pablo Galindocc115e52021-08-02 20:06:40 +010012743printf "%s\n" "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000012744
12745fi
12746
Neil Schemenauer4e425612001-06-19 15:44:15 +000012747# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12748
Michael W. Hudson54241132001-12-07 15:38:26 +000012749
Pablo Galindocc115e52021-08-02 20:06:40 +010012750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
12751printf %s "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000012752if test -z "$MACHDEP_OBJS"
12753then
Jack Jansene578a632001-08-15 01:27:14 +000012754 MACHDEP_OBJS=$extra_machdep_objs
12755else
12756 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012757fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012758if test -z "$MACHDEP_OBJS"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010012759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
12760printf "%s\n" "none" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012761else
Pablo Galindocc115e52021-08-02 20:06:40 +010012762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
12763printf "%s\n" "$MACHDEP_OBJS" >&6; }
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012764fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000012765
Guido van Rossum627b2d71993-12-24 10:39:16 +000012766# checks for library functions
Pablo Galindocc115e52021-08-02 20:06:40 +010012767ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm"
12768if test "x$ac_cv_func_alarm" = xyes
12769then :
12770 printf "%s\n" "#define HAVE_ALARM 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012771
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012772fi
Pablo Galindocc115e52021-08-02 20:06:40 +010012773ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
12774if test "x$ac_cv_func_accept4" = xyes
12775then :
12776 printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
12777
12778fi
12779ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
12780if test "x$ac_cv_func_setitimer" = xyes
12781then :
12782 printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
12783
12784fi
12785ac_fn_c_check_func "$LINENO" "getitimer" "ac_cv_func_getitimer"
12786if test "x$ac_cv_func_getitimer" = xyes
12787then :
12788 printf "%s\n" "#define HAVE_GETITIMER 1" >>confdefs.h
12789
12790fi
12791ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12792if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
12793then :
12794 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
12795
12796fi
12797ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
12798if test "x$ac_cv_func_chown" = xyes
12799then :
12800 printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
12801
12802fi
12803ac_fn_c_check_func "$LINENO" "clock" "ac_cv_func_clock"
12804if test "x$ac_cv_func_clock" = xyes
12805then :
12806 printf "%s\n" "#define HAVE_CLOCK 1" >>confdefs.h
12807
12808fi
12809ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
12810if test "x$ac_cv_func_confstr" = xyes
12811then :
12812 printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
12813
12814fi
12815ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range"
12816if test "x$ac_cv_func_close_range" = xyes
12817then :
12818 printf "%s\n" "#define HAVE_CLOSE_RANGE 1" >>confdefs.h
12819
12820fi
12821ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range"
12822if test "x$ac_cv_func_copy_file_range" = xyes
12823then :
12824 printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h
12825
12826fi
12827ac_fn_c_check_func "$LINENO" "ctermid" "ac_cv_func_ctermid"
12828if test "x$ac_cv_func_ctermid" = xyes
12829then :
12830 printf "%s\n" "#define HAVE_CTERMID 1" >>confdefs.h
12831
12832fi
12833ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
12834if test "x$ac_cv_func_dup3" = xyes
12835then :
12836 printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
12837
12838fi
12839ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
12840if test "x$ac_cv_func_execv" = xyes
12841then :
12842 printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h
12843
12844fi
12845ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
12846if test "x$ac_cv_func_explicit_bzero" = xyes
12847then :
12848 printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
12849
12850fi
12851ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
12852if test "x$ac_cv_func_explicit_memset" = xyes
12853then :
12854 printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h
12855
12856fi
12857ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
12858if test "x$ac_cv_func_faccessat" = xyes
12859then :
12860 printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h
12861
12862fi
12863ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
12864if test "x$ac_cv_func_fchmod" = xyes
12865then :
12866 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
12867
12868fi
12869ac_fn_c_check_func "$LINENO" "fchmodat" "ac_cv_func_fchmodat"
12870if test "x$ac_cv_func_fchmodat" = xyes
12871then :
12872 printf "%s\n" "#define HAVE_FCHMODAT 1" >>confdefs.h
12873
12874fi
12875ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
12876if test "x$ac_cv_func_fchown" = xyes
12877then :
12878 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
12879
12880fi
12881ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
12882if test "x$ac_cv_func_fchownat" = xyes
12883then :
12884 printf "%s\n" "#define HAVE_FCHOWNAT 1" >>confdefs.h
12885
12886fi
12887ac_fn_c_check_func "$LINENO" "fdwalk" "ac_cv_func_fdwalk"
12888if test "x$ac_cv_func_fdwalk" = xyes
12889then :
12890 printf "%s\n" "#define HAVE_FDWALK 1" >>confdefs.h
12891
12892fi
12893ac_fn_c_check_func "$LINENO" "fexecve" "ac_cv_func_fexecve"
12894if test "x$ac_cv_func_fexecve" = xyes
12895then :
12896 printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h
12897
12898fi
12899ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir"
12900if test "x$ac_cv_func_fdopendir" = xyes
12901then :
12902 printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h
12903
12904fi
12905ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
12906if test "x$ac_cv_func_fork" = xyes
12907then :
12908 printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h
12909
12910fi
12911ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf"
12912if test "x$ac_cv_func_fpathconf" = xyes
12913then :
12914 printf "%s\n" "#define HAVE_FPATHCONF 1" >>confdefs.h
12915
12916fi
12917ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
12918if test "x$ac_cv_func_fstatat" = xyes
12919then :
12920 printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
12921
12922fi
12923ac_fn_c_check_func "$LINENO" "ftime" "ac_cv_func_ftime"
12924if test "x$ac_cv_func_ftime" = xyes
12925then :
12926 printf "%s\n" "#define HAVE_FTIME 1" >>confdefs.h
12927
12928fi
12929ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
12930if test "x$ac_cv_func_ftruncate" = xyes
12931then :
12932 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
12933
12934fi
12935ac_fn_c_check_func "$LINENO" "futimesat" "ac_cv_func_futimesat"
12936if test "x$ac_cv_func_futimesat" = xyes
12937then :
12938 printf "%s\n" "#define HAVE_FUTIMESAT 1" >>confdefs.h
12939
12940fi
12941ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens"
12942if test "x$ac_cv_func_futimens" = xyes
12943then :
12944 printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h
12945
12946fi
12947ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes"
12948if test "x$ac_cv_func_futimes" = xyes
12949then :
12950 printf "%s\n" "#define HAVE_FUTIMES 1" >>confdefs.h
12951
12952fi
12953ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
12954if test "x$ac_cv_func_gai_strerror" = xyes
12955then :
12956 printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h
12957
12958fi
12959ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
12960if test "x$ac_cv_func_getentropy" = xyes
12961then :
12962 printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
12963
12964fi
12965ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r"
12966if test "x$ac_cv_func_getgrgid_r" = xyes
12967then :
12968 printf "%s\n" "#define HAVE_GETGRGID_R 1" >>confdefs.h
12969
12970fi
12971ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r"
12972if test "x$ac_cv_func_getgrnam_r" = xyes
12973then :
12974 printf "%s\n" "#define HAVE_GETGRNAM_R 1" >>confdefs.h
12975
12976fi
12977ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
12978if test "x$ac_cv_func_getgrouplist" = xyes
12979then :
12980 printf "%s\n" "#define HAVE_GETGROUPLIST 1" >>confdefs.h
12981
12982fi
12983ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
12984if test "x$ac_cv_func_getgroups" = xyes
12985then :
12986 printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h
12987
12988fi
12989ac_fn_c_check_func "$LINENO" "getlogin" "ac_cv_func_getlogin"
12990if test "x$ac_cv_func_getlogin" = xyes
12991then :
12992 printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h
12993
12994fi
12995ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
12996if test "x$ac_cv_func_getloadavg" = xyes
12997then :
12998 printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h
12999
13000fi
13001ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername"
13002if test "x$ac_cv_func_getpeername" = xyes
13003then :
13004 printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h
13005
13006fi
13007ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13008if test "x$ac_cv_func_getpgid" = xyes
13009then :
13010 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13011
13012fi
13013ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
13014if test "x$ac_cv_func_getpid" = xyes
13015then :
13016 printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h
13017
13018fi
13019ac_fn_c_check_func "$LINENO" "getpriority" "ac_cv_func_getpriority"
13020if test "x$ac_cv_func_getpriority" = xyes
13021then :
13022 printf "%s\n" "#define HAVE_GETPRIORITY 1" >>confdefs.h
13023
13024fi
13025ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid"
13026if test "x$ac_cv_func_getresuid" = xyes
13027then :
13028 printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h
13029
13030fi
13031ac_fn_c_check_func "$LINENO" "getresgid" "ac_cv_func_getresgid"
13032if test "x$ac_cv_func_getresgid" = xyes
13033then :
13034 printf "%s\n" "#define HAVE_GETRESGID 1" >>confdefs.h
13035
13036fi
13037ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13038if test "x$ac_cv_func_getpwent" = xyes
13039then :
13040 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13041
13042fi
13043ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r"
13044if test "x$ac_cv_func_getpwnam_r" = xyes
13045then :
13046 printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h
13047
13048fi
13049ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r"
13050if test "x$ac_cv_func_getpwuid_r" = xyes
13051then :
13052 printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h
13053
13054fi
13055ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
13056if test "x$ac_cv_func_getspnam" = xyes
13057then :
13058 printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h
13059
13060fi
13061ac_fn_c_check_func "$LINENO" "getspent" "ac_cv_func_getspent"
13062if test "x$ac_cv_func_getspent" = xyes
13063then :
13064 printf "%s\n" "#define HAVE_GETSPENT 1" >>confdefs.h
13065
13066fi
13067ac_fn_c_check_func "$LINENO" "getsid" "ac_cv_func_getsid"
13068if test "x$ac_cv_func_getsid" = xyes
13069then :
13070 printf "%s\n" "#define HAVE_GETSID 1" >>confdefs.h
13071
13072fi
13073ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13074if test "x$ac_cv_func_getwd" = xyes
13075then :
13076 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
13077
13078fi
13079ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex"
13080if test "x$ac_cv_func_if_nameindex" = xyes
13081then :
13082 printf "%s\n" "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
13083
13084fi
13085ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
13086if test "x$ac_cv_func_initgroups" = xyes
13087then :
13088 printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h
13089
13090fi
13091ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
13092if test "x$ac_cv_func_kill" = xyes
13093then :
13094 printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
13095
13096fi
13097ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg"
13098if test "x$ac_cv_func_killpg" = xyes
13099then :
13100 printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h
13101
13102fi
13103ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
13104if test "x$ac_cv_func_lchown" = xyes
13105then :
13106 printf "%s\n" "#define HAVE_LCHOWN 1" >>confdefs.h
13107
13108fi
13109ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf"
13110if test "x$ac_cv_func_lockf" = xyes
13111then :
13112 printf "%s\n" "#define HAVE_LOCKF 1" >>confdefs.h
13113
13114fi
13115ac_fn_c_check_func "$LINENO" "linkat" "ac_cv_func_linkat"
13116if test "x$ac_cv_func_linkat" = xyes
13117then :
13118 printf "%s\n" "#define HAVE_LINKAT 1" >>confdefs.h
13119
13120fi
13121ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13122if test "x$ac_cv_func_lstat" = xyes
13123then :
13124 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13125
13126fi
13127ac_fn_c_check_func "$LINENO" "lutimes" "ac_cv_func_lutimes"
13128if test "x$ac_cv_func_lutimes" = xyes
13129then :
13130 printf "%s\n" "#define HAVE_LUTIMES 1" >>confdefs.h
13131
13132fi
13133ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
13134if test "x$ac_cv_func_mmap" = xyes
13135then :
13136 printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
13137
13138fi
13139ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
13140if test "x$ac_cv_func_memrchr" = xyes
13141then :
13142 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
13143
13144fi
13145ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
13146if test "x$ac_cv_func_mbrtowc" = xyes
13147then :
13148 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
13149
13150fi
13151ac_fn_c_check_func "$LINENO" "mkdirat" "ac_cv_func_mkdirat"
13152if test "x$ac_cv_func_mkdirat" = xyes
13153then :
13154 printf "%s\n" "#define HAVE_MKDIRAT 1" >>confdefs.h
13155
13156fi
13157ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
13158if test "x$ac_cv_func_mkfifo" = xyes
13159then :
13160 printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h
13161
13162fi
13163ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise"
13164if test "x$ac_cv_func_madvise" = xyes
13165then :
13166 printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h
13167
13168fi
13169ac_fn_c_check_func "$LINENO" "mkfifoat" "ac_cv_func_mkfifoat"
13170if test "x$ac_cv_func_mkfifoat" = xyes
13171then :
13172 printf "%s\n" "#define HAVE_MKFIFOAT 1" >>confdefs.h
13173
13174fi
13175ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod"
13176if test "x$ac_cv_func_mknod" = xyes
13177then :
13178 printf "%s\n" "#define HAVE_MKNOD 1" >>confdefs.h
13179
13180fi
13181ac_fn_c_check_func "$LINENO" "mknodat" "ac_cv_func_mknodat"
13182if test "x$ac_cv_func_mknodat" = xyes
13183then :
13184 printf "%s\n" "#define HAVE_MKNODAT 1" >>confdefs.h
13185
13186fi
13187ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
13188if test "x$ac_cv_func_mktime" = xyes
13189then :
13190 printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h
13191
13192fi
13193ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap"
13194if test "x$ac_cv_func_mremap" = xyes
13195then :
13196 printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h
13197
13198fi
13199ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
13200if test "x$ac_cv_func_nice" = xyes
13201then :
13202 printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
13203
13204fi
13205ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
13206if test "x$ac_cv_func_openat" = xyes
13207then :
13208 printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h
13209
13210fi
13211ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
13212if test "x$ac_cv_func_pathconf" = xyes
13213then :
13214 printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h
13215
13216fi
13217ac_fn_c_check_func "$LINENO" "pause" "ac_cv_func_pause"
13218if test "x$ac_cv_func_pause" = xyes
13219then :
13220 printf "%s\n" "#define HAVE_PAUSE 1" >>confdefs.h
13221
13222fi
13223ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
13224if test "x$ac_cv_func_pipe2" = xyes
13225then :
13226 printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
13227
13228fi
13229ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
13230if test "x$ac_cv_func_plock" = xyes
13231then :
13232 printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h
13233
13234fi
13235ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
13236if test "x$ac_cv_func_poll" = xyes
13237then :
13238 printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
13239
13240fi
13241ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate"
13242if test "x$ac_cv_func_posix_fallocate" = xyes
13243then :
13244 printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h
13245
13246fi
13247ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13248if test "x$ac_cv_func_posix_fadvise" = xyes
13249then :
13250 printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
13251
13252fi
13253ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
13254if test "x$ac_cv_func_posix_spawn" = xyes
13255then :
13256 printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
13257
13258fi
13259ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
13260if test "x$ac_cv_func_posix_spawnp" = xyes
13261then :
13262 printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
13263
13264fi
13265ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
13266if test "x$ac_cv_func_pread" = xyes
13267then :
13268 printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h
13269
13270fi
13271ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv"
13272if test "x$ac_cv_func_preadv" = xyes
13273then :
13274 printf "%s\n" "#define HAVE_PREADV 1" >>confdefs.h
13275
13276fi
13277ac_fn_c_check_func "$LINENO" "preadv2" "ac_cv_func_preadv2"
13278if test "x$ac_cv_func_preadv2" = xyes
13279then :
13280 printf "%s\n" "#define HAVE_PREADV2 1" >>confdefs.h
13281
13282fi
13283ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock"
13284if test "x$ac_cv_func_pthread_condattr_setclock" = xyes
13285then :
13286 printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
13287
13288fi
13289ac_fn_c_check_func "$LINENO" "pthread_init" "ac_cv_func_pthread_init"
13290if test "x$ac_cv_func_pthread_init" = xyes
13291then :
13292 printf "%s\n" "#define HAVE_PTHREAD_INIT 1" >>confdefs.h
13293
13294fi
13295ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13296if test "x$ac_cv_func_pthread_kill" = xyes
13297then :
13298 printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
13299
13300fi
13301ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
13302if test "x$ac_cv_func_pwrite" = xyes
13303then :
13304 printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h
13305
13306fi
13307ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev"
13308if test "x$ac_cv_func_pwritev" = xyes
13309then :
13310 printf "%s\n" "#define HAVE_PWRITEV 1" >>confdefs.h
13311
13312fi
13313ac_fn_c_check_func "$LINENO" "pwritev2" "ac_cv_func_pwritev2"
13314if test "x$ac_cv_func_pwritev2" = xyes
13315then :
13316 printf "%s\n" "#define HAVE_PWRITEV2 1" >>confdefs.h
13317
13318fi
13319ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13320if test "x$ac_cv_func_readlink" = xyes
13321then :
13322 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13323
13324fi
13325ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
13326if test "x$ac_cv_func_readlinkat" = xyes
13327then :
13328 printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h
13329
13330fi
13331ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv"
13332if test "x$ac_cv_func_readv" = xyes
13333then :
13334 printf "%s\n" "#define HAVE_READV 1" >>confdefs.h
13335
13336fi
13337ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
13338if test "x$ac_cv_func_realpath" = xyes
13339then :
13340 printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
13341
13342fi
13343ac_fn_c_check_func "$LINENO" "renameat" "ac_cv_func_renameat"
13344if test "x$ac_cv_func_renameat" = xyes
13345then :
13346 printf "%s\n" "#define HAVE_RENAMEAT 1" >>confdefs.h
13347
13348fi
13349ac_fn_c_check_func "$LINENO" "sem_open" "ac_cv_func_sem_open"
13350if test "x$ac_cv_func_sem_open" = xyes
13351then :
13352 printf "%s\n" "#define HAVE_SEM_OPEN 1" >>confdefs.h
13353
13354fi
13355ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
13356if test "x$ac_cv_func_sem_timedwait" = xyes
13357then :
13358 printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
13359
13360fi
13361ac_fn_c_check_func "$LINENO" "sem_getvalue" "ac_cv_func_sem_getvalue"
13362if test "x$ac_cv_func_sem_getvalue" = xyes
13363then :
13364 printf "%s\n" "#define HAVE_SEM_GETVALUE 1" >>confdefs.h
13365
13366fi
13367ac_fn_c_check_func "$LINENO" "sem_unlink" "ac_cv_func_sem_unlink"
13368if test "x$ac_cv_func_sem_unlink" = xyes
13369then :
13370 printf "%s\n" "#define HAVE_SEM_UNLINK 1" >>confdefs.h
13371
13372fi
13373ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile"
13374if test "x$ac_cv_func_sendfile" = xyes
13375then :
13376 printf "%s\n" "#define HAVE_SENDFILE 1" >>confdefs.h
13377
13378fi
13379ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
13380if test "x$ac_cv_func_setegid" = xyes
13381then :
13382 printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
13383
13384fi
13385ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
13386if test "x$ac_cv_func_seteuid" = xyes
13387then :
13388 printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
13389
13390fi
13391ac_fn_c_check_func "$LINENO" "setgid" "ac_cv_func_setgid"
13392if test "x$ac_cv_func_setgid" = xyes
13393then :
13394 printf "%s\n" "#define HAVE_SETGID 1" >>confdefs.h
13395
13396fi
13397ac_fn_c_check_func "$LINENO" "sethostname" "ac_cv_func_sethostname"
13398if test "x$ac_cv_func_sethostname" = xyes
13399then :
13400 printf "%s\n" "#define HAVE_SETHOSTNAME 1" >>confdefs.h
13401
13402fi
13403ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
13404if test "x$ac_cv_func_setlocale" = xyes
13405then :
13406 printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
13407
13408fi
13409ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
13410if test "x$ac_cv_func_setregid" = xyes
13411then :
13412 printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h
13413
13414fi
13415ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
13416if test "x$ac_cv_func_setreuid" = xyes
13417then :
13418 printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h
13419
13420fi
13421ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
13422if test "x$ac_cv_func_setresuid" = xyes
13423then :
13424 printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
13425
13426fi
13427ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
13428if test "x$ac_cv_func_setresgid" = xyes
13429then :
13430 printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
13431
13432fi
13433ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13434if test "x$ac_cv_func_setsid" = xyes
13435then :
13436 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13437
13438fi
13439ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13440if test "x$ac_cv_func_setpgid" = xyes
13441then :
13442 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13443
13444fi
13445ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
13446if test "x$ac_cv_func_setpgrp" = xyes
13447then :
13448 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
13449
13450fi
13451ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
13452if test "x$ac_cv_func_setpriority" = xyes
13453then :
13454 printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
13455
13456fi
13457ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid"
13458if test "x$ac_cv_func_setuid" = xyes
13459then :
13460 printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h
13461
13462fi
13463ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
13464if test "x$ac_cv_func_setvbuf" = xyes
13465then :
13466 printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
13467
13468fi
13469ac_fn_c_check_func "$LINENO" "sched_get_priority_max" "ac_cv_func_sched_get_priority_max"
13470if test "x$ac_cv_func_sched_get_priority_max" = xyes
13471then :
13472 printf "%s\n" "#define HAVE_SCHED_GET_PRIORITY_MAX 1" >>confdefs.h
13473
13474fi
13475ac_fn_c_check_func "$LINENO" "sched_setaffinity" "ac_cv_func_sched_setaffinity"
13476if test "x$ac_cv_func_sched_setaffinity" = xyes
13477then :
13478 printf "%s\n" "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
13479
13480fi
13481ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
13482if test "x$ac_cv_func_sched_setscheduler" = xyes
13483then :
13484 printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
13485
13486fi
13487ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
13488if test "x$ac_cv_func_sched_setparam" = xyes
13489then :
13490 printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
13491
13492fi
13493ac_fn_c_check_func "$LINENO" "sched_rr_get_interval" "ac_cv_func_sched_rr_get_interval"
13494if test "x$ac_cv_func_sched_rr_get_interval" = xyes
13495then :
13496 printf "%s\n" "#define HAVE_SCHED_RR_GET_INTERVAL 1" >>confdefs.h
13497
13498fi
13499ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13500if test "x$ac_cv_func_sigaction" = xyes
13501then :
13502 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13503
13504fi
13505ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13506if test "x$ac_cv_func_sigaltstack" = xyes
13507then :
13508 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13509
13510fi
13511ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset"
13512if test "x$ac_cv_func_sigfillset" = xyes
13513then :
13514 printf "%s\n" "#define HAVE_SIGFILLSET 1" >>confdefs.h
13515
13516fi
13517ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt"
13518if test "x$ac_cv_func_siginterrupt" = xyes
13519then :
13520 printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h
13521
13522fi
13523ac_fn_c_check_func "$LINENO" "sigpending" "ac_cv_func_sigpending"
13524if test "x$ac_cv_func_sigpending" = xyes
13525then :
13526 printf "%s\n" "#define HAVE_SIGPENDING 1" >>confdefs.h
13527
13528fi
13529ac_fn_c_check_func "$LINENO" "sigrelse" "ac_cv_func_sigrelse"
13530if test "x$ac_cv_func_sigrelse" = xyes
13531then :
13532 printf "%s\n" "#define HAVE_SIGRELSE 1" >>confdefs.h
13533
13534fi
13535ac_fn_c_check_func "$LINENO" "sigtimedwait" "ac_cv_func_sigtimedwait"
13536if test "x$ac_cv_func_sigtimedwait" = xyes
13537then :
13538 printf "%s\n" "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h
13539
13540fi
13541ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
13542if test "x$ac_cv_func_sigwait" = xyes
13543then :
13544 printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
13545
13546fi
13547ac_fn_c_check_func "$LINENO" "sigwaitinfo" "ac_cv_func_sigwaitinfo"
13548if test "x$ac_cv_func_sigwaitinfo" = xyes
13549then :
13550 printf "%s\n" "#define HAVE_SIGWAITINFO 1" >>confdefs.h
13551
13552fi
13553ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13554if test "x$ac_cv_func_snprintf" = xyes
13555then :
13556 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
13557
13558fi
13559ac_fn_c_check_func "$LINENO" "splice" "ac_cv_func_splice"
13560if test "x$ac_cv_func_splice" = xyes
13561then :
13562 printf "%s\n" "#define HAVE_SPLICE 1" >>confdefs.h
13563
13564fi
13565ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13566if test "x$ac_cv_func_strftime" = xyes
13567then :
13568 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13569
13570fi
13571ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13572if test "x$ac_cv_func_strlcpy" = xyes
13573then :
13574 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
13575
13576fi
13577ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
13578if test "x$ac_cv_func_strsignal" = xyes
13579then :
13580 printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
13581
13582fi
13583ac_fn_c_check_func "$LINENO" "symlinkat" "ac_cv_func_symlinkat"
13584if test "x$ac_cv_func_symlinkat" = xyes
13585then :
13586 printf "%s\n" "#define HAVE_SYMLINKAT 1" >>confdefs.h
13587
13588fi
13589ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
13590if test "x$ac_cv_func_sync" = xyes
13591then :
13592 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
13593
13594fi
13595ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
13596if test "x$ac_cv_func_sysconf" = xyes
13597then :
13598 printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
13599
13600fi
13601ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp"
13602if test "x$ac_cv_func_tcgetpgrp" = xyes
13603then :
13604 printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h
13605
13606fi
13607ac_fn_c_check_func "$LINENO" "tcsetpgrp" "ac_cv_func_tcsetpgrp"
13608if test "x$ac_cv_func_tcsetpgrp" = xyes
13609then :
13610 printf "%s\n" "#define HAVE_TCSETPGRP 1" >>confdefs.h
13611
13612fi
13613ac_fn_c_check_func "$LINENO" "tempnam" "ac_cv_func_tempnam"
13614if test "x$ac_cv_func_tempnam" = xyes
13615then :
13616 printf "%s\n" "#define HAVE_TEMPNAM 1" >>confdefs.h
13617
13618fi
13619ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
13620if test "x$ac_cv_func_timegm" = xyes
13621then :
13622 printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
13623
13624fi
13625ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
13626if test "x$ac_cv_func_times" = xyes
13627then :
13628 printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h
13629
13630fi
13631ac_fn_c_check_func "$LINENO" "tmpfile" "ac_cv_func_tmpfile"
13632if test "x$ac_cv_func_tmpfile" = xyes
13633then :
13634 printf "%s\n" "#define HAVE_TMPFILE 1" >>confdefs.h
13635
13636fi
13637ac_fn_c_check_func "$LINENO" "tmpnam" "ac_cv_func_tmpnam"
13638if test "x$ac_cv_func_tmpnam" = xyes
13639then :
13640 printf "%s\n" "#define HAVE_TMPNAM 1" >>confdefs.h
13641
13642fi
13643ac_fn_c_check_func "$LINENO" "tmpnam_r" "ac_cv_func_tmpnam_r"
13644if test "x$ac_cv_func_tmpnam_r" = xyes
13645then :
13646 printf "%s\n" "#define HAVE_TMPNAM_R 1" >>confdefs.h
13647
13648fi
13649ac_fn_c_check_func "$LINENO" "truncate" "ac_cv_func_truncate"
13650if test "x$ac_cv_func_truncate" = xyes
13651then :
13652 printf "%s\n" "#define HAVE_TRUNCATE 1" >>confdefs.h
13653
13654fi
13655ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
13656if test "x$ac_cv_func_uname" = xyes
13657then :
13658 printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
13659
13660fi
13661ac_fn_c_check_func "$LINENO" "unlinkat" "ac_cv_func_unlinkat"
13662if test "x$ac_cv_func_unlinkat" = xyes
13663then :
13664 printf "%s\n" "#define HAVE_UNLINKAT 1" >>confdefs.h
13665
13666fi
13667ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat"
13668if test "x$ac_cv_func_utimensat" = xyes
13669then :
13670 printf "%s\n" "#define HAVE_UTIMENSAT 1" >>confdefs.h
13671
13672fi
13673ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13674if test "x$ac_cv_func_utimes" = xyes
13675then :
13676 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13677
13678fi
13679ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
13680if test "x$ac_cv_func_vfork" = xyes
13681then :
13682 printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
13683
13684fi
13685ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
13686if test "x$ac_cv_func_waitid" = xyes
13687then :
13688 printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
13689
13690fi
13691ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
13692if test "x$ac_cv_func_waitpid" = xyes
13693then :
13694 printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
13695
13696fi
13697ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
13698if test "x$ac_cv_func_wait3" = xyes
13699then :
13700 printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h
13701
13702fi
13703ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4"
13704if test "x$ac_cv_func_wait4" = xyes
13705then :
13706 printf "%s\n" "#define HAVE_WAIT4 1" >>confdefs.h
13707
13708fi
13709ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
13710if test "x$ac_cv_func_wcscoll" = xyes
13711then :
13712 printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h
13713
13714fi
13715ac_fn_c_check_func "$LINENO" "wcsftime" "ac_cv_func_wcsftime"
13716if test "x$ac_cv_func_wcsftime" = xyes
13717then :
13718 printf "%s\n" "#define HAVE_WCSFTIME 1" >>confdefs.h
13719
13720fi
13721ac_fn_c_check_func "$LINENO" "wcsxfrm" "ac_cv_func_wcsxfrm"
13722if test "x$ac_cv_func_wcsxfrm" = xyes
13723then :
13724 printf "%s\n" "#define HAVE_WCSXFRM 1" >>confdefs.h
13725
13726fi
13727ac_fn_c_check_func "$LINENO" "wmemcmp" "ac_cv_func_wmemcmp"
13728if test "x$ac_cv_func_wmemcmp" = xyes
13729then :
13730 printf "%s\n" "#define HAVE_WMEMCMP 1" >>confdefs.h
13731
13732fi
13733ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev"
13734if test "x$ac_cv_func_writev" = xyes
13735then :
13736 printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h
13737
13738fi
13739ac_fn_c_check_func "$LINENO" "_getpty" "ac_cv_func__getpty"
13740if test "x$ac_cv_func__getpty" = xyes
13741then :
13742 printf "%s\n" "#define HAVE__GETPTY 1" >>confdefs.h
13743
13744fi
13745ac_fn_c_check_func "$LINENO" "rtpSpawn" "ac_cv_func_rtpSpawn"
13746if test "x$ac_cv_func_rtpSpawn" = xyes
13747then :
13748 printf "%s\n" "#define HAVE_RTPSPAWN 1" >>confdefs.h
13749
13750fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013751
Michael W. Hudson54241132001-12-07 15:38:26 +000013752
Benjamin Peterson40caa052018-09-12 15:52:40 -070013753# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
13754# links. Some libc implementations have a stub lchmod implementation that always
13755# returns an error.
13756if test "$MACHDEP" != linux; then
13757 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
Pablo Galindocc115e52021-08-02 20:06:40 +010013758if test "x$ac_cv_func_lchmod" = xyes
13759then :
13760 printf "%s\n" "#define HAVE_LCHMOD 1" >>confdefs.h
13761
13762fi
13763
13764fi
13765
13766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
13767printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
13768if test ${ac_cv_c_undeclared_builtin_options+y}
13769then :
13770 printf %s "(cached) " >&6
13771else $as_nop
13772 ac_save_CFLAGS=$CFLAGS
13773 ac_cv_c_undeclared_builtin_options='cannot detect'
13774 for ac_arg in '' -fno-builtin; do
13775 CFLAGS="$ac_save_CFLAGS $ac_arg"
13776 # This test program should *not* compile successfully.
13777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13778/* end confdefs.h. */
13779
13780int
13781main (void)
13782{
13783(void) strchr;
13784 ;
13785 return 0;
13786}
Benjamin Petersoned709d52018-09-12 17:22:11 -070013787_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010013788if ac_fn_c_try_compile "$LINENO"
13789then :
13790
13791else $as_nop
13792 # This test program should compile successfully.
13793 # No library function is consistently available on
13794 # freestanding implementations, so test against a dummy
13795 # declaration. Include always-available headers on the
13796 # off chance that they somehow elicit warnings.
13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13798/* end confdefs.h. */
13799#include <float.h>
13800#include <limits.h>
13801#include <stdarg.h>
13802#include <stddef.h>
13803extern void ac_decl (int, char *);
13804
13805int
13806main (void)
13807{
13808(void) ac_decl (0, (char *) 0);
13809 (void) ac_decl;
13810
13811 ;
13812 return 0;
13813}
13814_ACEOF
13815if ac_fn_c_try_compile "$LINENO"
13816then :
13817 if test x"$ac_arg" = x
13818then :
13819 ac_cv_c_undeclared_builtin_options='none needed'
13820else $as_nop
13821 ac_cv_c_undeclared_builtin_options=$ac_arg
13822fi
13823 break
13824fi
13825rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13826fi
13827rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13828 done
13829 CFLAGS=$ac_save_CFLAGS
Benjamin Peterson40caa052018-09-12 15:52:40 -070013830
13831fi
Pablo Galindocc115e52021-08-02 20:06:40 +010013832{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
13833printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
13834 case $ac_cv_c_undeclared_builtin_options in #(
13835 'cannot detect') :
13836 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13837printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13838as_fn_error $? "cannot make $CC report undeclared builtins
13839See \`config.log' for more details" "$LINENO" 5; } ;; #(
13840 'none needed') :
13841 ac_c_undeclared_builtin_options='' ;; #(
13842 *) :
13843 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
13844esac
Benjamin Peterson40caa052018-09-12 15:52:40 -070013845
Pablo Galindocc115e52021-08-02 20:06:40 +010013846ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013847 #include <dirent.h>
Pablo Galindocc115e52021-08-02 20:06:40 +010013848" "$ac_c_undeclared_builtin_options" "CFLAGS"
13849if test "x$ac_cv_have_decl_dirfd" = xyes
13850then :
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013851
Pablo Galindocc115e52021-08-02 20:06:40 +010013852printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Gregory P. Smithdf300d52012-01-21 18:20:15 -080013853
13854fi
13855
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013856# For some functions, having a definition is not sufficient, since
13857# we want to take their address.
Pablo Galindocc115e52021-08-02 20:06:40 +010013858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
13859printf %s "checking for chroot... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013861/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013862#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013863int
Pablo Galindocc115e52021-08-02 20:06:40 +010013864main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013865{
13866void *x=chroot
13867 ;
13868 return 0;
13869}
13870_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010013871if ac_fn_c_try_compile "$LINENO"
13872then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013873
Pablo Galindocc115e52021-08-02 20:06:40 +010013874printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013875
Pablo Galindocc115e52021-08-02 20:06:40 +010013876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13877printf "%s\n" "yes" >&6; }
13878else $as_nop
13879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13880printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013881
13882fi
Pablo Galindocc115e52021-08-02 20:06:40 +010013883rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for link" >&5
13885printf %s "checking for link... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013887/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013888#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013889int
Pablo Galindocc115e52021-08-02 20:06:40 +010013890main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013891{
13892void *x=link
13893 ;
13894 return 0;
13895}
13896_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010013897if ac_fn_c_try_compile "$LINENO"
13898then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013899
Pablo Galindocc115e52021-08-02 20:06:40 +010013900printf "%s\n" "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013901
Pablo Galindocc115e52021-08-02 20:06:40 +010013902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13903printf "%s\n" "yes" >&6; }
13904else $as_nop
13905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13906printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013907
13908fi
Pablo Galindocc115e52021-08-02 20:06:40 +010013909rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
13911printf %s "checking for symlink... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013913/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013914#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013915int
Pablo Galindocc115e52021-08-02 20:06:40 +010013916main (void)
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013917{
13918void *x=symlink
13919 ;
13920 return 0;
13921}
13922_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010013923if ac_fn_c_try_compile "$LINENO"
13924then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013925
Pablo Galindocc115e52021-08-02 20:06:40 +010013926printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013927
Pablo Galindocc115e52021-08-02 20:06:40 +010013928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13929printf "%s\n" "yes" >&6; }
13930else $as_nop
13931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13932printf "%s\n" "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013933
13934fi
Pablo Galindocc115e52021-08-02 20:06:40 +010013935rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
13937printf %s "checking for fchdir... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013939/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013940#include <unistd.h>
13941int
Pablo Galindocc115e52021-08-02 20:06:40 +010013942main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013943{
13944void *x=fchdir
13945 ;
13946 return 0;
13947}
13948_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010013949if ac_fn_c_try_compile "$LINENO"
13950then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013951
Pablo Galindocc115e52021-08-02 20:06:40 +010013952printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013953
Pablo Galindocc115e52021-08-02 20:06:40 +010013954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13955printf "%s\n" "yes" >&6; }
13956else $as_nop
13957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13958printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013959
13960fi
Pablo Galindocc115e52021-08-02 20:06:40 +010013961rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
13963printf %s "checking for fsync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013965/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013966#include <unistd.h>
13967int
Pablo Galindocc115e52021-08-02 20:06:40 +010013968main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013969{
13970void *x=fsync
13971 ;
13972 return 0;
13973}
13974_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010013975if ac_fn_c_try_compile "$LINENO"
13976then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013977
Pablo Galindocc115e52021-08-02 20:06:40 +010013978printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013979
Pablo Galindocc115e52021-08-02 20:06:40 +010013980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13981printf "%s\n" "yes" >&6; }
13982else $as_nop
13983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13984printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013985
13986fi
Pablo Galindocc115e52021-08-02 20:06:40 +010013987rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
13989printf %s "checking for fdatasync... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000013990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013991/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013992#include <unistd.h>
13993int
Pablo Galindocc115e52021-08-02 20:06:40 +010013994main (void)
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013995{
13996void *x=fdatasync
13997 ;
13998 return 0;
13999}
14000_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014001if ac_fn_c_try_compile "$LINENO"
14002then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014003
Pablo Galindocc115e52021-08-02 20:06:40 +010014004printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014005
Pablo Galindocc115e52021-08-02 20:06:40 +010014006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14007printf "%s\n" "yes" >&6; }
14008else $as_nop
14009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14010printf "%s\n" "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014011
14012fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014013rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
14015printf %s "checking for epoll... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014017/* end confdefs.h. */
14018#include <sys/epoll.h>
14019int
Pablo Galindocc115e52021-08-02 20:06:40 +010014020main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014021{
14022void *x=epoll_create
14023 ;
14024 return 0;
14025}
14026_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014027if ac_fn_c_try_compile "$LINENO"
14028then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014029
Pablo Galindocc115e52021-08-02 20:06:40 +010014030printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014031
Pablo Galindocc115e52021-08-02 20:06:40 +010014032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14033printf "%s\n" "yes" >&6; }
14034else $as_nop
14035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14036printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014037
14038fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014039rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
14041printf %s "checking for epoll_create1... " >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043/* end confdefs.h. */
14044#include <sys/epoll.h>
14045int
Pablo Galindocc115e52021-08-02 20:06:40 +010014046main (void)
Benjamin Peterson95c16622011-12-27 15:36:32 -060014047{
14048void *x=epoll_create1
14049 ;
14050 return 0;
14051}
14052_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014053if ac_fn_c_try_compile "$LINENO"
14054then :
Benjamin Peterson95c16622011-12-27 15:36:32 -060014055
Pablo Galindocc115e52021-08-02 20:06:40 +010014056printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
Benjamin Peterson95c16622011-12-27 15:36:32 -060014057
Pablo Galindocc115e52021-08-02 20:06:40 +010014058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14059printf "%s\n" "yes" >&6; }
14060else $as_nop
14061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14062printf "%s\n" "no" >&6; }
Benjamin Peterson95c16622011-12-27 15:36:32 -060014063
14064fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014065rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
14067printf %s "checking for kqueue... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014069/* end confdefs.h. */
14070
14071#include <sys/types.h>
14072#include <sys/event.h>
14073
14074int
Pablo Galindocc115e52021-08-02 20:06:40 +010014075main (void)
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014076{
14077int x=kqueue()
14078 ;
14079 return 0;
14080}
14081_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014082if ac_fn_c_try_compile "$LINENO"
14083then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014084
Pablo Galindocc115e52021-08-02 20:06:40 +010014085printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014086
Pablo Galindocc115e52021-08-02 20:06:40 +010014087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14088printf "%s\n" "yes" >&6; }
14089else $as_nop
14090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14091printf "%s\n" "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000014092
14093fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014094rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
14096printf %s "checking for prlimit... " >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14098/* end confdefs.h. */
14099
14100#include <sys/time.h>
14101#include <sys/resource.h>
14102
14103int
Pablo Galindocc115e52021-08-02 20:06:40 +010014104main (void)
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014105{
14106void *x=prlimit
14107 ;
14108 return 0;
14109}
14110_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014111if ac_fn_c_try_compile "$LINENO"
14112then :
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014113
Pablo Galindocc115e52021-08-02 20:06:40 +010014114printf "%s\n" "#define HAVE_PRLIMIT 1" >>confdefs.h
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014115
Pablo Galindocc115e52021-08-02 20:06:40 +010014116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14117printf "%s\n" "yes" >&6; }
14118else $as_nop
14119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14120printf "%s\n" "no" >&6; }
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014121
14122fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014123rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
14125printf %s "checking for _dyld_shared_cache_contains_path... " >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14127/* end confdefs.h. */
14128#include <mach-o/dyld.h>
14129int
Pablo Galindocc115e52021-08-02 20:06:40 +010014130main (void)
Ronald Oussoren41761932020-11-08 10:05:27 +010014131{
14132void *x=_dyld_shared_cache_contains_path
14133 ;
14134 return 0;
14135}
14136_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014137if ac_fn_c_try_compile "$LINENO"
14138then :
Ronald Oussoren41761932020-11-08 10:05:27 +010014139
Pablo Galindocc115e52021-08-02 20:06:40 +010014140printf "%s\n" "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
Ronald Oussoren41761932020-11-08 10:05:27 +010014141
Pablo Galindocc115e52021-08-02 20:06:40 +010014142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14143printf "%s\n" "yes" >&6; }
14144else $as_nop
14145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14146printf "%s\n" "no" >&6; }
Ronald Oussoren41761932020-11-08 10:05:27 +010014147
14148fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014149rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020014150
Pablo Galindocc115e52021-08-02 20:06:40 +010014151{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
14152printf %s "checking for memfd_create... " >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14154/* end confdefs.h. */
14155
14156#ifdef HAVE_SYS_MMAN_H
14157#include <sys/mman.h>
14158#endif
14159#ifdef HAVE_SYS_MEMFD_H
14160#include <sys/memfd.h>
14161#endif
14162
14163int
Pablo Galindocc115e52021-08-02 20:06:40 +010014164main (void)
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014165{
14166void *x=memfd_create
14167 ;
14168 return 0;
14169}
14170_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014171if ac_fn_c_try_compile "$LINENO"
14172then :
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014173
Pablo Galindocc115e52021-08-02 20:06:40 +010014174printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014175
Pablo Galindocc115e52021-08-02 20:06:40 +010014176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14177printf "%s\n" "yes" >&6; }
14178else $as_nop
14179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14180printf "%s\n" "no" >&6; }
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014181
14182fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014183rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Zackery Spytz43fdbd22019-05-29 13:57:07 -060014184
Pablo Galindocc115e52021-08-02 20:06:40 +010014185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
14186printf %s "checking for eventfd... " >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14188/* end confdefs.h. */
14189
14190#ifdef HAVE_SYS_EVENTFD_H
14191#include <sys/eventfd.h>
14192#endif
14193
14194int
Pablo Galindocc115e52021-08-02 20:06:40 +010014195main (void)
Christian Heimescd9fed62020-11-13 19:48:52 +010014196{
14197int x = eventfd(0, EFD_CLOEXEC)
14198 ;
14199 return 0;
14200}
14201_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014202if ac_fn_c_try_compile "$LINENO"
14203then :
Christian Heimescd9fed62020-11-13 19:48:52 +010014204
Pablo Galindocc115e52021-08-02 20:06:40 +010014205printf "%s\n" "#define HAVE_EVENTFD 1" >>confdefs.h
Christian Heimescd9fed62020-11-13 19:48:52 +010014206
Pablo Galindocc115e52021-08-02 20:06:40 +010014207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14208printf "%s\n" "yes" >&6; }
14209else $as_nop
14210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14211printf "%s\n" "no" >&6; }
Christian Heimescd9fed62020-11-13 19:48:52 +010014212
14213fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014214rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimescd9fed62020-11-13 19:48:52 +010014215
Martin v. Löwisd5843682002-11-21 20:41:28 +000014216# On some systems (eg. FreeBSD 5), we would find a definition of the
14217# functions ctermid_r, setgroups in the library, but no prototype
14218# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14219# address to avoid compiler warnings and potential miscompilations
14220# because of the missing prototypes.
14221
Pablo Galindocc115e52021-08-02 20:06:40 +010014222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
14223printf %s "checking for ctermid_r... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014225/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014226
Martin v. Löwisd5843682002-11-21 20:41:28 +000014227#include <stdio.h>
14228
Martin v. Löwisd5843682002-11-21 20:41:28 +000014229int
Pablo Galindocc115e52021-08-02 20:06:40 +010014230main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014231{
14232void* p = ctermid_r
14233 ;
14234 return 0;
14235}
14236_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014237if ac_fn_c_try_compile "$LINENO"
14238then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014239
Pablo Galindocc115e52021-08-02 20:06:40 +010014240printf "%s\n" "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014241
Pablo Galindocc115e52021-08-02 20:06:40 +010014242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14243printf "%s\n" "yes" >&6; }
14244else $as_nop
14245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14246printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014247
14248fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014249rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250
Pablo Galindocc115e52021-08-02 20:06:40 +010014251{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
14252printf %s "checking for flock declaration... " >&6; }
14253if test ${ac_cv_flock_decl+y}
14254then :
14255 printf %s "(cached) " >&6
14256else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014258/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014259#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014260int
Pablo Galindocc115e52021-08-02 20:06:40 +010014261main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014262{
14263void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014264
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014265 ;
14266 return 0;
14267}
14268_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014269if ac_fn_c_try_compile "$LINENO"
14270then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014271 ac_cv_flock_decl=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014272else $as_nop
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014273 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014274
14275fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014276rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000014277
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014278fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
14280printf "%s\n" "$ac_cv_flock_decl" >&6; }
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014281if test "x${ac_cv_flock_decl}" = xyes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010014282
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014283 for ac_func in flock
14284do :
14285 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Pablo Galindocc115e52021-08-02 20:06:40 +010014286if test "x$ac_cv_func_flock" = xyes
14287then :
14288 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014289
Pablo Galindocc115e52021-08-02 20:06:40 +010014290else $as_nop
14291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
14292printf %s "checking for flock in -lbsd... " >&6; }
14293if test ${ac_cv_lib_bsd_flock+y}
14294then :
14295 printf %s "(cached) " >&6
14296else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014297 ac_check_lib_save_LIBS=$LIBS
14298LIBS="-lbsd $LIBS"
14299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14300/* end confdefs.h. */
14301
14302/* Override any GCC internal prototype to avoid an error.
14303 Use char because int might match the return type of a GCC
14304 builtin and then its argument prototype would still apply. */
Antoine Pitroua3000072010-09-07 14:52:42 +000014305char flock ();
14306int
Pablo Galindocc115e52021-08-02 20:06:40 +010014307main (void)
Antoine Pitroua3000072010-09-07 14:52:42 +000014308{
14309return flock ();
14310 ;
14311 return 0;
14312}
14313_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014314if ac_fn_c_try_link "$LINENO"
14315then :
Antoine Pitroua3000072010-09-07 14:52:42 +000014316 ac_cv_lib_bsd_flock=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014317else $as_nop
Antoine Pitroua3000072010-09-07 14:52:42 +000014318 ac_cv_lib_bsd_flock=no
14319fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014320rm -f core conftest.err conftest.$ac_objext conftest.beam \
Antoine Pitroua3000072010-09-07 14:52:42 +000014321 conftest$ac_exeext conftest.$ac_ext
14322LIBS=$ac_check_lib_save_LIBS
14323fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
14325printf "%s\n" "$ac_cv_lib_bsd_flock" >&6; }
14326if test "x$ac_cv_lib_bsd_flock" = xyes
14327then :
14328 printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014329
14330
Pablo Galindocc115e52021-08-02 20:06:40 +010014331printf "%s\n" "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000014332
14333
14334fi
14335
14336
14337fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014338
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000014339done
Antoine Pitroua3000072010-09-07 14:52:42 +000014340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341
Pablo Galindocc115e52021-08-02 20:06:40 +010014342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
14343printf %s "checking for getpagesize... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014345/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014346
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014347#include <unistd.h>
14348
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014349int
Pablo Galindocc115e52021-08-02 20:06:40 +010014350main (void)
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014351{
14352void* p = getpagesize
14353 ;
14354 return 0;
14355}
14356_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014357if ac_fn_c_try_compile "$LINENO"
14358then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014359
Pablo Galindocc115e52021-08-02 20:06:40 +010014360printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014361
Pablo Galindocc115e52021-08-02 20:06:40 +010014362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14363printf "%s\n" "yes" >&6; }
14364else $as_nop
14365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366printf "%s\n" "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014367
14368fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014369rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014370
Pablo Galindocc115e52021-08-02 20:06:40 +010014371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
14372printf %s "checking for broken unsetenv... " >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14374/* end confdefs.h. */
14375
14376#include <stdlib.h>
14377
14378int
Pablo Galindocc115e52021-08-02 20:06:40 +010014379main (void)
Victor Stinner984890f2011-11-24 13:53:38 +010014380{
14381int res = unsetenv("DUMMY")
14382 ;
14383 return 0;
14384}
14385_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014386if ac_fn_c_try_compile "$LINENO"
14387then :
14388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389printf "%s\n" "no" >&6; }
14390else $as_nop
Victor Stinner984890f2011-11-24 13:53:38 +010014391
Pablo Galindocc115e52021-08-02 20:06:40 +010014392printf "%s\n" "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
Victor Stinner984890f2011-11-24 13:53:38 +010014393
Pablo Galindocc115e52021-08-02 20:06:40 +010014394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14395printf "%s\n" "yes" >&6; }
Victor Stinner984890f2011-11-24 13:53:38 +010014396
14397fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014398rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Victor Stinner984890f2011-11-24 13:53:38 +010014399
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014400for ac_prog in true
14401do
14402 # Extract the first word of "$ac_prog", so it can be a program name with args.
14403set dummy $ac_prog; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +010014404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14405printf %s "checking for $ac_word... " >&6; }
14406if test ${ac_cv_prog_TRUE+y}
14407then :
14408 printf %s "(cached) " >&6
14409else $as_nop
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014410 if test -n "$TRUE"; then
14411 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14412else
14413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14414for as_dir in $PATH
14415do
14416 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +010014417 case $as_dir in #(((
14418 '') as_dir=./ ;;
14419 */) ;;
14420 *) as_dir=$as_dir/ ;;
14421 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +010014423 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014424 ac_cv_prog_TRUE="$ac_prog"
Pablo Galindocc115e52021-08-02 20:06:40 +010014425 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 +000014426 break 2
14427 fi
14428done
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014431
14432fi
14433fi
14434TRUE=$ac_cv_prog_TRUE
14435if test -n "$TRUE"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010014436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
14437printf "%s\n" "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014438else
Pablo Galindocc115e52021-08-02 20:06:40 +010014439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14440printf "%s\n" "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014441fi
14442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014444 test -n "$TRUE" && break
14445done
14446test -n "$TRUE" || TRUE="/bin/true"
14447
14448
Pablo Galindocc115e52021-08-02 20:06:40 +010014449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
14450printf %s "checking for inet_aton in -lc... " >&6; }
14451if test ${ac_cv_lib_c_inet_aton+y}
14452then :
14453 printf %s "(cached) " >&6
14454else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014455 ac_check_lib_save_LIBS=$LIBS
14456LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014458/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460/* Override any GCC internal prototype to avoid an error.
14461 Use char because int might match the return type of a GCC
14462 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014463char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014464int
Pablo Galindocc115e52021-08-02 20:06:40 +010014465main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014468 ;
14469 return 0;
14470}
14471_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014472if ac_fn_c_try_link "$LINENO"
14473then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014474 ac_cv_lib_c_inet_aton=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014475else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014477fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014478rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014480LIBS=$ac_check_lib_save_LIBS
14481fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
14483printf "%s\n" "$ac_cv_lib_c_inet_aton" >&6; }
14484if test "x$ac_cv_lib_c_inet_aton" = xyes
14485then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014486 $ac_cv_prog_TRUE
Pablo Galindocc115e52021-08-02 20:06:40 +010014487else $as_nop
14488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
14489printf %s "checking for inet_aton in -lresolv... " >&6; }
14490if test ${ac_cv_lib_resolv_inet_aton+y}
14491then :
14492 printf %s "(cached) " >&6
14493else $as_nop
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014494 ac_check_lib_save_LIBS=$LIBS
14495LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014497/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499/* Override any GCC internal prototype to avoid an error.
14500 Use char because int might match the return type of a GCC
14501 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014502char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014503int
Pablo Galindocc115e52021-08-02 20:06:40 +010014504main (void)
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014507 ;
14508 return 0;
14509}
14510_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014511if ac_fn_c_try_link "$LINENO"
14512then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014513 ac_cv_lib_resolv_inet_aton=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014514else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014516fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014517rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014519LIBS=$ac_check_lib_save_LIBS
14520fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014521{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
14522printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; }
14523if test "x$ac_cv_lib_resolv_inet_aton" = xyes
14524then :
14525 printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014526
14527 LIBS="-lresolv $LIBS"
14528
14529fi
14530
14531
14532fi
14533
14534
Christian Heimesd0764e22007-12-04 15:00:33 +000014535# On Tru64, chflags seems to be present, but calling it will
14536# exit Python
Pablo Galindocc115e52021-08-02 20:06:40 +010014537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
14538printf %s "checking for chflags... " >&6; }
14539if test ${ac_cv_have_chflags+y}
14540then :
14541 printf %s "(cached) " >&6
14542else $as_nop
14543 if test "$cross_compiling" = yes
14544then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014545 ac_cv_have_chflags=cross
Pablo Galindocc115e52021-08-02 20:06:40 +010014546else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014548/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014549
Christian Heimesd0764e22007-12-04 15:00:33 +000014550#include <sys/stat.h>
14551#include <unistd.h>
14552int main(int argc, char*argv[])
14553{
14554 if(chflags(argv[0], 0) != 0)
14555 return 1;
14556 return 0;
14557}
Ned Deily3eb67d52011-06-28 00:00:28 -070014558
Christian Heimesd0764e22007-12-04 15:00:33 +000014559_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014560if ac_fn_c_try_run "$LINENO"
14561then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014562 ac_cv_have_chflags=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014563else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014568fi
14569
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014571fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014572{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
14573printf "%s\n" "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014574if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Pablo Galindocc115e52021-08-02 20:06:40 +010014576if test "x$ac_cv_func_chflags" = xyes
14577then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014578 ac_cv_have_chflags="yes"
Pablo Galindocc115e52021-08-02 20:06:40 +010014579else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014580 ac_cv_have_chflags="no"
14581fi
14582
14583fi
14584if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014585
Pablo Galindocc115e52021-08-02 20:06:40 +010014586printf "%s\n" "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014587
14588fi
14589
Pablo Galindocc115e52021-08-02 20:06:40 +010014590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
14591printf %s "checking for lchflags... " >&6; }
14592if test ${ac_cv_have_lchflags+y}
14593then :
14594 printf %s "(cached) " >&6
14595else $as_nop
14596 if test "$cross_compiling" = yes
14597then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014598 ac_cv_have_lchflags=cross
Pablo Galindocc115e52021-08-02 20:06:40 +010014599else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000014601/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070014602
Christian Heimesd0764e22007-12-04 15:00:33 +000014603#include <sys/stat.h>
14604#include <unistd.h>
14605int main(int argc, char*argv[])
14606{
14607 if(lchflags(argv[0], 0) != 0)
14608 return 1;
14609 return 0;
14610}
Ned Deily3eb67d52011-06-28 00:00:28 -070014611
Christian Heimesd0764e22007-12-04 15:00:33 +000014612_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014613if ac_fn_c_try_run "$LINENO"
14614then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014615 ac_cv_have_lchflags=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014616else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014617 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000014618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14620 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014621fi
14622
14623
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014624fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014625{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
14626printf "%s\n" "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014627if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Pablo Galindocc115e52021-08-02 20:06:40 +010014629if test "x$ac_cv_func_lchflags" = xyes
14630then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014631 ac_cv_have_lchflags="yes"
Pablo Galindocc115e52021-08-02 20:06:40 +010014632else $as_nop
Benjamin Petersoned68afa2010-01-30 19:36:43 +000014633 ac_cv_have_lchflags="no"
14634fi
14635
14636fi
14637if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014638
Pablo Galindocc115e52021-08-02 20:06:40 +010014639printf "%s\n" "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014640
14641fi
14642
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014643case $ac_sys_system/$ac_sys_release in
14644Darwin/*)
14645 _CUR_CFLAGS="${CFLAGS}"
14646 _CUR_LDFLAGS="${LDFLAGS}"
14647 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
14648 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
14649 ;;
14650esac
14651
Pablo Galindocc115e52021-08-02 20:06:40 +010014652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
14653printf %s "checking for inflateCopy in -lz... " >&6; }
14654if test ${ac_cv_lib_z_inflateCopy+y}
14655then :
14656 printf %s "(cached) " >&6
14657else $as_nop
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014658 ac_check_lib_save_LIBS=$LIBS
14659LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014661/* end confdefs.h. */
14662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663/* Override any GCC internal prototype to avoid an error.
14664 Use char because int might match the return type of a GCC
14665 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014666char inflateCopy ();
14667int
Pablo Galindocc115e52021-08-02 20:06:40 +010014668main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014671 ;
14672 return 0;
14673}
14674_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014675if ac_fn_c_try_link "$LINENO"
14676then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014677 ac_cv_lib_z_inflateCopy=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014678else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014680fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014681rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014683LIBS=$ac_check_lib_save_LIBS
14684fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
14686printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; }
14687if test "x$ac_cv_lib_z_inflateCopy" = xyes
14688then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014689
Pablo Galindocc115e52021-08-02 20:06:40 +010014690printf "%s\n" "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014691
14692fi
14693
14694
14695case $ac_sys_system/$ac_sys_release in
14696Darwin/*)
14697 CFLAGS="${_CUR_CFLAGS}"
14698 LDFLAGS="${_CUR_LDFLAGS}"
14699 ;;
14700esac
14701
Pablo Galindocc115e52021-08-02 20:06:40 +010014702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
14703printf %s "checking for hstrerror... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014705/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014706
Martin v. Löwise9416172003-05-03 10:12:45 +000014707#include <netdb.h>
14708
Martin v. Löwise9416172003-05-03 10:12:45 +000014709int
Pablo Galindocc115e52021-08-02 20:06:40 +010014710main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014711{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014712void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014713 ;
14714 return 0;
14715}
14716_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014717if ac_fn_c_try_link "$LINENO"
14718then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014719
Pablo Galindocc115e52021-08-02 20:06:40 +010014720printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014721
Pablo Galindocc115e52021-08-02 20:06:40 +010014722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14723printf "%s\n" "yes" >&6; }
14724else $as_nop
14725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14726printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014727
14728fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014729rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731
Pablo Galindocc115e52021-08-02 20:06:40 +010014732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
14733printf %s "checking for inet_aton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014735/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014736
Martin v. Löwis86d66262006-02-17 08:40:11 +000014737#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014738#include <sys/socket.h>
14739#include <netinet/in.h>
14740#include <arpa/inet.h>
14741
Martin v. Löwise9416172003-05-03 10:12:45 +000014742int
Pablo Galindocc115e52021-08-02 20:06:40 +010014743main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014744{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014745void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014746 ;
14747 return 0;
14748}
14749_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014750if ac_fn_c_try_link "$LINENO"
14751then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014752
Pablo Galindocc115e52021-08-02 20:06:40 +010014753printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014754
Pablo Galindocc115e52021-08-02 20:06:40 +010014755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14756printf "%s\n" "yes" >&6; }
14757else $as_nop
14758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14759printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014760
14761fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014762rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014763 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764
Pablo Galindocc115e52021-08-02 20:06:40 +010014765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
14766printf %s "checking for inet_pton... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014768/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014769
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014770#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014771#include <sys/socket.h>
14772#include <netinet/in.h>
14773#include <arpa/inet.h>
14774
Martin v. Löwise9416172003-05-03 10:12:45 +000014775int
Pablo Galindocc115e52021-08-02 20:06:40 +010014776main (void)
Martin v. Löwise9416172003-05-03 10:12:45 +000014777{
14778void* p = inet_pton
14779 ;
14780 return 0;
14781}
14782_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014783if ac_fn_c_try_compile "$LINENO"
14784then :
Martin v. Löwise9416172003-05-03 10:12:45 +000014785
Pablo Galindocc115e52021-08-02 20:06:40 +010014786printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000014787
Pablo Galindocc115e52021-08-02 20:06:40 +010014788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14789printf "%s\n" "yes" >&6; }
14790else $as_nop
14791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14792printf "%s\n" "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000014793
14794fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014795rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014796
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014797# On some systems, setgroups is in unistd.h, on others, in grp.h
Pablo Galindocc115e52021-08-02 20:06:40 +010014798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
14799printf %s "checking for setgroups... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000014800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014801/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014802
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014803#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014804#ifdef HAVE_GRP_H
14805#include <grp.h>
14806#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014807
Martin v. Löwisd5843682002-11-21 20:41:28 +000014808int
Pablo Galindocc115e52021-08-02 20:06:40 +010014809main (void)
Martin v. Löwisd5843682002-11-21 20:41:28 +000014810{
14811void* p = setgroups
14812 ;
14813 return 0;
14814}
14815_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014816if ac_fn_c_try_compile "$LINENO"
14817then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000014818
Pablo Galindocc115e52021-08-02 20:06:40 +010014819printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014820
Pablo Galindocc115e52021-08-02 20:06:40 +010014821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14822printf "%s\n" "yes" >&6; }
14823else $as_nop
14824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14825printf "%s\n" "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000014826
14827fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014828rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014829
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014830# check for openpty and forkpty
14831
Pablo Galindocc115e52021-08-02 20:06:40 +010014832
14833 for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000014834do :
14835 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Pablo Galindocc115e52021-08-02 20:06:40 +010014836if test "x$ac_cv_func_openpty" = xyes
14837then :
14838 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014839
Pablo Galindocc115e52021-08-02 20:06:40 +010014840else $as_nop
14841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
14842printf %s "checking for openpty in -lutil... " >&6; }
14843if test ${ac_cv_lib_util_openpty+y}
14844then :
14845 printf %s "(cached) " >&6
14846else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014848LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852/* Override any GCC internal prototype to avoid an error.
14853 Use char because int might match the return type of a GCC
14854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014855char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014856int
Pablo Galindocc115e52021-08-02 20:06:40 +010014857main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000014858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014860 ;
14861 return 0;
14862}
14863_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014864if ac_fn_c_try_link "$LINENO"
14865then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 ac_cv_lib_util_openpty=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014867else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014869fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014870rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014872LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014873fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
14875printf "%s\n" "$ac_cv_lib_util_openpty" >&6; }
14876if test "x$ac_cv_lib_util_openpty" = xyes
14877then :
14878 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000014879 LIBS="$LIBS -lutil"
Pablo Galindocc115e52021-08-02 20:06:40 +010014880else $as_nop
14881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
14882printf %s "checking for openpty in -lbsd... " >&6; }
14883if test ${ac_cv_lib_bsd_openpty+y}
14884then :
14885 printf %s "(cached) " >&6
14886else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014887 ac_check_lib_save_LIBS=$LIBS
14888LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014890/* end confdefs.h. */
14891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892/* Override any GCC internal prototype to avoid an error.
14893 Use char because int might match the return type of a GCC
14894 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014895char openpty ();
14896int
Pablo Galindocc115e52021-08-02 20:06:40 +010014897main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014900 ;
14901 return 0;
14902}
14903_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014904if ac_fn_c_try_link "$LINENO"
14905then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014906 ac_cv_lib_bsd_openpty=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014907else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014909fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014910rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014912LIBS=$ac_check_lib_save_LIBS
14913fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
14915printf "%s\n" "$ac_cv_lib_bsd_openpty" >&6; }
14916if test "x$ac_cv_lib_bsd_openpty" = xyes
14917then :
14918 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014919 LIBS="$LIBS -lbsd"
14920fi
14921
14922
14923fi
14924
Fred Drake8cef4cf2000-06-28 16:40:38 +000014925
14926fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014927
Fred Drake8cef4cf2000-06-28 16:40:38 +000014928done
14929
Pablo Galindocc115e52021-08-02 20:06:40 +010014930 for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000014931do :
14932 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Pablo Galindocc115e52021-08-02 20:06:40 +010014933if test "x$ac_cv_func_forkpty" = xyes
14934then :
14935 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000014936
Pablo Galindocc115e52021-08-02 20:06:40 +010014937else $as_nop
14938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
14939printf %s "checking for forkpty in -lutil... " >&6; }
14940if test ${ac_cv_lib_util_forkpty+y}
14941then :
14942 printf %s "(cached) " >&6
14943else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000014944 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014945LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949/* Override any GCC internal prototype to avoid an error.
14950 Use char because int might match the return type of a GCC
14951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014952char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014953int
Pablo Galindocc115e52021-08-02 20:06:40 +010014954main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000014955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 ;
14958 return 0;
14959}
14960_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010014961if ac_fn_c_try_link "$LINENO"
14962then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 ac_cv_lib_util_forkpty=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010014964else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014966fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014967rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014969LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014970fi
Pablo Galindocc115e52021-08-02 20:06:40 +010014971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
14972printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; }
14973if test "x$ac_cv_lib_util_forkpty" = xyes
14974then :
14975 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000014976 LIBS="$LIBS -lutil"
Pablo Galindocc115e52021-08-02 20:06:40 +010014977else $as_nop
14978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
14979printf %s "checking for forkpty in -lbsd... " >&6; }
14980if test ${ac_cv_lib_bsd_forkpty+y}
14981then :
14982 printf %s "(cached) " >&6
14983else $as_nop
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014984 ac_check_lib_save_LIBS=$LIBS
14985LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014987/* end confdefs.h. */
14988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989/* Override any GCC internal prototype to avoid an error.
14990 Use char because int might match the return type of a GCC
14991 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014992char forkpty ();
14993int
Pablo Galindocc115e52021-08-02 20:06:40 +010014994main (void)
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000014997 ;
14998 return 0;
14999}
15000_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015001if ac_fn_c_try_link "$LINENO"
15002then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015003 ac_cv_lib_bsd_forkpty=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015004else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015006fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015007rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015009LIBS=$ac_check_lib_save_LIBS
15010fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015011{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
15012printf "%s\n" "$ac_cv_lib_bsd_forkpty" >&6; }
15013if test "x$ac_cv_lib_bsd_forkpty" = xyes
15014then :
15015 printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015016 LIBS="$LIBS -lbsd"
15017fi
15018
15019
15020fi
15021
Fred Drake8cef4cf2000-06-28 16:40:38 +000015022
15023fi
Christian Heimes39258d32021-04-17 11:36:35 +020015024
Pablo Galindocc115e52021-08-02 20:06:40 +010015025done
Pablo Galindo Salgadoc2e0b132021-07-30 16:14:28 +010015026
Michael W. Hudson54241132001-12-07 15:38:26 +000015027# check for long file support functions
Pablo Galindocc115e52021-08-02 20:06:40 +010015028ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64"
15029if test "x$ac_cv_func_fseek64" = xyes
15030then :
15031 printf "%s\n" "#define HAVE_FSEEK64 1" >>confdefs.h
Michael W. Hudson54241132001-12-07 15:38:26 +000015032
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015033fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015034ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15035if test "x$ac_cv_func_fseeko" = xyes
15036then :
15037 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
15038
15039fi
15040ac_fn_c_check_func "$LINENO" "fstatvfs" "ac_cv_func_fstatvfs"
15041if test "x$ac_cv_func_fstatvfs" = xyes
15042then :
15043 printf "%s\n" "#define HAVE_FSTATVFS 1" >>confdefs.h
15044
15045fi
15046ac_fn_c_check_func "$LINENO" "ftell64" "ac_cv_func_ftell64"
15047if test "x$ac_cv_func_ftell64" = xyes
15048then :
15049 printf "%s\n" "#define HAVE_FTELL64 1" >>confdefs.h
15050
15051fi
15052ac_fn_c_check_func "$LINENO" "ftello" "ac_cv_func_ftello"
15053if test "x$ac_cv_func_ftello" = xyes
15054then :
15055 printf "%s\n" "#define HAVE_FTELLO 1" >>confdefs.h
15056
15057fi
15058ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
15059if test "x$ac_cv_func_statvfs" = xyes
15060then :
15061 printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h
15062
15063fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064
Michael W. Hudson54241132001-12-07 15:38:26 +000015065
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015066ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Pablo Galindocc115e52021-08-02 20:06:40 +010015067if test "x$ac_cv_func_dup2" = xyes
15068then :
15069 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000015070
Pablo Galindocc115e52021-08-02 20:06:40 +010015071else $as_nop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015073 *" dup2.$ac_objext "* ) ;;
15074 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015076esac
15077
Martin v. Löwis1142de32002-03-29 16:28:31 +000015078fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015079
Martin v. Löwis1142de32002-03-29 16:28:31 +000015080
Pablo Galindocc115e52021-08-02 20:06:40 +010015081 for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015082do :
15083 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Pablo Galindocc115e52021-08-02 20:06:40 +010015084if test "x$ac_cv_func_getpgrp" = xyes
15085then :
15086 printf "%s\n" "#define HAVE_GETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015088/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015089#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015090int
Pablo Galindocc115e52021-08-02 20:06:40 +010015091main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015092{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015093getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 ;
15095 return 0;
15096}
15097_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015098if ac_fn_c_try_compile "$LINENO"
15099then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Pablo Galindocc115e52021-08-02 20:06:40 +010015101printf "%s\n" "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015102
Guido van Rossum627b2d71993-12-24 10:39:16 +000015103fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015104rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015105
Guido van Rossum627b2d71993-12-24 10:39:16 +000015106fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015107
Thomas Wouters3a584202000-08-05 23:28:51 +000015108done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015109
Pablo Galindocc115e52021-08-02 20:06:40 +010015110 for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000015111do :
15112 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Pablo Galindocc115e52021-08-02 20:06:40 +010015113if test "x$ac_cv_func_setpgrp" = xyes
15114then :
15115 printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015117/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015118#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015119int
Pablo Galindocc115e52021-08-02 20:06:40 +010015120main (void)
Jack Jansen150753c2003-03-29 22:07:47 +000015121{
15122setpgrp(0,0);
15123 ;
15124 return 0;
15125}
15126_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015127if ac_fn_c_try_compile "$LINENO"
15128then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015129
Pablo Galindocc115e52021-08-02 20:06:40 +010015130printf "%s\n" "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000015131
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015132fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015133rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015134
15135fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015136
Jack Jansen150753c2003-03-29 22:07:47 +000015137done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015138
Gregory P. Smith387512c2018-12-30 15:42:32 -080015139# We search for both crypt and crypt_r as one or the other may be defined
15140# This gets us our -lcrypt in LIBS when required on the target platform.
Pablo Galindocc115e52021-08-02 20:06:40 +010015141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
15142printf %s "checking for library containing crypt... " >&6; }
15143if test ${ac_cv_search_crypt+y}
15144then :
15145 printf %s "(cached) " >&6
15146else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015147 ac_func_search_save_LIBS=$LIBS
15148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15149/* end confdefs.h. */
15150
15151/* Override any GCC internal prototype to avoid an error.
15152 Use char because int might match the return type of a GCC
15153 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015154char crypt ();
15155int
Pablo Galindocc115e52021-08-02 20:06:40 +010015156main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015157{
15158return crypt ();
15159 ;
15160 return 0;
15161}
15162_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015163for ac_lib in '' crypt
15164do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015165 if test -z "$ac_lib"; then
15166 ac_res="none required"
15167 else
15168 ac_res=-l$ac_lib
15169 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15170 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015171 if ac_fn_c_try_link "$LINENO"
15172then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015173 ac_cv_search_crypt=$ac_res
15174fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015175rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015176 conftest$ac_exeext
Pablo Galindocc115e52021-08-02 20:06:40 +010015177 if test ${ac_cv_search_crypt+y}
15178then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015179 break
15180fi
15181done
Pablo Galindocc115e52021-08-02 20:06:40 +010015182if test ${ac_cv_search_crypt+y}
15183then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015184
Pablo Galindocc115e52021-08-02 20:06:40 +010015185else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015186 ac_cv_search_crypt=no
15187fi
15188rm conftest.$ac_ext
15189LIBS=$ac_func_search_save_LIBS
15190fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
15192printf "%s\n" "$ac_cv_search_crypt" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015193ac_res=$ac_cv_search_crypt
Pablo Galindocc115e52021-08-02 20:06:40 +010015194if test "$ac_res" != no
15195then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015196 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15197
15198fi
15199
Pablo Galindocc115e52021-08-02 20:06:40 +010015200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
15201printf %s "checking for library containing crypt_r... " >&6; }
15202if test ${ac_cv_search_crypt_r+y}
15203then :
15204 printf %s "(cached) " >&6
15205else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015206 ac_func_search_save_LIBS=$LIBS
15207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15208/* end confdefs.h. */
15209
15210/* Override any GCC internal prototype to avoid an error.
15211 Use char because int might match the return type of a GCC
15212 builtin and then its argument prototype would still apply. */
Gregory P. Smith387512c2018-12-30 15:42:32 -080015213char crypt_r ();
15214int
Pablo Galindocc115e52021-08-02 20:06:40 +010015215main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015216{
15217return crypt_r ();
15218 ;
15219 return 0;
15220}
15221_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015222for ac_lib in '' crypt
15223do
Gregory P. Smith387512c2018-12-30 15:42:32 -080015224 if test -z "$ac_lib"; then
15225 ac_res="none required"
15226 else
15227 ac_res=-l$ac_lib
15228 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15229 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015230 if ac_fn_c_try_link "$LINENO"
15231then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015232 ac_cv_search_crypt_r=$ac_res
15233fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015234rm -f core conftest.err conftest.$ac_objext conftest.beam \
Gregory P. Smith387512c2018-12-30 15:42:32 -080015235 conftest$ac_exeext
Pablo Galindocc115e52021-08-02 20:06:40 +010015236 if test ${ac_cv_search_crypt_r+y}
15237then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015238 break
15239fi
15240done
Pablo Galindocc115e52021-08-02 20:06:40 +010015241if test ${ac_cv_search_crypt_r+y}
15242then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015243
Pablo Galindocc115e52021-08-02 20:06:40 +010015244else $as_nop
Gregory P. Smith387512c2018-12-30 15:42:32 -080015245 ac_cv_search_crypt_r=no
15246fi
15247rm conftest.$ac_ext
15248LIBS=$ac_func_search_save_LIBS
15249fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
15251printf "%s\n" "$ac_cv_search_crypt_r" >&6; }
Gregory P. Smith387512c2018-12-30 15:42:32 -080015252ac_res=$ac_cv_search_crypt_r
Pablo Galindocc115e52021-08-02 20:06:40 +010015253if test "$ac_res" != no
15254then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015255 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15256
15257fi
15258
15259
15260ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
Pablo Galindocc115e52021-08-02 20:06:40 +010015261if test "x$ac_cv_func_crypt_r" = xyes
15262then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264/* end confdefs.h. */
15265
15266#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
15267#include <crypt.h>
15268
15269int
Pablo Galindocc115e52021-08-02 20:06:40 +010015270main (void)
Gregory P. Smith387512c2018-12-30 15:42:32 -080015271{
15272
15273struct crypt_data d;
15274char *r = crypt_r("", "", &d);
15275
15276 ;
15277 return 0;
15278}
15279_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015280if ac_fn_c_try_compile "$LINENO"
15281then :
Gregory P. Smith387512c2018-12-30 15:42:32 -080015282
Pablo Galindocc115e52021-08-02 20:06:40 +010015283printf "%s\n" "#define HAVE_CRYPT_R 1" >>confdefs.h
Gregory P. Smith387512c2018-12-30 15:42:32 -080015284
15285fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015286rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Gregory P. Smith387512c2018-12-30 15:42:32 -080015287
15288fi
15289
15290
Pablo Galindocc115e52021-08-02 20:06:40 +010015291
15292 for ac_func in clock_gettime
Victor Stinnere0be4232011-10-25 13:06:09 +020015293do :
15294 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
Pablo Galindocc115e52021-08-02 20:06:40 +010015295if test "x$ac_cv_func_clock_gettime" = xyes
15296then :
15297 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015298
Pablo Galindocc115e52021-08-02 20:06:40 +010015299else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015300
Pablo Galindocc115e52021-08-02 20:06:40 +010015301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
15302printf %s "checking for clock_gettime in -lrt... " >&6; }
15303if test ${ac_cv_lib_rt_clock_gettime+y}
15304then :
15305 printf %s "(cached) " >&6
15306else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015307 ac_check_lib_save_LIBS=$LIBS
15308LIBS="-lrt $LIBS"
15309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310/* end confdefs.h. */
15311
15312/* Override any GCC internal prototype to avoid an error.
15313 Use char because int might match the return type of a GCC
15314 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015315char clock_gettime ();
15316int
Pablo Galindocc115e52021-08-02 20:06:40 +010015317main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015318{
15319return clock_gettime ();
15320 ;
15321 return 0;
15322}
15323_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015324if ac_fn_c_try_link "$LINENO"
15325then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015326 ac_cv_lib_rt_clock_gettime=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015327else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015328 ac_cv_lib_rt_clock_gettime=no
15329fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015330rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015331 conftest$ac_exeext conftest.$ac_ext
15332LIBS=$ac_check_lib_save_LIBS
15333fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
15335printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
15336if test "x$ac_cv_lib_rt_clock_gettime" = xyes
15337then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015338
Victor Stinner7efb8332014-08-29 15:41:08 +020015339 LIBS="$LIBS -lrt"
Pablo Galindocc115e52021-08-02 20:06:40 +010015340 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015341
15342
Pablo Galindocc115e52021-08-02 20:06:40 +010015343printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015344
15345
15346fi
15347
15348
15349fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015350
Victor Stinnere0be4232011-10-25 13:06:09 +020015351done
15352
15353
Pablo Galindocc115e52021-08-02 20:06:40 +010015354 for ac_func in clock_getres
Victor Stinnere0be4232011-10-25 13:06:09 +020015355do :
15356 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
Pablo Galindocc115e52021-08-02 20:06:40 +010015357if test "x$ac_cv_func_clock_getres" = xyes
15358then :
15359 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015360
Pablo Galindocc115e52021-08-02 20:06:40 +010015361else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015362
Pablo Galindocc115e52021-08-02 20:06:40 +010015363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
15364printf %s "checking for clock_getres in -lrt... " >&6; }
15365if test ${ac_cv_lib_rt_clock_getres+y}
15366then :
15367 printf %s "(cached) " >&6
15368else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015369 ac_check_lib_save_LIBS=$LIBS
15370LIBS="-lrt $LIBS"
15371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372/* end confdefs.h. */
15373
15374/* Override any GCC internal prototype to avoid an error.
15375 Use char because int might match the return type of a GCC
15376 builtin and then its argument prototype would still apply. */
Victor Stinnere0be4232011-10-25 13:06:09 +020015377char clock_getres ();
15378int
Pablo Galindocc115e52021-08-02 20:06:40 +010015379main (void)
Victor Stinnere0be4232011-10-25 13:06:09 +020015380{
15381return clock_getres ();
15382 ;
15383 return 0;
15384}
15385_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015386if ac_fn_c_try_link "$LINENO"
15387then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015388 ac_cv_lib_rt_clock_getres=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015389else $as_nop
Victor Stinnere0be4232011-10-25 13:06:09 +020015390 ac_cv_lib_rt_clock_getres=no
15391fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015392rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinnere0be4232011-10-25 13:06:09 +020015393 conftest$ac_exeext conftest.$ac_ext
15394LIBS=$ac_check_lib_save_LIBS
15395fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
15397printf "%s\n" "$ac_cv_lib_rt_clock_getres" >&6; }
15398if test "x$ac_cv_lib_rt_clock_getres" = xyes
15399then :
Victor Stinnere0be4232011-10-25 13:06:09 +020015400
Pablo Galindocc115e52021-08-02 20:06:40 +010015401 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
Victor Stinnere0be4232011-10-25 13:06:09 +020015402
15403
15404fi
15405
15406
15407fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015408
Victor Stinnere0be4232011-10-25 13:06:09 +020015409done
15410
15411
Pablo Galindocc115e52021-08-02 20:06:40 +010015412 for ac_func in clock_settime
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015413do :
15414 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
Pablo Galindocc115e52021-08-02 20:06:40 +010015415if test "x$ac_cv_func_clock_settime" = xyes
15416then :
15417 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015418
Pablo Galindocc115e52021-08-02 20:06:40 +010015419else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015420
Pablo Galindocc115e52021-08-02 20:06:40 +010015421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
15422printf %s "checking for clock_settime in -lrt... " >&6; }
15423if test ${ac_cv_lib_rt_clock_settime+y}
15424then :
15425 printf %s "(cached) " >&6
15426else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015427 ac_check_lib_save_LIBS=$LIBS
15428LIBS="-lrt $LIBS"
15429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15430/* end confdefs.h. */
15431
15432/* Override any GCC internal prototype to avoid an error.
15433 Use char because int might match the return type of a GCC
15434 builtin and then its argument prototype would still apply. */
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015435char clock_settime ();
15436int
Pablo Galindocc115e52021-08-02 20:06:40 +010015437main (void)
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015438{
15439return clock_settime ();
15440 ;
15441 return 0;
15442}
15443_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015444if ac_fn_c_try_link "$LINENO"
15445then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015446 ac_cv_lib_rt_clock_settime=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015447else $as_nop
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015448 ac_cv_lib_rt_clock_settime=no
15449fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015450rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015451 conftest$ac_exeext conftest.$ac_ext
15452LIBS=$ac_check_lib_save_LIBS
15453fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
15455printf "%s\n" "$ac_cv_lib_rt_clock_settime" >&6; }
15456if test "x$ac_cv_lib_rt_clock_settime" = xyes
15457then :
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015458
Pablo Galindocc115e52021-08-02 20:06:40 +010015459 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015460
15461
15462fi
15463
15464
15465fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015466
Benjamin Peterson37098cd2016-09-13 22:55:09 -070015467done
15468
Pablo Galindocc115e52021-08-02 20:06:40 +010015469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for major" >&5
15470printf %s "checking for major... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015472/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015473
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015474#if defined(MAJOR_IN_MKDEV)
15475#include <sys/mkdev.h>
15476#elif defined(MAJOR_IN_SYSMACROS)
15477#include <sys/sysmacros.h>
15478#else
15479#include <sys/types.h>
15480#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015481
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015482int
Pablo Galindocc115e52021-08-02 20:06:40 +010015483main (void)
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015484{
15485
15486 makedev(major(0),minor(0));
15487
15488 ;
15489 return 0;
15490}
15491_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015492if ac_fn_c_try_link "$LINENO"
15493then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015494
15495
Pablo Galindocc115e52021-08-02 20:06:40 +010015496printf "%s\n" "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015497
Pablo Galindocc115e52021-08-02 20:06:40 +010015498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15499printf "%s\n" "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015500
Pablo Galindocc115e52021-08-02 20:06:40 +010015501else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000015502
Pablo Galindocc115e52021-08-02 20:06:40 +010015503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15504printf "%s\n" "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015505
15506fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015507rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015509
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015510# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015511# for [no]getaddrinfo in netdb.h.
Pablo Galindocc115e52021-08-02 20:06:40 +010015512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
15513printf %s "checking for getaddrinfo... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015515/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015516
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015517#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015518#include <sys/socket.h>
15519#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015520#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015521
Martin v. Löwis11437992002-04-12 09:54:03 +000015522int
Pablo Galindocc115e52021-08-02 20:06:40 +010015523main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015524{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015525getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 ;
15527 return 0;
15528}
15529_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015530if ac_fn_c_try_link "$LINENO"
15531then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015532 have_getaddrinfo=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015533else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015535fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015536rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +010015538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
15539printf "%s\n" "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015540if test $have_getaddrinfo = yes
15541then
Pablo Galindocc115e52021-08-02 20:06:40 +010015542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
15543printf %s "checking getaddrinfo bug... " >&6; }
15544 if test ${ac_cv_buggy_getaddrinfo+y}
15545then :
15546 printf %s "(cached) " >&6
15547else $as_nop
15548 if test "$cross_compiling" = yes
15549then :
Matthias Klose96350132012-03-15 20:42:23 +010015550
15551if test "${enable_ipv6+set}" = set; then
15552 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
15553else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015554 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010015555fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015556else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015558/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015559
Stefan Krah19c21392012-11-22 23:47:32 +010015560#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015561#include <sys/types.h>
15562#include <netdb.h>
15563#include <string.h>
15564#include <sys/socket.h>
15565#include <netinet/in.h>
15566
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015567int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015568{
15569 int passive, gaierr, inet4 = 0, inet6 = 0;
15570 struct addrinfo hints, *ai, *aitop;
15571 char straddr[INET6_ADDRSTRLEN], strport[16];
15572
15573 for (passive = 0; passive <= 1; passive++) {
15574 memset(&hints, 0, sizeof(hints));
15575 hints.ai_family = AF_UNSPEC;
15576 hints.ai_flags = passive ? AI_PASSIVE : 0;
15577 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015578 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015579 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15580 (void)gai_strerror(gaierr);
15581 goto bad;
15582 }
15583 for (ai = aitop; ai; ai = ai->ai_next) {
15584 if (ai->ai_addr == NULL ||
15585 ai->ai_addrlen == 0 ||
15586 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15587 straddr, sizeof(straddr), strport, sizeof(strport),
15588 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15589 goto bad;
15590 }
15591 switch (ai->ai_family) {
15592 case AF_INET:
15593 if (strcmp(strport, "54321") != 0) {
15594 goto bad;
15595 }
15596 if (passive) {
15597 if (strcmp(straddr, "0.0.0.0") != 0) {
15598 goto bad;
15599 }
15600 } else {
15601 if (strcmp(straddr, "127.0.0.1") != 0) {
15602 goto bad;
15603 }
15604 }
15605 inet4++;
15606 break;
15607 case AF_INET6:
15608 if (strcmp(strport, "54321") != 0) {
15609 goto bad;
15610 }
15611 if (passive) {
15612 if (strcmp(straddr, "::") != 0) {
15613 goto bad;
15614 }
15615 } else {
15616 if (strcmp(straddr, "::1") != 0) {
15617 goto bad;
15618 }
15619 }
15620 inet6++;
15621 break;
15622 case AF_UNSPEC:
15623 goto bad;
15624 break;
15625 default:
15626 /* another family support? */
15627 break;
15628 }
15629 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070015630 freeaddrinfo(aitop);
15631 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015632 }
15633
15634 if (!(inet4 == 0 || inet4 == 2))
15635 goto bad;
15636 if (!(inet6 == 0 || inet6 == 2))
15637 goto bad;
15638
15639 if (aitop)
15640 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015641 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015642
15643 bad:
15644 if (aitop)
15645 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015646 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015647}
15648
Martin v. Löwis11437992002-04-12 09:54:03 +000015649_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015650if ac_fn_c_try_run "$LINENO"
15651then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015652 ac_cv_buggy_getaddrinfo=no
Pablo Galindocc115e52021-08-02 20:06:40 +010015653else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015660fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015661
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015663
Pablo Galindocc115e52021-08-02 20:06:40 +010015664{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
15665printf "%s\n" "$ac_cv_buggy_getaddrinfo" >&6; }
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015666
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020015667if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015668then
15669 if test $ipv6 = yes
15670 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015671 echo 'Fatal: You must get working getaddrinfo() function.'
15672 echo ' or you can specify "--disable-ipv6"'.
15673 exit 1
15674 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015675else
Martin v. Löwis11437992002-04-12 09:54:03 +000015676
Pablo Galindocc115e52021-08-02 20:06:40 +010015677printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015678
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015679fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000015680
Pablo Galindocc115e52021-08-02 20:06:40 +010015681ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
15682if test "x$ac_cv_func_getnameinfo" = xyes
15683then :
15684 printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015685
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015686fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015687
Michael W. Hudson54241132001-12-07 15:38:26 +000015688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015689# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
Martin v. Löwis11437992002-04-12 09:54:03 +000015691
Pablo Galindocc115e52021-08-02 20:06:40 +010015692# Obsolete code to be removed.
15693if test $ac_cv_header_sys_time_h = yes; then
15694
15695printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015696
15697fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015698# End of obsolete code.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015699
Pablo Galindocc115e52021-08-02 20:06:40 +010015700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
15701printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15702if test ${ac_cv_struct_tm+y}
15703then :
15704 printf %s "(cached) " >&6
15705else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015707/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015708#include <sys/types.h>
15709#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711int
Pablo Galindocc115e52021-08-02 20:06:40 +010015712main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714struct tm tm;
15715 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 ;
15718 return 0;
15719}
15720_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015721if ac_fn_c_try_compile "$LINENO"
15722then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015723 ac_cv_struct_tm=time.h
Pablo Galindocc115e52021-08-02 20:06:40 +010015724else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015725 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015726fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015727rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015728fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
15730printf "%s\n" "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015731if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015732
Pablo Galindocc115e52021-08-02 20:06:40 +010015733printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015734
15735fi
15736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737ac_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 +000015738#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740"
Pablo Galindocc115e52021-08-02 20:06:40 +010015741if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
15742then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015743
Pablo Galindocc115e52021-08-02 20:06:40 +010015744printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015745
15746
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015747fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015748
Martin v. Löwis11437992002-04-12 09:54:03 +000015749if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15750
Pablo Galindocc115e52021-08-02 20:06:40 +010015751printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015752
15753else
Pablo Galindocc115e52021-08-02 20:06:40 +010015754 ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15755" "$ac_c_undeclared_builtin_options" "CFLAGS"
15756if test "x$ac_cv_have_decl_tzname" = xyes
15757then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015758 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010015759else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015761fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015762printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763
Pablo Galindocc115e52021-08-02 20:06:40 +010015764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15765printf %s "checking for tzname... " >&6; }
15766if test ${ac_cv_var_tzname+y}
15767then :
15768 printf %s "(cached) " >&6
15769else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015771/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015772#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773#if !HAVE_DECL_TZNAME
15774extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000015775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015776
Martin v. Löwis11437992002-04-12 09:54:03 +000015777int
Pablo Galindocc115e52021-08-02 20:06:40 +010015778main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 ;
15782 return 0;
15783}
15784_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015785if ac_fn_c_try_link "$LINENO"
15786then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015787 ac_cv_var_tzname=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015788else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015789 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015790fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015791rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000015793fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15795printf "%s\n" "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015796 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015797
Pablo Galindocc115e52021-08-02 20:06:40 +010015798printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000015799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015800 fi
15801fi
15802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +010015804if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
15805then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015806
Pablo Galindocc115e52021-08-02 20:06:40 +010015807printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
15809
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015810fi
15811
Matthias Kloseb9621712010-04-24 17:59:49 +000015812ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +010015813if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
15814then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015815
Pablo Galindocc115e52021-08-02 20:06:40 +010015816printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015819fi
15820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +010015822if test "x$ac_cv_member_struct_stat_st_flags" = xyes
15823then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015824
Pablo Galindocc115e52021-08-02 20:06:40 +010015825printf "%s\n" "#define HAVE_STRUCT_STAT_ST_FLAGS 1" >>confdefs.h
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000015826
15827
15828fi
15829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +010015831if test "x$ac_cv_member_struct_stat_st_gen" = xyes
15832then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015833
Pablo Galindocc115e52021-08-02 20:06:40 +010015834printf "%s\n" "#define HAVE_STRUCT_STAT_ST_GEN 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015835
15836
15837fi
15838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +010015840if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes
15841then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015842
Pablo Galindocc115e52021-08-02 20:06:40 +010015843printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015844
15845
15846fi
15847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +010015849if test "x$ac_cv_member_struct_stat_st_blocks" = xyes
15850then :
Jack Jansendd19cf82001-12-06 22:36:17 +000015851
Pablo Galindocc115e52021-08-02 20:06:40 +010015852printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
15854
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015855fi
15856
Stefan Krah267b6392016-04-26 01:09:18 +020015857ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
15858 #include <sys/types.h>
15859 #include <pwd.h>
15860
15861"
Pablo Galindocc115e52021-08-02 20:06:40 +010015862if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes
15863then :
Stefan Krah267b6392016-04-26 01:09:18 +020015864
Pablo Galindocc115e52021-08-02 20:06:40 +010015865printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_GECOS 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020015866
15867
15868fi
15869ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
15870 #include <sys/types.h>
15871 #include <pwd.h>
15872
15873"
Pablo Galindocc115e52021-08-02 20:06:40 +010015874if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes
15875then :
Stefan Krah267b6392016-04-26 01:09:18 +020015876
Pablo Galindocc115e52021-08-02 20:06:40 +010015877printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_PASSWD 1" >>confdefs.h
Stefan Krah267b6392016-04-26 01:09:18 +020015878
15879
15880fi
15881
Zachary Ware6a6967e2016-10-01 00:47:27 -050015882# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
15883ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
15884"
Pablo Galindocc115e52021-08-02 20:06:40 +010015885if test "x$ac_cv_member_siginfo_t_si_band" = xyes
15886then :
Zachary Ware6a6967e2016-10-01 00:47:27 -050015887
Pablo Galindocc115e52021-08-02 20:06:40 +010015888printf "%s\n" "#define HAVE_SIGINFO_T_SI_BAND 1" >>confdefs.h
Zachary Ware6a6967e2016-10-01 00:47:27 -050015889
15890
15891fi
15892
Michael W. Hudson54241132001-12-07 15:38:26 +000015893
Pablo Galindocc115e52021-08-02 20:06:40 +010015894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
15895printf %s "checking for time.h that defines altzone... " >&6; }
15896if test ${ac_cv_header_time_altzone+y}
15897then :
15898 printf %s "(cached) " >&6
15899else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000015900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015902/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015903#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015904int
Pablo Galindocc115e52021-08-02 20:06:40 +010015905main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015906{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015907return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 ;
15909 return 0;
15910}
15911_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015912if ac_fn_c_try_compile "$LINENO"
15913then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015914 ac_cv_header_time_altzone=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015915else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015916 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015917fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015918rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000015919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920fi
15921
Pablo Galindocc115e52021-08-02 20:06:40 +010015922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
15923printf "%s\n" "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015924if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015925
Pablo Galindocc115e52021-08-02 20:06:40 +010015926printf "%s\n" "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015927
15928fi
15929
Guido van Rossumda88dad1995-01-26 00:46:29 +000015930was_it_defined=no
Pablo Galindocc115e52021-08-02 20:06:40 +010015931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
15932printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000015933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015934/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015935
15936#include <sys/types.h>
15937#include <sys/select.h>
15938#include <sys/time.h>
15939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940int
Pablo Galindocc115e52021-08-02 20:06:40 +010015941main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015942{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015943;
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 ;
15945 return 0;
15946}
15947_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015948if ac_fn_c_try_compile "$LINENO"
15949then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015950
15951
Pablo Galindocc115e52021-08-02 20:06:40 +010015952printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015953
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015954 was_it_defined=yes
15955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015957rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
15959printf "%s\n" "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960
Pablo Galindocc115e52021-08-02 20:06:40 +010015961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
15962printf %s "checking for addrinfo... " >&6; }
15963if test ${ac_cv_struct_addrinfo+y}
15964then :
15965 printf %s "(cached) " >&6
15966else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015968/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000015969#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015970int
Pablo Galindocc115e52021-08-02 20:06:40 +010015971main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000015972{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015973struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015974 ;
15975 return 0;
15976}
15977_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010015978if ac_fn_c_try_compile "$LINENO"
15979then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015980 ac_cv_struct_addrinfo=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010015981else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000015982 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015983fi
Pablo Galindocc115e52021-08-02 20:06:40 +010015984rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015985fi
15986
Pablo Galindocc115e52021-08-02 20:06:40 +010015987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
15988printf "%s\n" "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015989if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Pablo Galindocc115e52021-08-02 20:06:40 +010015991printf "%s\n" "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015992
15993fi
15994
Pablo Galindocc115e52021-08-02 20:06:40 +010015995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
15996printf %s "checking for sockaddr_storage... " >&6; }
15997if test ${ac_cv_struct_sockaddr_storage+y}
15998then :
15999 printf %s "(cached) " >&6
16000else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016002/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016003
16004# include <sys/types.h>
16005# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016006int
Pablo Galindocc115e52021-08-02 20:06:40 +010016007main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016008{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016009struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 ;
16011 return 0;
16012}
16013_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016014if ac_fn_c_try_compile "$LINENO"
16015then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016016 ac_cv_struct_sockaddr_storage=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016017else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016018 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016019fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016020rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016021fi
16022
Pablo Galindocc115e52021-08-02 20:06:40 +010016023{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
16024printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016025if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
Pablo Galindocc115e52021-08-02 20:06:40 +010016027printf "%s\n" "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016028
16029fi
16030
Pablo Galindocc115e52021-08-02 20:06:40 +010016031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
16032printf %s "checking for sockaddr_alg... " >&6; }
16033if test ${ac_cv_struct_sockaddr_alg+y}
16034then :
16035 printf %s "(cached) " >&6
16036else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16038/* end confdefs.h. */
16039
16040# include <sys/types.h>
16041# include <sys/socket.h>
16042# include <linux/if_alg.h>
16043int
Pablo Galindocc115e52021-08-02 20:06:40 +010016044main (void)
Christian Heimesdffa3942016-09-05 23:54:41 +020016045{
16046struct sockaddr_alg s
16047 ;
16048 return 0;
16049}
16050_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016051if ac_fn_c_try_compile "$LINENO"
16052then :
Christian Heimesdffa3942016-09-05 23:54:41 +020016053 ac_cv_struct_sockaddr_alg=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016054else $as_nop
Christian Heimesdffa3942016-09-05 23:54:41 +020016055 ac_cv_struct_sockaddr_alg=no
16056fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016057rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesdffa3942016-09-05 23:54:41 +020016058fi
16059
Pablo Galindocc115e52021-08-02 20:06:40 +010016060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
16061printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; }
Christian Heimesdffa3942016-09-05 23:54:41 +020016062if test $ac_cv_struct_sockaddr_alg = yes; then
16063
Pablo Galindocc115e52021-08-02 20:06:40 +010016064printf "%s\n" "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
Christian Heimesdffa3942016-09-05 23:54:41 +020016065
16066fi
16067
Guido van Rossum627b2d71993-12-24 10:39:16 +000016068# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016069
Pablo Galindocc115e52021-08-02 20:06:40 +010016070{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
16071printf %s "checking whether char is unsigned... " >&6; }
16072if test ${ac_cv_c_char_unsigned+y}
16073then :
16074 printf %s "(cached) " >&6
16075else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016078$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016079int
Pablo Galindocc115e52021-08-02 20:06:40 +010016080main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016081{
16082static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016083test_array [0] = 0;
16084return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000016085
16086 ;
16087 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016088}
Martin v. Löwis11437992002-04-12 09:54:03 +000016089_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016090if ac_fn_c_try_compile "$LINENO"
16091then :
Michael W. Hudson54241132001-12-07 15:38:26 +000016092 ac_cv_c_char_unsigned=no
Pablo Galindocc115e52021-08-02 20:06:40 +010016093else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016095fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016096rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016097fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
16099printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
16100if test $ac_cv_c_char_unsigned = yes; then
16101 printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016102
16103fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016104
Pablo Galindocc115e52021-08-02 20:06:40 +010016105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
16106printf %s "checking for an ANSI C-conforming const... " >&6; }
16107if test ${ac_cv_c_const+y}
16108then :
16109 printf %s "(cached) " >&6
16110else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016112/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016113
Martin v. Löwis11437992002-04-12 09:54:03 +000016114int
Pablo Galindocc115e52021-08-02 20:06:40 +010016115main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016116{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016117
Martin v. Löwis11437992002-04-12 09:54:03 +000016118#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016119 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016121 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000016122 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 char const *const *pcpcc;
16124 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 /* NEC SVR4.0.2 mips cc rejects this. */
16126 struct point {int x, y;};
16127 static struct point const zero = {0,0};
Pablo Galindocc115e52021-08-02 20:06:40 +010016128 /* IBM XL C 1.02.0.0 rejects this.
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 It does not let you subtract one const X* pointer from another in
16130 an arm of an if-expression whose if-part is not a constant
16131 expression */
16132 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016135 ++pcpcc;
16136 ppc = (char**) pcpcc;
16137 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016138 { /* SCO 3.2v4 cc rejects this sort of thing. */
16139 char tx;
16140 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016142
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 }
16146 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16147 int x[] = {25, 17};
16148 const int *foo = &x[0];
16149 ++foo;
16150 }
16151 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16152 typedef const int *iptr;
16153 iptr p = 0;
16154 ++p;
16155 }
Pablo Galindocc115e52021-08-02 20:06:40 +010016156 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000016157 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016158 struct s { int j; const int *ap[3]; } bx;
16159 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000016160 }
16161 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16162 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000016166#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016167
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 ;
16169 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016170}
Martin v. Löwis11437992002-04-12 09:54:03 +000016171_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016172if ac_fn_c_try_compile "$LINENO"
16173then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016174 ac_cv_c_const=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016175else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016177fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016179fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
16181printf "%s\n" "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016182if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016183
Pablo Galindocc115e52021-08-02 20:06:40 +010016184printf "%s\n" "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016185
16186fi
16187
Michael W. Hudson54241132001-12-07 15:38:26 +000016188
Guido van Rossumda88dad1995-01-26 00:46:29 +000016189works=no
Pablo Galindocc115e52021-08-02 20:06:40 +010016190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
16191printf %s "checking for working signed char... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016193/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016194
Martin v. Löwis11437992002-04-12 09:54:03 +000016195int
Pablo Galindocc115e52021-08-02 20:06:40 +010016196main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016197{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016198signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 ;
16200 return 0;
16201}
16202_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016203if ac_fn_c_try_compile "$LINENO"
16204then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000016205 works=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016206else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016207
Pablo Galindocc115e52021-08-02 20:06:40 +010016208printf "%s\n" "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016209
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016210
Guido van Rossum7f43da71994-08-01 12:15:30 +000016211fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016212rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16214printf "%s\n" "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016215
Guido van Rossumda88dad1995-01-26 00:46:29 +000016216have_prototypes=no
Pablo Galindocc115e52021-08-02 20:06:40 +010016217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
16218printf %s "checking for prototypes... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016220/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016221int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016222int
Pablo Galindocc115e52021-08-02 20:06:40 +010016223main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016224{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016225return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 ;
16227 return 0;
16228}
16229_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016230if ac_fn_c_try_compile "$LINENO"
16231then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016232
Pablo Galindocc115e52021-08-02 20:06:40 +010016233printf "%s\n" "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016234
Matthias Kloseb159a552010-04-25 21:00:44 +000016235 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016236fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016237rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
16239printf "%s\n" "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016240
Guido van Rossumda88dad1995-01-26 00:46:29 +000016241works=no
Pablo Galindocc115e52021-08-02 20:06:40 +010016242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
16243printf %s "checking for variable length prototypes and stdarg.h... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016245/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016246
16247#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000016248int foo(int x, ...) {
16249 va_list va;
16250 va_start(va, x);
16251 va_arg(va, int);
16252 va_arg(va, char *);
16253 va_arg(va, double);
16254 return 0;
16255}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016256
Martin v. Löwis11437992002-04-12 09:54:03 +000016257int
Pablo Galindocc115e52021-08-02 20:06:40 +010016258main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016259{
Guido van Rossum90eea071996-08-30 20:58:57 +000016260return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 ;
16262 return 0;
16263}
16264_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016265if ac_fn_c_try_compile "$LINENO"
16266then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016267
16268
Pablo Galindocc115e52021-08-02 20:06:40 +010016269printf "%s\n" "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016270
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016271 works=yes
16272
Guido van Rossum627b2d71993-12-24 10:39:16 +000016273fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016274rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16275{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5
16276printf "%s\n" "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016277
Martin v. Löwisd6320502004-08-12 13:45:08 +000016278# check for socketpair
Pablo Galindocc115e52021-08-02 20:06:40 +010016279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
16280printf %s "checking for socketpair... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016282/* end confdefs.h. */
16283
16284#include <sys/types.h>
16285#include <sys/socket.h>
16286
16287int
Pablo Galindocc115e52021-08-02 20:06:40 +010016288main (void)
Martin v. Löwisd6320502004-08-12 13:45:08 +000016289{
16290void *x=socketpair
16291 ;
16292 return 0;
16293}
16294_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016295if ac_fn_c_try_compile "$LINENO"
16296then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000016297
Pablo Galindocc115e52021-08-02 20:06:40 +010016298printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000016299
Pablo Galindocc115e52021-08-02 20:06:40 +010016300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16301printf "%s\n" "yes" >&6; }
16302else $as_nop
16303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16304printf "%s\n" "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000016305
16306fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016307rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000016308
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016309# check if sockaddr has sa_len member
Pablo Galindocc115e52021-08-02 20:06:40 +010016310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
16311printf %s "checking if sockaddr has sa_len member... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016313/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016314#include <sys/types.h>
16315#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016316int
Pablo Galindocc115e52021-08-02 20:06:40 +010016317main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016318{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016319struct sockaddr x;
16320x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 ;
16322 return 0;
16323}
16324_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016325if ac_fn_c_try_compile "$LINENO"
16326then :
16327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16328printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016329
Pablo Galindocc115e52021-08-02 20:06:40 +010016330printf "%s\n" "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016331
Pablo Galindocc115e52021-08-02 20:06:40 +010016332else $as_nop
16333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16334printf "%s\n" "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016335
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016336fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016337rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016339# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000016340
16341
Matthias Kloseb9621712010-04-24 17:59:49 +000016342ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Pablo Galindocc115e52021-08-02 20:06:40 +010016343if test "x$ac_cv_func_gethostbyname_r" = xyes
16344then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016345
Pablo Galindocc115e52021-08-02 20:06:40 +010016346 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016347
Pablo Galindocc115e52021-08-02 20:06:40 +010016348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
16349printf %s "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016350 OLD_CFLAGS=$CFLAGS
16351 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016353/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016354
16355# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016356
Martin v. Löwis11437992002-04-12 09:54:03 +000016357int
Pablo Galindocc115e52021-08-02 20:06:40 +010016358main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016359{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016360
16361 char *name;
16362 struct hostent *he, *res;
16363 char buffer[2048];
16364 int buflen = 2048;
16365 int h_errnop;
16366
16367 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016368
16369 ;
16370 return 0;
16371}
16372_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016373if ac_fn_c_try_compile "$LINENO"
16374then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016375
Pablo Galindocc115e52021-08-02 20:06:40 +010016376 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016377
Martin v. Löwis11437992002-04-12 09:54:03 +000016378
Pablo Galindocc115e52021-08-02 20:06:40 +010016379printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016380
Pablo Galindocc115e52021-08-02 20:06:40 +010016381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16382printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016383
Pablo Galindocc115e52021-08-02 20:06:40 +010016384else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016385
Pablo Galindocc115e52021-08-02 20:06:40 +010016386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16387printf "%s\n" "no" >&6; }
16388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
16389printf %s "checking gethostbyname_r with 5 args... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016391/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016393# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016394
Martin v. Löwis11437992002-04-12 09:54:03 +000016395int
Pablo Galindocc115e52021-08-02 20:06:40 +010016396main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016397{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016398
16399 char *name;
16400 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000016401 char buffer[2048];
16402 int buflen = 2048;
16403 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016404
Matthias Kloseb159a552010-04-25 21:00:44 +000016405 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000016406
16407 ;
16408 return 0;
16409}
16410_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016411if ac_fn_c_try_compile "$LINENO"
16412then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016413
Pablo Galindocc115e52021-08-02 20:06:40 +010016414 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016415
Martin v. Löwis11437992002-04-12 09:54:03 +000016416
Pablo Galindocc115e52021-08-02 20:06:40 +010016417printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016418
Pablo Galindocc115e52021-08-02 20:06:40 +010016419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16420printf "%s\n" "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016421
Pablo Galindocc115e52021-08-02 20:06:40 +010016422else $as_nop
Skip Montanaro6dead952003-09-25 14:50:04 +000016423
Pablo Galindocc115e52021-08-02 20:06:40 +010016424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16425printf "%s\n" "no" >&6; }
16426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
16427printf %s "checking gethostbyname_r with 3 args... " >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16429/* end confdefs.h. */
16430
16431# include <netdb.h>
16432
16433int
Pablo Galindocc115e52021-08-02 20:06:40 +010016434main (void)
Matthias Kloseb159a552010-04-25 21:00:44 +000016435{
16436
16437 char *name;
16438 struct hostent *he;
16439 struct hostent_data data;
16440
16441 (void) gethostbyname_r(name, he, &data);
16442
16443 ;
16444 return 0;
16445}
16446_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016447if ac_fn_c_try_compile "$LINENO"
16448then :
Matthias Kloseb159a552010-04-25 21:00:44 +000016449
Pablo Galindocc115e52021-08-02 20:06:40 +010016450 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016451
16452
Pablo Galindocc115e52021-08-02 20:06:40 +010016453printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Matthias Kloseb159a552010-04-25 21:00:44 +000016454
Pablo Galindocc115e52021-08-02 20:06:40 +010016455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16456printf "%s\n" "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000016457
Pablo Galindocc115e52021-08-02 20:06:40 +010016458else $as_nop
Matthias Kloseb159a552010-04-25 21:00:44 +000016459
Pablo Galindocc115e52021-08-02 20:06:40 +010016460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16461printf "%s\n" "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016462
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016463fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016464rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016465
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016466fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016467rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016468
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016469fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016470rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016471 CFLAGS=$OLD_CFLAGS
16472
Pablo Galindocc115e52021-08-02 20:06:40 +010016473else $as_nop
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016474
Matthias Kloseb9621712010-04-24 17:59:49 +000016475 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Pablo Galindocc115e52021-08-02 20:06:40 +010016476if test "x$ac_cv_func_gethostbyname" = xyes
16477then :
16478 printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016480fi
16481
Michael W. Hudson54241132001-12-07 15:38:26 +000016482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016483fi
16484
Michael W. Hudson54241132001-12-07 15:38:26 +000016485
16486
16487
16488
16489
16490
Guido van Rossum627b2d71993-12-24 10:39:16 +000016491# checks for system services
16492# (none yet)
16493
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000016495ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Pablo Galindocc115e52021-08-02 20:06:40 +010016496if test "x$ac_cv_func___fpu_control" = xyes
16497then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016498
Pablo Galindocc115e52021-08-02 20:06:40 +010016499else $as_nop
16500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
16501printf %s "checking for __fpu_control in -lieee... " >&6; }
16502if test ${ac_cv_lib_ieee___fpu_control+y}
16503then :
16504 printf %s "(cached) " >&6
16505else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000016506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016507LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511/* Override any GCC internal prototype to avoid an error.
16512 Use char because int might match the return type of a GCC
16513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016514char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016515int
Pablo Galindocc115e52021-08-02 20:06:40 +010016516main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000016517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 ;
16520 return 0;
16521}
16522_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016523if ac_fn_c_try_link "$LINENO"
16524then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 ac_cv_lib_ieee___fpu_control=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016526else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016527 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016528fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016529rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000016530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016531LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016532fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
16534printf "%s\n" "$ac_cv_lib_ieee___fpu_control" >&6; }
16535if test "x$ac_cv_lib_ieee___fpu_control" = xyes
16536then :
16537 printf "%s\n" "#define HAVE_LIBIEEE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016538
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016539 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016540
Guido van Rossum627b2d71993-12-24 10:39:16 +000016541fi
16542
Michael W. Hudson54241132001-12-07 15:38:26 +000016543
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016544fi
16545
Michael W. Hudson54241132001-12-07 15:38:26 +000016546
Guido van Rossum7f43da71994-08-01 12:15:30 +000016547# check for --with-libm=...
16548
Guido van Rossum563e7081996-09-10 18:20:48 +000016549case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016550Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016551*) LIBM=-lm
16552esac
Pablo Galindocc115e52021-08-02 20:06:40 +010016553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
16554printf %s "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556# Check whether --with-libm was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010016557if test ${with_libm+y}
16558then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016559 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000016560if test "$withval" = no
16561then LIBM=
Pablo Galindocc115e52021-08-02 20:06:40 +010016562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
16563printf "%s\n" "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016564elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016565then LIBM=$withval
Pablo Galindocc115e52021-08-02 20:06:40 +010016566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
16567printf "%s\n" "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016568else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016569fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016570else $as_nop
16571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
16572printf "%s\n" "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573fi
16574
Guido van Rossum7f43da71994-08-01 12:15:30 +000016575
16576# check for --with-libc=...
16577
Pablo Galindocc115e52021-08-02 20:06:40 +010016578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
16579printf %s "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581# Check whether --with-libc was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010016582if test ${with_libc+y}
16583then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000016585if test "$withval" = no
16586then LIBC=
Pablo Galindocc115e52021-08-02 20:06:40 +010016587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
16588printf "%s\n" "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000016589elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016590then LIBC=$withval
Pablo Galindocc115e52021-08-02 20:06:40 +010016591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
16592printf "%s\n" "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016593else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000016594fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016595else $as_nop
16596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
16597printf "%s\n" "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598fi
16599
Guido van Rossum7f43da71994-08-01 12:15:30 +000016600
Stefan Krah1919b7e2012-03-21 18:25:23 +010016601# **************************************
16602# * Check for gcc x64 inline assembler *
16603# **************************************
16604
Pablo Galindocc115e52021-08-02 20:06:40 +010016605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
16606printf %s "checking for x64 gcc inline assembler... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16608/* end confdefs.h. */
16609
16610int
Pablo Galindocc115e52021-08-02 20:06:40 +010016611main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010016612{
16613
16614 __asm__ __volatile__ ("movq %rcx, %rax");
16615
16616 ;
16617 return 0;
16618}
16619_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016620if ac_fn_c_try_link "$LINENO"
16621then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010016622 have_gcc_asm_for_x64=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016623else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010016624 have_gcc_asm_for_x64=no
16625fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016626rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016627 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +010016628{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
16629printf "%s\n" "$have_gcc_asm_for_x64" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010016630if test "$have_gcc_asm_for_x64" = yes
16631then
16632
Pablo Galindocc115e52021-08-02 20:06:40 +010016633printf "%s\n" "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010016634
16635fi
16636
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016637# **************************************************
16638# * Check for various properties of floating point *
16639# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016640
Pablo Galindocc115e52021-08-02 20:06:40 +010016641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
16642printf %s "checking whether float word ordering is bigendian... " >&6; }
16643if test ${ax_cv_c_float_words_bigendian+y}
16644then :
16645 printf %s "(cached) " >&6
16646else $as_nop
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016647
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016648
16649ax_cv_c_float_words_bigendian=unknown
16650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016651/* end confdefs.h. */
16652
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016653
16654double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
16655
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016656
16657_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016658if ac_fn_c_try_compile "$LINENO"
16659then :
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016660
16661
Christian Heimes5d6e8c12021-03-27 14:44:04 +010016662if grep noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016663 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016664fi
Christian Heimes5d6e8c12021-03-27 14:44:04 +010016665if grep seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016666 if test "$ax_cv_c_float_words_bigendian" = unknown; then
16667 ax_cv_c_float_words_bigendian=no
16668 else
16669 ax_cv_c_float_words_bigendian=unknown
16670 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016671fi
16672
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016673
16674fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016675rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016676fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
16678printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016679
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016680case $ax_cv_c_float_words_bigendian in
16681 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016682
Pablo Galindocc115e52021-08-02 20:06:40 +010016683printf "%s\n" "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016684 ;;
16685 no)
16686 ;;
16687 *)
16688 as_fn_error $? "
16689
16690Unknown float word ordering. You need to manually preset
16691ax_cv_c_float_words_bigendian=no (or yes) according to your system.
16692
16693 " "$LINENO" 5 ;;
16694esac
16695
16696
16697if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016698then
16699
Pablo Galindocc115e52021-08-02 20:06:40 +010016700printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016701
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016702elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016703then
16704
Pablo Galindocc115e52021-08-02 20:06:40 +010016705printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070016706
16707else
16708 # Some ARM platforms use a mixed-endian representation for doubles.
16709 # While Python doesn't currently have full support for these platforms
16710 # (see e.g., issue 1762561), we can at least make sure that float <-> string
16711 # conversions work.
16712 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
16713 # or little, then it must be this?
16714
Pablo Galindocc115e52021-08-02 20:06:40 +010016715printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016716
16717fi
16718
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016719# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000016720# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000016721# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000016722# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016723# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000016724# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016725
16726# This inline assembler syntax may also work for suncc and icc,
16727# so we try it on all platforms.
16728
Pablo Galindocc115e52021-08-02 20:06:40 +010016729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
16730printf %s "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000016731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016732/* end confdefs.h. */
16733
16734int
Pablo Galindocc115e52021-08-02 20:06:40 +010016735main (void)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016736{
16737
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016738 unsigned short cw;
16739 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
16740 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016741
16742 ;
16743 return 0;
16744}
16745_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016746if ac_fn_c_try_link "$LINENO"
16747then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016748 have_gcc_asm_for_x87=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016749else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016750 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016751fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016752rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016753 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +010016754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
16755printf "%s\n" "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000016756if test "$have_gcc_asm_for_x87" = yes
16757then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016758
Pablo Galindocc115e52021-08-02 20:06:40 +010016759printf "%s\n" "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016760
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016762
Pablo Galindocc115e52021-08-02 20:06:40 +010016763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
16764printf %s "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16766/* end confdefs.h. */
16767
16768int
Pablo Galindocc115e52021-08-02 20:06:40 +010016769main (void)
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016770{
16771
16772 unsigned int fpcr;
16773 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
16774 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
16775
16776 ;
16777 return 0;
16778}
16779_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016780if ac_fn_c_try_link "$LINENO"
16781then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016782 have_gcc_asm_for_mc68881=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016783else $as_nop
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016784 have_gcc_asm_for_mc68881=no
16785fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016786rm -f core conftest.err conftest.$ac_objext conftest.beam \
Stefan Krahe31db2a2015-07-02 20:27:56 +020016787 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +010016788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
16789printf "%s\n" "$have_gcc_asm_for_mc68881" >&6; }
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016790if test "$have_gcc_asm_for_mc68881" = yes
16791then
16792
Pablo Galindocc115e52021-08-02 20:06:40 +010016793printf "%s\n" "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040016794
16795fi
16796
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016797# Detect whether system arithmetic is subject to x87-style double
16798# rounding issues. The result of this test has little meaning on non
16799# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
16800# mode is round-to-nearest and double rounding issues are present, and
16801# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Pablo Galindocc115e52021-08-02 20:06:40 +010016802{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
16803printf %s "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016804# $BASECFLAGS may affect the result
16805ac_save_cc="$CC"
16806CC="$CC $BASECFLAGS"
Pablo Galindocc115e52021-08-02 20:06:40 +010016807if test "$cross_compiling" = yes
16808then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016809 ac_cv_x87_double_rounding=no
Pablo Galindocc115e52021-08-02 20:06:40 +010016810else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016812/* end confdefs.h. */
16813
16814#include <stdlib.h>
16815#include <math.h>
16816int main() {
16817 volatile double x, y, z;
16818 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
16819 x = 0.99999999999999989; /* 1-2**-53 */
16820 y = 1./x;
16821 if (y != 1.)
16822 exit(0);
16823 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
16824 x = 1e16;
16825 y = 2.99999;
16826 z = x + y;
16827 if (z != 1e16+4.)
16828 exit(0);
16829 /* both tests show evidence of double rounding */
16830 exit(1);
16831}
16832
16833_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010016834if ac_fn_c_try_run "$LINENO"
16835then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016836 ac_cv_x87_double_rounding=no
Pablo Galindocc115e52021-08-02 20:06:40 +010016837else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016838 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016842fi
16843
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016844CC="$ac_save_cc"
Pablo Galindocc115e52021-08-02 20:06:40 +010016845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
16846printf "%s\n" "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016847if test "$ac_cv_x87_double_rounding" = yes
16848then
16849
Pablo Galindocc115e52021-08-02 20:06:40 +010016850printf "%s\n" "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000016851
16852fi
16853
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000016854# ************************************
16855# * Check for mathematical functions *
16856# ************************************
16857
16858LIBS_SAVE=$LIBS
16859LIBS="$LIBS $LIBM"
16860
Pablo Galindocc115e52021-08-02 20:06:40 +010016861ac_fn_c_check_func "$LINENO" "acosh" "ac_cv_func_acosh"
16862if test "x$ac_cv_func_acosh" = xyes
16863then :
16864 printf "%s\n" "#define HAVE_ACOSH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016865
16866fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016867ac_fn_c_check_func "$LINENO" "asinh" "ac_cv_func_asinh"
16868if test "x$ac_cv_func_asinh" = xyes
16869then :
16870 printf "%s\n" "#define HAVE_ASINH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016871
16872fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016873ac_fn_c_check_func "$LINENO" "atanh" "ac_cv_func_atanh"
16874if test "x$ac_cv_func_atanh" = xyes
16875then :
16876 printf "%s\n" "#define HAVE_ATANH 1" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016877
Pablo Galindocc115e52021-08-02 20:06:40 +010016878fi
16879ac_fn_c_check_func "$LINENO" "copysign" "ac_cv_func_copysign"
16880if test "x$ac_cv_func_copysign" = xyes
16881then :
16882 printf "%s\n" "#define HAVE_COPYSIGN 1" >>confdefs.h
16883
16884fi
16885ac_fn_c_check_func "$LINENO" "erf" "ac_cv_func_erf"
16886if test "x$ac_cv_func_erf" = xyes
16887then :
16888 printf "%s\n" "#define HAVE_ERF 1" >>confdefs.h
16889
16890fi
16891ac_fn_c_check_func "$LINENO" "erfc" "ac_cv_func_erfc"
16892if test "x$ac_cv_func_erfc" = xyes
16893then :
16894 printf "%s\n" "#define HAVE_ERFC 1" >>confdefs.h
16895
16896fi
16897ac_fn_c_check_func "$LINENO" "expm1" "ac_cv_func_expm1"
16898if test "x$ac_cv_func_expm1" = xyes
16899then :
16900 printf "%s\n" "#define HAVE_EXPM1 1" >>confdefs.h
16901
16902fi
16903ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
16904if test "x$ac_cv_func_finite" = xyes
16905then :
16906 printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h
16907
16908fi
16909ac_fn_c_check_func "$LINENO" "gamma" "ac_cv_func_gamma"
16910if test "x$ac_cv_func_gamma" = xyes
16911then :
16912 printf "%s\n" "#define HAVE_GAMMA 1" >>confdefs.h
16913
16914fi
16915
16916ac_fn_c_check_func "$LINENO" "hypot" "ac_cv_func_hypot"
16917if test "x$ac_cv_func_hypot" = xyes
16918then :
16919 printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h
16920
16921fi
16922ac_fn_c_check_func "$LINENO" "lgamma" "ac_cv_func_lgamma"
16923if test "x$ac_cv_func_lgamma" = xyes
16924then :
16925 printf "%s\n" "#define HAVE_LGAMMA 1" >>confdefs.h
16926
16927fi
16928ac_fn_c_check_func "$LINENO" "log1p" "ac_cv_func_log1p"
16929if test "x$ac_cv_func_log1p" = xyes
16930then :
16931 printf "%s\n" "#define HAVE_LOG1P 1" >>confdefs.h
16932
16933fi
16934ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2"
16935if test "x$ac_cv_func_log2" = xyes
16936then :
16937 printf "%s\n" "#define HAVE_LOG2 1" >>confdefs.h
16938
16939fi
16940ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round"
16941if test "x$ac_cv_func_round" = xyes
16942then :
16943 printf "%s\n" "#define HAVE_ROUND 1" >>confdefs.h
16944
16945fi
16946ac_fn_c_check_func "$LINENO" "tgamma" "ac_cv_func_tgamma"
16947if test "x$ac_cv_func_tgamma" = xyes
16948then :
16949 printf "%s\n" "#define HAVE_TGAMMA 1" >>confdefs.h
16950
16951fi
16952
16953ac_fn_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
16954" "$ac_c_undeclared_builtin_options" "CFLAGS"
16955if test "x$ac_cv_have_decl_isinf" = xyes
16956then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016957 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010016958else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016959 ac_have_decl=0
16960fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016961printf "%s\n" "#define HAVE_DECL_ISINF $ac_have_decl" >>confdefs.h
16962ac_fn_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
16963" "$ac_c_undeclared_builtin_options" "CFLAGS"
16964if test "x$ac_cv_have_decl_isnan" = xyes
16965then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016966 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010016967else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016968 ac_have_decl=0
16969fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016970printf "%s\n" "#define HAVE_DECL_ISNAN $ac_have_decl" >>confdefs.h
16971ac_fn_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
16972" "$ac_c_undeclared_builtin_options" "CFLAGS"
16973if test "x$ac_cv_have_decl_isfinite" = xyes
16974then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016975 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010016976else $as_nop
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016977 ac_have_decl=0
16978fi
Pablo Galindocc115e52021-08-02 20:06:40 +010016979printf "%s\n" "#define HAVE_DECL_ISFINITE $ac_have_decl" >>confdefs.h
Mark Dickinsonec0d3552010-11-20 10:29:12 +000016980
16981
Mark Dickinsona614f042009-11-28 12:48:43 +000016982# For multiprocessing module, check that sem_open
16983# actually works. For FreeBSD versions <= 7.2,
16984# the kernel module that provides POSIX semaphores
16985# isn't loaded by default, so an attempt to call
16986# sem_open results in a 'Signal 12' error.
Pablo Galindocc115e52021-08-02 20:06:40 +010016987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
16988printf %s "checking whether POSIX semaphores are enabled... " >&6; }
16989if test ${ac_cv_posix_semaphores_enabled+y}
16990then :
16991 printf %s "(cached) " >&6
16992else $as_nop
16993 if test "$cross_compiling" = yes
16994then :
Mark Dickinsona614f042009-11-28 12:48:43 +000016995 ac_cv_posix_semaphores_enabled=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010016996else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000016997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000016998/* end confdefs.h. */
16999
17000#include <unistd.h>
17001#include <fcntl.h>
17002#include <stdio.h>
17003#include <semaphore.h>
17004#include <sys/stat.h>
17005
17006int main(void) {
17007 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
17008 if (a == SEM_FAILED) {
17009 perror("sem_open");
17010 return 1;
17011 }
17012 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017013 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000017014 return 0;
17015}
17016
17017_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017018if ac_fn_c_try_run "$LINENO"
17019then :
Mark Dickinsona614f042009-11-28 12:48:43 +000017020 ac_cv_posix_semaphores_enabled=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017021else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017022 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000017023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000017026fi
17027
17028
Mark Dickinsona614f042009-11-28 12:48:43 +000017029fi
17030
Pablo Galindocc115e52021-08-02 20:06:40 +010017031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
17032printf "%s\n" "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000017033if test $ac_cv_posix_semaphores_enabled = no
17034then
17035
Pablo Galindocc115e52021-08-02 20:06:40 +010017036printf "%s\n" "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000017037
17038fi
17039
Mark Dickinson10683072009-04-18 21:18:19 +000017040# Multiprocessing check for broken sem_getvalue
Pablo Galindocc115e52021-08-02 20:06:40 +010017041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
17042printf %s "checking for broken sem_getvalue... " >&6; }
17043if test ${ac_cv_broken_sem_getvalue+y}
17044then :
17045 printf %s "(cached) " >&6
17046else $as_nop
17047 if test "$cross_compiling" = yes
17048then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017049 ac_cv_broken_sem_getvalue=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017050else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000017052/* end confdefs.h. */
17053
17054#include <unistd.h>
17055#include <fcntl.h>
17056#include <stdio.h>
17057#include <semaphore.h>
17058#include <sys/stat.h>
17059
17060int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000017061 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000017062 int count;
17063 int res;
17064 if(a==SEM_FAILED){
17065 perror("sem_open");
17066 return 1;
17067
17068 }
17069 res = sem_getvalue(a, &count);
17070 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000017071 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000017072 return res==-1 ? 1 : 0;
17073}
17074
Mark Dickinson10683072009-04-18 21:18:19 +000017075_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017076if ac_fn_c_try_run "$LINENO"
17077then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017078 ac_cv_broken_sem_getvalue=no
Pablo Galindocc115e52021-08-02 20:06:40 +010017079else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17083 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017084fi
17085
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017086
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017087fi
17088
Pablo Galindocc115e52021-08-02 20:06:40 +010017089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
17090printf "%s\n" "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017091if test $ac_cv_broken_sem_getvalue = yes
17092then
17093
Pablo Galindocc115e52021-08-02 20:06:40 +010017094printf "%s\n" "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000017095
17096fi
17097
Pablo Galindocc115e52021-08-02 20:06:40 +010017098ac_fn_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
17099" "$ac_c_undeclared_builtin_options" "CFLAGS"
17100if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes
17101then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017102 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017103else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017104 ac_have_decl=0
17105fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017106printf "%s\n" "#define HAVE_DECL_RTLD_LAZY $ac_have_decl" >>confdefs.h
17107ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
17108" "$ac_c_undeclared_builtin_options" "CFLAGS"
17109if test "x$ac_cv_have_decl_RTLD_NOW" = xyes
17110then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017111 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017112else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017113 ac_have_decl=0
17114fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017115printf "%s\n" "#define HAVE_DECL_RTLD_NOW $ac_have_decl" >>confdefs.h
17116ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
17117" "$ac_c_undeclared_builtin_options" "CFLAGS"
17118if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes
17119then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017120 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017121else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017122 ac_have_decl=0
17123fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017124printf "%s\n" "#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl" >>confdefs.h
17125ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
17126" "$ac_c_undeclared_builtin_options" "CFLAGS"
17127if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes
17128then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017129 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017130else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017131 ac_have_decl=0
17132fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017133printf "%s\n" "#define HAVE_DECL_RTLD_LOCAL $ac_have_decl" >>confdefs.h
17134ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
17135" "$ac_c_undeclared_builtin_options" "CFLAGS"
17136if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes
17137then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017138 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017139else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017140 ac_have_decl=0
17141fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017142printf "%s\n" "#define HAVE_DECL_RTLD_NODELETE $ac_have_decl" >>confdefs.h
17143ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
17144" "$ac_c_undeclared_builtin_options" "CFLAGS"
17145if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes
17146then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017147 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017148else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017149 ac_have_decl=0
17150fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017151printf "%s\n" "#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl" >>confdefs.h
17152ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
17153" "$ac_c_undeclared_builtin_options" "CFLAGS"
17154if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes
17155then :
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017156 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017157else $as_nop
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017158 ac_have_decl=0
17159fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017160printf "%s\n" "#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl" >>confdefs.h
17161ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
17162" "$ac_c_undeclared_builtin_options" "CFLAGS"
17163if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes
17164then :
Michael Feltc5ae1692017-12-19 13:58:49 +010017165 ac_have_decl=1
Pablo Galindocc115e52021-08-02 20:06:40 +010017166else $as_nop
Michael Feltc5ae1692017-12-19 13:58:49 +010017167 ac_have_decl=0
17168fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017169printf "%s\n" "#define HAVE_DECL_RTLD_MEMBER $ac_have_decl" >>confdefs.h
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030017170
17171
Mark Dickinsonbd792642009-03-18 20:06:12 +000017172# determine what size digit to use for Python's longs
Pablo Galindocc115e52021-08-02 20:06:40 +010017173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
17174printf %s "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017175# Check whether --enable-big-digits was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010017176if test ${enable_big_digits+y}
17177then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000017178 enableval=$enable_big_digits; case $enable_big_digits in
17179yes)
17180 enable_big_digits=30 ;;
17181no)
17182 enable_big_digits=15 ;;
1718315|30)
17184 ;;
17185*)
Victor Stinnere0be4232011-10-25 13:06:09 +020017186 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 +000017187esac
Pablo Galindocc115e52021-08-02 20:06:40 +010017188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
17189printf "%s\n" "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017190
Pablo Galindocc115e52021-08-02 20:06:40 +010017191printf "%s\n" "#define PYLONG_BITS_IN_DIGIT $enable_big_digits" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +000017192
17193
Pablo Galindocc115e52021-08-02 20:06:40 +010017194else $as_nop
17195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
17196printf "%s\n" "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000017197fi
17198
17199
Guido van Rossumef2255b2000-03-10 22:30:29 +000017200# check for wchar.h
Pablo Galindocc115e52021-08-02 20:06:40 +010017201ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
17202if test "x$ac_cv_header_wchar_h" = xyes
17203then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017204
17205
Pablo Galindocc115e52021-08-02 20:06:40 +010017206printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017207
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017208 wchar_h="yes"
17209
Pablo Galindocc115e52021-08-02 20:06:40 +010017210else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017212
17213fi
17214
Michael W. Hudson54241132001-12-07 15:38:26 +000017215
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017216# determine wchar_t size
17217if test "$wchar_h" = yes
17218then
Matthias Kloseb9621712010-04-24 17:59:49 +000017219 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17222# This bug is HP SR number 8606223364.
Pablo Galindocc115e52021-08-02 20:06:40 +010017223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
17224printf %s "checking size of wchar_t... " >&6; }
17225if test ${ac_cv_sizeof_wchar_t+y}
17226then :
17227 printf %s "(cached) " >&6
17228else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
Pablo Galindocc115e52021-08-02 20:06:40 +010017230"
17231then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017232
Pablo Galindocc115e52021-08-02 20:06:40 +010017233else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017234 if test "$ac_cv_type_wchar_t" = yes; then
Pablo Galindocc115e52021-08-02 20:06:40 +010017235 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17236printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017237as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020017238See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239 else
17240 ac_cv_sizeof_wchar_t=0
17241 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017243
Martin v. Löwis11437992002-04-12 09:54:03 +000017244fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
17246printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247
17248
17249
Pablo Galindocc115e52021-08-02 20:06:40 +010017250printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017251
Michael W. Hudson54241132001-12-07 15:38:26 +000017252
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017253fi
17254
Pablo Galindocc115e52021-08-02 20:06:40 +010017255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
17256printf %s "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017257have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000017258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017259/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017260
17261#include <tcl.h>
17262#if TCL_UTF_MAX != 6
17263# error "NOT UCS4_TCL"
17264#endif
17265int
Pablo Galindocc115e52021-08-02 20:06:40 +010017266main (void)
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017267{
17268
17269 ;
17270 return 0;
17271}
17272_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017273if ac_fn_c_try_compile "$LINENO"
17274then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017275
17276
Pablo Galindocc115e52021-08-02 20:06:40 +010017277printf "%s\n" "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017278
17279 have_ucs4_tcl=yes
17280
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017281fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017282rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
17284printf "%s\n" "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017285
Skip Montanaro6dead952003-09-25 14:50:04 +000017286# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017287if test "$wchar_h" = yes
17288then
17289 # check whether wchar_t is signed or not
Pablo Galindocc115e52021-08-02 20:06:40 +010017290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
17291printf %s "checking whether wchar_t is signed... " >&6; }
17292 if test ${ac_cv_wchar_t_signed+y}
17293then :
17294 printf %s "(cached) " >&6
17295else $as_nop
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017296
Pablo Galindocc115e52021-08-02 20:06:40 +010017297 if test "$cross_compiling" = yes
17298then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017299 ac_cv_wchar_t_signed=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017300else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017302/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017303
17304 #include <wchar.h>
17305 int main()
17306 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017307 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110017308 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017309 }
17310
17311_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017312if ac_fn_c_try_run "$LINENO"
17313then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017314 ac_cv_wchar_t_signed=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017315else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017316 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17319 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017320fi
17321
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017322fi
17323
Pablo Galindocc115e52021-08-02 20:06:40 +010017324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
17325printf "%s\n" "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017326fi
17327
Pablo Galindocc115e52021-08-02 20:06:40 +010017328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
17329printf %s "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017330# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020017331if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000017332 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000017333then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017334
Pablo Galindocc115e52021-08-02 20:06:40 +010017335printf "%s\n" "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000017336
Pablo Galindocc115e52021-08-02 20:06:40 +010017337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17338printf "%s\n" "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000017339else
Pablo Galindocc115e52021-08-02 20:06:40 +010017340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17341printf "%s\n" "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017342fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017343
Jakub Kulík9032cf52021-04-30 15:21:42 +020017344case $ac_sys_system/$ac_sys_release in
17345SunOS/*)
17346 if test -f /etc/os-release; then
17347 OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
17348 if test "x$OS_NAME" = "xOracle Solaris"; then
17349 # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
17350 # non-Unicode locales is not Unicode and hence cannot be used directly.
17351 # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html
17352
Pablo Galindocc115e52021-08-02 20:06:40 +010017353printf "%s\n" "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h
Jakub Kulík9032cf52021-04-30 15:21:42 +020017354
17355 fi
17356 fi
17357 ;;
17358esac
17359
Guido van Rossumef2255b2000-03-10 22:30:29 +000017360# check for endianness
Pablo Galindocc115e52021-08-02 20:06:40 +010017361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17362printf %s "checking whether byte ordering is bigendian... " >&6; }
17363if test ${ac_cv_c_bigendian+y}
17364then :
17365 printf %s "(cached) " >&6
17366else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 ac_cv_c_bigendian=unknown
17368 # See if we're dealing with a universal compiler.
17369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17370/* end confdefs.h. */
17371#ifndef __APPLE_CC__
17372 not a universal capable compiler
17373 #endif
17374 typedef int dummy;
17375
Skip Montanaro6dead952003-09-25 14:50:04 +000017376_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017377if ac_fn_c_try_compile "$LINENO"
17378then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017379
17380 # Check for potential -arch flags. It is not universal unless
17381 # there are at least two -arch flags with different values.
17382 ac_arch=
17383 ac_prev=
17384 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17385 if test -n "$ac_prev"; then
17386 case $ac_word in
17387 i?86 | x86_64 | ppc | ppc64)
17388 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17389 ac_arch=$ac_word
17390 else
17391 ac_cv_c_bigendian=universal
17392 break
17393 fi
17394 ;;
17395 esac
17396 ac_prev=
17397 elif test "x$ac_word" = "x-arch"; then
17398 ac_prev=arch
17399 fi
17400 done
17401fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017402rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 if test $ac_cv_c_bigendian = unknown; then
17404 # See if sys/param.h defines the BYTE_ORDER macro.
17405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017406/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017407#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017408 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017409
Martin v. Löwis11437992002-04-12 09:54:03 +000017410int
Pablo Galindocc115e52021-08-02 20:06:40 +010017411main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017412{
Matthias Kloseb9621712010-04-24 17:59:49 +000017413#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17414 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17415 && LITTLE_ENDIAN)
17416 bogus endian macros
17417 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017418
17419 ;
17420 return 0;
17421}
17422_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017423if ac_fn_c_try_compile "$LINENO"
17424then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017425 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000017426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017427/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017428#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017430
Martin v. Löwis11437992002-04-12 09:54:03 +000017431int
Pablo Galindocc115e52021-08-02 20:06:40 +010017432main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017433{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017434#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000017435 not big endian
17436 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017437
17438 ;
17439 return 0;
17440}
17441_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017442if ac_fn_c_try_compile "$LINENO"
17443then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017444 ac_cv_c_bigendian=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017445else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017446 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017447fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017448rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017449fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017450rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 fi
17452 if test $ac_cv_c_bigendian = unknown; then
17453 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017455/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017456#include <limits.h>
17457
Martin v. Löwis11437992002-04-12 09:54:03 +000017458int
Pablo Galindocc115e52021-08-02 20:06:40 +010017459main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017460{
Matthias Kloseb9621712010-04-24 17:59:49 +000017461#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17462 bogus endian macros
17463 #endif
17464
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 ;
17466 return 0;
17467}
17468_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017469if ac_fn_c_try_compile "$LINENO"
17470then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017471 # It does; now see whether it defined to _BIG_ENDIAN or not.
17472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17473/* end confdefs.h. */
17474#include <limits.h>
17475
17476int
Pablo Galindocc115e52021-08-02 20:06:40 +010017477main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017478{
17479#ifndef _BIG_ENDIAN
17480 not big endian
17481 #endif
17482
17483 ;
17484 return 0;
17485}
17486_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017487if ac_fn_c_try_compile "$LINENO"
17488then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 ac_cv_c_bigendian=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017490else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017491 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017492fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017493rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017494fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017495rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000017496 fi
17497 if test $ac_cv_c_bigendian = unknown; then
17498 # Compile a test program.
Pablo Galindocc115e52021-08-02 20:06:40 +010017499 if test "$cross_compiling" = yes
17500then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017501 # Try to guess by grepping values from an object file.
17502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17503/* end confdefs.h. */
Pablo Galindocc115e52021-08-02 20:06:40 +010017504unsigned short int ascii_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017505 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Pablo Galindocc115e52021-08-02 20:06:40 +010017506 unsigned short int ascii_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017507 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17508 int use_ascii (int i) {
17509 return ascii_mm[i] + ascii_ii[i];
17510 }
Pablo Galindocc115e52021-08-02 20:06:40 +010017511 unsigned short int ebcdic_ii[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Pablo Galindocc115e52021-08-02 20:06:40 +010017513 unsigned short int ebcdic_mm[] =
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17515 int use_ebcdic (int i) {
17516 return ebcdic_mm[i] + ebcdic_ii[i];
17517 }
17518 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519
Matthias Kloseb9621712010-04-24 17:59:49 +000017520int
Pablo Galindocc115e52021-08-02 20:06:40 +010017521main (void)
Matthias Kloseb9621712010-04-24 17:59:49 +000017522{
17523return use_ascii (foo) == use_ebcdic (foo);
17524 ;
17525 return 0;
17526}
17527_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017528if ac_fn_c_try_compile "$LINENO"
17529then :
Matthias Kloseb9621712010-04-24 17:59:49 +000017530 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17531 ac_cv_c_bigendian=yes
17532 fi
17533 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17534 if test "$ac_cv_c_bigendian" = unknown; then
17535 ac_cv_c_bigendian=no
17536 else
17537 # finding both strings is unlikely to happen, but who knows?
17538 ac_cv_c_bigendian=unknown
17539 fi
17540 fi
17541fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017542rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17543else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017545/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017546$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017547int
Pablo Galindocc115e52021-08-02 20:06:40 +010017548main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550
Matthias Kloseb9621712010-04-24 17:59:49 +000017551 /* Are we little or big endian? From Harbison&Steele. */
17552 union
17553 {
17554 long int l;
17555 char c[sizeof (long int)];
17556 } u;
17557 u.l = 1;
17558 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559
17560 ;
17561 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000017562}
Martin v. Löwis11437992002-04-12 09:54:03 +000017563_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017564if ac_fn_c_try_run "$LINENO"
17565then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000017566 ac_cv_c_bigendian=no
Pablo Galindocc115e52021-08-02 20:06:40 +010017567else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017575fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17577printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 case $ac_cv_c_bigendian in #(
17579 yes)
Pablo Galindocc115e52021-08-02 20:06:40 +010017580 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Matthias Kloseb9621712010-04-24 17:59:49 +000017581;; #(
17582 no)
17583 ;; #(
17584 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017585
Pablo Galindocc115e52021-08-02 20:06:40 +010017586printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017587
Matthias Kloseb9621712010-04-24 17:59:49 +000017588 ;; #(
17589 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017590 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020017591 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017593
Michael W. Hudson54241132001-12-07 15:38:26 +000017594
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017595# ABI version string for Python extension modules. This appears between the
17596# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
17597# from the following attributes which affect the ABI of this Python build (in
17598# this order):
17599#
17600# * The Python implementation (always 'cpython-' for us)
17601# * The major and minor version numbers
17602# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017603#
17604# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000017605# would get a shared library ABI version tag of 'cpython-32dmu' and shared
17606# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020017607#
17608# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
17609# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017610
Pablo Galindocc115e52021-08-02 20:06:40 +010017611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
17612printf %s "checking ABIFLAGS... " >&6; }
17613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
17614printf "%s\n" "$ABIFLAGS" >&6; }
17615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
17616printf %s "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020017617SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Pablo Galindocc115e52021-08-02 20:06:40 +010017618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
17619printf "%s\n" "$SOABI" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000017620
Victor Stinner6d13e5b2019-04-26 18:56:19 +020017621# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
17622if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020017623 # Similar to SOABI but remove "d" flag from ABIFLAGS
17624
17625 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
17626
Pablo Galindocc115e52021-08-02 20:06:40 +010017627printf "%s\n" "#define ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h
Victor Stinner5422e3c2019-04-26 01:40:00 +020017628
17629fi
17630
Victor Stinner52a327c2020-12-23 03:41:08 +010017631
Matti Picusa44ce6c2020-12-20 04:56:57 +020017632EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070017633
Pablo Galindocc115e52021-08-02 20:06:40 +010017634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
17635printf %s "checking LDVERSION... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017636LDVERSION='$(VERSION)$(ABIFLAGS)'
Pablo Galindocc115e52021-08-02 20:06:40 +010017637{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
17638printf "%s\n" "$LDVERSION" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000017639
E. M. Brayc994c8f2019-05-24 17:33:47 +020017640# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020017641
E. M. Brayb1fc4172019-05-24 18:39:39 +020017642if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020017643 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020017644else
17645 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020017646fi
17647
doko@python.org87421192013-01-26 11:39:31 +010017648
Victor Stinner51ae31e2020-06-09 15:32:43 +020017649
17650BINLIBDEST='$(LIBDIR)/python$(VERSION)'
17651
17652
17653# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010017654# /usr/$LIDIRNAME/python$VERSION
17655
17656PLATLIBDIR="lib"
Pablo Galindocc115e52021-08-02 20:06:40 +010017657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
17658printf %s "checking for --with-platlibdir... " >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017659
17660# Check whether --with-platlibdir was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010017661if test ${with_platlibdir+y}
17662then :
Victor Stinner8510f432020-03-10 09:53:09 +010017663 withval=$with_platlibdir;
17664# ignore 3 options:
17665# --with-platlibdir
17666# --with-platlibdir=
17667# --without-platlibdir
17668if test -n "$withval" -a "$withval" != yes -a "$withval" != no
17669then
Pablo Galindocc115e52021-08-02 20:06:40 +010017670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17671printf "%s\n" "yes" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017672 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020017673 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020017674else
Pablo Galindocc115e52021-08-02 20:06:40 +010017675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17676printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017677fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017678else $as_nop
17679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17680printf "%s\n" "no" >&6; }
Victor Stinner8510f432020-03-10 09:53:09 +010017681fi
17682
17683
17684
17685
17686if test x$PLATFORM_TRIPLET = x; then
17687 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
17688else
17689 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020017690fi
doko@python.org87421192013-01-26 11:39:31 +010017691
17692
Victor Stinner75e59a92021-01-20 17:07:21 +010017693# Check for --with-wheel-pkg-dir=PATH
17694
17695WHEEL_PKG_DIR=""
Pablo Galindocc115e52021-08-02 20:06:40 +010017696{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
17697printf %s "checking for --with-wheel-pkg-dir... " >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017698
17699# Check whether --with-wheel-pkg-dir was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010017700if test ${with_wheel_pkg_dir+y}
17701then :
Victor Stinner75e59a92021-01-20 17:07:21 +010017702 withval=$with_wheel_pkg_dir;
17703if test -n "$withval"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010017704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17705printf "%s\n" "yes" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017706 WHEEL_PKG_DIR="$withval"
17707else
Pablo Galindocc115e52021-08-02 20:06:40 +010017708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17709printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017710fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017711else $as_nop
17712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17713printf "%s\n" "no" >&6; }
Victor Stinner75e59a92021-01-20 17:07:21 +010017714fi
17715
17716
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017717# Check whether right shifting a negative integer extends the sign bit
17718# or fills with zeros (like the Cray J90, according to Tim Peters).
Pablo Galindocc115e52021-08-02 20:06:40 +010017719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
17720printf %s "checking whether right shift extends the sign bit... " >&6; }
17721if test ${ac_cv_rshift_extends_sign+y}
17722then :
17723 printf %s "(cached) " >&6
17724else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017725
Pablo Galindocc115e52021-08-02 20:06:40 +010017726if test "$cross_compiling" = yes
17727then :
Guido van Rossum3065c942001-09-17 04:03:14 +000017728 ac_cv_rshift_extends_sign=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017729else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017731/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017732
17733int main()
17734{
Joshua Root674fa0a2020-12-14 07:56:34 +110017735 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017736}
17737
Martin v. Löwis11437992002-04-12 09:54:03 +000017738_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017739if ac_fn_c_try_run "$LINENO"
17740then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000017741 ac_cv_rshift_extends_sign=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017742else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017743 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000017747fi
17748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749fi
17750
Pablo Galindocc115e52021-08-02 20:06:40 +010017751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
17752printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000017753if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017754then
Martin v. Löwis11437992002-04-12 09:54:03 +000017755
Pablo Galindocc115e52021-08-02 20:06:40 +010017756printf "%s\n" "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017757
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017758fi
17759
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017760# check for getc_unlocked and related locking functions
Pablo Galindocc115e52021-08-02 20:06:40 +010017761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
17762printf %s "checking for getc_unlocked() and friends... " >&6; }
17763if test ${ac_cv_have_getc_unlocked+y}
17764then :
17765 printf %s "(cached) " >&6
17766else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017767
Matthias Kloseb9621712010-04-24 17:59:49 +000017768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017769/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017770#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017771int
Pablo Galindocc115e52021-08-02 20:06:40 +010017772main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017773{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017774
17775 FILE *f = fopen("/dev/null", "r");
17776 flockfile(f);
17777 getc_unlocked(f);
17778 funlockfile(f);
17779
Martin v. Löwis11437992002-04-12 09:54:03 +000017780 ;
17781 return 0;
17782}
17783_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017784if ac_fn_c_try_link "$LINENO"
17785then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017786 ac_cv_have_getc_unlocked=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010017787else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000017788 ac_cv_have_getc_unlocked=no
17789fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017790rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017791 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793
Pablo Galindocc115e52021-08-02 20:06:40 +010017794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
17795printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017796if test "$ac_cv_have_getc_unlocked" = yes
17797then
Martin v. Löwis11437992002-04-12 09:54:03 +000017798
Pablo Galindocc115e52021-08-02 20:06:40 +010017799printf "%s\n" "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017800
17801fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017802
Roland Hiebere1f77692021-02-09 02:05:25 +010017803
17804# Check whether --with-readline was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010017805if test ${with_readline+y}
17806then :
Roland Hiebere1f77692021-02-09 02:05:25 +010017807 withval=$with_readline;
Pablo Galindocc115e52021-08-02 20:06:40 +010017808else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010017809 with_readline=yes
17810fi
17811
17812
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017813# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010017814py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000017815# save the value of LIBS so we don't actually link Python with readline
17816LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017817
Roland Hiebere1f77692021-02-09 02:05:25 +010017818if test "$with_readline" != no; then
17819 case "$with_readline" in
17820 editline|edit)
17821 LIBREADLINE=edit
17822
Pablo Galindocc115e52021-08-02 20:06:40 +010017823printf "%s\n" "#define WITH_EDITLINE 1" >>confdefs.h
Roland Hiebere1f77692021-02-09 02:05:25 +010017824
17825 ;;
17826 yes|readline)
17827 LIBREADLINE=readline
17828 ;;
17829 *)
17830 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
17831 ;;
17832 esac
17833
17834 # On some systems we need to link readline to a termcap compatible
17835 # library. NOTE: Keep the precedence of listed libraries synchronised
17836 # with setup.py.
Pablo Galindocc115e52021-08-02 20:06:40 +010017837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
17838printf %s "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010017839 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
17840 if test -z "$py_libtermcap"; then
17841 READLINE_LIBS="-l$LIBREADLINE"
17842 else
17843 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
17844 fi
17845 LIBS="$READLINE_LIBS $LIBS_no_readline"
17846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017847/* end confdefs.h. */
17848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849/* Override any GCC internal prototype to avoid an error.
17850 Use char because int might match the return type of a GCC
17851 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017852char readline ();
17853int
Pablo Galindocc115e52021-08-02 20:06:40 +010017854main (void)
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017857 ;
17858 return 0;
17859}
17860_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017861if ac_fn_c_try_link "$LINENO"
17862then :
Gregory P. Smith18820942008-09-07 06:24:49 +000017863 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017864fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017866 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010017867 if test $py_cv_lib_readline = yes; then
17868 break
17869 fi
17870 done
17871
17872 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
17873 #AC_SUBST([READLINE_LIBS])
17874 if test $py_cv_lib_readline = no; then
Pablo Galindocc115e52021-08-02 20:06:40 +010017875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
17876printf "%s\n" "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010017877 else
Pablo Galindocc115e52021-08-02 20:06:40 +010017878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
17879printf "%s\n" "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000017880
Pablo Galindocc115e52021-08-02 20:06:40 +010017881printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017882
Roland Hiebere1f77692021-02-09 02:05:25 +010017883 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000017884fi
17885
Roland Hiebere1f77692021-02-09 02:05:25 +010017886if test "$py_cv_lib_readline" = yes; then
17887 # check for readline 2.2
Pablo Galindocc115e52021-08-02 20:06:40 +010017888 ac_fn_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
Roland Hiebere1f77692021-02-09 02:05:25 +010017889#include <stdio.h> /* Must be first for Gnu Readline */
17890#ifdef WITH_EDITLINE
17891# include <editline/readline.h>
17892#else
17893# include <readline/readline.h>
17894#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000017895
Pablo Galindocc115e52021-08-02 20:06:40 +010017896" "$ac_c_undeclared_builtin_options" "CFLAGS"
17897if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes
17898then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017899
Pablo Galindocc115e52021-08-02 20:06:40 +010017900printf "%s\n" "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017901
17902fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017903 ac_fn_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
Roland Hiebere1f77692021-02-09 02:05:25 +010017904#include <stdio.h> /* Must be first for Gnu Readline */
17905#ifdef WITH_EDITLINE
17906# include <editline/readline.h>
17907#else
17908# include <readline/readline.h>
17909#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000017910
Pablo Galindocc115e52021-08-02 20:06:40 +010017911" "$ac_c_undeclared_builtin_options" "CFLAGS"
17912if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes
17913then :
Antoine Pitroud5131772009-10-26 19:22:14 +000017914
Pablo Galindocc115e52021-08-02 20:06:40 +010017915printf "%s\n" "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000017916
17917fi
Antoine Pitroud5131772009-10-26 19:22:14 +000017918
Roland Hiebere1f77692021-02-09 02:05:25 +010017919 # check for readline 4.0
Pablo Galindocc115e52021-08-02 20:06:40 +010017920 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_pre_input_hook" | $as_tr_sh`
17921{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
17922printf %s "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
17923if eval test \${$as_ac_Lib+y}
17924then :
17925 printf %s "(cached) " >&6
17926else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000017927 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010017928LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932/* Override any GCC internal prototype to avoid an error.
17933 Use char because int might match the return type of a GCC
17934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017935char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017936int
Pablo Galindocc115e52021-08-02 20:06:40 +010017937main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000017938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017939return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 ;
17941 return 0;
17942}
17943_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017944if ac_fn_c_try_link "$LINENO"
17945then :
Roland Hiebere1f77692021-02-09 02:05:25 +010017946 eval "$as_ac_Lib=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +010017947else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010017948 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000017949fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017950rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017951 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017952LIBS=$ac_check_lib_save_LIBS
17953fi
Roland Hiebere1f77692021-02-09 02:05:25 +010017954eval ac_res=\$$as_ac_Lib
Pablo Galindocc115e52021-08-02 20:06:40 +010017955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17956printf "%s\n" "$ac_res" >&6; }
17957if eval test \"x\$"$as_ac_Lib"\" = x"yes"
17958then :
Michael W. Hudson54241132001-12-07 15:38:26 +000017959
Pablo Galindocc115e52021-08-02 20:06:40 +010017960printf "%s\n" "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000017961
Martin v. Löwis0daad592001-09-30 21:09:59 +000017962fi
17963
Michael W. Hudson54241132001-12-07 15:38:26 +000017964
Roland Hiebere1f77692021-02-09 02:05:25 +010017965 # also in 4.0
Pablo Galindocc115e52021-08-02 20:06:40 +010017966 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_display_matches_hook" | $as_tr_sh`
17967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
17968printf %s "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
17969if eval test \${$as_ac_Lib+y}
17970then :
17971 printf %s "(cached) " >&6
17972else $as_nop
Thomas Wouters89d996e2007-09-08 17:39:28 +000017973 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010017974LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000017976/* end confdefs.h. */
17977
17978/* Override any GCC internal prototype to avoid an error.
17979 Use char because int might match the return type of a GCC
17980 builtin and then its argument prototype would still apply. */
Thomas Wouters89d996e2007-09-08 17:39:28 +000017981char rl_completion_display_matches_hook ();
17982int
Pablo Galindocc115e52021-08-02 20:06:40 +010017983main (void)
Thomas Wouters89d996e2007-09-08 17:39:28 +000017984{
17985return rl_completion_display_matches_hook ();
17986 ;
17987 return 0;
17988}
17989_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010017990if ac_fn_c_try_link "$LINENO"
17991then :
Roland Hiebere1f77692021-02-09 02:05:25 +010017992 eval "$as_ac_Lib=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +010017993else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010017994 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000017995fi
Pablo Galindocc115e52021-08-02 20:06:40 +010017996rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000017997 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000017998LIBS=$ac_check_lib_save_LIBS
17999fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018000eval ac_res=\$$as_ac_Lib
Pablo Galindocc115e52021-08-02 20:06:40 +010018001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18002printf "%s\n" "$ac_res" >&6; }
18003if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18004then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000018005
Pablo Galindocc115e52021-08-02 20:06:40 +010018006printf "%s\n" "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000018007
18008fi
18009
18010
Roland Hiebere1f77692021-02-09 02:05:25 +010018011 # also in 4.0, but not in editline
Pablo Galindocc115e52021-08-02 20:06:40 +010018012 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_resize_terminal" | $as_tr_sh`
18013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
18014printf %s "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
18015if eval test \${$as_ac_Lib+y}
18016then :
18017 printf %s "(cached) " >&6
18018else $as_nop
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018019 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018020LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18022/* end confdefs.h. */
18023
18024/* Override any GCC internal prototype to avoid an error.
18025 Use char because int might match the return type of a GCC
18026 builtin and then its argument prototype would still apply. */
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018027char rl_resize_terminal ();
18028int
Pablo Galindocc115e52021-08-02 20:06:40 +010018029main (void)
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018030{
18031return rl_resize_terminal ();
18032 ;
18033 return 0;
18034}
18035_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018036if ac_fn_c_try_link "$LINENO"
18037then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018038 eval "$as_ac_Lib=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +010018039else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018040 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018041fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018042rm -f core conftest.err conftest.$ac_objext conftest.beam \
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018043 conftest$ac_exeext conftest.$ac_ext
18044LIBS=$ac_check_lib_save_LIBS
18045fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018046eval ac_res=\$$as_ac_Lib
Pablo Galindocc115e52021-08-02 20:06:40 +010018047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18048printf "%s\n" "$ac_res" >&6; }
18049if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18050then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018051
Pablo Galindocc115e52021-08-02 20:06:40 +010018052printf "%s\n" "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
Martin Panter5dbbf1a2016-04-03 02:54:58 +000018053
18054fi
18055
18056
Roland Hiebere1f77692021-02-09 02:05:25 +010018057 # check for readline 4.2
Pablo Galindocc115e52021-08-02 20:06:40 +010018058 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_matches" | $as_tr_sh`
18059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
18060printf %s "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
18061if eval test \${$as_ac_Lib+y}
18062then :
18063 printf %s "(cached) " >&6
18064else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018066LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000018067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070/* Override any GCC internal prototype to avoid an error.
18071 Use char because int might match the return type of a GCC
18072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018073char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018074int
Pablo Galindocc115e52021-08-02 20:06:40 +010018075main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018078 ;
18079 return 0;
18080}
18081_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018082if ac_fn_c_try_link "$LINENO"
18083then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018084 eval "$as_ac_Lib=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +010018085else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018086 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000018087fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018088rm -f core conftest.err conftest.$ac_objext conftest.beam \
Matthias Kloseb9621712010-04-24 17:59:49 +000018089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018090LIBS=$ac_check_lib_save_LIBS
18091fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018092eval ac_res=\$$as_ac_Lib
Pablo Galindocc115e52021-08-02 20:06:40 +010018093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18094printf "%s\n" "$ac_res" >&6; }
18095if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18096then :
Michael W. Hudson54241132001-12-07 15:38:26 +000018097
Pablo Galindocc115e52021-08-02 20:06:40 +010018098printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000018099
Guido van Rossum353ae582001-07-10 16:45:32 +000018100fi
18101
Jack Jansendd19cf82001-12-06 22:36:17 +000018102
Roland Hiebere1f77692021-02-09 02:05:25 +010018103 # also in readline 4.2
Pablo Galindocc115e52021-08-02 20:06:40 +010018104 ac_fn_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
Roland Hiebere1f77692021-02-09 02:05:25 +010018105#include <stdio.h> /* Must be first for Gnu Readline */
18106#ifdef WITH_EDITLINE
18107# include <editline/readline.h>
18108#else
18109# include <readline/readline.h>
18110#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000018111
Pablo Galindocc115e52021-08-02 20:06:40 +010018112" "$ac_c_undeclared_builtin_options" "CFLAGS"
18113if test "x$ac_cv_have_decl_rl_catch_signals" = xyes
18114then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018115
Pablo Galindocc115e52021-08-02 20:06:40 +010018116printf "%s\n" "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018117
18118fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018119
Pablo Galindocc115e52021-08-02 20:06:40 +010018120 as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_append_history" | $as_tr_sh`
18121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
18122printf %s "checking for append_history in -l$LIBREADLINE... " >&6; }
18123if eval test \${$as_ac_Lib+y}
18124then :
18125 printf %s "(cached) " >&6
18126else $as_nop
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018127 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010018128LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18130/* end confdefs.h. */
18131
18132/* Override any GCC internal prototype to avoid an error.
18133 Use char because int might match the return type of a GCC
18134 builtin and then its argument prototype would still apply. */
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018135char append_history ();
18136int
Pablo Galindocc115e52021-08-02 20:06:40 +010018137main (void)
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018138{
18139return append_history ();
18140 ;
18141 return 0;
18142}
18143_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018144if ac_fn_c_try_link "$LINENO"
18145then :
Roland Hiebere1f77692021-02-09 02:05:25 +010018146 eval "$as_ac_Lib=yes"
Pablo Galindocc115e52021-08-02 20:06:40 +010018147else $as_nop
Roland Hiebere1f77692021-02-09 02:05:25 +010018148 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018149fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018150rm -f core conftest.err conftest.$ac_objext conftest.beam \
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018151 conftest$ac_exeext conftest.$ac_ext
18152LIBS=$ac_check_lib_save_LIBS
18153fi
Roland Hiebere1f77692021-02-09 02:05:25 +010018154eval ac_res=\$$as_ac_Lib
Pablo Galindocc115e52021-08-02 20:06:40 +010018155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18156printf "%s\n" "$ac_res" >&6; }
18157if eval test \"x\$"$as_ac_Lib"\" = x"yes"
18158then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018159
Pablo Galindocc115e52021-08-02 20:06:40 +010018160printf "%s\n" "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018161
18162fi
18163
Roland Hiebere1f77692021-02-09 02:05:25 +010018164fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060018165
Martin v. Löwis82bca632006-02-10 20:49:30 +000018166# End of readline checks: restore LIBS
18167LIBS=$LIBS_no_readline
18168
Pablo Galindocc115e52021-08-02 20:06:40 +010018169{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
18170printf %s "checking for broken nice()... " >&6; }
18171if test ${ac_cv_broken_nice+y}
18172then :
18173 printf %s "(cached) " >&6
18174else $as_nop
Martin v. Löwis11437992002-04-12 09:54:03 +000018175
Pablo Galindocc115e52021-08-02 20:06:40 +010018176if test "$cross_compiling" = yes
18177then :
Guido van Rossum3065c942001-09-17 04:03:14 +000018178 ac_cv_broken_nice=no
Pablo Galindocc115e52021-08-02 20:06:40 +010018179else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018181/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018182
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080018183#include <stdlib.h>
18184#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018185int main()
18186{
18187 int val1 = nice(1);
18188 if (val1 != -1 && val1 == nice(2))
18189 exit(0);
18190 exit(1);
18191}
18192
Martin v. Löwis11437992002-04-12 09:54:03 +000018193_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018194if ac_fn_c_try_run "$LINENO"
18195then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018196 ac_cv_broken_nice=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010018197else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018198 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18201 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018202fi
18203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204fi
18205
Pablo Galindocc115e52021-08-02 20:06:40 +010018206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
18207printf "%s\n" "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018208if test "$ac_cv_broken_nice" = yes
18209then
Martin v. Löwis11437992002-04-12 09:54:03 +000018210
Pablo Galindocc115e52021-08-02 20:06:40 +010018211printf "%s\n" "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000018212
18213fi
18214
Pablo Galindocc115e52021-08-02 20:06:40 +010018215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
18216printf %s "checking for broken poll()... " >&6; }
18217if test ${ac_cv_broken_poll+y}
18218then :
18219 printf %s "(cached) " >&6
18220else $as_nop
18221 if test "$cross_compiling" = yes
18222then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018223 ac_cv_broken_poll=no
Pablo Galindocc115e52021-08-02 20:06:40 +010018224else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018226/* end confdefs.h. */
18227
18228#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110018229#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018231int main()
18232{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018233 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018234 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018235
18236 close (42);
18237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018238 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018239 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018240 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018241 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018242 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018243 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018244 return 1;
18245}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018246
18247_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018248if ac_fn_c_try_run "$LINENO"
18249then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018250 ac_cv_broken_poll=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010018251else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018252 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018257
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018258fi
18259
Pablo Galindocc115e52021-08-02 20:06:40 +010018260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
18261printf "%s\n" "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018262if test "$ac_cv_broken_poll" = yes
18263then
18264
Pablo Galindocc115e52021-08-02 20:06:40 +010018265printf "%s\n" "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000018266
18267fi
18268
Martin v. Löwis1d459062005-03-14 21:23:33 +000018269# check tzset(3) exists and works like we expect it to
Pablo Galindocc115e52021-08-02 20:06:40 +010018270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
18271printf %s "checking for working tzset()... " >&6; }
18272if test ${ac_cv_working_tzset+y}
18273then :
18274 printf %s "(cached) " >&6
18275else $as_nop
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018276
Pablo Galindocc115e52021-08-02 20:06:40 +010018277if test "$cross_compiling" = yes
18278then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018279 ac_cv_working_tzset=no
Pablo Galindocc115e52021-08-02 20:06:40 +010018280else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018282/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018283
18284#include <stdlib.h>
18285#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000018286#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000018287
18288#if HAVE_TZNAME
18289extern char *tzname[];
18290#endif
18291
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018292int main()
18293{
Brett Cannon18367812003-09-19 00:59:16 +000018294 /* Note that we need to ensure that not only does tzset(3)
18295 do 'something' with localtime, but it works as documented
18296 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000018297 This includes making sure that tzname is set properly if
18298 tm->tm_zone does not exist since it is the alternative way
18299 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000018300
18301 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000018302 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000018303 */
18304
Martin v. Löwis1d459062005-03-14 21:23:33 +000018305 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000018306 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
18307
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018308 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018309 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018310 if (localtime(&groundhogday)->tm_hour != 0)
18311 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018312#if HAVE_TZNAME
18313 /* For UTC, tzname[1] is sometimes "", sometimes " " */
18314 if (strcmp(tzname[0], "UTC") ||
18315 (tzname[1][0] != 0 && tzname[1][0] != ' '))
18316 exit(1);
18317#endif
Brett Cannon18367812003-09-19 00:59:16 +000018318
Neal Norwitz7f2588c2003-04-11 15:35:53 +000018319 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018320 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000018321 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018322 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018323#if HAVE_TZNAME
18324 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
18325 exit(1);
18326#endif
Brett Cannon18367812003-09-19 00:59:16 +000018327
18328 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
18329 tzset();
18330 if (localtime(&groundhogday)->tm_hour != 11)
18331 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018332#if HAVE_TZNAME
18333 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
18334 exit(1);
18335#endif
18336
18337#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000018338 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
18339 exit(1);
18340 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
18341 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000018342#endif
Brett Cannon18367812003-09-19 00:59:16 +000018343
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018344 exit(0);
18345}
18346
18347_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018348if ac_fn_c_try_run "$LINENO"
18349then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018350 ac_cv_working_tzset=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010018351else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018352 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018356fi
18357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018358fi
18359
Pablo Galindocc115e52021-08-02 20:06:40 +010018360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
18361printf "%s\n" "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018362if test "$ac_cv_working_tzset" = yes
18363then
18364
Pablo Galindocc115e52021-08-02 20:06:40 +010018365printf "%s\n" "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018366
18367fi
18368
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018369# Look for subsecond timestamps in struct stat
Pablo Galindocc115e52021-08-02 20:06:40 +010018370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
18371printf %s "checking for tv_nsec in struct stat... " >&6; }
18372if test ${ac_cv_stat_tv_nsec+y}
18373then :
18374 printf %s "(cached) " >&6
18375else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018377/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018378#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018379int
Pablo Galindocc115e52021-08-02 20:06:40 +010018380main (void)
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018381{
18382
18383struct stat st;
18384st.st_mtim.tv_nsec = 1;
18385
18386 ;
18387 return 0;
18388}
18389_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018390if ac_fn_c_try_compile "$LINENO"
18391then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018392 ac_cv_stat_tv_nsec=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010018393else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018394 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018395fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018396rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397fi
18398
Pablo Galindocc115e52021-08-02 20:06:40 +010018399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
18400printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018401if test "$ac_cv_stat_tv_nsec" = yes
18402then
18403
Pablo Galindocc115e52021-08-02 20:06:40 +010018404printf "%s\n" "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018405
18406fi
18407
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018408# Look for BSD style subsecond timestamps in struct stat
Pablo Galindocc115e52021-08-02 20:06:40 +010018409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
18410printf %s "checking for tv_nsec2 in struct stat... " >&6; }
18411if test ${ac_cv_stat_tv_nsec2+y}
18412then :
18413 printf %s "(cached) " >&6
18414else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018416/* end confdefs.h. */
18417#include <sys/stat.h>
18418int
Pablo Galindocc115e52021-08-02 20:06:40 +010018419main (void)
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018420{
18421
18422struct stat st;
18423st.st_mtimespec.tv_nsec = 1;
18424
18425 ;
18426 return 0;
18427}
18428_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018429if ac_fn_c_try_compile "$LINENO"
18430then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018431 ac_cv_stat_tv_nsec2=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010018432else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018433 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018434fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018435rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018436fi
18437
Pablo Galindocc115e52021-08-02 20:06:40 +010018438{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
18439printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018440if test "$ac_cv_stat_tv_nsec2" = yes
18441then
18442
Pablo Galindocc115e52021-08-02 20:06:40 +010018443printf "%s\n" "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018444
18445fi
18446
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018447# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020018448ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010018449if test "$cross_compiling" = no; then
18450 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
18451fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018452
Pablo Galindocc115e52021-08-02 20:06:40 +010018453ac_fn_c_check_header_compile "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
18454if test "x$ac_cv_header_curses_h" = xyes
18455then :
18456 printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h
18457
18458fi
18459ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default"
18460if test "x$ac_cv_header_ncurses_h" = xyes
18461then :
18462 printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h
Pablo Galindoba421752021-05-03 20:33:17 +010018463
18464fi
Pablo Galindo53e55292021-04-05 17:38:40 +010018465
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018466
18467# On Solaris, term.h requires curses.h
Pablo Galindocc115e52021-08-02 20:06:40 +010018468ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018469#ifdef HAVE_CURSES_H
18470#include <curses.h>
18471#endif
18472
18473"
Pablo Galindocc115e52021-08-02 20:06:40 +010018474if test "x$ac_cv_header_term_h" = xyes
18475then :
18476 printf "%s\n" "#define HAVE_TERM_H 1" >>confdefs.h
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018477
18478fi
18479
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020018480
Jack Jansen666b1e72001-10-31 12:11:48 +000018481# On HP/UX 11.0, mvwdelch is a block with a return statement
Pablo Galindocc115e52021-08-02 20:06:40 +010018482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
18483printf %s "checking whether mvwdelch is an expression... " >&6; }
18484if test ${ac_cv_mvwdelch_is_expression+y}
18485then :
18486 printf %s "(cached) " >&6
18487else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018489/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018490#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018491int
Pablo Galindocc115e52021-08-02 20:06:40 +010018492main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018493{
Jack Jansen666b1e72001-10-31 12:11:48 +000018494
18495 int rtn;
18496 rtn = mvwdelch(0,0,0);
18497
Martin v. Löwis11437992002-04-12 09:54:03 +000018498 ;
18499 return 0;
18500}
18501_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018502if ac_fn_c_try_compile "$LINENO"
18503then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018504 ac_cv_mvwdelch_is_expression=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010018505else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018506 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018507fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018508rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509fi
18510
Pablo Galindocc115e52021-08-02 20:06:40 +010018511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
18512printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000018513
18514if test "$ac_cv_mvwdelch_is_expression" = yes
18515then
Martin v. Löwis11437992002-04-12 09:54:03 +000018516
Pablo Galindocc115e52021-08-02 20:06:40 +010018517printf "%s\n" "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018518
18519fi
18520
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018521# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
18522# structs since version 5.7. If the macro is defined as zero before including
18523# [n]curses.h, ncurses will expose fields of the structs regardless of the
18524# configuration.
Pablo Galindocc115e52021-08-02 20:06:40 +010018525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
18526printf %s "checking whether WINDOW has _flags... " >&6; }
18527if test ${ac_cv_window_has_flags+y}
18528then :
18529 printf %s "(cached) " >&6
18530else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018532/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018533
18534 #define NCURSES_OPAQUE 0
18535 #include <curses.h>
18536
Martin v. Löwis11437992002-04-12 09:54:03 +000018537int
Pablo Galindocc115e52021-08-02 20:06:40 +010018538main (void)
Martin v. Löwis11437992002-04-12 09:54:03 +000018539{
Jack Jansen666b1e72001-10-31 12:11:48 +000018540
18541 WINDOW *w;
18542 w->_flags = 0;
18543
Martin v. Löwis11437992002-04-12 09:54:03 +000018544 ;
18545 return 0;
18546}
18547_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018548if ac_fn_c_try_compile "$LINENO"
18549then :
Jack Jansen666b1e72001-10-31 12:11:48 +000018550 ac_cv_window_has_flags=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010018551else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018552 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018553fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018554rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555fi
18556
Pablo Galindocc115e52021-08-02 20:06:40 +010018557{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
18558printf "%s\n" "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018559
Jack Jansen666b1e72001-10-31 12:11:48 +000018560
18561if test "$ac_cv_window_has_flags" = yes
18562then
Martin v. Löwis11437992002-04-12 09:54:03 +000018563
Pablo Galindocc115e52021-08-02 20:06:40 +010018564printf "%s\n" "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000018565
18566fi
18567
Pablo Galindocc115e52021-08-02 20:06:40 +010018568{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
18569printf %s "checking for is_pad... " >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18571/* end confdefs.h. */
18572#include <curses.h>
18573int
Pablo Galindocc115e52021-08-02 20:06:40 +010018574main (void)
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018575{
18576
18577#ifndef is_pad
18578void *x=is_pad
18579#endif
18580
18581 ;
18582 return 0;
18583}
18584_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018585if ac_fn_c_try_compile "$LINENO"
18586then :
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018587
Pablo Galindocc115e52021-08-02 20:06:40 +010018588printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018589
Pablo Galindocc115e52021-08-02 20:06:40 +010018590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18591printf "%s\n" "yes" >&6; }
18592else $as_nop
18593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18594printf "%s\n" "no" >&6; }
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018595
18596fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018597rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090018598
Pablo Galindocc115e52021-08-02 20:06:40 +010018599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
18600printf %s "checking for is_term_resized... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018602/* end confdefs.h. */
18603#include <curses.h>
18604int
Pablo Galindocc115e52021-08-02 20:06:40 +010018605main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018606{
18607void *x=is_term_resized
18608 ;
18609 return 0;
18610}
18611_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018612if ac_fn_c_try_compile "$LINENO"
18613then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018614
Pablo Galindocc115e52021-08-02 20:06:40 +010018615printf "%s\n" "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018616
Pablo Galindocc115e52021-08-02 20:06:40 +010018617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18618printf "%s\n" "yes" >&6; }
18619else $as_nop
18620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018622
18623fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018624rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625
Pablo Galindocc115e52021-08-02 20:06:40 +010018626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
18627printf %s "checking for resize_term... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018629/* end confdefs.h. */
18630#include <curses.h>
18631int
Pablo Galindocc115e52021-08-02 20:06:40 +010018632main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018633{
18634void *x=resize_term
18635 ;
18636 return 0;
18637}
18638_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018639if ac_fn_c_try_compile "$LINENO"
18640then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018641
Pablo Galindocc115e52021-08-02 20:06:40 +010018642printf "%s\n" "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018643
Pablo Galindocc115e52021-08-02 20:06:40 +010018644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18645printf "%s\n" "yes" >&6; }
18646else $as_nop
18647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18648printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018649
18650fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018651rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018652
Pablo Galindocc115e52021-08-02 20:06:40 +010018653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
18654printf %s "checking for resizeterm... " >&6; }
Matthias Kloseb9621712010-04-24 17:59:49 +000018655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018656/* end confdefs.h. */
18657#include <curses.h>
18658int
Pablo Galindocc115e52021-08-02 20:06:40 +010018659main (void)
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018660{
18661void *x=resizeterm
18662 ;
18663 return 0;
18664}
18665_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018666if ac_fn_c_try_compile "$LINENO"
18667then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018668
Pablo Galindocc115e52021-08-02 20:06:40 +010018669printf "%s\n" "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018670
Pablo Galindocc115e52021-08-02 20:06:40 +010018671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18672printf "%s\n" "yes" >&6; }
18673else $as_nop
18674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18675printf "%s\n" "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018676
18677fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018678rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018679
Pablo Galindocc115e52021-08-02 20:06:40 +010018680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
18681printf %s "checking for immedok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18683/* end confdefs.h. */
18684#include <curses.h>
18685int
Pablo Galindocc115e52021-08-02 20:06:40 +010018686main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018687{
18688
18689#ifndef immedok
18690void *x=immedok
18691#endif
18692
18693 ;
18694 return 0;
18695}
18696_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018697if ac_fn_c_try_compile "$LINENO"
18698then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018699
Pablo Galindocc115e52021-08-02 20:06:40 +010018700printf "%s\n" "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018701
Pablo Galindocc115e52021-08-02 20:06:40 +010018702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18703printf "%s\n" "yes" >&6; }
18704else $as_nop
18705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18706printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018707
18708fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018709rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018710
Pablo Galindocc115e52021-08-02 20:06:40 +010018711{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
18712printf %s "checking for syncok... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18714/* end confdefs.h. */
18715#include <curses.h>
18716int
Pablo Galindocc115e52021-08-02 20:06:40 +010018717main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018718{
18719
18720#ifndef syncok
18721void *x=syncok
18722#endif
18723
18724 ;
18725 return 0;
18726}
18727_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018728if ac_fn_c_try_compile "$LINENO"
18729then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018730
Pablo Galindocc115e52021-08-02 20:06:40 +010018731printf "%s\n" "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018732
Pablo Galindocc115e52021-08-02 20:06:40 +010018733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18734printf "%s\n" "yes" >&6; }
18735else $as_nop
18736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18737printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018738
18739fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018740rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018741
Pablo Galindocc115e52021-08-02 20:06:40 +010018742{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
18743printf %s "checking for wchgat... " >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18745/* end confdefs.h. */
18746#include <curses.h>
18747int
Pablo Galindocc115e52021-08-02 20:06:40 +010018748main (void)
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018749{
18750
18751#ifndef wchgat
18752void *x=wchgat
18753#endif
18754
18755 ;
18756 return 0;
18757}
18758_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018759if ac_fn_c_try_compile "$LINENO"
18760then :
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018761
Pablo Galindocc115e52021-08-02 20:06:40 +010018762printf "%s\n" "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018763
Pablo Galindocc115e52021-08-02 20:06:40 +010018764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18765printf "%s\n" "yes" >&6; }
18766else $as_nop
18767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18768printf "%s\n" "no" >&6; }
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018769
18770fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018771rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020018772
Pablo Galindocc115e52021-08-02 20:06:40 +010018773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
18774printf %s "checking for filter... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18776/* end confdefs.h. */
18777#include <curses.h>
18778int
Pablo Galindocc115e52021-08-02 20:06:40 +010018779main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018780{
18781
18782#ifndef filter
18783void *x=filter
18784#endif
18785
18786 ;
18787 return 0;
18788}
18789_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018790if ac_fn_c_try_compile "$LINENO"
18791then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018792
Pablo Galindocc115e52021-08-02 20:06:40 +010018793printf "%s\n" "#define HAVE_CURSES_FILTER 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018794
Pablo Galindocc115e52021-08-02 20:06:40 +010018795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18796printf "%s\n" "yes" >&6; }
18797else $as_nop
18798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18799printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018800
18801fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018802rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018803
Pablo Galindocc115e52021-08-02 20:06:40 +010018804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
18805printf %s "checking for has_key... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18807/* end confdefs.h. */
18808#include <curses.h>
18809int
Pablo Galindocc115e52021-08-02 20:06:40 +010018810main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018811{
18812
18813#ifndef has_key
18814void *x=has_key
18815#endif
18816
18817 ;
18818 return 0;
18819}
18820_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018821if ac_fn_c_try_compile "$LINENO"
18822then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018823
Pablo Galindocc115e52021-08-02 20:06:40 +010018824printf "%s\n" "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018825
Pablo Galindocc115e52021-08-02 20:06:40 +010018826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18827printf "%s\n" "yes" >&6; }
18828else $as_nop
18829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18830printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018831
18832fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018833rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018834
Pablo Galindocc115e52021-08-02 20:06:40 +010018835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
18836printf %s "checking for typeahead... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18838/* end confdefs.h. */
18839#include <curses.h>
18840int
Pablo Galindocc115e52021-08-02 20:06:40 +010018841main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018842{
18843
18844#ifndef typeahead
18845void *x=typeahead
18846#endif
18847
18848 ;
18849 return 0;
18850}
18851_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018852if ac_fn_c_try_compile "$LINENO"
18853then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018854
Pablo Galindocc115e52021-08-02 20:06:40 +010018855printf "%s\n" "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018856
Pablo Galindocc115e52021-08-02 20:06:40 +010018857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18858printf "%s\n" "yes" >&6; }
18859else $as_nop
18860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18861printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018862
18863fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018864rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018865
Pablo Galindocc115e52021-08-02 20:06:40 +010018866{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
18867printf %s "checking for use_env... " >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18869/* end confdefs.h. */
18870#include <curses.h>
18871int
Pablo Galindocc115e52021-08-02 20:06:40 +010018872main (void)
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018873{
18874
18875#ifndef use_env
18876void *x=use_env
18877#endif
18878
18879 ;
18880 return 0;
18881}
18882_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010018883if ac_fn_c_try_compile "$LINENO"
18884then :
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018885
Pablo Galindocc115e52021-08-02 20:06:40 +010018886printf "%s\n" "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018887
Pablo Galindocc115e52021-08-02 20:06:40 +010018888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18889printf "%s\n" "yes" >&6; }
18890else $as_nop
18891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18892printf "%s\n" "no" >&6; }
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020018893
18894fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018895rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020018896# last curses configure check
18897CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018898
Pablo Galindocc115e52021-08-02 20:06:40 +010018899{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
18900printf "%s\n" "$as_me: checking for device files" >&6;}
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018901
18902if test "x$cross_compiling" = xyes; then
18903 if test "${ac_cv_file__dev_ptmx+set}" != set; then
Pablo Galindocc115e52021-08-02 20:06:40 +010018904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
18905printf %s "checking for /dev/ptmx... " >&6; }
18906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
18907printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018908 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
18909 fi
18910 if test "${ac_cv_file__dev_ptc+set}" != set; then
Pablo Galindocc115e52021-08-02 20:06:40 +010018911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
18912printf %s "checking for /dev/ptc... " >&6; }
18913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
18914printf "%s\n" "not set" >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018915 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
18916 fi
18917fi
18918
Pablo Galindocc115e52021-08-02 20:06:40 +010018919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
18920printf %s "checking for /dev/ptmx... " >&6; }
18921if test ${ac_cv_file__dev_ptmx+y}
18922then :
18923 printf %s "(cached) " >&6
18924else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018925 test "$cross_compiling" = yes &&
18926 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18927if test -r "/dev/ptmx"; then
18928 ac_cv_file__dev_ptmx=yes
18929else
18930 ac_cv_file__dev_ptmx=no
18931fi
18932fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
18934printf "%s\n" "$ac_cv_file__dev_ptmx" >&6; }
18935if test "x$ac_cv_file__dev_ptmx" = xyes
18936then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000018937
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018938fi
18939
18940if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018941
Pablo Galindocc115e52021-08-02 20:06:40 +010018942printf "%s\n" "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018943
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018944fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
18946printf %s "checking for /dev/ptc... " >&6; }
18947if test ${ac_cv_file__dev_ptc+y}
18948then :
18949 printf %s "(cached) " >&6
18950else $as_nop
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018951 test "$cross_compiling" = yes &&
18952 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18953if test -r "/dev/ptc"; then
18954 ac_cv_file__dev_ptc=yes
18955else
18956 ac_cv_file__dev_ptc=no
18957fi
18958fi
Pablo Galindocc115e52021-08-02 20:06:40 +010018959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
18960printf "%s\n" "$ac_cv_file__dev_ptc" >&6; }
18961if test "x$ac_cv_file__dev_ptc" = xyes
18962then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000018963
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020018964fi
18965
18966if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000018967
Pablo Galindocc115e52021-08-02 20:06:40 +010018968printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000018969
Neal Norwitz865400f2003-03-21 01:42:58 +000018970fi
18971
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000018972if test $ac_sys_system = Darwin
18973then
18974 LIBS="$LIBS -framework CoreFoundation"
18975fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000018976
Pablo Galindocc115e52021-08-02 20:06:40 +010018977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
18978printf %s "checking for %zd printf() format support... " >&6; }
18979if test ${ac_cv_have_size_t_format+y}
18980then :
18981 printf %s "(cached) " >&6
18982else $as_nop
18983 if test "$cross_compiling" = yes
18984then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000018985 ac_cv_have_size_t_format="cross -- assuming yes"
18986
Pablo Galindocc115e52021-08-02 20:06:40 +010018987else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000018988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000018989/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018990
Thomas Wouters477c8d52006-05-27 19:21:47 +000018991#include <stdio.h>
18992#include <stddef.h>
18993#include <string.h>
18994
Christian Heimes2c181612007-12-17 20:04:13 +000018995#ifdef HAVE_SYS_TYPES_H
18996#include <sys/types.h>
18997#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000018998
18999#ifdef HAVE_SSIZE_T
19000typedef ssize_t Py_ssize_t;
19001#elif SIZEOF_VOID_P == SIZEOF_LONG
19002typedef long Py_ssize_t;
19003#else
19004typedef int Py_ssize_t;
19005#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000019006
Christian Heimes2c181612007-12-17 20:04:13 +000019007int main()
19008{
19009 char buffer[256];
19010
Thomas Wouters477c8d52006-05-27 19:21:47 +000019011 if(sprintf(buffer, "%zd", (size_t)123) < 0)
19012 return 1;
19013
Thomas Wouters89f507f2006-12-13 04:49:30 +000019014 if (strcmp(buffer, "123"))
19015 return 1;
19016
19017 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
19018 return 1;
19019
19020 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000019021 return 1;
19022
19023 return 0;
19024}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019025
Thomas Wouters477c8d52006-05-27 19:21:47 +000019026_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019027if ac_fn_c_try_run "$LINENO"
19028then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019029 ac_cv_have_size_t_format=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019030else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019031 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19034 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019035fi
19036
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019037fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
19039printf "%s\n" "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000019040if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019041
Pablo Galindocc115e52021-08-02 20:06:40 +010019042printf "%s\n" "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019043
19044fi
19045
Matthias Kloseb9621712010-04-24 17:59:49 +000019046ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000019047#ifdef HAVE_SYS_TYPES_H
19048#include <sys/types.h>
19049#endif
19050#ifdef HAVE_SYS_SOCKET_H
19051#include <sys/socket.h>
19052#endif
19053
Matthias Kloseb9621712010-04-24 17:59:49 +000019054"
Pablo Galindocc115e52021-08-02 20:06:40 +010019055if test "x$ac_cv_type_socklen_t" = xyes
19056then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000019057
Pablo Galindocc115e52021-08-02 20:06:40 +010019058else $as_nop
Guido van Rossum95713eb2000-05-18 20:53:31 +000019059
Pablo Galindocc115e52021-08-02 20:06:40 +010019060printf "%s\n" "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000019061
19062fi
19063
Michael W. Hudson54241132001-12-07 15:38:26 +000019064
Pablo Galindocc115e52021-08-02 20:06:40 +010019065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
19066printf %s "checking for broken mbstowcs... " >&6; }
19067if test ${ac_cv_broken_mbstowcs+y}
19068then :
19069 printf %s "(cached) " >&6
19070else $as_nop
19071 if test "$cross_compiling" = yes
19072then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019073 ac_cv_broken_mbstowcs=no
Pablo Galindocc115e52021-08-02 20:06:40 +010019074else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019076/* end confdefs.h. */
19077
Stefan Krah19c21392012-11-22 23:47:32 +010019078#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000019079#include<stdlib.h>
19080int main() {
19081 size_t len = -1;
19082 const char *str = "text";
19083 len = mbstowcs(NULL, str, 0);
19084 return (len != 4);
19085}
19086
19087_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019088if ac_fn_c_try_run "$LINENO"
19089then :
Antoine Pitroufff95302008-09-03 18:58:51 +000019090 ac_cv_broken_mbstowcs=no
Pablo Galindocc115e52021-08-02 20:06:40 +010019091else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000019092 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000019093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000019094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000019096fi
19097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000019098fi
19099
Pablo Galindocc115e52021-08-02 20:06:40 +010019100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
19101printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000019102if test "$ac_cv_broken_mbstowcs" = yes
19103then
19104
Pablo Galindocc115e52021-08-02 20:06:40 +010019105printf "%s\n" "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000019106
19107fi
19108
Antoine Pitroub52ec782009-01-25 16:34:23 +000019109# Check for --with-computed-gotos
Pablo Galindocc115e52021-08-02 20:06:40 +010019110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
19111printf %s "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019112
19113# Check whether --with-computed-gotos was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010019114if test ${with_computed_gotos+y}
19115then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000019116 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000019117if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000019118then
19119
Pablo Galindocc115e52021-08-02 20:06:40 +010019120printf "%s\n" "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000019121
Pablo Galindocc115e52021-08-02 20:06:40 +010019122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19123printf "%s\n" "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019124fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000019125if test "$withval" = no
19126then
19127
Pablo Galindocc115e52021-08-02 20:06:40 +010019128printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
Antoine Pitrou042b1282010-08-13 21:15:58 +000019129
Pablo Galindocc115e52021-08-02 20:06:40 +010019130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131printf "%s\n" "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000019132fi
19133
Pablo Galindocc115e52021-08-02 20:06:40 +010019134else $as_nop
19135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
19136printf "%s\n" "no value specified" >&6; }
Antoine Pitrou042b1282010-08-13 21:15:58 +000019137fi
19138
Antoine Pitroub52ec782009-01-25 16:34:23 +000019139
Pablo Galindocc115e52021-08-02 20:06:40 +010019140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
19141printf %s "checking whether $CC supports computed gotos... " >&6; }
19142if test ${ac_cv_computed_gotos+y}
19143then :
19144 printf %s "(cached) " >&6
19145else $as_nop
19146 if test "$cross_compiling" = yes
19147then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019148 if test "${with_computed_gotos+set}" = set; then
19149 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
19150 else
19151 ac_cv_computed_gotos=no
19152 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019153else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19155/* end confdefs.h. */
19156
19157int main(int argc, char **argv)
19158{
19159 static void *targets[1] = { &&LABEL1 };
19160 goto LABEL2;
19161LABEL1:
19162 return 0;
19163LABEL2:
19164 goto *targets[0];
19165 return 1;
19166}
19167
19168_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019169if ac_fn_c_try_run "$LINENO"
19170then :
Matthias Kloseb17289e2012-03-15 19:51:34 +010019171 ac_cv_computed_gotos=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019172else $as_nop
Matthias Kloseb17289e2012-03-15 19:51:34 +010019173 ac_cv_computed_gotos=no
19174fi
19175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19176 conftest.$ac_objext conftest.beam conftest.$ac_ext
19177fi
19178
19179fi
19180
Pablo Galindocc115e52021-08-02 20:06:40 +010019181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
19182printf "%s\n" "$ac_cv_computed_gotos" >&6; }
Matthias Kloseb17289e2012-03-15 19:51:34 +010019183case "$ac_cv_computed_gotos" in yes*)
19184
Pablo Galindocc115e52021-08-02 20:06:40 +010019185printf "%s\n" "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
Matthias Kloseb17289e2012-03-15 19:51:34 +010019186
19187esac
19188
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019189case $ac_sys_system in
19190AIX*)
19191
Pablo Galindocc115e52021-08-02 20:06:40 +010019192printf "%s\n" "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
Benjamin Petersond8d835b2010-10-15 23:14:46 +000019193 ;;
19194esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019195
Michael W. Hudson54241132001-12-07 15:38:26 +000019196
Mark Dickinsonb2153e92010-05-05 22:31:36 +000019197
19198
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000019199for h in `(cd $srcdir;echo Python/thread_*.h)`
19200do
19201 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
19202done
19203
Michael W. Hudson54241132001-12-07 15:38:26 +000019204
Ned Deily8d02f912020-06-25 10:46:44 -040019205SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Pablo Galindocc115e52021-08-02 20:06:40 +010019206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
19207printf %s "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019208for dir in $SRCDIRS; do
19209 if test ! -d $dir; then
19210 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000019211 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000019212done
Pablo Galindocc115e52021-08-02 20:06:40 +010019213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
19214printf "%s\n" "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000019215
Stefan Krah1919b7e2012-03-21 18:25:23 +010019216# Availability of -O2:
Pablo Galindocc115e52021-08-02 20:06:40 +010019217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
19218printf %s "checking for -O2... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019219saved_cflags="$CFLAGS"
19220CFLAGS="-O2"
19221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19222/* end confdefs.h. */
19223
19224int
Pablo Galindocc115e52021-08-02 20:06:40 +010019225main (void)
Stefan Krah1919b7e2012-03-21 18:25:23 +010019226{
19227
19228
19229 ;
19230 return 0;
19231}
19232_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019233if ac_fn_c_try_compile "$LINENO"
19234then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019235 have_O2=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019236else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019237 have_O2=no
19238fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019239rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19240{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
19241printf "%s\n" "$have_O2" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019242CFLAGS="$saved_cflags"
19243
19244# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
19245# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
Pablo Galindocc115e52021-08-02 20:06:40 +010019246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
19247printf %s "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019248saved_cflags="$CFLAGS"
19249CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
19250if test "$have_O2" = no; then
19251 CFLAGS=""
19252fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019253if test "$cross_compiling" = yes
19254then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019255 have_glibc_memmove_bug=undefined
Pablo Galindocc115e52021-08-02 20:06:40 +010019256else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19258/* end confdefs.h. */
19259
19260#include <stdio.h>
19261#include <stdlib.h>
19262#include <string.h>
19263void foo(void *p, void *q) { memmove(p, q, 19); }
19264int main() {
19265 char a[32] = "123456789000000000";
19266 foo(&a[9], a);
19267 if (strcmp(a, "123456789123456789000000000") != 0)
19268 return 1;
19269 foo(a, &a[9]);
19270 if (strcmp(a, "123456789000000000") != 0)
19271 return 1;
19272 return 0;
19273}
19274
19275_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019276if ac_fn_c_try_run "$LINENO"
19277then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019278 have_glibc_memmove_bug=no
Pablo Galindocc115e52021-08-02 20:06:40 +010019279else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019280 have_glibc_memmove_bug=yes
19281fi
19282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19283 conftest.$ac_objext conftest.beam conftest.$ac_ext
19284fi
19285
19286CFLAGS="$saved_cflags"
Pablo Galindocc115e52021-08-02 20:06:40 +010019287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
19288printf "%s\n" "$have_glibc_memmove_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019289if test "$have_glibc_memmove_bug" = yes; then
19290
Pablo Galindocc115e52021-08-02 20:06:40 +010019291printf "%s\n" "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019292
19293fi
19294
19295if test "$have_gcc_asm_for_x87" = yes; then
19296 # Some versions of gcc miscompile inline asm:
19297 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
19298 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
19299 case $CC in
19300 *gcc*)
Pablo Galindocc115e52021-08-02 20:06:40 +010019301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
19302printf %s "checking for gcc ipa-pure-const bug... " >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019303 saved_cflags="$CFLAGS"
19304 CFLAGS="-O2"
Pablo Galindocc115e52021-08-02 20:06:40 +010019305 if test "$cross_compiling" = yes
19306then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019307 have_ipa_pure_const_bug=undefined
Pablo Galindocc115e52021-08-02 20:06:40 +010019308else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19310/* end confdefs.h. */
19311
19312 __attribute__((noinline)) int
19313 foo(int *p) {
19314 int r;
19315 asm ( "movl \$6, (%1)\n\t"
19316 "xorl %0, %0\n\t"
19317 : "=r" (r) : "r" (p) : "memory"
19318 );
19319 return r;
19320 }
19321 int main() {
19322 int p = 8;
19323 if ((foo(&p) ? : p) != 6)
19324 return 1;
19325 return 0;
19326 }
19327
19328_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019329if ac_fn_c_try_run "$LINENO"
19330then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010019331 have_ipa_pure_const_bug=no
Pablo Galindocc115e52021-08-02 20:06:40 +010019332else $as_nop
Stefan Krah1919b7e2012-03-21 18:25:23 +010019333 have_ipa_pure_const_bug=yes
19334fi
19335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19336 conftest.$ac_objext conftest.beam conftest.$ac_ext
19337fi
19338
19339 CFLAGS="$saved_cflags"
Pablo Galindocc115e52021-08-02 20:06:40 +010019340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
19341printf "%s\n" "$have_ipa_pure_const_bug" >&6; }
Stefan Krah1919b7e2012-03-21 18:25:23 +010019342 if test "$have_ipa_pure_const_bug" = yes; then
19343
Pablo Galindocc115e52021-08-02 20:06:40 +010019344printf "%s\n" "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
Stefan Krah1919b7e2012-03-21 18:25:23 +010019345
19346 fi
19347 ;;
19348 esac
19349fi
19350
Victor Stinner4f5366e2015-01-09 02:13:19 +010019351# Check for stdatomic.h
Pablo Galindocc115e52021-08-02 20:06:40 +010019352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
19353printf %s "checking for stdatomic.h... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19355/* end confdefs.h. */
19356
19357
19358 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020019359 atomic_int int_var;
19360 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019361 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020019362 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
19363 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
19364 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019365 return 0;
19366 }
19367
19368
19369_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019370if ac_fn_c_try_link "$LINENO"
19371then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019372 have_stdatomic_h=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019373else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019374 have_stdatomic_h=no
19375fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019376rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019377 conftest$ac_exeext conftest.$ac_ext
19378
Pablo Galindocc115e52021-08-02 20:06:40 +010019379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
19380printf "%s\n" "$have_stdatomic_h" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019381
19382if test "$have_stdatomic_h" = yes; then
19383
Pablo Galindocc115e52021-08-02 20:06:40 +010019384printf "%s\n" "#define HAVE_STD_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019385
19386fi
19387
Victor Stinner52a327c2020-12-23 03:41:08 +010019388# Check for GCC >= 4.7 and clang __atomic builtin functions
Pablo Galindocc115e52021-08-02 20:06:40 +010019389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
19390printf %s "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19392/* end confdefs.h. */
19393
19394
Victor Stinner52a327c2020-12-23 03:41:08 +010019395 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010019396 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010019397 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
19398 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010019399 return 0;
19400 }
19401
19402
19403_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019404if ac_fn_c_try_link "$LINENO"
19405then :
Victor Stinner4f5366e2015-01-09 02:13:19 +010019406 have_builtin_atomic=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019407else $as_nop
Victor Stinner4f5366e2015-01-09 02:13:19 +010019408 have_builtin_atomic=no
19409fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019410rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner4f5366e2015-01-09 02:13:19 +010019411 conftest$ac_exeext conftest.$ac_ext
19412
Pablo Galindocc115e52021-08-02 20:06:40 +010019413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
19414printf "%s\n" "$have_builtin_atomic" >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010019415
19416if test "$have_builtin_atomic" = yes; then
19417
Pablo Galindocc115e52021-08-02 20:06:40 +010019418printf "%s\n" "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
Victor Stinner4f5366e2015-01-09 02:13:19 +010019419
19420fi
19421
Ned Deily322f5ba2013-11-21 23:01:59 -080019422# ensurepip option
Pablo Galindocc115e52021-08-02 20:06:40 +010019423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
19424printf %s "checking for ensurepip... " >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019425
19426# Check whether --with-ensurepip was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010019427if test ${with_ensurepip+y}
19428then :
Ned Deily322f5ba2013-11-21 23:01:59 -080019429 withval=$with_ensurepip;
Pablo Galindocc115e52021-08-02 20:06:40 +010019430else $as_nop
Ned Deily322f5ba2013-11-21 23:01:59 -080019431 with_ensurepip=upgrade
19432fi
19433
19434case $with_ensurepip in #(
19435 yes|upgrade) :
19436 ENSUREPIP=upgrade ;; #(
19437 install) :
19438 ENSUREPIP=install ;; #(
19439 no) :
19440 ENSUREPIP=no ;; #(
19441 *) :
19442 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
19443esac
Pablo Galindocc115e52021-08-02 20:06:40 +010019444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
19445printf "%s\n" "$ENSUREPIP" >&6; }
Ned Deily322f5ba2013-11-21 23:01:59 -080019446
19447
Victor Stinner35a97c02015-03-08 02:59:09 +010019448# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
Pablo Galindocc115e52021-08-02 20:06:40 +010019449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
19450printf %s "checking if the dirent structure of a d_type field... " >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19452/* end confdefs.h. */
19453
19454
19455 #include <dirent.h>
19456
19457 int main() {
19458 struct dirent entry;
19459 return entry.d_type == DT_UNKNOWN;
19460 }
19461
19462
19463_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019464if ac_fn_c_try_link "$LINENO"
19465then :
Victor Stinner35a97c02015-03-08 02:59:09 +010019466 have_dirent_d_type=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019467else $as_nop
Victor Stinner35a97c02015-03-08 02:59:09 +010019468 have_dirent_d_type=no
19469fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019470rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner35a97c02015-03-08 02:59:09 +010019471 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +010019472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
19473printf "%s\n" "$have_dirent_d_type" >&6; }
Victor Stinner35a97c02015-03-08 02:59:09 +010019474
19475if test "$have_dirent_d_type" = yes; then
19476
Pablo Galindocc115e52021-08-02 20:06:40 +010019477printf "%s\n" "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
Victor Stinner35a97c02015-03-08 02:59:09 +010019478
19479fi
19480
Victor Stinner9eb57c52015-03-19 22:21:49 +010019481# check if the Linux getrandom() syscall is available
Pablo Galindocc115e52021-08-02 20:06:40 +010019482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
19483printf %s "checking for the Linux getrandom() syscall... " >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19485/* end confdefs.h. */
19486
19487
Victor Stinner1b80b242016-04-12 22:34:58 +020019488 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019489 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020019490 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010019491
19492 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010019493 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020019494 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020019495 const int flags = GRND_NONBLOCK;
19496 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020019497 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010019498 return 0;
19499 }
19500
19501
19502_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019503if ac_fn_c_try_link "$LINENO"
19504then :
Victor Stinner9eb57c52015-03-19 22:21:49 +010019505 have_getrandom_syscall=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019506else $as_nop
Victor Stinner9eb57c52015-03-19 22:21:49 +010019507 have_getrandom_syscall=no
19508fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019509rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner9eb57c52015-03-19 22:21:49 +010019510 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +010019511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
19512printf "%s\n" "$have_getrandom_syscall" >&6; }
Victor Stinner9eb57c52015-03-19 22:21:49 +010019513
19514if test "$have_getrandom_syscall" = yes; then
19515
Pablo Galindocc115e52021-08-02 20:06:40 +010019516printf "%s\n" "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
Victor Stinner9eb57c52015-03-19 22:21:49 +010019517
19518fi
19519
Victor Stinner3abf44e2015-09-18 15:38:37 +020019520# check if the getrandom() function is available
19521# the test was written for the Solaris function of <sys/random.h>
Pablo Galindocc115e52021-08-02 20:06:40 +010019522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
19523printf %s "checking for the getrandom() function... " >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19525/* end confdefs.h. */
19526
19527
19528 #include <sys/random.h>
19529
19530 int main() {
19531 char buffer[1];
19532 const size_t buflen = sizeof(buffer);
19533 const int flags = 0;
19534 /* ignore the result, Python checks for ENOSYS at runtime */
19535 (void)getrandom(buffer, buflen, flags);
19536 return 0;
19537 }
19538
19539
19540_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019541if ac_fn_c_try_link "$LINENO"
19542then :
Victor Stinner3abf44e2015-09-18 15:38:37 +020019543 have_getrandom=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010019544else $as_nop
Victor Stinner3abf44e2015-09-18 15:38:37 +020019545 have_getrandom=no
19546fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019547rm -f core conftest.err conftest.$ac_objext conftest.beam \
Victor Stinner3abf44e2015-09-18 15:38:37 +020019548 conftest$ac_exeext conftest.$ac_ext
Pablo Galindocc115e52021-08-02 20:06:40 +010019549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
19550printf "%s\n" "$have_getrandom" >&6; }
Victor Stinner3abf44e2015-09-18 15:38:37 +020019551
19552if test "$have_getrandom" = yes; then
19553
Pablo Galindocc115e52021-08-02 20:06:40 +010019554printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
Victor Stinner3abf44e2015-09-18 15:38:37 +020019555
19556fi
19557
Neil Schemenauer5741c452019-02-08 10:48:46 -080019558# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
19559# shm_* may only be available if linking against librt
19560save_LIBS="$LIBS"
19561save_includes_default="$ac_includes_default"
Pablo Galindocc115e52021-08-02 20:06:40 +010019562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
19563printf %s "checking for library containing shm_open... " >&6; }
19564if test ${ac_cv_search_shm_open+y}
19565then :
19566 printf %s "(cached) " >&6
19567else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019568 ac_func_search_save_LIBS=$LIBS
19569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19570/* end confdefs.h. */
19571
19572/* Override any GCC internal prototype to avoid an error.
19573 Use char because int might match the return type of a GCC
19574 builtin and then its argument prototype would still apply. */
Neil Schemenauer5741c452019-02-08 10:48:46 -080019575char shm_open ();
19576int
Pablo Galindocc115e52021-08-02 20:06:40 +010019577main (void)
Neil Schemenauer5741c452019-02-08 10:48:46 -080019578{
19579return shm_open ();
19580 ;
19581 return 0;
19582}
19583_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019584for ac_lib in '' rt
19585do
Neil Schemenauer5741c452019-02-08 10:48:46 -080019586 if test -z "$ac_lib"; then
19587 ac_res="none required"
19588 else
19589 ac_res=-l$ac_lib
19590 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19591 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019592 if ac_fn_c_try_link "$LINENO"
19593then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019594 ac_cv_search_shm_open=$ac_res
19595fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019596rm -f core conftest.err conftest.$ac_objext conftest.beam \
Neil Schemenauer5741c452019-02-08 10:48:46 -080019597 conftest$ac_exeext
Pablo Galindocc115e52021-08-02 20:06:40 +010019598 if test ${ac_cv_search_shm_open+y}
19599then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019600 break
19601fi
19602done
Pablo Galindocc115e52021-08-02 20:06:40 +010019603if test ${ac_cv_search_shm_open+y}
19604then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019605
Pablo Galindocc115e52021-08-02 20:06:40 +010019606else $as_nop
Neil Schemenauer5741c452019-02-08 10:48:46 -080019607 ac_cv_search_shm_open=no
19608fi
19609rm conftest.$ac_ext
19610LIBS=$ac_func_search_save_LIBS
19611fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
19613printf "%s\n" "$ac_cv_search_shm_open" >&6; }
Neil Schemenauer5741c452019-02-08 10:48:46 -080019614ac_res=$ac_cv_search_shm_open
Pablo Galindocc115e52021-08-02 20:06:40 +010019615if test "$ac_res" != no
19616then :
Neil Schemenauer5741c452019-02-08 10:48:46 -080019617 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19618
19619fi
19620
19621if test "$ac_cv_search_shm_open" = "-lrt"; then
19622
Pablo Galindocc115e52021-08-02 20:06:40 +010019623printf "%s\n" "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019624
19625fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019626ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
19627if test "x$ac_cv_header_sys_mman_h" = xyes
19628then :
19629 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019630
19631fi
19632
Neil Schemenauer5741c452019-02-08 10:48:46 -080019633# temporarily override ac_includes_default for AC_CHECK_FUNCS below
19634ac_includes_default="\
19635${ac_includes_default}
19636#ifndef __cplusplus
19637# ifdef HAVE_SYS_MMAN_H
19638# include <sys/mman.h>
19639# endif
19640#endif
19641"
Pablo Galindocc115e52021-08-02 20:06:40 +010019642ac_fn_c_check_func "$LINENO" "shm_open" "ac_cv_func_shm_open"
19643if test "x$ac_cv_func_shm_open" = xyes
19644then :
19645 printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h
Neil Schemenauer5741c452019-02-08 10:48:46 -080019646
19647fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019648ac_fn_c_check_func "$LINENO" "shm_unlink" "ac_cv_func_shm_unlink"
19649if test "x$ac_cv_func_shm_unlink" = xyes
19650then :
19651 printf "%s\n" "#define HAVE_SHM_UNLINK 1" >>confdefs.h
19652
19653fi
Neil Schemenauer5741c452019-02-08 10:48:46 -080019654
19655# we don't want to link with librt always, restore LIBS
19656LIBS="$save_LIBS"
19657ac_includes_default="$save_includes_default"
19658
Christian Heimesff5be6e2018-01-20 13:19:21 +010019659# Check for usable OpenSSL
19660
19661 found=false
19662
19663# Check whether --with-openssl was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010019664if test ${with_openssl+y}
19665then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019666 withval=$with_openssl;
19667 case "$withval" in
19668 "" | y | ye | yes | n | no)
19669 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
19670 ;;
19671 *) ssldirs="$withval"
19672 ;;
19673 esac
19674
Pablo Galindocc115e52021-08-02 20:06:40 +010019675else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019676
19677 # if pkg-config is installed and openssl has installed a .pc file,
19678 # then use that information and don't search ssldirs
19679 if test -n "$ac_tool_prefix"; then
19680 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19681set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +010019682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19683printf %s "checking for $ac_word... " >&6; }
19684if test ${ac_cv_prog_PKG_CONFIG+y}
19685then :
19686 printf %s "(cached) " >&6
19687else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019688 if test -n "$PKG_CONFIG"; then
19689 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
19690else
19691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19692for as_dir in $PATH
19693do
19694 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +010019695 case $as_dir in #(((
19696 '') as_dir=./ ;;
19697 */) ;;
19698 *) as_dir=$as_dir/ ;;
19699 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019700 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +010019701 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019702 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
Pablo Galindocc115e52021-08-02 20:06:40 +010019703 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019704 break 2
19705 fi
19706done
19707 done
19708IFS=$as_save_IFS
19709
19710fi
19711fi
19712PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
19713if test -n "$PKG_CONFIG"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010019714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19715printf "%s\n" "$PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019716else
Pablo Galindocc115e52021-08-02 20:06:40 +010019717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19718printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019719fi
19720
19721
19722fi
19723if test -z "$ac_cv_prog_PKG_CONFIG"; then
19724 ac_ct_PKG_CONFIG=$PKG_CONFIG
19725 # Extract the first word of "pkg-config", so it can be a program name with args.
19726set dummy pkg-config; ac_word=$2
Pablo Galindocc115e52021-08-02 20:06:40 +010019727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19728printf %s "checking for $ac_word... " >&6; }
19729if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y}
19730then :
19731 printf %s "(cached) " >&6
19732else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019733 if test -n "$ac_ct_PKG_CONFIG"; then
19734 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
19735else
19736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19737for as_dir in $PATH
19738do
19739 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +010019740 case $as_dir in #(((
19741 '') as_dir=./ ;;
19742 */) ;;
19743 *) as_dir=$as_dir/ ;;
19744 esac
Christian Heimesff5be6e2018-01-20 13:19:21 +010019745 for ac_exec_ext in '' $ac_executable_extensions; do
Pablo Galindocc115e52021-08-02 20:06:40 +010019746 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Christian Heimesff5be6e2018-01-20 13:19:21 +010019747 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
Pablo Galindocc115e52021-08-02 20:06:40 +010019748 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Christian Heimesff5be6e2018-01-20 13:19:21 +010019749 break 2
19750 fi
19751done
19752 done
19753IFS=$as_save_IFS
19754
19755fi
19756fi
19757ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
19758if test -n "$ac_ct_PKG_CONFIG"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010019759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
19760printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019761else
Pablo Galindocc115e52021-08-02 20:06:40 +010019762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19763printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019764fi
19765
19766 if test "x$ac_ct_PKG_CONFIG" = x; then
19767 PKG_CONFIG=""
19768 else
19769 case $cross_compiling:$ac_tool_warned in
19770yes:)
Pablo Galindocc115e52021-08-02 20:06:40 +010019771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19772printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Christian Heimesff5be6e2018-01-20 13:19:21 +010019773ac_tool_warned=yes ;;
19774esac
19775 PKG_CONFIG=$ac_ct_PKG_CONFIG
19776 fi
19777else
19778 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
19779fi
19780
19781 if test x"$PKG_CONFIG" != x""; then
19782 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
19783 if test $? = 0; then
19784 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
19785 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
19786 found=true
19787 fi
19788 fi
19789
19790 # no such luck; use some default ssldirs
19791 if ! $found; then
19792 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
19793 fi
19794
19795
19796fi
19797
19798
19799
19800 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
19801 # an 'openssl' subdirectory
19802
19803 if ! $found; then
19804 OPENSSL_INCLUDES=
19805 for ssldir in $ssldirs; do
Pablo Galindocc115e52021-08-02 20:06:40 +010019806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
19807printf %s "checking for openssl/ssl.h in $ssldir... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019808 if test -f "$ssldir/include/openssl/ssl.h"; then
19809 OPENSSL_INCLUDES="-I$ssldir/include"
19810 OPENSSL_LDFLAGS="-L$ssldir/lib"
19811 OPENSSL_LIBS="-lssl -lcrypto"
19812 found=true
Pablo Galindocc115e52021-08-02 20:06:40 +010019813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19814printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019815 break
19816 else
Pablo Galindocc115e52021-08-02 20:06:40 +010019817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19818printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019819 fi
19820 done
19821
19822 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
19823 # it will just work!
19824 fi
19825
19826 # try the preprocessor and linker with our new flags,
19827 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
19828
Pablo Galindocc115e52021-08-02 20:06:40 +010019829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
19830printf %s "checking whether compiling and linking against OpenSSL works... " >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019831 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
19832 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
19833
19834 save_LIBS="$LIBS"
19835 save_LDFLAGS="$LDFLAGS"
19836 save_CPPFLAGS="$CPPFLAGS"
19837 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
19838 LIBS="$OPENSSL_LIBS $LIBS"
19839 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
19840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19841/* end confdefs.h. */
19842#include <openssl/ssl.h>
19843int
Pablo Galindocc115e52021-08-02 20:06:40 +010019844main (void)
Christian Heimesff5be6e2018-01-20 13:19:21 +010019845{
19846SSL_new(NULL)
19847 ;
19848 return 0;
19849}
19850_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010019851if ac_fn_c_try_link "$LINENO"
19852then :
Christian Heimesff5be6e2018-01-20 13:19:21 +010019853
Pablo Galindocc115e52021-08-02 20:06:40 +010019854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19855printf "%s\n" "yes" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019856 have_openssl=yes
19857
Pablo Galindocc115e52021-08-02 20:06:40 +010019858else $as_nop
Christian Heimesff5be6e2018-01-20 13:19:21 +010019859
Pablo Galindocc115e52021-08-02 20:06:40 +010019860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19861printf "%s\n" "no" >&6; }
Christian Heimesff5be6e2018-01-20 13:19:21 +010019862 have_openssl=no
19863
19864fi
Pablo Galindocc115e52021-08-02 20:06:40 +010019865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Heimesff5be6e2018-01-20 13:19:21 +010019866 conftest$ac_exeext conftest.$ac_ext
19867 CPPFLAGS="$save_CPPFLAGS"
19868 LDFLAGS="$save_LDFLAGS"
19869 LIBS="$save_LIBS"
19870
19871
19872
19873
19874
19875
Christian Heimes32eba612021-03-19 10:29:25 +010019876# rpath to libssl and libcrypto
Pablo Galindocc115e52021-08-02 20:06:40 +010019877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
19878printf %s "checking for --with-openssl-rpath... " >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010019879
19880# Check whether --with-openssl-rpath was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010019881if test ${with_openssl_rpath+y}
19882then :
Christian Heimes32eba612021-03-19 10:29:25 +010019883 withval=$with_openssl_rpath;
Pablo Galindocc115e52021-08-02 20:06:40 +010019884else $as_nop
Christian Heimes32eba612021-03-19 10:29:25 +010019885 with_openssl_rpath=no
19886
19887fi
19888
19889case $with_openssl_rpath in #(
19890 auto|yes) :
19891 OPENSSL_RPATH=auto ;; #(
19892 no) :
19893 OPENSSL_RPATH= ;; #(
19894 *) :
Pablo Galindocc115e52021-08-02 20:06:40 +010019895 if test -d "$with_openssl_rpath"
19896then :
Christian Heimes32eba612021-03-19 10:29:25 +010019897 OPENSSL_RPATH="$with_openssl_rpath"
Pablo Galindocc115e52021-08-02 20:06:40 +010019898else $as_nop
Christian Heimes32eba612021-03-19 10:29:25 +010019899 as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
19900fi
19901
19902 ;;
19903esac
Pablo Galindocc115e52021-08-02 20:06:40 +010019904{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5
19905printf "%s\n" "$OPENSSL_RPATH" >&6; }
Christian Heimes32eba612021-03-19 10:29:25 +010019906
19907
Christian Heimes892d66e2018-01-29 14:10:18 +010019908# ssl module default cipher suite string
19909
19910
19911
Pablo Galindocc115e52021-08-02 20:06:40 +010019912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
19913printf %s "checking for --with-ssl-default-suites... " >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010019914
19915# Check whether --with-ssl-default-suites was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010019916if test ${with_ssl_default_suites+y}
19917then :
Christian Heimes892d66e2018-01-29 14:10:18 +010019918 withval=$with_ssl_default_suites;
Pablo Galindocc115e52021-08-02 20:06:40 +010019919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
19920printf "%s\n" "$withval" >&6; }
Christian Heimes892d66e2018-01-29 14:10:18 +010019921case "$withval" in
19922 python)
Pablo Galindocc115e52021-08-02 20:06:40 +010019923 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010019924
19925 ;;
19926 openssl)
Pablo Galindocc115e52021-08-02 20:06:40 +010019927 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010019928
19929 ;;
19930 *)
Pablo Galindocc115e52021-08-02 20:06:40 +010019931 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010019932
Pablo Galindocc115e52021-08-02 20:06:40 +010019933 printf "%s\n" "#define PY_SSL_DEFAULT_CIPHER_STRING \"$withval\"" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010019934
19935 ;;
19936esac
19937
Pablo Galindocc115e52021-08-02 20:06:40 +010019938else $as_nop
Christian Heimes892d66e2018-01-29 14:10:18 +010019939
Pablo Galindocc115e52021-08-02 20:06:40 +010019940{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: python" >&5
19941printf "%s\n" "python" >&6; }
19942printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
Christian Heimes892d66e2018-01-29 14:10:18 +010019943
19944
19945fi
19946
19947
Christian Heimes9b60e552020-05-15 23:54:53 +020019948# builtin hash modules
19949default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
19950
Pablo Galindocc115e52021-08-02 20:06:40 +010019951printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020019952
Pablo Galindocc115e52021-08-02 20:06:40 +010019953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
19954printf %s "checking for --with-builtin-hashlib-hashes... " >&6; }
Christian Heimes9b60e552020-05-15 23:54:53 +020019955
19956# Check whether --with-builtin-hashlib-hashes was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010019957if test ${with_builtin_hashlib_hashes+y}
19958then :
Christian Heimes9b60e552020-05-15 23:54:53 +020019959 withval=$with_builtin_hashlib_hashes;
19960case "$withval" in
19961 yes)
19962 withval=$default_hashlib_hashes
19963 ;;
19964 no)
19965 withval=""
19966 ;;
19967esac
Pablo Galindocc115e52021-08-02 20:06:40 +010019968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
19969printf "%s\n" "$withval" >&6; }
19970printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$withval\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020019971
19972
Pablo Galindocc115e52021-08-02 20:06:40 +010019973else $as_nop
Christian Heimes9b60e552020-05-15 23:54:53 +020019974
Pablo Galindocc115e52021-08-02 20:06:40 +010019975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
19976printf "%s\n" "$default_hashlib_hashes" >&6; };
19977printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$default_hashlib_hashes\"" >>confdefs.h
Christian Heimes9b60e552020-05-15 23:54:53 +020019978
19979
19980fi
19981
19982
Victor Stinnerc5fa3642020-05-05 16:41:11 +020019983# --with-experimental-isolated-subinterpreters
19984
Pablo Galindocc115e52021-08-02 20:06:40 +010019985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
19986printf %s "checking for --with-experimental-isolated-subinterpreters... " >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020019987
19988# Check whether --with-experimental-isolated-subinterpreters was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010019989if test ${with_experimental_isolated_subinterpreters+y}
19990then :
Victor Stinnerc5fa3642020-05-05 16:41:11 +020019991 withval=$with_experimental_isolated_subinterpreters;
19992if test "$withval" != no
19993then
Pablo Galindocc115e52021-08-02 20:06:40 +010019994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19995printf "%s\n" "yes" >&6; };
19996 printf "%s\n" "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
Victor Stinnerc5fa3642020-05-05 16:41:11 +020019997
19998else
Pablo Galindocc115e52021-08-02 20:06:40 +010019999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20000printf "%s\n" "no" >&6; };
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020001fi
Pablo Galindocc115e52021-08-02 20:06:40 +010020002else $as_nop
20003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20004printf "%s\n" "no" >&6; }
Victor Stinnerc5fa3642020-05-05 16:41:11 +020020005fi
20006
20007
Victor Stinner801bb0b2021-02-17 11:14:42 +010020008# --with-static-libpython
20009STATIC_LIBPYTHON=1
Pablo Galindocc115e52021-08-02 20:06:40 +010020010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
20011printf %s "checking for --with-static-libpython... " >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020012
20013# Check whether --with-static-libpython was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010020014if test ${with_static_libpython+y}
20015then :
Victor Stinner801bb0b2021-02-17 11:14:42 +010020016 withval=$with_static_libpython;
20017if test "$withval" = no
20018then
Pablo Galindocc115e52021-08-02 20:06:40 +010020019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20020printf "%s\n" "no" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020021 STATIC_LIBPYTHON=0
20022else
Pablo Galindocc115e52021-08-02 20:06:40 +010020023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20024printf "%s\n" "yes" >&6; };
Victor Stinner801bb0b2021-02-17 11:14:42 +010020025fi
Pablo Galindocc115e52021-08-02 20:06:40 +010020026else $as_nop
20027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20028printf "%s\n" "yes" >&6; }
Victor Stinner801bb0b2021-02-17 11:14:42 +010020029fi
20030
20031LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
Ned Deily06084252021-03-01 02:04:02 -050020032if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
Victor Stinner801bb0b2021-02-17 11:14:42 +010020033 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
20034 if test "$STATIC_LIBPYTHON" = 1; then
20035 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20036 fi
20037else
20038 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
20039fi
20040
20041
20042
pxinwr277ce302020-12-30 20:50:39 +080020043# Check whether to disable test modules. Once set, setup.py will not build
20044# test extension modules and "make install" will not install test suites.
Pablo Galindocc115e52021-08-02 20:06:40 +010020045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
20046printf %s "checking for --disable-test-modules... " >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020047# Check whether --enable-test-modules was given.
Pablo Galindocc115e52021-08-02 20:06:40 +010020048if test ${enable_test_modules+y}
20049then :
pxinwr277ce302020-12-30 20:50:39 +080020050 enableval=$enable_test_modules;
20051fi
20052
20053if test "$enable_test_modules" = no; then
20054 TEST_MODULES=no
Pablo Galindocc115e52021-08-02 20:06:40 +010020055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20056printf "%s\n" "yes" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020057else
20058 TEST_MODULES=yes
Pablo Galindocc115e52021-08-02 20:06:40 +010020059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20060printf "%s\n" "no" >&6; }
pxinwr277ce302020-12-30 20:50:39 +080020061fi
20062
20063
Christian Heimes892d66e2018-01-29 14:10:18 +010020064
Guido van Rossum627b2d71993-12-24 10:39:16 +000020065# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020020066ac_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 +000020067
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020068ac_config_files="$ac_config_files Modules/ld_so_aix"
20069
Martin v. Löwis11437992002-04-12 09:54:03 +000020070cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020071# This file is a shell script that caches the results of configure
20072# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020073# scripts and configure runs, see configure's option --config-cache.
20074# It is not useful on other systems. If it contains results you don't
20075# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020076#
Martin v. Löwis11437992002-04-12 09:54:03 +000020077# config.status only pays attention to the cache file if you give it
20078# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020079#
Skip Montanaro6dead952003-09-25 14:50:04 +000020080# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020081# loading this file, other *unset* `ac_cv_foo' will be assigned the
20082# following values.
20083
20084_ACEOF
20085
Guido van Rossumf78abae1997-01-21 22:02:36 +000020086# The following way of writing the cache mishandles newlines in values,
20087# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020088# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020089# Ultrix sh set writes to stderr and can't be redirected directly,
20090# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020091(
20092 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20093 eval ac_val=\$$ac_var
20094 case $ac_val in #(
20095 *${as_nl}*)
20096 case $ac_var in #(
Pablo Galindocc115e52021-08-02 20:06:40 +010020097 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20098printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020099 esac
20100 case $ac_var in #(
20101 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000020102 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20103 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020104 esac ;;
20105 esac
20106 done
20107
Martin v. Löwis11437992002-04-12 09:54:03 +000020108 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020109 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20110 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000020111 # `set' does not quote correctly, so add quotes: double-quote
20112 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020114 "s/'/'\\\\''/g;
20115 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020116 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000020117 *)
20118 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020119 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020120 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020121 esac |
20122 sort
20123) |
Martin v. Löwis11437992002-04-12 09:54:03 +000020124 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020125 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000020126 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020127 :clear
Pablo Galindocc115e52021-08-02 20:06:40 +010020128 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Martin v. Löwis11437992002-04-12 09:54:03 +000020129 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020130 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20131 :end' >>confcache
20132if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20133 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020020134 if test "x$cache_file" != "x/dev/null"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010020135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20136printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020020137 if test ! -f "$cache_file" || test -h "$cache_file"; then
20138 cat confcache >"$cache_file"
20139 else
20140 case $cache_file in #(
20141 */* | ?:*)
20142 mv -f confcache "$cache_file"$$ &&
20143 mv -f "$cache_file"$$ "$cache_file" ;; #(
20144 *)
20145 mv -f confcache "$cache_file" ;;
20146 esac
20147 fi
20148 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020149 else
Pablo Galindocc115e52021-08-02 20:06:40 +010020150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20151printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020152 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020153fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020154rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020156test "x$prefix" = xNONE && prefix=$ac_default_prefix
20157# Let make expand exec_prefix.
20158test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020159
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020160DEFS=-DHAVE_CONFIG_H
20161
Skip Montanaro6dead952003-09-25 14:50:04 +000020162ac_libobjs=
20163ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020164U=
Skip Montanaro6dead952003-09-25 14:50:04 +000020165for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20166 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020167 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Pablo Galindocc115e52021-08-02 20:06:40 +010020168 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020169 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20170 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000020171 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20172 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000020173done
20174LIBOBJS=$ac_libobjs
20175
20176LTLIBOBJS=$ac_ltlibobjs
20177
20178
Martin v. Löwis11437992002-04-12 09:54:03 +000020179
Matthias Kloseb9621712010-04-24 17:59:49 +000020180
Victor Stinnere0be4232011-10-25 13:06:09 +020020181: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000020182ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000020183ac_clean_files_save=$ac_clean_files
20184ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Pablo Galindocc115e52021-08-02 20:06:40 +010020185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20186printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Matthias Kloseb9621712010-04-24 17:59:49 +000020187as_write_fail=0
20188cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020189#! $SHELL
20190# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020191# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020192# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020193# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020194
Martin v. Löwis11437992002-04-12 09:54:03 +000020195debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020196ac_cs_recheck=false
20197ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000020198
Matthias Kloseb9621712010-04-24 17:59:49 +000020199SHELL=\${CONFIG_SHELL-$SHELL}
20200export SHELL
20201_ASEOF
20202cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20203## -------------------- ##
20204## M4sh Initialization. ##
20205## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020207# Be more Bourne compatible
20208DUALCASE=1; export DUALCASE # for MKS sh
Pablo Galindocc115e52021-08-02 20:06:40 +010020209as_nop=:
20210if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20211then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020212 emulate sh
20213 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000020214 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000020215 # is contrary to our usage. Disable this feature.
20216 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020217 setopt NO_GLOB_SUBST
Pablo Galindocc115e52021-08-02 20:06:40 +010020218else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020219 case `(set -o) 2>/dev/null` in #(
20220 *posix*) :
20221 set -o posix ;; #(
20222 *) :
20223 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020224esac
Michael W. Hudson54241132001-12-07 15:38:26 +000020225fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000020226
20227
Pablo Galindocc115e52021-08-02 20:06:40 +010020228
20229# Reset variables that may have inherited troublesome values from
20230# the environment.
20231
20232# IFS needs to be set, to space, tab, and newline, in precisely that order.
20233# (If _AS_PATH_WALK were called with IFS unset, it would have the
20234# side effect of setting IFS to empty, thus disabling word splitting.)
20235# Quoting is to prevent editors from complaining about space-tab.
Matthias Kloseb9621712010-04-24 17:59:49 +000020236as_nl='
20237'
20238export as_nl
Pablo Galindocc115e52021-08-02 20:06:40 +010020239IFS=" "" $as_nl"
20240
20241PS1='$ '
20242PS2='> '
20243PS4='+ '
20244
20245# Ensure predictable behavior from utilities with locale-dependent output.
20246LC_ALL=C
20247export LC_ALL
20248LANGUAGE=C
20249export LANGUAGE
20250
20251# We cannot yet rely on "unset" to work, but we need these variables
20252# to be unset--not just set to an empty or harmless value--now, to
20253# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
20254# also avoids known problems related to "unset" and subshell syntax
20255# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
20256for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
20257do eval test \${$as_var+y} \
20258 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20259done
20260
20261# Ensure that fds 0, 1, and 2 are open.
20262if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
20263if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
20264if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020265
20266# The user is always right.
Pablo Galindocc115e52021-08-02 20:06:40 +010020267if ${PATH_SEPARATOR+false} :; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020268 PATH_SEPARATOR=:
20269 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20270 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20271 PATH_SEPARATOR=';'
20272 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020276# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020020277as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000020278case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020279 *[\\/]* ) as_myself=$0 ;;
20280 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000020281for as_dir in $PATH
20282do
20283 IFS=$as_save_IFS
Pablo Galindocc115e52021-08-02 20:06:40 +010020284 case $as_dir in #(((
20285 '') as_dir=./ ;;
20286 */) ;;
20287 *) as_dir=$as_dir/ ;;
20288 esac
20289 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Matthias Kloseb9621712010-04-24 17:59:49 +000020290 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020291IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000020292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020293 ;;
20294esac
20295# We did not find ourselves, most probably we were run as `sh COMMAND'
20296# in which case we are not to be found in the path.
20297if test "x$as_myself" = x; then
20298 as_myself=$0
20299fi
20300if test ! -f "$as_myself"; then
Pablo Galindocc115e52021-08-02 20:06:40 +010020301 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020302 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020303fi
20304
Matthias Kloseb9621712010-04-24 17:59:49 +000020305
20306
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020307# as_fn_error STATUS ERROR [LINENO LOG_FD]
20308# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000020309# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20310# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020311# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000020312as_fn_error ()
20313{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020314 as_status=$1; test $as_status -eq 0 && as_status=1
20315 if test "$4"; then
20316 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Pablo Galindocc115e52021-08-02 20:06:40 +010020317 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000020318 fi
Pablo Galindocc115e52021-08-02 20:06:40 +010020319 printf "%s\n" "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000020320 as_fn_exit $as_status
20321} # as_fn_error
20322
20323
Pablo Galindocc115e52021-08-02 20:06:40 +010020324
Matthias Kloseb9621712010-04-24 17:59:49 +000020325# as_fn_set_status STATUS
20326# -----------------------
20327# Set $? to STATUS, without forking.
20328as_fn_set_status ()
20329{
20330 return $1
20331} # as_fn_set_status
20332
20333# as_fn_exit STATUS
20334# -----------------
20335# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20336as_fn_exit ()
20337{
20338 set +e
20339 as_fn_set_status $1
20340 exit $1
20341} # as_fn_exit
20342
20343# as_fn_unset VAR
20344# ---------------
20345# Portably unset VAR.
20346as_fn_unset ()
20347{
20348 { eval $1=; unset $1;}
20349}
20350as_unset=as_fn_unset
Pablo Galindocc115e52021-08-02 20:06:40 +010020351
Matthias Kloseb9621712010-04-24 17:59:49 +000020352# as_fn_append VAR VALUE
20353# ----------------------
20354# Append the text in VALUE to the end of the definition contained in VAR. Take
20355# advantage of any shell optimizations that allow amortized linear growth over
20356# repeated appends, instead of the typical quadratic growth present in naive
20357# implementations.
Pablo Galindocc115e52021-08-02 20:06:40 +010020358if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
20359then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020360 eval 'as_fn_append ()
20361 {
20362 eval $1+=\$2
20363 }'
Pablo Galindocc115e52021-08-02 20:06:40 +010020364else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020365 as_fn_append ()
20366 {
20367 eval $1=\$$1\$2
20368 }
20369fi # as_fn_append
20370
20371# as_fn_arith ARG...
20372# ------------------
20373# Perform arithmetic evaluation on the ARGs, and store the result in the
20374# global $as_val. Take advantage of shells that can avoid forks. The arguments
20375# must be portable across $(()) and expr.
Pablo Galindocc115e52021-08-02 20:06:40 +010020376if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
20377then :
Matthias Kloseb9621712010-04-24 17:59:49 +000020378 eval 'as_fn_arith ()
20379 {
20380 as_val=$(( $* ))
20381 }'
Pablo Galindocc115e52021-08-02 20:06:40 +010020382else $as_nop
Matthias Kloseb9621712010-04-24 17:59:49 +000020383 as_fn_arith ()
20384 {
20385 as_val=`expr "$@" || test $? -eq 1`
20386 }
20387fi # as_fn_arith
20388
20389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020390if expr a : '\(a\)' >/dev/null 2>&1 &&
20391 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20392 as_expr=expr
20393else
20394 as_expr=false
20395fi
20396
20397if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20398 as_basename=basename
20399else
20400 as_basename=false
20401fi
20402
Matthias Kloseb9621712010-04-24 17:59:49 +000020403if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20404 as_dirname=dirname
20405else
20406 as_dirname=false
20407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020409as_me=`$as_basename -- "$0" ||
20410$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20411 X"$0" : 'X\(//\)$' \| \
20412 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc115e52021-08-02 20:06:40 +010020413printf "%s\n" X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020414 sed '/^.*\/\([^/][^/]*\)\/*$/{
20415 s//\1/
20416 q
20417 }
20418 /^X\/\(\/\/\)$/{
20419 s//\1/
20420 q
20421 }
20422 /^X\/\(\/\).*/{
20423 s//\1/
20424 q
20425 }
20426 s/.*/./; q'`
20427
Matthias Kloseb9621712010-04-24 17:59:49 +000020428# Avoid depending upon Character Ranges.
20429as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20430as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20431as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20432as_cr_digits='0123456789'
20433as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020434
Pablo Galindocc115e52021-08-02 20:06:40 +010020435
20436# Determine whether it's possible to make 'echo' print without a newline.
20437# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
20438# for compatibility with existing Makefiles.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020439ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000020440case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020441-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000020442 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020443 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000020444 xy) ECHO_C='\c';;
20445 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20446 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020447 esac;;
20448*)
20449 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000020450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020451
Pablo Galindocc115e52021-08-02 20:06:40 +010020452# For backward compatibility with old third-party macros, we provide
20453# the shell variables $as_echo and $as_echo_n. New code should use
20454# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
20455as_echo='printf %s\n'
20456as_echo_n='printf %s'
20457
Martin v. Löwis11437992002-04-12 09:54:03 +000020458rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020459if test -d conf$$.dir; then
20460 rm -f conf$$.dir/conf$$.file
20461else
20462 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000020463 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000020465if (echo >conf$$.file) 2>/dev/null; then
20466 if ln -s conf$$.file conf$$ 2>/dev/null; then
20467 as_ln_s='ln -s'
20468 # ... but there are two gotchas:
20469 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20470 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020471 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000020472 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020473 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020474 elif ln conf$$.file conf$$ 2>/dev/null; then
20475 as_ln_s=ln
20476 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020477 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000020478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020479else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020480 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000020481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020482rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20483rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000020484
Matthias Kloseb9621712010-04-24 17:59:49 +000020485
20486# as_fn_mkdir_p
20487# -------------
20488# Create "$as_dir" as a directory, including parents if necessary.
20489as_fn_mkdir_p ()
20490{
20491
20492 case $as_dir in #(
20493 -*) as_dir=./$as_dir;;
20494 esac
20495 test -d "$as_dir" || eval $as_mkdir_p || {
20496 as_dirs=
20497 while :; do
20498 case $as_dir in #(
Pablo Galindocc115e52021-08-02 20:06:40 +010020499 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Matthias Kloseb9621712010-04-24 17:59:49 +000020500 *) as_qdir=$as_dir;;
20501 esac
20502 as_dirs="'$as_qdir' $as_dirs"
20503 as_dir=`$as_dirname -- "$as_dir" ||
20504$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20505 X"$as_dir" : 'X\(//\)[^/]' \| \
20506 X"$as_dir" : 'X\(//\)$' \| \
20507 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc115e52021-08-02 20:06:40 +010020508printf "%s\n" X"$as_dir" |
Matthias Kloseb9621712010-04-24 17:59:49 +000020509 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20510 s//\1/
20511 q
20512 }
20513 /^X\(\/\/\)[^/].*/{
20514 s//\1/
20515 q
20516 }
20517 /^X\(\/\/\)$/{
20518 s//\1/
20519 q
20520 }
20521 /^X\(\/\).*/{
20522 s//\1/
20523 q
20524 }
20525 s/.*/./; q'`
20526 test -d "$as_dir" && break
20527 done
20528 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020529 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000020530
20531
20532} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000020533if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020534 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000020535else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020536 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020537 as_mkdir_p=false
20538fi
20539
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020540
20541# as_fn_executable_p FILE
20542# -----------------------
20543# Test if FILE is an executable regular file.
20544as_fn_executable_p ()
20545{
20546 test -f "$1" && test -x "$1"
20547} # as_fn_executable_p
20548as_test_x='test -x'
20549as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000020550
20551# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020552as_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 +000020553
20554# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020555as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020556
20557
Martin v. Löwis11437992002-04-12 09:54:03 +000020558exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000020559## ----------------------------------- ##
20560## Main body of $CONFIG_STATUS script. ##
20561## ----------------------------------- ##
20562_ASEOF
20563test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020564
Matthias Kloseb9621712010-04-24 17:59:49 +000020565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20566# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000020567# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020568# values after options handling.
20569ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010020570This file was extended by python $as_me 3.10, which was
Pablo Galindocc115e52021-08-02 20:06:40 +010020571generated by GNU Autoconf 2.71. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020572
20573 CONFIG_FILES = $CONFIG_FILES
20574 CONFIG_HEADERS = $CONFIG_HEADERS
20575 CONFIG_LINKS = $CONFIG_LINKS
20576 CONFIG_COMMANDS = $CONFIG_COMMANDS
20577 $ $0 $@
20578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020579on `(hostname || uname -n) 2>/dev/null | sed 1q`
20580"
20581
Martin v. Löwis11437992002-04-12 09:54:03 +000020582_ACEOF
20583
Matthias Kloseb9621712010-04-24 17:59:49 +000020584case $ac_config_files in *"
20585"*) set x $ac_config_files; shift; ac_config_files=$*;;
20586esac
20587
20588case $ac_config_headers in *"
20589"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20590esac
20591
20592
20593cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020594# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010020595config_files="$ac_config_files"
20596config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000020597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020598_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020599
Matthias Kloseb9621712010-04-24 17:59:49 +000020600cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020601ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000020602\`$as_me' instantiates files and other configuration actions
20603from templates according to the current configuration. Unless the files
20604and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000020605
Matthias Kloseb9621712010-04-24 17:59:49 +000020606Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000020607
20608 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020609 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000020610 --config print configuration, then exit
20611 -q, --quiet, --silent
20612 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 -d, --debug don't remove temporary files
20614 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000020615 --file=FILE[:TEMPLATE]
20616 instantiate the configuration file FILE
20617 --header=FILE[:TEMPLATE]
20618 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020619
20620Configuration files:
20621$config_files
20622
20623Configuration headers:
20624$config_headers
20625
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070020626Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020628_ACEOF
Pablo Galindocc115e52021-08-02 20:06:40 +010020629ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
20630ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Matthias Kloseb9621712010-04-24 17:59:49 +000020631cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Pablo Galindocc115e52021-08-02 20:06:40 +010020632ac_cs_config='$ac_cs_config_escaped'
Martin v. Löwis11437992002-04-12 09:54:03 +000020633ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010020634python config.status 3.10
Pablo Galindocc115e52021-08-02 20:06:40 +010020635configured by $0, generated by GNU Autoconf 2.71,
Matthias Kloseb9621712010-04-24 17:59:49 +000020636 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000020637
Pablo Galindocc115e52021-08-02 20:06:40 +010020638Copyright (C) 2021 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020639This config.status script is free software; the Free Software Foundation
20640gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020641
20642ac_pwd='$ac_pwd'
20643srcdir='$srcdir'
20644INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010020645MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000020646test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000020647_ACEOF
20648
Matthias Kloseb9621712010-04-24 17:59:49 +000020649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20650# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000020651ac_need_defaults=:
20652while test $# != 0
20653do
20654 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020655 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020656 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20657 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020658 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020660 --*=)
20661 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20662 ac_optarg=
20663 ac_shift=:
20664 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020665 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020666 ac_option=$1
20667 ac_optarg=$2
20668 ac_shift=shift
20669 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 esac
20671
Skip Montanaro6dead952003-09-25 14:50:04 +000020672 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020673 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000020674 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20675 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020676 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Pablo Galindocc115e52021-08-02 20:06:40 +010020677 printf "%s\n" "$ac_cs_version"; exit ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020678 --config | --confi | --conf | --con | --co | --c )
Pablo Galindocc115e52021-08-02 20:06:40 +010020679 printf "%s\n" "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020680 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000020681 debug=: ;;
20682 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020683 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020684 case $ac_optarg in
Pablo Galindocc115e52021-08-02 20:06:40 +010020685 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020686 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020687 esac
20688 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 ac_need_defaults=false;;
20690 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020691 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000020692 case $ac_optarg in
Pablo Galindocc115e52021-08-02 20:06:40 +010020693 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000020694 esac
20695 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020696 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020697 --he | --h)
20698 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020699 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020700Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020701 --help | --hel | -h )
Pablo Galindocc115e52021-08-02 20:06:40 +010020702 printf "%s\n" "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020703 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20704 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20705 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020706
20707 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020708 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000020709Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020710
Matthias Kloseb9621712010-04-24 17:59:49 +000020711 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020712 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020713
20714 esac
20715 shift
20716done
20717
Skip Montanaro6dead952003-09-25 14:50:04 +000020718ac_configure_extra_args=
20719
20720if $ac_cs_silent; then
20721 exec 6>/dev/null
20722 ac_configure_extra_args="$ac_configure_extra_args --silent"
20723fi
20724
20725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000020727if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000020728 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000020729 shift
Pablo Galindocc115e52021-08-02 20:06:40 +010020730 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Matthias Kloseb9621712010-04-24 17:59:49 +000020731 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020732 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000020733 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000020734fi
20735
Martin v. Löwis11437992002-04-12 09:54:03 +000020736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020738exec 5>>config.log
20739{
20740 echo
20741 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20742## Running $as_me. ##
20743_ASBOX
Pablo Galindocc115e52021-08-02 20:06:40 +010020744 printf "%s\n" "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020745} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020748cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020749_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020750
Matthias Kloseb9621712010-04-24 17:59:49 +000020751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752
20753# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000020754for ac_config_target in $ac_config_targets
20755do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756 case $ac_config_target in
20757 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20758 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
20759 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000020760 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
20761 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020762 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000020763 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020020764 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010020765 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000020766 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020767
Victor Stinnere0be4232011-10-25 13:06:09 +020020768 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020769 esac
20770done
20771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020772
Martin v. Löwis11437992002-04-12 09:54:03 +000020773# If the user did not use the arguments to specify the items to instantiate,
20774# then the envvar interface is used. Set only those that are not.
20775# We use the long form for the default assignment because of an extremely
20776# bizarre bug on SunOS 4.1.3.
20777if $ac_need_defaults; then
Pablo Galindocc115e52021-08-02 20:06:40 +010020778 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
20779 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Martin v. Löwis11437992002-04-12 09:54:03 +000020780fi
20781
Skip Montanaro6dead952003-09-25 14:50:04 +000020782# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020783# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000020784# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020785# Hook for its removal unless debugging.
20786# Note that there is a small window in which the directory will not be cleaned:
20787# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000020788$debug ||
20789{
Victor Stinnere0be4232011-10-25 13:06:09 +020020790 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020791 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020020792 : "${ac_tmp:=$tmp}"
20793 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020794' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000020795 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000020796}
Martin v. Löwis11437992002-04-12 09:54:03 +000020797# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020798
Martin v. Löwis11437992002-04-12 09:54:03 +000020799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020800 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020020801 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000020802} ||
20803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804 tmp=./conf$$-$RANDOM
20805 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020806} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020020807ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000020808
Matthias Kloseb9621712010-04-24 17:59:49 +000020809# Set up the scripts for CONFIG_FILES section.
20810# No need to generate them if there are no CONFIG_FILES.
20811# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020812if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020813
Matthias Kloseb9621712010-04-24 17:59:49 +000020814
20815ac_cr=`echo X | tr X '\015'`
20816# On cygwin, bash can eat \r inside `` if the user requested igncr.
20817# But we know of no other shell where ac_cr would be empty at this
20818# point, so we can use a bashism as a fallback.
20819if test "x$ac_cr" = x; then
20820 eval ac_cr=\$\'\\r\'
20821fi
20822ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20823if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020824 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000020825else
20826 ac_cs_awk_cr=$ac_cr
20827fi
20828
Victor Stinnere0be4232011-10-25 13:06:09 +020020829echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000020830_ACEOF
20831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020832
Matthias Kloseb9621712010-04-24 17:59:49 +000020833{
20834 echo "cat >conf$$subs.awk <<_ACEOF" &&
20835 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20836 echo "_ACEOF"
20837} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020838 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20839ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020840ac_delim='%!_!# '
20841for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000020842 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020843 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020844
Matthias Kloseb9621712010-04-24 17:59:49 +000020845 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20846 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020847 break
20848 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020849 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020850 else
20851 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000020852 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020853done
Matthias Kloseb9621712010-04-24 17:59:49 +000020854rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020855
Matthias Kloseb9621712010-04-24 17:59:49 +000020856cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020020857cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020859sed -n '
20860h
20861s/^/S["/; s/!.*/"]=/
20862p
20863g
20864s/^[^!]*!//
20865:repl
20866t repl
20867s/'"$ac_delim"'$//
20868t delim
20869:nl
20870h
20871s/\(.\{148\}\)..*/\1/
20872t more1
20873s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20874p
20875n
20876b repl
20877:more1
20878s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20879p
20880g
20881s/.\{148\}//
20882t nl
20883:delim
20884h
20885s/\(.\{148\}\)..*/\1/
20886t more2
20887s/["\\]/\\&/g; s/^/"/; s/$/"/
20888p
20889b
20890:more2
20891s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20892p
20893g
20894s/.\{148\}//
20895t delim
20896' <conf$$subs.awk | sed '
20897/^[^""]/{
20898 N
20899 s/\n//
20900}
20901' >>$CONFIG_STATUS || ac_write_fail=1
20902rm -f conf$$subs.awk
20903cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20904_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020020905cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000020906 for (key in S) S_is_set[key] = 1
20907 FS = ""
20908
20909}
20910{
20911 line = $ 0
20912 nfields = split(line, field, "@")
20913 substed = 0
20914 len = length(field[1])
20915 for (i = 2; i < nfields; i++) {
20916 key = field[i]
20917 keylen = length(key)
20918 if (S_is_set[key]) {
20919 value = S[key]
20920 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20921 len += length(value) + length(field[++i])
20922 substed = 1
20923 } else
20924 len += 1 + keylen
20925 }
20926
20927 print line
20928}
20929
20930_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000020932cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20933if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20934 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20935else
20936 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020020937fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020938 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020939_ACEOF
20940
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020941# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20942# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020943# trailing colons and then remove the whole line if VPATH becomes empty
20944# (actually we leave an empty line to preserve line numbers).
20945if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020946 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20947h
20948s///
20949s/^/:/
20950s/[ ]*$/:/
20951s/:\$(srcdir):/:/g
20952s/:\${srcdir}:/:/g
20953s/:@srcdir@:/:/g
20954s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020955s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020956x
20957s/\(=[ ]*\).*/\1/
20958G
20959s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020960s/^[^=]*=[ ]*$//
20961}'
20962fi
20963
Matthias Kloseb9621712010-04-24 17:59:49 +000020964cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000020965fi # test -n "$CONFIG_FILES"
20966
Matthias Kloseb9621712010-04-24 17:59:49 +000020967# Set up the scripts for CONFIG_HEADERS section.
20968# No need to generate them if there are no CONFIG_HEADERS.
20969# This happens for instance with `./config.status Makefile'.
20970if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020020971cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000020972BEGIN {
20973_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020974
Matthias Kloseb9621712010-04-24 17:59:49 +000020975# Transform confdefs.h into an awk script `defines.awk', embedded as
20976# here-document in config.status, that substitutes the proper values into
20977# config.h.in to produce config.h.
20978
20979# Create a delimiter string that does not exist in confdefs.h, to ease
20980# handling of long lines.
20981ac_delim='%!_!# '
20982for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020020983 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20984 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000020985 break
20986 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020020987 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000020988 else
20989 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20990 fi
20991done
20992
20993# For the awk script, D is an array of macro values keyed by name,
20994# likewise P contains macro parameters if any. Preserve backslash
20995# newline sequences.
20996
20997ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20998sed -n '
20999s/.\{148\}/&'"$ac_delim"'/g
21000t rset
21001:rset
21002s/^[ ]*#[ ]*define[ ][ ]*/ /
21003t def
21004d
21005:def
21006s/\\$//
21007t bsnl
21008s/["\\]/\\&/g
21009s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21010D["\1"]=" \3"/p
21011s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21012d
21013:bsnl
21014s/["\\]/\\&/g
21015s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21016D["\1"]=" \3\\\\\\n"\\/p
21017t cont
21018s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21019t cont
21020d
21021:cont
21022n
21023s/.\{148\}/&'"$ac_delim"'/g
21024t clear
21025:clear
21026s/\\$//
21027t bsnlc
21028s/["\\]/\\&/g; s/^/"/; s/$/"/p
21029d
21030:bsnlc
21031s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21032b cont
21033' <confdefs.h | sed '
21034s/'"$ac_delim"'/"\\\
21035"/g' >>$CONFIG_STATUS || ac_write_fail=1
21036
21037cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21038 for (key in D) D_is_set[key] = 1
21039 FS = ""
21040}
21041/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21042 line = \$ 0
21043 split(line, arg, " ")
21044 if (arg[1] == "#") {
21045 defundef = arg[2]
21046 mac1 = arg[3]
21047 } else {
21048 defundef = substr(arg[1], 2)
21049 mac1 = arg[2]
21050 }
21051 split(mac1, mac2, "(") #)
21052 macro = mac2[1]
21053 prefix = substr(line, 1, index(line, defundef) - 1)
21054 if (D_is_set[macro]) {
21055 # Preserve the white space surrounding the "#".
21056 print prefix "define", macro P[macro] D[macro]
21057 next
21058 } else {
21059 # Replace #undef with comments. This is necessary, for example,
21060 # in the case of _POSIX_SOURCE, which is predefined and required
21061 # on some systems where configure will not decide to define it.
21062 if (defundef == "undef") {
21063 print "/*", prefix defundef, macro, "*/"
21064 next
21065 }
21066 }
21067}
21068{ print }
21069_ACAWK
21070_ACEOF
21071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021072 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021073fi # test -n "$CONFIG_HEADERS"
21074
21075
21076eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
21077shift
21078for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021079do
21080 case $ac_tag in
21081 :[FHLC]) ac_mode=$ac_tag; continue;;
21082 esac
21083 case $ac_mode$ac_tag in
21084 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020021085 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021086 :[FH]-) ac_tag=-:-;;
21087 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21088 esac
21089 ac_save_IFS=$IFS
21090 IFS=:
21091 set x $ac_tag
21092 IFS=$ac_save_IFS
21093 shift
21094 ac_file=$1
21095 shift
21096
21097 case $ac_mode in
21098 :L) ac_source=$1;;
21099 :[FH])
21100 ac_file_inputs=
21101 for ac_f
21102 do
21103 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020021104 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021105 *) # Look for the file first in the build tree, then in the source tree
21106 # (if the path is not absolute). The absolute path cannot be DOS-style,
21107 # because $ac_f cannot contain `:'.
21108 test -f "$ac_f" ||
21109 case $ac_f in
21110 [\\/$]*) false;;
21111 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21112 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020021113 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021114 esac
Pablo Galindocc115e52021-08-02 20:06:40 +010021115 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Matthias Kloseb9621712010-04-24 17:59:49 +000021116 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021117 done
21118
21119 # Let's still pretend it is `configure' which instantiates (i.e., don't
21120 # use $as_me), people would be surprised to read:
21121 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000021122 configure_input='Generated from '`
Pablo Galindocc115e52021-08-02 20:06:40 +010021123 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Matthias Kloseb9621712010-04-24 17:59:49 +000021124 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021125 if test x"$ac_file" != x-; then
21126 configure_input="$ac_file. $configure_input"
Pablo Galindocc115e52021-08-02 20:06:40 +010021127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21128printf "%s\n" "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021129 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000021130 # Neutralize special characters interpreted by sed in replacement strings.
21131 case $configure_input in #(
21132 *\&* | *\|* | *\\* )
Pablo Galindocc115e52021-08-02 20:06:40 +010021133 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Matthias Kloseb9621712010-04-24 17:59:49 +000021134 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21135 *) ac_sed_conf_input=$configure_input;;
21136 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021137
21138 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020021139 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021141 esac
21142 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 esac
21144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021145 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021146$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021147 X"$ac_file" : 'X\(//\)[^/]' \| \
21148 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021149 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Pablo Galindocc115e52021-08-02 20:06:40 +010021150printf "%s\n" X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021151 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21152 s//\1/
21153 q
21154 }
21155 /^X\(\/\/\)[^/].*/{
21156 s//\1/
21157 q
21158 }
21159 /^X\(\/\/\)$/{
21160 s//\1/
21161 q
21162 }
21163 /^X\(\/\).*/{
21164 s//\1/
21165 q
21166 }
21167 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000021168 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000021169 ac_builddir=.
21170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021171case "$ac_dir" in
21172.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21173*)
Pablo Galindocc115e52021-08-02 20:06:40 +010021174 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021175 # A ".." for each directory in $ac_dir_suffix.
Pablo Galindocc115e52021-08-02 20:06:40 +010021176 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021177 case $ac_top_builddir_sub in
21178 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21179 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21180 esac ;;
21181esac
21182ac_abs_top_builddir=$ac_pwd
21183ac_abs_builddir=$ac_pwd$ac_dir_suffix
21184# for backward compatibility:
21185ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000021186
21187case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021188 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000021189 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021190 ac_top_srcdir=$ac_top_builddir_sub
21191 ac_abs_top_srcdir=$ac_pwd ;;
21192 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000021193 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021194 ac_top_srcdir=$srcdir
21195 ac_abs_top_srcdir=$srcdir ;;
21196 *) # Relative name.
21197 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21198 ac_top_srcdir=$ac_top_build_prefix$srcdir
21199 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021200esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021201ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000021202
Martin v. Löwis11437992002-04-12 09:54:03 +000021203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021204 case $ac_mode in
21205 :F)
21206 #
21207 # CONFIG_FILE
21208 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021209
21210 case $INSTALL in
21211 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021213 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010021214 ac_MKDIR_P=$MKDIR_P
21215 case $MKDIR_P in
21216 [\\/$]* | ?:[\\/]* ) ;;
21217 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21218 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000021219_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220
Matthias Kloseb9621712010-04-24 17:59:49 +000021221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021222# If the template does not know about datarootdir, expand it.
21223# FIXME: This hack should be removed a few years after 2.60.
21224ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000021225ac_sed_dataroot='
21226/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021227 p
21228 q
21229}
21230/@datadir@/p
21231/@docdir@/p
21232/@infodir@/p
21233/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000021234/@mandir@/p'
21235case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021236*datarootdir*) ac_datarootdir_seen=yes;;
21237*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Pablo Galindocc115e52021-08-02 20:06:40 +010021238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21239printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021242 ac_datarootdir_hack='
21243 s&@datadir@&$datadir&g
21244 s&@docdir@&$docdir&g
21245 s&@infodir@&$infodir&g
21246 s&@localedir@&$localedir&g
21247 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000021248 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021249esac
21250_ACEOF
21251
21252# Neutralize VPATH when `$srcdir' = `.'.
21253# Shell code in configure.ac might set extrasub.
21254# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000021255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21256ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000021257$extrasub
21258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000021259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000021260:t
21261/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000021262s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021263s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000021264s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021265s&@srcdir@&$ac_srcdir&;t t
21266s&@abs_srcdir@&$ac_abs_srcdir&;t t
21267s&@top_srcdir@&$ac_top_srcdir&;t t
21268s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21269s&@builddir@&$ac_builddir&;t t
21270s&@abs_builddir@&$ac_abs_builddir&;t t
21271s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21272s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010021273s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021274$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000021275"
Victor Stinnere0be4232011-10-25 13:06:09 +020021276eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21277 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021279test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020021280 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21281 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21282 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Pablo Galindocc115e52021-08-02 20:06:40 +010021283 { 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 +020021284which seems to be undefined. Please make sure it is defined" >&5
Pablo Galindocc115e52021-08-02 20:06:40 +010021285printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021286which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021287
Victor Stinnere0be4232011-10-25 13:06:09 +020021288 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000021289 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020021290 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21291 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000021292 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021293 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021294 ;;
21295 :H)
21296 #
21297 # CONFIG_HEADER
21298 #
Martin v. Löwis11437992002-04-12 09:54:03 +000021299 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000021300 {
Pablo Galindocc115e52021-08-02 20:06:40 +010021301 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021302 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21303 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021304 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020021305 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Pablo Galindocc115e52021-08-02 20:06:40 +010021306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21307printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021308 else
Matthias Kloseb9621712010-04-24 17:59:49 +000021309 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020021310 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021311 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 fi
21313 else
Pablo Galindocc115e52021-08-02 20:06:40 +010021314 printf "%s\n" "/* $configure_input */" >&1 \
Victor Stinnere0be4232011-10-25 13:06:09 +020021315 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021316 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021318 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000021319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021320
21321 esac
21322
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000021323
21324 case $ac_file$ac_mode in
21325 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
21326
21327 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021328done # for ac_tag
21329
Guido van Rossum627b2d71993-12-24 10:39:16 +000021330
Matthias Kloseb9621712010-04-24 17:59:49 +000021331as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000021332_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021333ac_clean_files=$ac_clean_files_save
21334
Matthias Kloseb9621712010-04-24 17:59:49 +000021335test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021336 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000021337
Martin v. Löwis11437992002-04-12 09:54:03 +000021338
21339# configure is writing to config.log, and then calls config.status.
21340# config.status does its own redirection, appending to config.log.
21341# Unfortunately, on DOS this fails, as config.log is still kept open
21342# by configure, so config.status won't be able to write to it; its
21343# output is simply discarded. So we exec the FD to /dev/null,
21344# effectively closing config.log, so it can be properly (re)opened and
21345# appended to by config.status. When coming back to configure, we
21346# need to make the FD available again.
21347if test "$no_create" != yes; then
21348 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021349 ac_config_status_args=
21350 test "$silent" = yes &&
21351 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021352 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021353 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021354 exec 5>>config.log
21355 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21356 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020021357 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000021358fi
21359if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Pablo Galindocc115e52021-08-02 20:06:40 +010021360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21361printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021362fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021363
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021364
Christian Heimes75ed8902013-11-20 01:11:18 +010021365echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021366if test ! -f Modules/Setup.local
21367then
21368 echo "# Edit this file for local setup changes" >Modules/Setup.local
21369fi
21370
Christian Heimes75ed8902013-11-20 01:11:18 +010021371echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021372$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020021373 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020021374 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021375mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070021376
21377if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
21378 echo "" >&6
21379 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070021380 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 +000021381 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070021382 echo "" >&6
21383 echo "" >&6
21384fi
Pablo Galindocc115e52021-08-02 20:06:40 +010021385