blob: 2d5a61e71eb79466ac894e6b9820fb8d73799f01 [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 Galindod4fe0982020-05-19 03:33:01 +01003# Generated by GNU Autoconf 2.69 for python 3.10.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 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
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100583PACKAGE_VERSION='3.10'
584PACKAGE_STRING='python 3.10'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
pxinwr277ce302020-12-30 20:50:39 +0800626TEST_MODULES
Victor Stinner801bb0b2021-02-17 11:14:42 +0100627LIBRARY_DEPS
628STATIC_LIBPYTHON
Christian Heimesff5be6e2018-01-20 13:19:21 +0100629OPENSSL_LDFLAGS
630OPENSSL_LIBS
631OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800632ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000633SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000634THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100635WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100636LIBPL
637PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100638PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200639BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200640LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700641EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200642ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000643SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000644LIBC
645LIBM
646HAVE_GETHOSTBYNAME
647HAVE_GETHOSTBYNAME_R
648HAVE_GETHOSTBYNAME_R_3_ARG
649HAVE_GETHOSTBYNAME_R_5_ARG
650HAVE_GETHOSTBYNAME_R_6_ARG
651LIBOBJS
652TRUE
653MACHDEP_OBJS
654DYNLOADFILE
655DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700656DTRACE_OBJS
657DTRACE_HEADERS
658DFLAGS
659DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700660TCLTK_LIBS
661TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800663PKG_CONFIG_LIBDIR
664PKG_CONFIG_PATH
665PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400666TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000667SHLIBS
668CFLAGSFORSHARED
669LINKFORSHARED
670CCSHARED
671BLDSHARED
672LDCXXSHARED
673LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700674SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000675LIBTOOL_CRUFT
676OTHER_LIBTOOL_OPT
677UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100678LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700679CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000680BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200681CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000682OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700683LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700684LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700685LLVM_PROF_ERR
686LLVM_PROF_FILE
687LLVM_PROF_MERGER
688PGO_PROF_USE_FLAG
689PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200690LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200691LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700692PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700693DEF_MAKE_RULE
694DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000695ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000696LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100697MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000698INSTALL_DATA
699INSTALL_SCRIPT
700INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200701ac_ct_READELF
702READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000703ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200704ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000705AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000706GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200707EXPORTSFROM
708EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000709LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000710LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000711RUNSHARED
712INSTSONAME
713LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000714PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000715BLDLIBRARY
716DLLLIBRARY
717LDLIBRARY
718LIBRARY
719BUILDEXEEXT
720EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200721NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200722MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200723PLATFORM_TRIPLET
724MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200725ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726MAINCC
727CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700728SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200729GREP
730CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000731OBJEXT
732EXEEXT
733ac_ct_CC
734CPPFLAGS
735LDFLAGS
736CFLAGS
737CC
738EXPORT_MACOSX_DEPLOYMENT_TARGET
739CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200740_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000741MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000742FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000743FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800744FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000745FRAMEWORKALTINSTALLLAST
746FRAMEWORKALTINSTALLFIRST
747FRAMEWORKINSTALLLAST
748FRAMEWORKINSTALLFIRST
749PYTHONFRAMEWORKINSTALLDIR
750PYTHONFRAMEWORKPREFIX
751PYTHONFRAMEWORKDIR
752PYTHONFRAMEWORKIDENTIFIER
753PYTHONFRAMEWORK
754LIPO_32BIT_FLAGS
755ARCH_RUN_32BIT
756UNIVERSALSDK
757CONFIG_ARGS
758SOVERSION
759VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200760PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200761PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100762host_os
763host_vendor
764host_cpu
765host
766build_os
767build_vendor
768build_cpu
769build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500770HAS_GIT
771GITBRANCH
772GITTAG
773GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400774BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000775target_alias
776host_alias
777build_alias
778LIBS
779ECHO_T
780ECHO_N
781ECHO_C
782DEFS
783mandir
784localedir
785libdir
786psdir
787pdfdir
788dvidir
789htmldir
790infodir
791docdir
792oldincludedir
793includedir
794localstatedir
795sharedstatedir
796sysconfdir
797datadir
798datarootdir
799libexecdir
800sbindir
801bindir
802program_transform_name
803prefix
804exec_prefix
805PACKAGE_URL
806PACKAGE_BUGREPORT
807PACKAGE_STRING
808PACKAGE_VERSION
809PACKAGE_TARNAME
810PACKAGE_NAME
811PATH_SEPARATOR
812SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000813ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000814ac_user_opts='
815enable_option_checking
816enable_universalsdk
817with_universal_archs
818with_framework_name
819enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_cxx_main
821with_suffix
822enable_shared
823enable_profiling
824with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200825with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200826with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000827enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700828with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100829with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400830with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100831with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800832with_memory_sanitizer
833with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_libs
835with_system_expat
836with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100837with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100838with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000839enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700840with_tcltk_includes
841with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000843enable_ipv6
844with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000846with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000847with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700848with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_libm
850with_libc
851enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100852with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100853with_wheel_pkg_dir
Roland Hiebere1f77692021-02-09 02:05:25 +0100854with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000855with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800856with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100857with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100858with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200859with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200860with_experimental_isolated_subinterpreters
Victor Stinner801bb0b2021-02-17 11:14:42 +0100861with_static_libpython
pxinwr277ce302020-12-30 20:50:39 +0800862enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000863'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 ac_precious_vars='build_alias
865host_alias
866target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100867MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868CC
869CFLAGS
870LDFLAGS
871LIBS
872CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800873CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700874PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800875PKG_CONFIG
876PKG_CONFIG_PATH
877PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000881ac_init_help=
882ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000883ac_unrecognized_opts=
884ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885# The variables have the same names as the options, with
886# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000887cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890no_recursion=
891prefix=NONE
892program_prefix=NONE
893program_suffix=NONE
894program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899x_includes=NONE
900x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000901
902# Installation directory options.
903# These are left unexpanded so users can "make install exec_prefix=/foo"
904# and all the variables that are supposed to be based on exec_prefix
905# by default will actually change.
906# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908bindir='${exec_prefix}/bin'
909sbindir='${exec_prefix}/sbin'
910libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911datarootdir='${prefix}/share'
912datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913sysconfdir='${prefix}/etc'
914sharedstatedir='${prefix}/com'
915localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916includedir='${prefix}/include'
917oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
919infodir='${datarootdir}/info'
920htmldir='${docdir}'
921dvidir='${docdir}'
922pdfdir='${docdir}'
923psdir='${docdir}'
924libdir='${exec_prefix}/lib'
925localedir='${datarootdir}/locale'
926mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000931do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 # If the previous option needs an argument, assign it.
933 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935 ac_prev=
936 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000937 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200940 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
941 *=) ac_optarg= ;;
942 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 # Accept the important Cygnus configure options, so we can diagnose typos.
946
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 case $ac_dashdash$ac_option in
948 --)
949 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -bindir | --bindir | --bindi | --bind | --bin | --bi)
952 ac_prev=bindir ;;
953 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
956 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 -cache-file | --cache-file | --cache-fil | --cache-fi \
962 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963 ac_prev=cache_file ;;
964 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 cache_file=$ac_optarg ;;
967
968 --config-cache | -C)
969 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977 | --dataroo | --dataro | --datar)
978 ac_prev=datarootdir ;;
979 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981 datarootdir=$ac_optarg ;;
982
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000998
999 -docdir | --docdir | --docdi | --doc | --do)
1000 ac_prev=docdir ;;
1001 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002 docdir=$ac_optarg ;;
1003
1004 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005 ac_prev=dvidir ;;
1006 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001010 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001012 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001013 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001014 ac_useropt_orig=$ac_useropt
1015 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1016 case $ac_user_opts in
1017 *"
1018"enable_$ac_useropt"
1019"*) ;;
1020 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021 ac_unrecognized_sep=', ';;
1022 esac
1023 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027 | --exec | --exe | --ex)
1028 ac_prev=exec_prefix ;;
1029 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 # Obsolete; use --with-gas.
1036 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 -help | --help | --hel | --he | -h)
1039 ac_init_help=long ;;
1040 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041 ac_init_help=recursive ;;
1042 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
1045 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051 ac_prev=htmldir ;;
1052 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053 | --ht=*)
1054 htmldir=$ac_optarg ;;
1055
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 -includedir | --includedir | --includedi | --included | --include \
1057 | --includ | --inclu | --incl | --inc)
1058 ac_prev=includedir ;;
1059 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
1063 -infodir | --infodir | --infodi | --infod | --info | --inf)
1064 ac_prev=infodir ;;
1065 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
1068 -libdir | --libdir | --libdi | --libd)
1069 ac_prev=libdir ;;
1070 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074 | --libexe | --libex | --libe)
1075 ac_prev=libexecdir ;;
1076 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001080 -localedir | --localedir | --localedi | --localed | --locale)
1081 ac_prev=localedir ;;
1082 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083 localedir=$ac_optarg ;;
1084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001086 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 ac_prev=localstatedir ;;
1088 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001089 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
1092 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093 ac_prev=mandir ;;
1094 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098 # Obsolete; use --without-fp.
1099 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 no_create=yes ;;
1104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111 | --oldin | --oldi | --old | --ol | --o)
1112 ac_prev=oldincludedir ;;
1113 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119 ac_prev=prefix ;;
1120 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124 | --program-pre | --program-pr | --program-p)
1125 ac_prev=program_prefix ;;
1126 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
1130 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131 | --program-suf | --program-su | --program-s)
1132 ac_prev=program_suffix ;;
1133 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -program-transform-name | --program-transform-name \
1138 | --program-transform-nam | --program-transform-na \
1139 | --program-transform-n | --program-transform- \
1140 | --program-transform | --program-transfor \
1141 | --program-transfo | --program-transf \
1142 | --program-trans | --program-tran \
1143 | --progr-tra | --program-tr | --program-t)
1144 ac_prev=program_transform_name ;;
1145 -program-transform-name=* | --program-transform-name=* \
1146 | --program-transform-nam=* | --program-transform-na=* \
1147 | --program-transform-n=* | --program-transform-=* \
1148 | --program-transform=* | --program-transfor=* \
1149 | --program-transfo=* | --program-transf=* \
1150 | --program-trans=* | --program-tran=* \
1151 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001154 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155 ac_prev=pdfdir ;;
1156 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157 pdfdir=$ac_optarg ;;
1158
1159 -psdir | --psdir | --psdi | --psd | --ps)
1160 ac_prev=psdir ;;
1161 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162 psdir=$ac_optarg ;;
1163
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165 | -silent | --silent | --silen | --sile | --sil)
1166 silent=yes ;;
1167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1169 ac_prev=sbindir ;;
1170 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1171 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
1174 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1175 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1176 | --sharedst | --shareds | --shared | --share | --shar \
1177 | --sha | --sh)
1178 ac_prev=sharedstatedir ;;
1179 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1180 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1181 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1182 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 -site | --site | --sit)
1186 ac_prev=site ;;
1187 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1191 ac_prev=srcdir ;;
1192 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001195 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1196 | --syscon | --sysco | --sysc | --sys | --sy)
1197 ac_prev=sysconfdir ;;
1198 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1199 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001201
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1208 verbose=yes ;;
1209
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 -version | --version | --versio | --versi | --vers | -V)
1211 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
1226 esac
1227 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001233 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 ac_useropt_orig=$ac_useropt
1235 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236 case $ac_user_opts in
1237 *"
1238"with_$ac_useropt"
1239"*) ;;
1240 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1241 ac_unrecognized_sep=', ';;
1242 esac
1243 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245 --x)
1246 # Obsolete; use --with-x.
1247 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1250 | --x-incl | --x-inc | --x-in | --x-i)
1251 ac_prev=x_includes ;;
1252 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1253 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
1256 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1257 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1258 ac_prev=x_libraries ;;
1259 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1260 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1264Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 *=*)
1268 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1269 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 case $ac_envvar in #(
1271 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 export $ac_envvar ;;
1276
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001277 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001282 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283 ;;
1284
1285 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286done
1287
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001289 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291fi
1292
Matthias Kloseb9621712010-04-24 17:59:49 +00001293if test -n "$ac_unrecognized_opts"; then
1294 case $enable_option_checking in
1295 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001296 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001297 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1298 esac
1299fi
1300
1301# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1303 datadir sysconfdir sharedstatedir localstatedir includedir \
1304 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001305 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001308 # Remove trailing slashes.
1309 case $ac_val in
1310 */ )
1311 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1312 eval $ac_var=\$ac_val;;
1313 esac
1314 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 [\\/$]* | ?:[\\/]* ) continue;;
1317 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001318 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001319 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001320done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# There might be people who depend on the old broken behavior: `$host'
1323# used to hold the argument of --host etc.
1324# FIXME: To remove some day.
1325build=$build_alias
1326host=$host_alias
1327target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328
Martin v. Löwis11437992002-04-12 09:54:03 +00001329# FIXME: To remove some day.
1330if test "x$host_alias" != x; then
1331 if test "x$build_alias" = x; then
1332 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001333 elif test "x$build_alias" != "x$host_alias"; then
1334 cross_compiling=yes
1335 fi
1336fi
1337
1338ac_tool_prefix=
1339test -n "$host_alias" && ac_tool_prefix=$host_alias-
1340
1341test "$silent" = yes && exec 6>/dev/null
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344ac_pwd=`pwd` && test -n "$ac_pwd" &&
1345ac_ls_di=`ls -di .` &&
1346ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001349 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350
1351
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352# Find the source files, if location was not specified.
1353if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001354 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001356 ac_confdir=`$as_dirname -- "$as_myself" ||
1357$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1358 X"$as_myself" : 'X\(//\)[^/]' \| \
1359 X"$as_myself" : 'X\(//\)$' \| \
1360 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1361$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\/\)[^/].*/{
1367 s//\1/
1368 q
1369 }
1370 /^X\(\/\/\)$/{
1371 s//\1/
1372 q
1373 }
1374 /^X\(\/\).*/{
1375 s//\1/
1376 q
1377 }
1378 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001379 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001381 srcdir=..
1382 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383else
1384 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386if test ! -r "$srcdir/$ac_unique_file"; then
1387 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001388 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001390ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1391ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001392 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001393 pwd)`
1394# When building in place, set srcdir=.
1395if test "$ac_abs_confdir" = "$ac_pwd"; then
1396 srcdir=.
1397fi
1398# Remove unnecessary trailing slashes from srcdir.
1399# Double slashes in file names in object file debugging info
1400# mess up M-x gdb in Emacs.
1401case $srcdir in
1402*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1403esac
1404for ac_var in $ac_precious_vars; do
1405 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1406 eval ac_env_${ac_var}_value=\$${ac_var}
1407 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1409done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411#
1412# Report the --help message.
1413#
1414if test "$ac_init_help" = "long"; then
1415 # Omit some internal or obsolete options to make the list less imposing.
1416 # This message is too long to be a string in the A/UX 3.1 sh.
1417 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001418\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001419
1420Usage: $0 [OPTION]... [VAR=VALUE]...
1421
1422To assign environment variables (e.g., CC, CFLAGS...), specify them as
1423VAR=VALUE. See below for descriptions of some of the useful variables.
1424
1425Defaults for the options are specified in brackets.
1426
1427Configuration:
1428 -h, --help display this help and exit
1429 --help=short display options specific to this package
1430 --help=recursive display the short help of all the included packages
1431 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001432 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --cache-file=FILE cache test results in FILE [disabled]
1434 -C, --config-cache alias for \`--cache-file=config.cache'
1435 -n, --no-create do not create output files
1436 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1437
Martin v. Löwis11437992002-04-12 09:54:03 +00001438Installation directories:
1439 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444By default, \`make install' will install all the files in
1445\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1446an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1447for instance \`--prefix=\$HOME'.
1448
1449For better control, use the options below.
1450
1451Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --bindir=DIR user executables [EPREFIX/bin]
1453 --sbindir=DIR system admin executables [EPREFIX/sbin]
1454 --libexecdir=DIR program executables [EPREFIX/libexec]
1455 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1456 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1457 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1458 --libdir=DIR object code libraries [EPREFIX/lib]
1459 --includedir=DIR C header files [PREFIX/include]
1460 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1461 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1462 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1463 --infodir=DIR info documentation [DATAROOTDIR/info]
1464 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1465 --mandir=DIR man documentation [DATAROOTDIR/man]
1466 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1467 --htmldir=DIR html documentation [DOCDIR]
1468 --dvidir=DIR dvi documentation [DOCDIR]
1469 --pdfdir=DIR pdf documentation [DOCDIR]
1470 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
1472
1473 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001474
1475System types:
1476 --build=BUILD configure for building on BUILD [guessed]
1477 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001478_ACEOF
1479fi
1480
1481if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001482 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001483 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001484 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 cat <<\_ACEOF
1486
1487Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1490 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001491 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001492 create a universal binary build. SDKDIR specifies
1493 which macOS SDK should be used to perform the build,
1494 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001496 create a Python.framework rather than a traditional
1497 Unix install. optional INSTALLDIR specifies the
1498 installation path. see Mac/README.rst (default is
1499 no)
1500 --enable-shared enable building a shared Python library (default is
1501 no)
1502 --enable-profiling enable C-level code profiling with gprof (default is
1503 no)
1504 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1505 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001506 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001507 support loadable extensions in _sqlite module, see
1508 Doc/library/sqlite3.rst (default is no)
1509 --enable-ipv6 enable ipv6 (with ipv4) support, see
1510 Doc/library/socket.rst (default is yes if supported)
1511 --enable-big-digits[=15|30]
1512 use big digits (30 or 15 bits) for Python longs
1513 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001514 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
1516Optional Packages:
1517 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1518 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001519 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001520 specify the kind of universal binary that should be
1521 created. this option is only valid when
1522 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001523 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1524 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001525 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001526 specify the name for the python framework on macOS
1527 only valid when --enable-framework is set. see
1528 Mac/README.rst (default is 'Python')
1529 --with-cxx-main[=COMPILER]
1530 compile main() and link Python executable with C++
1531 compiler specified in COMPILER (default is $CXX)
1532 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1533 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001534 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001535 (default is no)
1536 --with-assertions build with C assertions enabled (default is no)
1537 --with-lto enable Link-Time-Optimization in any build (default
1538 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001539 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001540 select hash algorithm for use in Python/pyhash.c
1541 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001542 --with-tzpath=<list of absolute paths separated by pathsep>
1543 Select the default time zone search path for zoneinfo.TZPATH
1544
Charles-François Natalid30b0222014-05-08 23:08:51 +01001545 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001546 enable AddressSanitizer memory error detector,
1547 'asan' (default is no)
1548 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1549 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001550 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001551 enable UndefinedBehaviorSanitizer undefined
1552 behaviour detector, 'ubsan' (default is no)
1553 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001554 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001555 library, see Doc/library/pyexpat.rst (default is no)
1556 --with-system-ffi build _ctypes module using an installed ffi library,
1557 see Doc/library/ctypes.rst (default is
1558 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001559 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001560 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001561 --with-decimal-contextvar
1562 build _decimal module using a coroutine-local rather
1563 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001564 --with-tcltk-includes='-I...'
1565 override search for Tcl and Tk include files
1566 --with-tcltk-libs='-L...'
1567 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001568 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001569 override order to check db backends for dbm; a valid
1570 value is a colon separated string with the backend
1571 names `ndbm', `gdbm' and `bdb'.
1572 --with-doc-strings enable documentation strings (default is yes)
1573 --with-pymalloc enable specialized mallocs (default is yes)
1574 --with-c-locale-coercion
1575 enable C locale coercion to a UTF-8 based locale
1576 (default is yes)
1577 --with-valgrind enable Valgrind support (default is no)
1578 --with-dtrace enable DTrace support (default is no)
1579 --with-libm=STRING override libm math library to STRING (default is
1580 system-dependent)
1581 --with-libc=STRING override libc C library to STRING (default is
1582 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001583 --with-platlibdir=DIRNAME
1584 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001585 --with-wheel-pkg-dir=PATH
1586 Directory of wheel packages used by ensurepip
1587 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001588 --with(out)-readline[=editline]
1589 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001590 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001591 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001592 --with-ensurepip[=install|upgrade|no]
1593 "install" or "upgrade" using bundled pip (default is
1594 upgrade)
1595 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001596 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001597 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001598 Python's preferred selection (default), openssl:
1599 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001600 custom string, PROTOCOL_SSLv2 ignores the setting,
1601 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001602 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1603 builtin hash modules, md5, sha1, sha256, sha512,
1604 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001605 --with-experimental-isolated-subinterpreters
1606 better isolate subinterpreters, experimental build
1607 mode (default is no)
Victor Stinner801bb0b2021-02-17 11:14:42 +01001608 --without-static-libpython
1609 do not build libpythonMAJOR.MINOR.a and do not
1610 install python.o (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001611
1612Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001613 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 CC C compiler command
1615 CFLAGS C compiler flags
1616 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1617 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001619 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001622 PROFILE_TASK
1623 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001624 PKG_CONFIG path to pkg-config utility
1625 PKG_CONFIG_PATH
1626 directories to add to pkg-config's search path
1627 PKG_CONFIG_LIBDIR
1628 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001629
1630Use these variables to override the choices made by `configure' or to help
1631it to find libraries and programs with nonstandard names/locations.
1632
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001633Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001634_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001636fi
1637
1638if test "$ac_init_help" = "recursive"; then
1639 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 test -d "$ac_dir" ||
1642 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1643 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 ac_builddir=.
1645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646case "$ac_dir" in
1647.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1648*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001649 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001651 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 case $ac_top_builddir_sub in
1653 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1654 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1655 esac ;;
1656esac
1657ac_abs_top_builddir=$ac_pwd
1658ac_abs_builddir=$ac_pwd$ac_dir_suffix
1659# for backward compatibility:
1660ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001661
1662case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001664 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001665 ac_top_srcdir=$ac_top_builddir_sub
1666 ac_abs_top_srcdir=$ac_pwd ;;
1667 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001669 ac_top_srcdir=$srcdir
1670 ac_abs_top_srcdir=$srcdir ;;
1671 *) # Relative name.
1672 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1673 ac_top_srcdir=$ac_top_build_prefix$srcdir
1674 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001675esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001676ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001678 cd "$ac_dir" || { ac_status=$?; continue; }
1679 # Check for guested configure.
1680 if test -f "$ac_srcdir/configure.gnu"; then
1681 echo &&
1682 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1683 elif test -f "$ac_srcdir/configure"; then
1684 echo &&
1685 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001686 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001688 fi || ac_status=$?
1689 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 done
1691fi
1692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001693test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001694if $ac_init_version; then
1695 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001696python configure 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001697generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001698
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001699Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001700This configure script is free software; the Free Software Foundation
1701gives unlimited permission to copy, distribute and modify it.
1702_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001703 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001705
1706## ------------------------ ##
1707## Autoconf initialization. ##
1708## ------------------------ ##
1709
1710# ac_fn_c_try_compile LINENO
1711# --------------------------
1712# Try to compile conftest.$ac_ext, and return whether this succeeded.
1713ac_fn_c_try_compile ()
1714{
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext
1717 if { { ac_try="$ac_compile"
1718case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721esac
1722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723$as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_compile") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1730 fi
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_c_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest.$ac_objext; then :
1736 ac_retval=0
1737else
1738 $as_echo "$as_me: failed program was:" >&5
1739sed 's/^/| /' conftest.$ac_ext >&5
1740
1741 ac_retval=1
1742fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 as_fn_set_status $ac_retval
1745
1746} # ac_fn_c_try_compile
1747
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001748# ac_fn_c_try_cpp LINENO
1749# ----------------------
1750# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1751ac_fn_c_try_cpp ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if { { ac_try="$ac_cpp conftest.$ac_ext"
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\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_cpp conftest.$ac_ext") 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
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } > conftest.i && {
1770 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1771 test ! -s conftest.err
1772 }; then :
1773 ac_retval=0
1774else
1775 $as_echo "$as_me: failed program was:" >&5
1776sed 's/^/| /' conftest.$ac_ext >&5
1777
1778 ac_retval=1
1779fi
1780 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1781 as_fn_set_status $ac_retval
1782
1783} # ac_fn_c_try_cpp
1784
Matthias Kloseb9621712010-04-24 17:59:49 +00001785# ac_fn_c_try_link LINENO
1786# -----------------------
1787# Try to link conftest.$ac_ext, and return whether this succeeded.
1788ac_fn_c_try_link ()
1789{
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 rm -f conftest.$ac_objext conftest$ac_exeext
1792 if { { ac_try="$ac_link"
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\""
1798$as_echo "$ac_try_echo"; } >&5
1799 (eval "$ac_link") 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
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; } && {
1808 test -z "$ac_c_werror_flag" ||
1809 test ! -s conftest.err
1810 } && test -s conftest$ac_exeext && {
1811 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001812 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001813 }; then :
1814 ac_retval=0
1815else
1816 $as_echo "$as_me: failed program was:" >&5
1817sed 's/^/| /' conftest.$ac_ext >&5
1818
1819 ac_retval=1
1820fi
1821 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1822 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1823 # interfere with the next link command; also delete a directory that is
1824 # left behind by Apple's compiler. We do this before executing the actions.
1825 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001827 as_fn_set_status $ac_retval
1828
1829} # ac_fn_c_try_link
1830
Matthias Kloseb9621712010-04-24 17:59:49 +00001831# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1832# -------------------------------------------------------
1833# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1834# the include files in INCLUDES and setting the cache variable VAR
1835# accordingly.
1836ac_fn_c_check_header_mongrel ()
1837{
1838 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001839 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844fi
1845eval ac_res=\$$3
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1847$as_echo "$ac_res" >&6; }
1848else
1849 # Is the header compilable?
1850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1851$as_echo_n "checking $2 usability... " >&6; }
1852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853/* end confdefs.h. */
1854$4
1855#include <$2>
1856_ACEOF
1857if ac_fn_c_try_compile "$LINENO"; then :
1858 ac_header_compiler=yes
1859else
1860 ac_header_compiler=no
1861fi
1862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1864$as_echo "$ac_header_compiler" >&6; }
1865
1866# Is the header present?
1867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1868$as_echo_n "checking $2 presence... " >&6; }
1869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1870/* end confdefs.h. */
1871#include <$2>
1872_ACEOF
1873if ac_fn_c_try_cpp "$LINENO"; then :
1874 ac_header_preproc=yes
1875else
1876 ac_header_preproc=no
1877fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001878rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1880$as_echo "$ac_header_preproc" >&6; }
1881
1882# So? What about this header?
1883case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1884 yes:no: )
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1886$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1888$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1889 ;;
1890 no:yes:* )
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1892$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1894$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1896$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1898$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1900$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001901( $as_echo "## --------------------------------------- ##
1902## Report this to https://bugs.python.org/ ##
1903## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001904 ) | sed "s/^/$as_me: WARNING: /" >&2
1905 ;;
1906esac
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1908$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001909if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001910 $as_echo_n "(cached) " >&6
1911else
1912 eval "$3=\$ac_header_compiler"
1913fi
1914eval ac_res=\$$3
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1916$as_echo "$ac_res" >&6; }
1917fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_check_header_mongrel
1921
1922# ac_fn_c_try_run LINENO
1923# ----------------------
1924# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1925# that executables *can* be run.
1926ac_fn_c_try_run ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 if { { ac_try="$ac_link"
1930case "(($ac_try" in
1931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1932 *) ac_try_echo=$ac_try;;
1933esac
1934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1935$as_echo "$ac_try_echo"; } >&5
1936 (eval "$ac_link") 2>&5
1937 ac_status=$?
1938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1939 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1940 { { case "(($ac_try" in
1941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942 *) ac_try_echo=$ac_try;;
1943esac
1944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1945$as_echo "$ac_try_echo"; } >&5
1946 (eval "$ac_try") 2>&5
1947 ac_status=$?
1948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1949 test $ac_status = 0; }; }; then :
1950 ac_retval=0
1951else
1952 $as_echo "$as_me: program exited with status $ac_status" >&5
1953 $as_echo "$as_me: failed program was:" >&5
1954sed 's/^/| /' conftest.$ac_ext >&5
1955
1956 ac_retval=$ac_status
1957fi
1958 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001959 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 as_fn_set_status $ac_retval
1961
1962} # ac_fn_c_try_run
1963
1964# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1965# -------------------------------------------------------
1966# Tests whether HEADER exists and can be compiled using the include files in
1967# INCLUDES, setting the cache variable VAR accordingly.
1968ac_fn_c_check_header_compile ()
1969{
1970 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1972$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001974 $as_echo_n "(cached) " >&6
1975else
1976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1977/* end confdefs.h. */
1978$4
1979#include <$2>
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982 eval "$3=yes"
1983else
1984 eval "$3=no"
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993} # ac_fn_c_check_header_compile
1994
Matthias Kloseb9621712010-04-24 17:59:49 +00001995# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1996# -------------------------------------------
1997# Tests whether TYPE exists after having included INCLUDES, setting cache
1998# variable VAR accordingly.
1999ac_fn_c_check_type ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2003$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002004if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002005 $as_echo_n "(cached) " >&6
2006else
2007 eval "$3=no"
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014if (sizeof ($2))
2015 return 0;
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022/* end confdefs.h. */
2023$4
2024int
2025main ()
2026{
2027if (sizeof (($2)))
2028 return 0;
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034
2035else
2036 eval "$3=yes"
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039fi
2040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041fi
2042eval ac_res=\$$3
2043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047} # ac_fn_c_check_type
2048
Matthias Kloseb9621712010-04-24 17:59:49 +00002049# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2050# --------------------------------------------
2051# Tries to find the compile-time value of EXPR in a program that includes
2052# INCLUDES, setting VAR accordingly. Returns whether the value could be
2053# computed
2054ac_fn_c_compute_int ()
2055{
2056 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2057 if test "$cross_compiling" = yes; then
2058 # Depending upon the size, compute the lo and hi bounds.
2059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=0 ac_mid=0
2075 while :; do
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002083test_array [0] = 0;
2084return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_hi=$ac_mid; break
2092else
2093 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2094 if test $ac_lo -le $ac_mid; then
2095 ac_lo= ac_hi=
2096 break
2097 fi
2098 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 done
2102else
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002110test_array [0] = 0;
2111return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=-1 ac_mid=-1
2119 while :; do
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002127test_array [0] = 0;
2128return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002129
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_lo=$ac_mid; break
2136else
2137 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2138 if test $ac_mid -le $ac_hi; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
2146else
2147 ac_lo= ac_hi=
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152# Binary search between lo and hi bounds.
2153while test "x$ac_lo" != "x$ac_hi"; do
2154 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h. */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002162test_array [0] = 0;
2163return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002164
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_compile "$LINENO"; then :
2170 ac_hi=$ac_mid
2171else
2172 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2173fi
2174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175done
2176case $ac_lo in #((
2177?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2178'') ac_retval=1 ;;
2179esac
2180 else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183$4
2184static long int longval () { return $2; }
2185static unsigned long int ulongval () { return $2; }
2186#include <stdio.h>
2187#include <stdlib.h>
2188int
2189main ()
2190{
2191
2192 FILE *f = fopen ("conftest.val", "w");
2193 if (! f)
2194 return 1;
2195 if (($2) < 0)
2196 {
2197 long int i = longval ();
2198 if (i != ($2))
2199 return 1;
2200 fprintf (f, "%ld", i);
2201 }
2202 else
2203 {
2204 unsigned long int i = ulongval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%lu", i);
2208 }
2209 /* Do not output a trailing newline, as this causes \r\n confusion
2210 on some platforms. */
2211 return ferror (f) || fclose (f) != 0;
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_run "$LINENO"; then :
2218 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2219else
2220 ac_retval=1
2221fi
2222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2223 conftest.$ac_objext conftest.beam conftest.$ac_ext
2224rm -f conftest.val
2225
2226 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002227 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002228 as_fn_set_status $ac_retval
2229
2230} # ac_fn_c_compute_int
2231
2232# ac_fn_c_check_func LINENO FUNC VAR
2233# ----------------------------------
2234# Tests whether FUNC exists, setting the cache variable VAR accordingly
2235ac_fn_c_check_func ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002240if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2246 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2247#define $2 innocuous_$2
2248
2249/* System header to define __stub macros and hopefully few prototypes,
2250 which can conflict with char $2 (); below.
2251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2252 <limits.h> exists even on freestanding compilers. */
2253
2254#ifdef __STDC__
2255# include <limits.h>
2256#else
2257# include <assert.h>
2258#endif
2259
2260#undef $2
2261
2262/* Override any GCC internal prototype to avoid an error.
2263 Use char because int might match the return type of a GCC
2264 builtin and then its argument prototype would still apply. */
2265#ifdef __cplusplus
2266extern "C"
2267#endif
2268char $2 ();
2269/* The GNU C library defines this for functions which it implements
2270 to always fail with ENOSYS. Some functions are actually named
2271 something starting with __ and the normal name is an alias. */
2272#if defined __stub_$2 || defined __stub___$2
2273choke me
2274#endif
2275
2276int
2277main ()
2278{
2279return $2 ();
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_link "$LINENO"; then :
2285 eval "$3=yes"
2286else
2287 eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext \
2290 conftest$ac_exeext conftest.$ac_ext
2291fi
2292eval ac_res=\$$3
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002296
2297} # ac_fn_c_check_func
2298
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002299# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2300# ---------------------------------------------
2301# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2302# accordingly.
2303ac_fn_c_check_decl ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 as_decl_name=`echo $2|sed 's/ *(.*//'`
2307 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2309$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2310if eval \${$3+:} false; then :
2311 $as_echo_n "(cached) " >&6
2312else
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h. */
2315$4
2316int
2317main ()
2318{
2319#ifndef $as_decl_name
2320#ifdef __cplusplus
2321 (void) $as_decl_use;
2322#else
2323 (void) $as_decl_name;
2324#endif
2325#endif
2326
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_compile "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
2341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2342
2343} # ac_fn_c_check_decl
2344
Matthias Kloseb9621712010-04-24 17:59:49 +00002345# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2346# ----------------------------------------------------
2347# Tries to find if the field MEMBER exists in type AGGR, after including
2348# INCLUDES, setting cache variable VAR accordingly.
2349ac_fn_c_check_member ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2353$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002354if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002355 $as_echo_n "(cached) " >&6
2356else
2357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358/* end confdefs.h. */
2359$5
2360int
2361main ()
2362{
2363static $2 ac_aggr;
2364if (ac_aggr.$3)
2365return 0;
2366 ;
2367 return 0;
2368}
2369_ACEOF
2370if ac_fn_c_try_compile "$LINENO"; then :
2371 eval "$4=yes"
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$5
2376int
2377main ()
2378{
2379static $2 ac_aggr;
2380if (sizeof ac_aggr.$3)
2381return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 eval "$4=yes"
2388else
2389 eval "$4=no"
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$4
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002399
2400} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002402This file contains any messages produced by compilers while
2403running configure, to aid debugging if configure makes a mistake.
2404
Pablo Galindod4fe0982020-05-19 03:33:01 +01002405It was created by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002406generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408 $ $0 $@
2409
2410_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002412{
2413cat <<_ASUNAME
2414## --------- ##
2415## Platform. ##
2416## --------- ##
2417
2418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2419uname -m = `(uname -m) 2>/dev/null || echo unknown`
2420uname -r = `(uname -r) 2>/dev/null || echo unknown`
2421uname -s = `(uname -s) 2>/dev/null || echo unknown`
2422uname -v = `(uname -v) 2>/dev/null || echo unknown`
2423
2424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2425/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2426
2427/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2428/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002431/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2432/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2433/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2434
2435_ASUNAME
2436
2437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438for as_dir in $PATH
2439do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002442 $as_echo "PATH: $as_dir"
2443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446} >&5
2447
2448cat >&5 <<_ACEOF
2449
2450
2451## ----------- ##
2452## Core tests. ##
2453## ----------- ##
2454
2455_ACEOF
2456
2457
2458# Keep a trace of the command line.
2459# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002461# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002462# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002463ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002464ac_configure_args0=
2465ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002466ac_must_keep_next=false
2467for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002468do
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 for ac_arg
2470 do
2471 case $ac_arg in
2472 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2474 | -silent | --silent | --silen | --sile | --sil)
2475 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 esac
2479 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002482 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002484 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002486 case $ac_arg in
2487 *=* | --config-cache | -C | -disable-* | --disable-* \
2488 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2489 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2490 | -with-* | --with-* | -without-* | --without-* | --x)
2491 case "$ac_configure_args0 " in
2492 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2493 esac
2494 ;;
2495 -* ) ac_must_keep_next=true ;;
2496 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ;;
2500 esac
2501 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002502done
Matthias Kloseb9621712010-04-24 17:59:49 +00002503{ ac_configure_args0=; unset ac_configure_args0;}
2504{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506# When interrupted or exit'd, cleanup temporary files, and complete
2507# config.log. We remove comments because anyway the quotes in there
2508# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509# WARNING: Use '\'' to represent an apostrophe within the trap.
2510# 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 +00002511trap 'exit_status=$?
2512 # Save into config.log some information that might help in debugging.
2513 {
2514 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002515
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521(
2522 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523 eval ac_val=\$$ac_var
2524 case $ac_val in #(
2525 *${as_nl}*)
2526 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac
2530 case $ac_var in #(
2531 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 esac ;;
2535 esac
2536 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 "s/'\''/'\''\\\\'\'''\''/g;
2542 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002544 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002546 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac |
2548 sort
2549)
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002551
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002553## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002554## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 echo
2556 for ac_var in $ac_subst_vars
2557 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 eval ac_val=\$$ac_var
2559 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002562 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002563 done | sort
2564 echo
2565
2566 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002569## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 echo
2571 for ac_var in $ac_subst_files
2572 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 eval ac_val=\$$ac_var
2574 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002578 done | sort
2579 echo
2580 fi
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002583 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002584## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 echo
2589 fi
2590 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 $as_echo "$as_me: caught signal $ac_signal"
2592 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 rm -f core *.core core.conftest.* &&
2595 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002598for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002600done
2601ac_signal=0
2602
2603# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
Matthias Kloseb9621712010-04-24 17:59:49 +00002606$as_echo "/* confdefs.h */" > confdefs.h
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608# Predefined preprocessor variables.
2609
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_NAME "$PACKAGE_NAME"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_VERSION "$PACKAGE_VERSION"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_STRING "$PACKAGE_STRING"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2628_ACEOF
2629
Matthias Kloseb9621712010-04-24 17:59:49 +00002630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_URL "$PACKAGE_URL"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
2635# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002636# Prefer an explicitly selected file to automatically selected ones.
2637ac_site_file1=NONE
2638ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002640 # We do not want a PATH search for config.site.
2641 case $CONFIG_SITE in #((
2642 -*) ac_site_file1=./$CONFIG_SITE;;
2643 */*) ac_site_file1=$CONFIG_SITE;;
2644 *) ac_site_file1=./$CONFIG_SITE;;
2645 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 ac_site_file1=$prefix/share/config.site
2648 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649else
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 ac_site_file1=$ac_default_prefix/share/config.site
2651 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002653for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654do
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 test "x$ac_site_file" = xNONE && continue
2656 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2658$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002660 . "$ac_site_file" \
2661 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002664See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665 fi
2666done
2667
2668if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 # Some versions of bash will fail to source /dev/null (special files
2670 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2671 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2673$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2676 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679else
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2681$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 >$cache_file
2683fi
2684
2685# Check that the precious variables saved in the cache have kept the same
2686# value.
2687ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2690 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2692 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 case $ac_old_set,$ac_new_set in
2694 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2696$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 ac_cache_corrupted=: ;;
2698 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2700$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 ac_cache_corrupted=: ;;
2702 ,);;
2703 *)
2704 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 # differences in whitespace do not lead to failure.
2706 ac_old_val_w=`echo x $ac_old_val`
2707 ac_new_val_w=`echo x $ac_new_val`
2708 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2710$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2711 ac_cache_corrupted=:
2712 else
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2714$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2715 eval $ac_var=\$ac_old_val
2716 fi
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2718$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2720$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 fi;;
2722 esac
2723 # Pass precious variables to config.status.
2724 if test "$ac_new_set" = set; then
2725 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 *) ac_arg=$ac_var=$ac_new_val ;;
2728 esac
2729 case " $ac_configure_args " in
2730 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
2734done
2735if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2739$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002740 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002742## -------------------- ##
2743## Main body of script. ##
2744## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745
Guido van Rossum7f43da71994-08-01 12:15:30 +00002746ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2750ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751
Guido van Rossum627b2d71993-12-24 10:39:16 +00002752
Michael W. Hudson54241132001-12-07 15:38:26 +00002753
Trent Nelson4d4ec652012-10-16 08:51:24 -04002754
Christian Heimesff5be6e2018-01-20 13:19:21 +01002755
2756
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002757if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002758 # If we're building out-of-tree, we need to make sure the following
2759 # resources get picked up before their $srcdir counterparts.
2760 # Objects/ -> typeslots.inc
Lysandros Nikolaou314858e2020-06-20 21:07:25 +03002761 # Include/ -> Python-ast.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002762 # Python/ -> importlib.h
2763 # (A side effect of this is that these resources will automatically be
2764 # regenerated when building out-of-tree, regardless of whether or not
2765 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2766 # off.)
2767 BASECPPFLAGS="-IObjects -IInclude -IPython"
2768else
2769 BASECPPFLAGS=""
2770fi
2771
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002772
2773
2774
2775
Victor Stinner9ed34a82017-05-02 22:35:58 +02002776if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002778# Extract the first word of "git", so it can be a program name with args.
2779set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2781$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002782if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002783 $as_echo_n "(cached) " >&6
2784else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002785 if test -n "$HAS_GIT"; then
2786 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787else
2788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2789for as_dir in $PATH
2790do
2791 IFS=$as_save_IFS
2792 test -z "$as_dir" && as_dir=.
2793 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002795 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2797 break 2
2798 fi
2799done
2800 done
2801IFS=$as_save_IFS
2802
Ned Deily5c4b0d02017-03-04 00:19:55 -05002803 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804fi
2805fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002806HAS_GIT=$ac_cv_prog_HAS_GIT
2807if test -n "$HAS_GIT"; then
2808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2809$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002810else
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2812$as_echo "no" >&6; }
2813fi
2814
2815
2816else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002817HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002818fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002819if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002820then
Xiang Zhang4c855572018-08-20 22:36:19 +08002821 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2822 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2823 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002824else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002825 GITVERSION=""
2826 GITTAG=""
2827 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828fi
2829
2830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002831ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002832
2833
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002834ac_aux_dir=
2835for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2836 if test -f "$ac_dir/install-sh"; then
2837 ac_aux_dir=$ac_dir
2838 ac_install_sh="$ac_aux_dir/install-sh -c"
2839 break
2840 elif test -f "$ac_dir/install.sh"; then
2841 ac_aux_dir=$ac_dir
2842 ac_install_sh="$ac_aux_dir/install.sh -c"
2843 break
2844 elif test -f "$ac_dir/shtool"; then
2845 ac_aux_dir=$ac_dir
2846 ac_install_sh="$ac_aux_dir/shtool install -c"
2847 break
2848 fi
2849done
2850if test -z "$ac_aux_dir"; then
2851 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2852fi
2853
2854# These three variables are undocumented and unsupported,
2855# and are intended to be withdrawn in a future Autoconf release.
2856# They can cause serious problems if a builder's source tree is in a directory
2857# whose full name contains unusual characters.
2858ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2859ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2860ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2861
2862
2863# Make sure we can run config.sub.
2864$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2865 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2866
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2868$as_echo_n "checking build system type... " >&6; }
2869if ${ac_cv_build+:} false; then :
2870 $as_echo_n "(cached) " >&6
2871else
2872 ac_build_alias=$build_alias
2873test "x$ac_build_alias" = x &&
2874 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2875test "x$ac_build_alias" = x &&
2876 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2877ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2878 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2879
2880fi
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2882$as_echo "$ac_cv_build" >&6; }
2883case $ac_cv_build in
2884*-*-*) ;;
2885*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2886esac
2887build=$ac_cv_build
2888ac_save_IFS=$IFS; IFS='-'
2889set x $ac_cv_build
2890shift
2891build_cpu=$1
2892build_vendor=$2
2893shift; shift
2894# Remember, the first character of IFS is used to create $*,
2895# except with old shells:
2896build_os=$*
2897IFS=$ac_save_IFS
2898case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2899
2900
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2902$as_echo_n "checking host system type... " >&6; }
2903if ${ac_cv_host+:} false; then :
2904 $as_echo_n "(cached) " >&6
2905else
2906 if test "x$host_alias" = x; then
2907 ac_cv_host=$ac_cv_build
2908else
2909 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2910 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2911fi
2912
2913fi
2914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2915$as_echo "$ac_cv_host" >&6; }
2916case $ac_cv_host in
2917*-*-*) ;;
2918*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2919esac
2920host=$ac_cv_host
2921ac_save_IFS=$IFS; IFS='-'
2922set x $ac_cv_host
2923shift
2924host_cpu=$1
2925host_vendor=$2
2926shift; shift
2927# Remember, the first character of IFS is used to create $*,
2928# except with old shells:
2929host_os=$*
2930IFS=$ac_save_IFS
2931case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2932
2933
2934
doko@python.orga10e4a92013-01-25 18:45:12 +01002935
2936
Ned Deilyfcbc2462014-08-22 13:32:49 -07002937# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2938rm -f pybuilddir.txt
2939
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002940for ac_prog in python$PACKAGE_VERSION python3 python
2941do
2942 # Extract the first word of "$ac_prog", so it can be a program name with args.
2943set dummy $ac_prog; ac_word=$2
2944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2945$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002946if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002947 $as_echo_n "(cached) " >&6
2948else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002949 if test -n "$PYTHON_FOR_REGEN"; then
2950 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002951else
2952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953for as_dir in $PATH
2954do
2955 IFS=$as_save_IFS
2956 test -z "$as_dir" && as_dir=.
2957 for ac_exec_ext in '' $ac_executable_extensions; do
2958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002959 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2961 break 2
2962 fi
2963done
2964 done
2965IFS=$as_save_IFS
2966
2967fi
2968fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002969PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2970if test -n "$PYTHON_FOR_REGEN"; then
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2972$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002973else
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2975$as_echo "no" >&6; }
2976fi
2977
2978
Victor Stinnera5c62a82017-05-03 18:21:48 +02002979 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002980done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002981test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002982
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002983
2984
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002985if test "$cross_compiling" = yes; then
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2987$as_echo_n "checking for python interpreter for cross build... " >&6; }
2988 if test -z "$PYTHON_FOR_BUILD"; then
2989 for interp in python$PACKAGE_VERSION python3 python; do
2990 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002991 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 +02002992 break
2993 fi
2994 interp=
2995 done
2996 if test x$interp = x; then
2997 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2998 fi
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3000$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02003001 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 +02003002 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003003elif test "$cross_compiling" = maybe; then
3004 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003005else
3006 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3007fi
3008
3009
Martin v. Löwis11437992002-04-12 09:54:03 +00003010
Benjamin Petersond23f8222009-04-05 19:13:16 +00003011if test "$prefix" != "/"; then
3012 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3013fi
3014
3015
Martin v. Löwis11437992002-04-12 09:54:03 +00003016
3017
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003018# We don't use PACKAGE_ variables, and they cause conflicts
3019# with other autoconf-based packages that include Python.h
3020grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3021rm confdefs.h
3022mv confdefs.h.new confdefs.h
3023
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003024
Pablo Galindod4fe0982020-05-19 03:33:01 +01003025VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003026
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003027# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003028
3029SOVERSION=1.0
3030
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003031# The later defininition of _XOPEN_SOURCE disables certain features
3032# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003035
3036
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003037# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3038# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3039# them.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003042
3043
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3046# them.
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003049
3050
Martin v. Löwisd6320502004-08-12 13:45:08 +00003051# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003052# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3053# them.
3054
Matthias Kloseb9621712010-04-24 17:59:49 +00003055$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003056
3057
3058
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003059define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003060
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003061# Arguments passed to configure.
3062
3063CONFIG_ARGS="$ac_configure_args"
3064
Matthias Kloseb9621712010-04-24 17:59:49 +00003065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3066$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003068if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003069 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070 case $enableval in
3071 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003072 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073 # information
3074 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003075 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3078 if test ! -d "${enableval}"
3079 then
3080 enableval=/
3081 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083 ;;
3084 esac
3085 case $enableval in
3086 no)
3087 UNIVERSALSDK=
3088 enable_universalsdk=
3089 ;;
3090 *)
3091 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092 if test ! -d "${UNIVERSALSDK}"
3093 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003094 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003095 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003096 ;;
3097 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003098
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003099
Thomas Wouters477c8d52006-05-27 19:21:47 +00003100else
3101
3102 UNIVERSALSDK=
3103 enable_universalsdk=
3104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003106
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003107if test -n "${UNIVERSALSDK}"
3108then
Matthias Kloseb9621712010-04-24 17:59:49 +00003109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3110$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003111else
Matthias Kloseb9621712010-04-24 17:59:49 +00003112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3113$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003114fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003117
Ned Deily87adb6e2013-10-18 21:09:56 -07003118ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003119
Ned Deilycbfb9a52012-06-23 16:02:19 -07003120# For backward compatibility reasons we prefer to select '32-bit' if available,
3121# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003123if test "`uname -s`" = "Darwin"
3124then
3125 if test -n "${UNIVERSALSDK}"
3126 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003127 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003128 then
3129 UNIVERSAL_ARCHS="intel"
3130 fi
3131 fi
3132fi
3133
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003134
Matthias Kloseb9621712010-04-24 17:59:49 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3136$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137
3138# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003140 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003141 UNIVERSAL_ARCHS="$withval"
3142
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003143fi
3144
Ned Deily87adb6e2013-10-18 21:09:56 -07003145if test -n "${UNIVERSALSDK}"
3146then
3147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3148$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3149else
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3151$as_echo "no" >&6; }
3152fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003154
3155# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003156if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003157 withval=$with_framework_name;
3158 PYTHONFRAMEWORK=${withval}
3159 PYTHONFRAMEWORKDIR=${withval}.framework
3160 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3161
3162else
3163
3164 PYTHONFRAMEWORK=Python
3165 PYTHONFRAMEWORKDIR=Python.framework
3166 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3167
3168fi
3169
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003171if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003173 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003174 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003175 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003176 esac
3177 case $enableval in
3178 no)
3179 PYTHONFRAMEWORK=
3180 PYTHONFRAMEWORKDIR=no-framework
3181 PYTHONFRAMEWORKPREFIX=
3182 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183 FRAMEWORKINSTALLFIRST=
3184 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 FRAMEWORKALTINSTALLFIRST=
3186 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003187 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003188 if test "x${prefix}" = "xNONE"; then
3189 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3190 else
3191 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3192 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003193 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003194 ;;
3195 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003196 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003199 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003200 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3201 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003202 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003203 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003204
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003207
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 else
3209 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3210 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003211
3212 case "${enableval}" in
3213 /System*)
3214 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3215 if test "${prefix}" = "NONE" ; then
3216 # See below
3217 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3218 fi
3219 ;;
3220
3221 /Library*)
3222 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3223 ;;
3224
3225 */Library/Frameworks)
3226 MDIR="`dirname "${enableval}"`"
3227 MDIR="`dirname "${MDIR}"`"
3228 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3229
3230 if test "${prefix}" = "NONE"; then
3231 # User hasn't specified the
3232 # --prefix option, but wants to install
3233 # the framework in a non-default location,
3234 # ensure that the compatibility links get
3235 # installed relative to that prefix as well
3236 # instead of in /usr/local.
3237 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3238 fi
3239 ;;
3240
3241 *)
3242 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3243 ;;
3244 esac
3245
Jack Jansen127e56e2001-09-11 14:41:54 +00003246 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003247
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003248 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003249 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003254 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3255
3256 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3257
Jack Jansene578a632001-08-15 01:27:14 +00003258 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003259
Guido van Rossum563e7081996-09-10 18:20:48 +00003260else
Martin v. Löwis11437992002-04-12 09:54:03 +00003261
Jack Jansene578a632001-08-15 01:27:14 +00003262 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003263 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003264 PYTHONFRAMEWORKPREFIX=
3265 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003266 FRAMEWORKINSTALLFIRST=
3267 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003268 FRAMEWORKALTINSTALLFIRST=
3269 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003270 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003271 if test "x${prefix}" = "xNONE" ; then
3272 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3273 else
3274 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3275 fi
Jack Jansene578a632001-08-15 01:27:14 +00003276 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279fi
3280
Thomas Wouters477c8d52006-05-27 19:21:47 +00003281
3282
Michael W. Hudson54241132001-12-07 15:38:26 +00003283
3284
3285
3286
Jack Jansene578a632001-08-15 01:27:14 +00003287
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003288
3289
3290
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003291
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003292
Ned Deilyb8f944f2013-11-21 22:42:25 -08003293
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003294
3295cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003296#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003297_ACEOF
3298
3299
Jack Jansene578a632001-08-15 01:27:14 +00003300##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003301## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003302## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003303##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003304# Set name for machine-dependent library files
3305
Matthias Kloseb9621712010-04-24 17:59:49 +00003306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3307$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308if test -z "$MACHDEP"
3309then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003310 # avoid using uname for cross builds
3311 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003312 # ac_sys_system and ac_sys_release are used for setting
3313 # a lot of different things including 'define_xopen_source'
3314 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003315 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003316 *-*-linux-android*)
3317 ac_sys_system=Linux-android
3318 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003319 *-*-linux*)
3320 ac_sys_system=Linux
3321 ;;
3322 *-*-cygwin*)
3323 ac_sys_system=Cygwin
3324 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003325 *-*-vxworks*)
3326 ac_sys_system=VxWorks
3327 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003328 *)
3329 # for now, limit cross builds to known configurations
3330 MACHDEP="unknown"
3331 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3332 esac
3333 ac_sys_release=
3334 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003335 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003336 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003337 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003338 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003339 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003340 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003341 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003342 fi
3343 ac_md_system=`echo $ac_sys_system |
3344 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3345 ac_md_release=`echo $ac_sys_release |
3346 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3347 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003348
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003349 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003350 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003351 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003352 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003353 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003354 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003355 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003356fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3358$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003359
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003360
3361if test "$cross_compiling" = yes; then
3362 case "$host" in
3363 *-*-linux*)
3364 case "$host_cpu" in
3365 arm*)
3366 _host_cpu=arm
3367 ;;
3368 *)
3369 _host_cpu=$host_cpu
3370 esac
3371 ;;
3372 *-*-cygwin*)
3373 _host_cpu=
3374 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003375 *-*-vxworks*)
3376 _host_cpu=$host_cpu
3377 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003378 *)
3379 # for now, limit cross builds to known configurations
3380 MACHDEP="unknown"
3381 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3382 esac
3383 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3384fi
3385
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003386# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3387# disable features if it is defined, without any means to access these
3388# features as extensions. For these systems, we skip the definition of
3389# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3390# some feature, make sure there is no alternative way to access this
3391# feature. Also, when using wildcards, make sure you have verified the
3392# need for not defining _XOPEN_SOURCE on all systems matching the
3393# wildcard, and that the wildcard does not include future systems
3394# (which may remove their limitations).
3395case $ac_sys_system/$ac_sys_release in
3396 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3397 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003398 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003399 # In addition, Stefan Krah confirms that issue #1244610 exists through
3400 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003401 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003402 define_xopen_source=no
3403 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3404 # also defined. This can be overridden by defining _BSD_SOURCE
3405 # As this has a different meaning on Linux, only define it on OpenBSD
3406
Matthias Kloseb9621712010-04-24 17:59:49 +00003407$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003408
3409 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003410 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003411 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3412 # also defined. This can be overridden by defining _BSD_SOURCE
3413 # As this has a different meaning on Linux, only define it on OpenBSD
3414
Matthias Kloseb9621712010-04-24 17:59:49 +00003415$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003416
3417 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003418 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3419 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3420 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003421 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 +00003422 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003423 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3424 # request to enable features supported by the standard as a request
3425 # to disable features not supported by the standard. The best way
3426 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3427 # entirely and define __EXTENSIONS__ instead.
3428 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003429 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003430 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3431 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003432 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003433 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003434 define_xopen_source=no;;
3435 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003436 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003437 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003438 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003439 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3440 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3441 # identifies itself as Darwin/7.*
3442 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3443 # disables platform specific features beyond repair.
3444 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3445 # has no effect, don't bother defining them
3446 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003447 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003448 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003449 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003450 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3451 # defining NI_NUMERICHOST.
3452 QNX/6.3.2)
3453 define_xopen_source=no
3454 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003455 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3456 # in network headers still using system V types.
3457 VxWorks/*)
3458 define_xopen_source=no
3459 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003460
Ian Nortona9edf442020-02-14 03:09:11 +00003461 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3462 # chroot() and other functions
3463 hp*|HP*)
3464 define_xopen_source=no
3465 ;;
3466
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003467esac
3468
3469if test $define_xopen_source = yes
3470then
Victor Stinner14d098d2011-09-07 22:29:43 +02003471 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003472
Victor Stinner14d098d2011-09-07 22:29:43 +02003473$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003474
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003475
3476 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3477 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3478 # several APIs are not declared. Since this is also needed in some
3479 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003480
Matthias Kloseb9621712010-04-24 17:59:49 +00003481$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003482
3483
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003484
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003485$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003486
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003487fi
3488
Christian Heimes647cd872013-12-07 23:39:33 +01003489# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3490case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003491 hp*|HP*)
3492 define_stdc_a1=yes;;
3493 *)
3494 define_stdc_a1=no;;
3495esac
3496
3497if test $define_stdc_a1 = yes
3498then
Christian Heimes647cd872013-12-07 23:39:33 +01003499
3500$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3501
Christian Heimesb02bcae2013-12-08 15:21:08 +01003502fi
Christian Heimes647cd872013-12-07 23:39:33 +01003503
Jack Jansen6b08a402004-06-03 12:41:45 +00003504# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3505# it may influence the way we can build extensions, so distutils
3506# needs to check it
3507
Thomas Wouters477c8d52006-05-27 19:21:47 +00003508
Jack Jansen6b08a402004-06-03 12:41:45 +00003509CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003510EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003511
Guido van Rossum627b2d71993-12-24 10:39:16 +00003512# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003513
3514# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3515# for debug/optimization stuff. BASECFLAGS is for flags that are required
3516# just to get things to compile and link. Users are free to override OPT
3517# when running configure or make. The build should not break if they do.
3518# BASECFLAGS should generally not be messed with, however.
3519
Guido van Rossum8b131c51995-03-09 14:10:13 +00003520# If the user switches compilers, we can't believe the cache
3521if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3522then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003523 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003524(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003525fi
3526
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003527# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3528# when the compiler supports them, but we don't always want -O2, and
3529# we set -g later.
3530if test -z "$CFLAGS"; then
3531 CFLAGS=
3532fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533
3534if test "$ac_sys_system" = "Darwin"
3535then
3536 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003537 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003538 # information
3539 if test -z "${CC}"
3540 then
3541 found_gcc=
3542 found_clang=
3543 as_save_IFS=$IFS; IFS=:
3544 for as_dir in $PATH
3545 do
3546 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003547 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003548 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003549 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003550 fi
3551 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003552 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003553 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003554 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003555 fi
3556 fi
3557 done
3558 IFS=$as_save_IFS
3559
3560 if test -n "$found_gcc" -a -n "$found_clang"
3561 then
3562 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3565$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3566 CC="$found_clang"
3567 CXX="$found_clang++"
3568 fi
3569
3570
3571 elif test -z "$found_gcc" -a -n "$found_clang"
3572 then
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3574$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3575 CC="$found_clang"
3576 CXX="$found_clang++"
3577
3578 elif test -z "$found_gcc" -a -z "$found_clang"
3579 then
3580 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3581 if test -n "${found_clang}"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3584$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3585 CC="${found_clang}"
3586 CXX="`/usr/bin/xcrun -find clang++`"
3587
3588 # else: use default behaviour
3589 fi
3590 fi
3591 fi
3592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003593ac_ext=c
3594ac_cpp='$CPP $CPPFLAGS'
3595ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3596ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3597ac_compiler_gnu=$ac_cv_c_compiler_gnu
3598if test -n "$ac_tool_prefix"; then
3599 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3600set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3602$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003603if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003605else
3606 if test -n "$CC"; then
3607 ac_cv_prog_CC="$CC" # Let the user override the test.
3608else
Martin v. Löwis11437992002-04-12 09:54:03 +00003609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3610for as_dir in $PATH
3611do
3612 IFS=$as_save_IFS
3613 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003615 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 break 2
3619 fi
3620done
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003623
Jack Jansendd19cf82001-12-06 22:36:17 +00003624fi
3625fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003626CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003627if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3629$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003630else
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3632$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637if test -z "$ac_cv_prog_CC"; then
3638 ac_ct_CC=$CC
3639 # Extract the first word of "gcc", so it can be a program name with args.
3640set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3642$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003643if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003645else
3646 if test -n "$ac_ct_CC"; then
3647 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3648else
3649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3650for as_dir in $PATH
3651do
3652 IFS=$as_save_IFS
3653 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 break 2
3659 fi
3660done
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003663
3664fi
3665fi
3666ac_ct_CC=$ac_cv_prog_ac_ct_CC
3667if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3669$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670else
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3672$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003673fi
3674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675 if test "x$ac_ct_CC" = x; then
3676 CC=""
3677 else
3678 case $cross_compiling:$ac_tool_warned in
3679yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682ac_tool_warned=yes ;;
3683esac
3684 CC=$ac_ct_CC
3685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003686else
3687 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003688fi
3689
Jack Jansendd19cf82001-12-06 22:36:17 +00003690if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691 if test -n "$ac_tool_prefix"; then
3692 # 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 +00003693set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003696if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003698else
3699 if test -n "$CC"; then
3700 ac_cv_prog_CC="$CC" # Let the user override the test.
3701else
Martin v. Löwis11437992002-04-12 09:54:03 +00003702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 break 2
3712 fi
3713done
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003716
3717fi
3718fi
3719CC=$ac_cv_prog_CC
3720if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3722$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723else
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003726fi
3727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003730fi
3731if test -z "$CC"; then
3732 # Extract the first word of "cc", so it can be a program name with args.
3733set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003736if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003738else
3739 if test -n "$CC"; then
3740 ac_cv_prog_CC="$CC" # Let the user override the test.
3741else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3744for as_dir in $PATH
3745do
3746 IFS=$as_save_IFS
3747 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3751 ac_prog_rejected=yes
3752 continue
3753 fi
3754 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 break 2
3757 fi
3758done
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762if test $ac_prog_rejected = yes; then
3763 # We found a bogon in the path, so make sure we never use it.
3764 set dummy $ac_cv_prog_CC
3765 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767 # We chose a different compiler from the bogus one.
3768 # However, it has the same basename, so the bogon will be chosen
3769 # first if we set CC to just the basename; use the full file name.
3770 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003771 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772 fi
3773fi
3774fi
3775fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003776CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3779$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780else
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3782$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783fi
3784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785
Martin v. Löwis11437992002-04-12 09:54:03 +00003786fi
3787if test -z "$CC"; then
3788 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 do
3791 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3792set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3794$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003795if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003797else
3798 if test -n "$CC"; then
3799 ac_cv_prog_CC="$CC" # Let the user override the test.
3800else
Martin v. Löwis11437992002-04-12 09:54:03 +00003801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802for as_dir in $PATH
3803do
3804 IFS=$as_save_IFS
3805 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003811 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003812done
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003815
3816fi
3817fi
3818CC=$ac_cv_prog_CC
3819if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3821$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822else
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3824$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003825fi
3826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 test -n "$CC" && break
3829 done
3830fi
3831if test -z "$CC"; then
3832 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003834do
3835 # Extract the first word of "$ac_prog", so it can be a program name with args.
3836set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3838$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003839if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003841else
3842 if test -n "$ac_ct_CC"; then
3843 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3844else
3845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3846for as_dir in $PATH
3847do
3848 IFS=$as_save_IFS
3849 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 break 2
3855 fi
3856done
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860fi
3861fi
3862ac_ct_CC=$ac_cv_prog_ac_ct_CC
3863if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3865$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866else
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3868$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003869fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 test -n "$ac_ct_CC" && break
3873done
Michael W. Hudson54241132001-12-07 15:38:26 +00003874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875 if test "x$ac_ct_CC" = x; then
3876 CC=""
3877 else
3878 case $cross_compiling:$ac_tool_warned in
3879yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882ac_tool_warned=yes ;;
3883esac
3884 CC=$ac_ct_CC
3885 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
3887
3888fi
3889
3890
Matthias Kloseb9621712010-04-24 17:59:49 +00003891test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003893as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003894See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003895
3896# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003897$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3898set X $ac_compile
3899ac_compiler=$2
3900for ac_option in --version -v -V -qversion; do
3901 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907$as_echo "$ac_try_echo"; } >&5
3908 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 if test -s conftest.err; then
3911 sed '10a\
3912... rest of stderr output deleted ...
3913 10q' conftest.err >conftest.er1
3914 cat conftest.er1 >&5
3915 fi
3916 rm -f conftest.er1 conftest.err
3917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3918 test $ac_status = 0; }
3919done
Martin v. Löwis11437992002-04-12 09:54:03 +00003920
Matthias Kloseb9621712010-04-24 17:59:49 +00003921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003922/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003923
Martin v. Löwis11437992002-04-12 09:54:03 +00003924int
3925main ()
3926{
3927
3928 ;
3929 return 0;
3930}
3931_ACEOF
3932ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003933ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003934# Try to create an executable without -o first, disregard a.out.
3935# It will help us diagnose broken compilers, and finding out an intuition
3936# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3938$as_echo_n "checking whether the C compiler works... " >&6; }
3939ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3940
3941# The possible output files:
3942ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944ac_rmfiles=
3945for ac_file in $ac_files
3946do
3947 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3950 esac
3951done
3952rm -f $ac_rmfiles
3953
Matthias Kloseb9621712010-04-24 17:59:49 +00003954if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955case "(($ac_try" in
3956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3957 *) ac_try_echo=$ac_try;;
3958esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3960$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3966# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3967# in a Makefile. We should not override ac_cv_exeext if it was cached,
3968# so that the user can short-circuit this test for compilers unknown to
3969# Autoconf.
3970for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003971do
3972 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 ;;
3976 [ab].out )
3977 # We found the default executable, but exeext='' is most
3978 # certainly right.
3979 break;;
3980 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 then :; else
3983 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3984 fi
3985 # We set ac_cv_exeext here because the later test for it is not
3986 # safe: cross compilers may not add the suffix if given an `-o'
3987 # argument, so we may need to know it at that point already.
3988 # Even if this section looks crufty: it has the advantage of
3989 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990 break;;
3991 * )
3992 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 esac
3994done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995test "$ac_cv_exeext" = no && ac_cv_exeext=
3996
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003997else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998 ac_file=''
3999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004000if test -z "$ac_file"; then :
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4002$as_echo "no" >&6; }
4003$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004004sed 's/^/| /' conftest.$ac_ext >&5
4005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004008as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004009See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004010else
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4012$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4015$as_echo_n "checking for C compiler default output file name... " >&6; }
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4017$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019
Matthias Kloseb9621712010-04-24 17:59:49 +00004020rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4023$as_echo_n "checking for suffix of executables... " >&6; }
4024if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025case "(($ac_try" in
4026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027 *) ac_try_echo=$ac_try;;
4028esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4030$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004032 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4034 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4036# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4037# work properly (i.e., refer to `conftest.exe'), while it won't with
4038# `rm'.
4039for ac_file in conftest.exe conftest conftest.*; do
4040 test -f "$ac_file" || continue
4041 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4044 break;;
4045 * ) break;;
4046 esac
4047done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048else
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004051as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004052See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004054rm -f conftest conftest$ac_cv_exeext
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4056$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057
4058rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004059EXEEXT=$ac_cv_exeext
4060ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4062/* end confdefs.h. */
4063#include <stdio.h>
4064int
4065main ()
4066{
4067FILE *f = fopen ("conftest.out", "w");
4068 return ferror (f) || fclose (f) != 0;
4069
4070 ;
4071 return 0;
4072}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004074ac_clean_files="$ac_clean_files conftest.out"
4075# Check that the compiler produces executables we can run. If not, either
4076# the compiler is broken, or we cross compile.
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4078$as_echo_n "checking whether we are cross compiling... " >&6; }
4079if test "$cross_compiling" != yes; then
4080 { { ac_try="$ac_link"
4081case "(($ac_try" in
4082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083 *) ac_try_echo=$ac_try;;
4084esac
4085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086$as_echo "$ac_try_echo"; } >&5
4087 (eval "$ac_link") 2>&5
4088 ac_status=$?
4089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090 test $ac_status = 0; }
4091 if { ac_try='./conftest$ac_cv_exeext'
4092 { { case "(($ac_try" in
4093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094 *) ac_try_echo=$ac_try;;
4095esac
4096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
4098 (eval "$ac_try") 2>&5
4099 ac_status=$?
4100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101 test $ac_status = 0; }; }; then
4102 cross_compiling=no
4103 else
4104 if test "$cross_compiling" = maybe; then
4105 cross_compiling=yes
4106 else
4107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004109as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004110If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004111See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 fi
4113 fi
4114fi
4115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4116$as_echo "$cross_compiling" >&6; }
4117
4118rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4119ac_clean_files=$ac_clean_files_save
4120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4121$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004122if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo_n "(cached) " >&6
4124else
4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004126/* end confdefs.h. */
4127
4128int
4129main ()
4130{
4131
4132 ;
4133 return 0;
4134}
4135_ACEOF
4136rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004137if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138case "(($ac_try" in
4139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4140 *) ac_try_echo=$ac_try;;
4141esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4143$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4147 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148 for ac_file in conftest.o conftest.obj conftest.*; do
4149 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4153 break;;
4154 esac
4155done
4156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004158sed 's/^/| /' conftest.$ac_ext >&5
4159
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004162as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004163See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004164fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004165rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4168$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004169OBJEXT=$ac_cv_objext
4170ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4172$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004173if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004175else
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004178
Martin v. Löwis11437992002-04-12 09:54:03 +00004179int
4180main ()
4181{
4182#ifndef __GNUC__
4183 choke me
4184#endif
4185
4186 ;
4187 return 0;
4188}
4189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004190if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004191 ac_compiler_gnu=yes
4192else
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004196ac_cv_c_compiler_gnu=$ac_compiler_gnu
4197
4198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4200$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4201if test $ac_compiler_gnu = yes; then
4202 GCC=yes
4203else
4204 GCC=
4205fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_test_CFLAGS=${CFLAGS+set}
4207ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4209$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004210if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004212else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 ac_save_c_werror_flag=$ac_c_werror_flag
4214 ac_c_werror_flag=yes
4215 ac_cv_prog_cc_g=no
4216 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004219
Martin v. Löwis11437992002-04-12 09:54:03 +00004220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004229 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230else
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 CFLAGS=""
4232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233/* end confdefs.h. */
4234
4235int
4236main ()
4237{
4238
4239 ;
4240 return 0;
4241}
4242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244
Matthias Kloseb9621712010-04-24 17:59:49 +00004245else
4246 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249/* end confdefs.h. */
4250
4251int
4252main ()
4253{
4254
4255 ;
4256 return 0;
4257}
4258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004259if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267 ac_c_werror_flag=$ac_save_c_werror_flag
4268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4270$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004271if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273elif test $ac_cv_prog_cc_g = yes; then
4274 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004275 CFLAGS="-g -O2"
4276 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278 fi
4279else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280 if test "$GCC" = yes; then
4281 CFLAGS="-O2"
4282 else
4283 CFLAGS=
4284 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4287$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004288if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004290else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004292ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* end confdefs.h. */
4295#include <stdarg.h>
4296#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004297struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004298/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4299struct buf { int x; };
4300FILE * (*rcsopen) (struct buf *, struct stat *, int);
4301static char *e (p, i)
4302 char **p;
4303 int i;
4304{
4305 return p[i];
4306}
4307static char *f (char * (*g) (char **, int), char **p, ...)
4308{
4309 char *s;
4310 va_list v;
4311 va_start (v,p);
4312 s = g (p, va_arg (v,int));
4313 va_end (v);
4314 return s;
4315}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004316
4317/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4318 function prototypes and stuff, but not '\xHH' hex character constants.
4319 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4322 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004324int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4327 inside strings and character constants. */
4328#define FOO(x) 'x'
4329int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4330
Skip Montanaro6dead952003-09-25 14:50:04 +00004331int test (int i, double x);
4332struct s1 {int (*f) (int a);};
4333struct s2 {int (*f) (double a);};
4334int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4335int argc;
4336char **argv;
4337int
4338main ()
4339{
4340return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4341 ;
4342 return 0;
4343}
4344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4346 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004347do
4348 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352rm -f core conftest.err conftest.$ac_objext
4353 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004354done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004356CC=$ac_save_CC
4357
4358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359# AC_CACHE_VAL
4360case "x$ac_cv_prog_cc_c89" in
4361 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4363$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4366$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004367 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4370$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004371esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004372if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004375
Martin v. Löwis11437992002-04-12 09:54:03 +00004376ac_ext=c
4377ac_cpp='$CPP $CPPFLAGS'
4378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4380ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004382ac_ext=c
4383ac_cpp='$CPP $CPPFLAGS'
4384ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4385ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4386ac_compiler_gnu=$ac_cv_c_compiler_gnu
4387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4388$as_echo_n "checking how to run the C preprocessor... " >&6; }
4389# On Suns, sometimes $CPP names a directory.
4390if test -n "$CPP" && test -d "$CPP"; then
4391 CPP=
4392fi
4393if test -z "$CPP"; then
4394 if ${ac_cv_prog_CPP+:} false; then :
4395 $as_echo_n "(cached) " >&6
4396else
4397 # Double quotes because CPP needs to be expanded
4398 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4399 do
4400 ac_preproc_ok=false
4401for ac_c_preproc_warn_flag in '' yes
4402do
4403 # Use a header file that comes with gcc, so configuring glibc
4404 # with a fresh cross-compiler works.
4405 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4406 # <limits.h> exists even on freestanding compilers.
4407 # On the NeXT, cc -E runs the code through the compiler's parser,
4408 # not just through cpp. "Syntax error" is here to catch this case.
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#ifdef __STDC__
4412# include <limits.h>
4413#else
4414# include <assert.h>
4415#endif
4416 Syntax error
4417_ACEOF
4418if ac_fn_c_try_cpp "$LINENO"; then :
4419
4420else
4421 # Broken: fails on valid input.
4422continue
4423fi
4424rm -f conftest.err conftest.i conftest.$ac_ext
4425
4426 # OK, works on sane cases. Now check whether nonexistent headers
4427 # can be detected and how.
4428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4429/* end confdefs.h. */
4430#include <ac_nonexistent.h>
4431_ACEOF
4432if ac_fn_c_try_cpp "$LINENO"; then :
4433 # Broken: success on invalid input.
4434continue
4435else
4436 # Passes both tests.
4437ac_preproc_ok=:
4438break
4439fi
4440rm -f conftest.err conftest.i conftest.$ac_ext
4441
4442done
4443# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4444rm -f conftest.i conftest.err conftest.$ac_ext
4445if $ac_preproc_ok; then :
4446 break
4447fi
4448
4449 done
4450 ac_cv_prog_CPP=$CPP
4451
4452fi
4453 CPP=$ac_cv_prog_CPP
4454else
4455 ac_cv_prog_CPP=$CPP
4456fi
4457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4458$as_echo "$CPP" >&6; }
4459ac_preproc_ok=false
4460for ac_c_preproc_warn_flag in '' yes
4461do
4462 # Use a header file that comes with gcc, so configuring glibc
4463 # with a fresh cross-compiler works.
4464 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4465 # <limits.h> exists even on freestanding compilers.
4466 # On the NeXT, cc -E runs the code through the compiler's parser,
4467 # not just through cpp. "Syntax error" is here to catch this case.
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469/* end confdefs.h. */
4470#ifdef __STDC__
4471# include <limits.h>
4472#else
4473# include <assert.h>
4474#endif
4475 Syntax error
4476_ACEOF
4477if ac_fn_c_try_cpp "$LINENO"; then :
4478
4479else
4480 # Broken: fails on valid input.
4481continue
4482fi
4483rm -f conftest.err conftest.i conftest.$ac_ext
4484
4485 # OK, works on sane cases. Now check whether nonexistent headers
4486 # can be detected and how.
4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4488/* end confdefs.h. */
4489#include <ac_nonexistent.h>
4490_ACEOF
4491if ac_fn_c_try_cpp "$LINENO"; then :
4492 # Broken: success on invalid input.
4493continue
4494else
4495 # Passes both tests.
4496ac_preproc_ok=:
4497break
4498fi
4499rm -f conftest.err conftest.i conftest.$ac_ext
4500
4501done
4502# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4503rm -f conftest.i conftest.err conftest.$ac_ext
4504if $ac_preproc_ok; then :
4505
4506else
4507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4509as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4510See \`config.log' for more details" "$LINENO" 5; }
4511fi
4512
4513ac_ext=c
4514ac_cpp='$CPP $CPPFLAGS'
4515ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4516ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4517ac_compiler_gnu=$ac_cv_c_compiler_gnu
4518
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4520$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4521if ${ac_cv_path_GREP+:} false; then :
4522 $as_echo_n "(cached) " >&6
4523else
4524 if test -z "$GREP"; then
4525 ac_path_GREP_found=false
4526 # Loop through the user's path and test for each of PROGNAME-LIST
4527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4528for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4529do
4530 IFS=$as_save_IFS
4531 test -z "$as_dir" && as_dir=.
4532 for ac_prog in grep ggrep; do
4533 for ac_exec_ext in '' $ac_executable_extensions; do
4534 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4535 as_fn_executable_p "$ac_path_GREP" || continue
4536# Check for GNU ac_path_GREP and select it if it is found.
4537 # Check for GNU $ac_path_GREP
4538case `"$ac_path_GREP" --version 2>&1` in
4539*GNU*)
4540 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4541*)
4542 ac_count=0
4543 $as_echo_n 0123456789 >"conftest.in"
4544 while :
4545 do
4546 cat "conftest.in" "conftest.in" >"conftest.tmp"
4547 mv "conftest.tmp" "conftest.in"
4548 cp "conftest.in" "conftest.nl"
4549 $as_echo 'GREP' >> "conftest.nl"
4550 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4551 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4552 as_fn_arith $ac_count + 1 && ac_count=$as_val
4553 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4554 # Best one so far, save it but keep looking for a better one
4555 ac_cv_path_GREP="$ac_path_GREP"
4556 ac_path_GREP_max=$ac_count
4557 fi
4558 # 10*(2^10) chars as input seems more than enough
4559 test $ac_count -gt 10 && break
4560 done
4561 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4562esac
4563
4564 $ac_path_GREP_found && break 3
4565 done
4566 done
4567 done
4568IFS=$as_save_IFS
4569 if test -z "$ac_cv_path_GREP"; then
4570 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4571 fi
4572else
4573 ac_cv_path_GREP=$GREP
4574fi
4575
4576fi
4577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4578$as_echo "$ac_cv_path_GREP" >&6; }
4579 GREP="$ac_cv_path_GREP"
4580
4581
Łukasz Langaa785c872016-09-09 17:37:37 -07004582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4583$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4584if ${ac_cv_path_SED+:} false; then :
4585 $as_echo_n "(cached) " >&6
4586else
4587 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4588 for ac_i in 1 2 3 4 5 6 7; do
4589 ac_script="$ac_script$as_nl$ac_script"
4590 done
4591 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4592 { ac_script=; unset ac_script;}
4593 if test -z "$SED"; then
4594 ac_path_SED_found=false
4595 # Loop through the user's path and test for each of PROGNAME-LIST
4596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in $PATH
4598do
4599 IFS=$as_save_IFS
4600 test -z "$as_dir" && as_dir=.
4601 for ac_prog in sed gsed; do
4602 for ac_exec_ext in '' $ac_executable_extensions; do
4603 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4604 as_fn_executable_p "$ac_path_SED" || continue
4605# Check for GNU ac_path_SED and select it if it is found.
4606 # Check for GNU $ac_path_SED
4607case `"$ac_path_SED" --version 2>&1` in
4608*GNU*)
4609 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4610*)
4611 ac_count=0
4612 $as_echo_n 0123456789 >"conftest.in"
4613 while :
4614 do
4615 cat "conftest.in" "conftest.in" >"conftest.tmp"
4616 mv "conftest.tmp" "conftest.in"
4617 cp "conftest.in" "conftest.nl"
4618 $as_echo '' >> "conftest.nl"
4619 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4620 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4621 as_fn_arith $ac_count + 1 && ac_count=$as_val
4622 if test $ac_count -gt ${ac_path_SED_max-0}; then
4623 # Best one so far, save it but keep looking for a better one
4624 ac_cv_path_SED="$ac_path_SED"
4625 ac_path_SED_max=$ac_count
4626 fi
4627 # 10*(2^10) chars as input seems more than enough
4628 test $ac_count -gt 10 && break
4629 done
4630 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4631esac
4632
4633 $ac_path_SED_found && break 3
4634 done
4635 done
4636 done
4637IFS=$as_save_IFS
4638 if test -z "$ac_cv_path_SED"; then
4639 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4640 fi
4641else
4642 ac_cv_path_SED=$SED
4643fi
4644
4645fi
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4647$as_echo "$ac_cv_path_SED" >&6; }
4648 SED="$ac_cv_path_SED"
4649 rm -f conftest.sed
4650
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004651
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004652
4653
Matthias Kloseb9621712010-04-24 17:59:49 +00004654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4655$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004657# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004658if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004659 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660
4661 case $withval in
4662 no) with_cxx_main=no
4663 MAINCC='$(CC)';;
4664 yes) with_cxx_main=yes
4665 MAINCC='$(CXX)';;
4666 *) with_cxx_main=yes
4667 MAINCC=$withval
4668 if test -z "$CXX"
4669 then
4670 CXX=$withval
4671 fi;;
4672 esac
4673else
4674
4675 with_cxx_main=no
4676 MAINCC='$(CC)'
4677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004678fi
4679
Matthias Kloseb9621712010-04-24 17:59:49 +00004680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4681$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004682
4683preset_cxx="$CXX"
4684if test -z "$CXX"
4685then
4686 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 gcc) if test -n "$ac_tool_prefix"; then
4688 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4689set dummy ${ac_tool_prefix}g++; ac_word=$2
4690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691$as_echo_n "checking for $ac_word... " >&6; }
4692if ${ac_cv_path_CXX+:} false; then :
4693 $as_echo_n "(cached) " >&6
4694else
4695 case $CXX in
4696 [\\/]* | ?:[\\/]*)
4697 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4698 ;;
4699 *)
4700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in notfound
4702do
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4710 fi
4711done
4712 done
4713IFS=$as_save_IFS
4714
4715 ;;
4716esac
4717fi
4718CXX=$ac_cv_path_CXX
4719if test -n "$CXX"; then
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4721$as_echo "$CXX" >&6; }
4722else
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
4725fi
4726
4727
4728fi
4729if test -z "$ac_cv_path_CXX"; then
4730 ac_pt_CXX=$CXX
4731 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004732set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004735if ${ac_cv_path_ac_pt_CXX+:} false; then :
4736 $as_echo_n "(cached) " >&6
4737else
4738 case $ac_pt_CXX in
4739 [\\/]* | ?:[\\/]*)
4740 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4741 ;;
4742 *)
4743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in notfound
4745do
4746 IFS=$as_save_IFS
4747 test -z "$as_dir" && as_dir=.
4748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4752 break 2
4753 fi
4754done
4755 done
4756IFS=$as_save_IFS
4757
4758 ;;
4759esac
4760fi
4761ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4762if test -n "$ac_pt_CXX"; then
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4764$as_echo "$ac_pt_CXX" >&6; }
4765else
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767$as_echo "no" >&6; }
4768fi
4769
4770 if test "x$ac_pt_CXX" = x; then
4771 CXX="g++"
4772 else
4773 case $cross_compiling:$ac_tool_warned in
4774yes:)
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4777ac_tool_warned=yes ;;
4778esac
4779 CXX=$ac_pt_CXX
4780 fi
4781else
4782 CXX="$ac_cv_path_CXX"
4783fi
4784 ;;
4785 cc) if test -n "$ac_tool_prefix"; then
4786 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4787set dummy ${ac_tool_prefix}c++; ac_word=$2
4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004790if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792else
4793 case $CXX in
4794 [\\/]* | ?:[\\/]*)
4795 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4796 ;;
4797 *)
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in notfound
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807 break 2
4808 fi
4809done
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004811IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 ;;
4814esac
4815fi
4816CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004817if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4819$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820else
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004824
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825
4826fi
4827if test -z "$ac_cv_path_CXX"; then
4828 ac_pt_CXX=$CXX
4829 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004838 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 +00004839 ;;
4840 *)
4841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4842for as_dir in notfound
4843do
4844 IFS=$as_save_IFS
4845 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850 break 2
4851 fi
4852done
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004854IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004856 ;;
4857esac
4858fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4860if test -n "$ac_pt_CXX"; then
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4862$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004863else
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004867
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004868 if test "x$ac_pt_CXX" = x; then
4869 CXX="c++"
4870 else
4871 case $cross_compiling:$ac_tool_warned in
4872yes:)
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4875ac_tool_warned=yes ;;
4876esac
4877 CXX=$ac_pt_CXX
4878 fi
4879else
4880 CXX="$ac_cv_path_CXX"
4881fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004882 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883 clang|*/clang) if test -n "$ac_tool_prefix"; then
4884 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4885set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if ${ac_cv_path_CXX+:} false; then :
4889 $as_echo_n "(cached) " >&6
4890else
4891 case $CXX in
4892 [\\/]* | ?:[\\/]*)
4893 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4894 ;;
4895 *)
4896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in notfound
4898do
4899 IFS=$as_save_IFS
4900 test -z "$as_dir" && as_dir=.
4901 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004903 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905 break 2
4906 fi
4907done
4908 done
4909IFS=$as_save_IFS
4910
Ned Deilycbfb9a52012-06-23 16:02:19 -07004911 ;;
4912esac
4913fi
4914CXX=$ac_cv_path_CXX
4915if test -n "$CXX"; then
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4917$as_echo "$CXX" >&6; }
4918else
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004923
4924fi
4925if test -z "$ac_cv_path_CXX"; then
4926 ac_pt_CXX=$CXX
4927 # Extract the first word of "clang++", so it can be a program name with args.
4928set dummy clang++; ac_word=$2
4929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4930$as_echo_n "checking for $ac_word... " >&6; }
4931if ${ac_cv_path_ac_pt_CXX+:} false; then :
4932 $as_echo_n "(cached) " >&6
4933else
4934 case $ac_pt_CXX in
4935 [\\/]* | ?:[\\/]*)
4936 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4937 ;;
4938 *)
4939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4940for as_dir in notfound
4941do
4942 IFS=$as_save_IFS
4943 test -z "$as_dir" && as_dir=.
4944 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004946 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4948 break 2
4949 fi
4950done
4951 done
4952IFS=$as_save_IFS
4953
4954 ;;
4955esac
4956fi
4957ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4958if test -n "$ac_pt_CXX"; then
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4960$as_echo "$ac_pt_CXX" >&6; }
4961else
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4963$as_echo "no" >&6; }
4964fi
4965
4966 if test "x$ac_pt_CXX" = x; then
4967 CXX="clang++"
4968 else
4969 case $cross_compiling:$ac_tool_warned in
4970yes:)
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4973ac_tool_warned=yes ;;
4974esac
4975 CXX=$ac_pt_CXX
4976 fi
4977else
4978 CXX="$ac_cv_path_CXX"
4979fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004980 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004981 icc|*/icc) if test -n "$ac_tool_prefix"; then
4982 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4983set dummy ${ac_tool_prefix}icpc; ac_word=$2
4984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4985$as_echo_n "checking for $ac_word... " >&6; }
4986if ${ac_cv_path_CXX+:} false; then :
4987 $as_echo_n "(cached) " >&6
4988else
4989 case $CXX in
4990 [\\/]* | ?:[\\/]*)
4991 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4992 ;;
4993 *)
4994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in notfound
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
4999 for ac_exec_ext in '' $ac_executable_extensions; do
5000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5001 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5003 break 2
5004 fi
5005done
5006 done
5007IFS=$as_save_IFS
5008
5009 ;;
5010esac
5011fi
5012CXX=$ac_cv_path_CXX
5013if test -n "$CXX"; then
5014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5015$as_echo "$CXX" >&6; }
5016else
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5018$as_echo "no" >&6; }
5019fi
5020
5021
5022fi
5023if test -z "$ac_cv_path_CXX"; then
5024 ac_pt_CXX=$CXX
5025 # Extract the first word of "icpc", so it can be a program name with args.
5026set dummy icpc; ac_word=$2
5027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5028$as_echo_n "checking for $ac_word... " >&6; }
5029if ${ac_cv_path_ac_pt_CXX+:} false; then :
5030 $as_echo_n "(cached) " >&6
5031else
5032 case $ac_pt_CXX in
5033 [\\/]* | ?:[\\/]*)
5034 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5035 ;;
5036 *)
5037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5038for as_dir in notfound
5039do
5040 IFS=$as_save_IFS
5041 test -z "$as_dir" && as_dir=.
5042 for ac_exec_ext in '' $ac_executable_extensions; do
5043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5044 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5046 break 2
5047 fi
5048done
5049 done
5050IFS=$as_save_IFS
5051
5052 ;;
5053esac
5054fi
5055ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5056if test -n "$ac_pt_CXX"; then
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5058$as_echo "$ac_pt_CXX" >&6; }
5059else
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5061$as_echo "no" >&6; }
5062fi
5063
5064 if test "x$ac_pt_CXX" = x; then
5065 CXX="icpc"
5066 else
5067 case $cross_compiling:$ac_tool_warned in
5068yes:)
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5071ac_tool_warned=yes ;;
5072esac
5073 CXX=$ac_pt_CXX
5074 fi
5075else
5076 CXX="$ac_cv_path_CXX"
5077fi
5078 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005079 esac
5080 if test "$CXX" = "notfound"
5081 then
5082 CXX=""
5083 fi
5084fi
5085if test -z "$CXX"
5086then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005087 if test -n "$ac_tool_prefix"; then
5088 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5089 do
5090 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5091set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5093$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005094if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096else
5097 if test -n "$CXX"; then
5098 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5099else
5100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101for as_dir in $PATH
5102do
5103 IFS=$as_save_IFS
5104 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005107 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109 break 2
5110 fi
5111done
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005113IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114
5115fi
5116fi
5117CXX=$ac_cv_prog_CXX
5118if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5120$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121else
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124fi
5125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005126
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005127 test -n "$CXX" && break
5128 done
5129fi
5130if test -z "$CXX"; then
5131 ac_ct_CXX=$CXX
5132 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5133do
5134 # Extract the first word of "$ac_prog", so it can be a program name with args.
5135set dummy $ac_prog; ac_word=$2
5136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137$as_echo_n "checking for $ac_word... " >&6; }
5138if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5139 $as_echo_n "(cached) " >&6
5140else
5141 if test -n "$ac_ct_CXX"; then
5142 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5143else
5144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5145for as_dir in $PATH
5146do
5147 IFS=$as_save_IFS
5148 test -z "$as_dir" && as_dir=.
5149 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005151 ac_cv_prog_ac_ct_CXX="$ac_prog"
5152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5153 break 2
5154 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005155done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005156 done
5157IFS=$as_save_IFS
5158
5159fi
5160fi
5161ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5162if test -n "$ac_ct_CXX"; then
5163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5164$as_echo "$ac_ct_CXX" >&6; }
5165else
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5167$as_echo "no" >&6; }
5168fi
5169
5170
5171 test -n "$ac_ct_CXX" && break
5172done
5173
5174 if test "x$ac_ct_CXX" = x; then
5175 CXX="notfound"
5176 else
5177 case $cross_compiling:$ac_tool_warned in
5178yes:)
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5180$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5181ac_tool_warned=yes ;;
5182esac
5183 CXX=$ac_ct_CXX
5184 fi
5185fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005186
5187 if test "$CXX" = "notfound"
5188 then
5189 CXX=""
5190 fi
5191fi
5192if test "$preset_cxx" != "$CXX"
5193then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005194 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005195
5196 By default, distutils will build C++ extension modules with \"$CXX\".
5197 If this is not intended, then set CXX on the configure command line.
5198 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005199$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005200
5201 By default, distutils will build C++ extension modules with \"$CXX\".
5202 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005203 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005204fi
5205
5206
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5208
5209
5210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5211$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5212cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef bfin
5214#undef cris
5215#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005217#undef hppa
5218#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005220#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005221#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005222#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005224#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005225 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005226#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005227# if defined(__x86_64__) && defined(__LP64__)
5228 x86_64-linux-gnu
5229# elif defined(__x86_64__) && defined(__ILP32__)
5230 x86_64-linux-gnux32
5231# elif defined(__i386__)
5232 i386-linux-gnu
5233# elif defined(__aarch64__) && defined(__AARCH64EL__)
5234# if defined(__ILP32__)
5235 aarch64_ilp32-linux-gnu
5236# else
5237 aarch64-linux-gnu
5238# endif
5239# elif defined(__aarch64__) && defined(__AARCH64EB__)
5240# if defined(__ILP32__)
5241 aarch64_be_ilp32-linux-gnu
5242# else
5243 aarch64_be-linux-gnu
5244# endif
5245# elif defined(__alpha__)
5246 alpha-linux-gnu
5247# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5248# if defined(__ARMEL__)
5249 arm-linux-gnueabihf
5250# else
5251 armeb-linux-gnueabihf
5252# endif
5253# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5254# if defined(__ARMEL__)
5255 arm-linux-gnueabi
5256# else
5257 armeb-linux-gnueabi
5258# endif
5259# elif defined(__hppa__)
5260 hppa-linux-gnu
5261# elif defined(__ia64__)
5262 ia64-linux-gnu
5263# elif defined(__m68k__) && !defined(__mcoldfire__)
5264 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005265# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5266# if _MIPS_SIM == _ABIO32
5267 mipsisa32r6el-linux-gnu
5268# elif _MIPS_SIM == _ABIN32
5269 mipsisa64r6el-linux-gnuabin32
5270# elif _MIPS_SIM == _ABI64
5271 mipsisa64r6el-linux-gnuabi64
5272# else
5273# error unknown platform triplet
5274# endif
5275# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5276# if _MIPS_SIM == _ABIO32
5277 mipsisa32r6-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mipsisa64r6-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mipsisa64r6-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005285# elif defined(__mips_hard_float) && defined(_MIPSEL)
5286# if _MIPS_SIM == _ABIO32
5287 mipsel-linux-gnu
5288# elif _MIPS_SIM == _ABIN32
5289 mips64el-linux-gnuabin32
5290# elif _MIPS_SIM == _ABI64
5291 mips64el-linux-gnuabi64
5292# else
5293# error unknown platform triplet
5294# endif
5295# elif defined(__mips_hard_float)
5296# if _MIPS_SIM == _ABIO32
5297 mips-linux-gnu
5298# elif _MIPS_SIM == _ABIN32
5299 mips64-linux-gnuabin32
5300# elif _MIPS_SIM == _ABI64
5301 mips64-linux-gnuabi64
5302# else
5303# error unknown platform triplet
5304# endif
5305# elif defined(__or1k__)
5306 or1k-linux-gnu
5307# elif defined(__powerpc__) && defined(__SPE__)
5308 powerpc-linux-gnuspe
5309# elif defined(__powerpc64__)
5310# if defined(__LITTLE_ENDIAN__)
5311 powerpc64le-linux-gnu
5312# else
5313 powerpc64-linux-gnu
5314# endif
5315# elif defined(__powerpc__)
5316 powerpc-linux-gnu
5317# elif defined(__s390x__)
5318 s390x-linux-gnu
5319# elif defined(__s390__)
5320 s390-linux-gnu
5321# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5322 sh4-linux-gnu
5323# elif defined(__sparc__) && defined(__arch64__)
5324 sparc64-linux-gnu
5325# elif defined(__sparc__)
5326 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005327# elif defined(__riscv)
5328# if __riscv_xlen == 32
5329 riscv32-linux-gnu
5330# elif __riscv_xlen == 64
5331 riscv64-linux-gnu
5332# else
5333# error unknown platform triplet
5334# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005335# else
5336# error unknown platform triplet
5337# endif
5338#elif defined(__FreeBSD_kernel__)
5339# if defined(__LP64__)
5340 x86_64-kfreebsd-gnu
5341# elif defined(__i386__)
5342 i386-kfreebsd-gnu
5343# else
5344# error unknown platform triplet
5345# endif
5346#elif defined(__gnu_hurd__)
5347 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005348#elif defined(__APPLE__)
5349 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005350#elif defined(__VXWORKS__)
5351 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352#else
5353# error unknown platform triplet
5354#endif
5355
5356EOF
5357
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005358if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5361$as_echo "$PLATFORM_TRIPLET" >&6; }
5362else
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5364$as_echo "none" >&6; }
5365fi
5366rm -f conftest.c conftest.out
5367
5368if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5369 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5370 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5371 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005372elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5373 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005374fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005375
doko@ubuntu.com55532312016-06-14 08:55:19 +02005376if test x$MULTIARCH != x; then
5377 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5378fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005379
5380
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5382$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5383save_LDFLAGS="$LDFLAGS"
5384LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005385
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5387/* end confdefs.h. */
5388
5389int
5390main ()
5391{
5392
5393 ;
5394 return 0;
5395}
5396_ACEOF
5397if ac_fn_c_try_link "$LINENO"; then :
5398 NO_AS_NEEDED="-Wl,--no-as-needed"
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5400$as_echo "yes" >&6; }
5401else
5402 NO_AS_NEEDED=""
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
5405fi
5406rm -f core conftest.err conftest.$ac_objext \
5407 conftest$ac_exeext conftest.$ac_ext
5408LDFLAGS="$save_LDFLAGS"
5409
5410
5411
5412# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413
Matthias Kloseb9621712010-04-24 17:59:49 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5415$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005416if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418else
5419 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5420 then ac_cv_path_EGREP="$GREP -E"
5421 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 # Loop through the user's path and test for each of PROGNAME-LIST
5425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5427do
5428 IFS=$as_save_IFS
5429 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 for ac_prog in egrep; do
5431 for ac_exec_ext in '' $ac_executable_extensions; do
5432 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005433 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005434# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 # Check for GNU $ac_path_EGREP
5436case `"$ac_path_EGREP" --version 2>&1` in
5437*GNU*)
5438 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5439*)
5440 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 while :
5443 do
5444 cat "conftest.in" "conftest.in" >"conftest.tmp"
5445 mv "conftest.tmp" "conftest.in"
5446 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5449 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5452 # Best one so far, save it but keep looking for a better one
5453 ac_cv_path_EGREP="$ac_path_EGREP"
5454 ac_path_EGREP_max=$ac_count
5455 fi
5456 # 10*(2^10) chars as input seems more than enough
5457 test $ac_count -gt 10 && break
5458 done
5459 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5460esac
5461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 $ac_path_EGREP_found && break 3
5463 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005466IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005468 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005470else
5471 ac_cv_path_EGREP=$EGREP
5472fi
5473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005474 fi
5475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5477$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005478 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005479
5480
Matthias Kloseb9621712010-04-24 17:59:49 +00005481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5482$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005483if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005484 $as_echo_n "(cached) " >&6
5485else
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005487/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005488#include <stdlib.h>
5489#include <stdarg.h>
5490#include <string.h>
5491#include <float.h>
5492
5493int
5494main ()
5495{
5496
5497 ;
5498 return 0;
5499}
5500_ACEOF
5501if ac_fn_c_try_compile "$LINENO"; then :
5502 ac_cv_header_stdc=yes
5503else
5504 ac_cv_header_stdc=no
5505fi
5506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5507
5508if test $ac_cv_header_stdc = yes; then
5509 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h. */
5512#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005513
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005514_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005515if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005516 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005518else
Matthias Kloseb9621712010-04-24 17:59:49 +00005519 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005520fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005521rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522
Matthias Kloseb9621712010-04-24 17:59:49 +00005523fi
5524
5525if test $ac_cv_header_stdc = yes; then
5526 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529#include <stdlib.h>
5530
5531_ACEOF
5532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5533 $EGREP "free" >/dev/null 2>&1; then :
5534
5535else
5536 ac_cv_header_stdc=no
5537fi
5538rm -f conftest*
5539
5540fi
5541
5542if test $ac_cv_header_stdc = yes; then
5543 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5544 if test "$cross_compiling" = yes; then :
5545 :
5546else
5547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5548/* end confdefs.h. */
5549#include <ctype.h>
5550#include <stdlib.h>
5551#if ((' ' & 0x0FF) == 0x020)
5552# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5553# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5554#else
5555# define ISLOWER(c) \
5556 (('a' <= (c) && (c) <= 'i') \
5557 || ('j' <= (c) && (c) <= 'r') \
5558 || ('s' <= (c) && (c) <= 'z'))
5559# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5560#endif
5561
5562#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5563int
5564main ()
5565{
5566 int i;
5567 for (i = 0; i < 256; i++)
5568 if (XOR (islower (i), ISLOWER (i))
5569 || toupper (i) != TOUPPER (i))
5570 return 2;
5571 return 0;
5572}
5573_ACEOF
5574if ac_fn_c_try_run "$LINENO"; then :
5575
5576else
5577 ac_cv_header_stdc=no
5578fi
5579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5580 conftest.$ac_objext conftest.beam conftest.$ac_ext
5581fi
5582
5583fi
5584fi
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5586$as_echo "$ac_cv_header_stdc" >&6; }
5587if test $ac_cv_header_stdc = yes; then
5588
5589$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5590
5591fi
5592
5593# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5594for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5595 inttypes.h stdint.h unistd.h
5596do :
5597 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5598ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5599"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005600if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005601 cat >>confdefs.h <<_ACEOF
5602#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5603_ACEOF
5604
5605fi
5606
5607done
5608
5609
5610
5611 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005612if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005613 MINIX=yes
5614else
5615 MINIX=
5616fi
5617
5618
5619 if test "$MINIX" = yes; then
5620
5621$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5622
5623
5624$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5625
5626
5627$as_echo "#define _MINIX 1" >>confdefs.h
5628
5629 fi
5630
5631
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5633$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005634if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005635 $as_echo_n "(cached) " >&6
5636else
5637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5638/* end confdefs.h. */
5639
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005640# define __EXTENSIONS__ 1
5641 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005642int
5643main ()
5644{
5645
5646 ;
5647 return 0;
5648}
5649_ACEOF
5650if ac_fn_c_try_compile "$LINENO"; then :
5651 ac_cv_safe_to_define___extensions__=yes
5652else
5653 ac_cv_safe_to_define___extensions__=no
5654fi
5655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5656fi
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5658$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5659 test $ac_cv_safe_to_define___extensions__ = yes &&
5660 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5661
5662 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5663
5664 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5665
5666 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5667
5668 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5669
5670
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5673$as_echo_n "checking for the Android API level... " >&6; }
5674cat >> conftest.c <<EOF
5675#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005676android_api = __ANDROID_API__
5677arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005678#else
5679#error not Android
5680#endif
5681EOF
5682
5683if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005684 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5685 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5687$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005688 if test -z "$ANDROID_API_LEVEL"; then
5689 echo 'Fatal: you must define __ANDROID_API__'
5690 exit 1
5691 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005692
5693cat >>confdefs.h <<_ACEOF
5694#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5695_ACEOF
5696
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005697
5698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5699$as_echo_n "checking for the Android arm ABI... " >&6; }
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5701$as_echo "$_arm_arch" >&6; }
5702 if test "$_arm_arch" = 7; then
5703 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5704 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5705 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005706else
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5708$as_echo "not Android" >&6; }
5709fi
5710rm -f conftest.c conftest.out
5711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712# Check for unsupported systems
5713case $ac_sys_system/$ac_sys_release in
5714atheos*|Linux*/1*)
5715 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5716 echo See README for details.
5717 exit 1;;
5718esac
5719
5720
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5722$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723
5724# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005725if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 withval=$with_suffix;
5727 case $withval in
5728 no) EXEEXT=;;
5729 yes) EXEEXT=.exe;;
5730 *) EXEEXT=$withval;;
5731 esac
5732fi
5733
Matthias Kloseb9621712010-04-24 17:59:49 +00005734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5735$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736
5737# Test whether we're running on a non-case-sensitive system, in which
5738# case we give a warning if no ext is given
5739
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5741$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742if test ! -d CaseSensitiveTestDir; then
5743mkdir CaseSensitiveTestDir
5744fi
5745
5746if test -d casesensitivetestdir
5747then
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5749$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750 BUILDEXEEXT=.exe
5751else
Matthias Kloseb9621712010-04-24 17:59:49 +00005752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 BUILDEXEEXT=$EXEEXT
5755fi
5756rmdir CaseSensitiveTestDir
5757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758case $ac_sys_system in
5759hp*|HP*)
5760 case $CC in
5761 cc|*/cc) CC="$CC -Ae";;
5762 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763esac
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5767$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768if test -z "$LIBRARY"
5769then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005770 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5773$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
5775# LDLIBRARY is the name of the library to link against (as opposed to the
5776# name of the library into which to insert object files). BLDLIBRARY is also
5777# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5778# is blank as the main program is not linked directly against LDLIBRARY.
5779# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5780# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5781# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5782# DLLLIBRARY is the shared (i.e., DLL) library.
5783#
5784# RUNSHARED is used to run shared python without installed libraries
5785#
5786# INSTSONAME is the name of the shared library that will be use to install
5787# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005788#
5789# LDVERSION is the shared library version number, normally the Python version
5790# with the ABI build flags appended.
5791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
5793
5794
5795
5796
5797
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799LDLIBRARY="$LIBRARY"
5800BLDLIBRARY='$(LDLIBRARY)'
5801INSTSONAME='$(LDLIBRARY)'
5802DLLLIBRARY=''
5803LDLIBRARYDIR=''
5804RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005805LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806
5807# LINKCC is the command that links the python executable -- default is $(CC).
5808# If CXX is set, and if it is needed to link a main function that was
5809# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5810# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5813$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814if test -z "$LINKCC"
5815then
5816 LINKCC='$(PURIFY) $(MAINCC)'
5817 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 QNX*)
5819 # qcc must be used because the other compilers do not
5820 # support -N.
5821 LINKCC=qcc;;
5822 esac
5823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5825$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826
Stefan Krahe6dcd372020-08-29 17:00:08 +02005827# EXPORTSYMS holds the list of exported symbols for AIX.
5828# EXPORTSFROM holds the module name exporting symbols on AIX.
5829EXPORTSYMS=
5830EXPORTSFROM=
5831
5832
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5834$as_echo_n "checking EXPORTSYMS... " >&6; }
5835case $ac_sys_system in
5836AIX*)
5837 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005838 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005839 ;;
5840esac
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5842$as_echo "$EXPORTSYMS" >&6; }
5843
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5845# make sure we default having it set to "no": this is used by
5846# distutils.unixccompiler to know if it should add --enable-new-dtags
5847# to linker command lines, and failing to detect GNU ld simply results
5848# in the same bahaviour as before.
5849
Matthias Kloseb9621712010-04-24 17:59:49 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5851$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852ac_prog=ld
5853if test "$GCC" = yes; then
5854 ac_prog=`$CC -print-prog-name=ld`
5855fi
5856case `"$ac_prog" -V 2>&1 < /dev/null` in
5857 *GNU*)
5858 GNULD=yes;;
5859 *)
5860 GNULD=no;;
5861esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5863$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5866$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005868if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 enableval=$enable_shared;
5870fi
5871
5872
5873if test -z "$enable_shared"
5874then
5875 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005876 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 enable_shared="yes";;
5878 *)
5879 enable_shared="no";;
5880 esac
5881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5883$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5886$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005888if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005889 enableval=$enable_profiling;
5890fi
5891
5892if test "x$enable_profiling" = xyes; then
5893 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005894 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896/* end confdefs.h. */
5897int main() { return 0; }
5898_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005899if ac_fn_c_try_link "$LINENO"; then :
5900
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005902 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005904rm -f core conftest.err conftest.$ac_objext \
5905 conftest$ac_exeext conftest.$ac_ext
5906 CC="$ac_save_cc"
5907else
5908 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5911$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912
doko@ubuntu.comba015832012-06-30 16:52:05 +02005913if test "x$enable_profiling" = xyes; then
5914 BASECFLAGS="-pg $BASECFLAGS"
5915 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916fi
5917
Matthias Kloseb9621712010-04-24 17:59:49 +00005918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5919$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920
5921# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5922# library that we build, but we do not want to link against it (we
5923# will find it with a -framework option). For this reason there is an
5924# extra variable BLDLIBRARY against which Python and the extension
5925# modules are linked, BLDLIBRARY. This is normally the same as
5926# LDLIBRARY, but empty for MacOSX framework builds.
5927if test "$enable_framework"
5928then
5929 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005930 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 BLDLIBRARY=''
5932else
5933 BLDLIBRARY='$(LDLIBRARY)'
5934fi
5935
5936# Other platforms follow
5937if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005938 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
Matthias Kloseb9621712010-04-24 17:59:49 +00005940$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941
5942 case $ac_sys_system in
5943 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 LDLIBRARY='libpython$(LDVERSION).dll.a'
5945 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 ;;
5947 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005948 LDLIBRARY='libpython$(LDVERSION).so'
5949 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005950 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005952 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005953 then
5954 PY3LIBRARY=libpython3.so
5955 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
pxinwrc1174262020-12-15 06:14:43 +08005957 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).so'
5959 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005962 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005963 then
5964 PY3LIBRARY=libpython3.so
5965 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
5967 hp*|HP*)
5968 case `uname -m` in
5969 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005970 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 ;;
5972 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005973 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ;;
5975 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005976 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005977 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005980 LDLIBRARY='libpython$(LDVERSION).dylib'
5981 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005982 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005984 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005985 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005986 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005987 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988
5989 esac
5990else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005991 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 case $ac_sys_system in
5993 CYGWIN*)
5994 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005995 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996 ;;
5997 esac
5998fi
5999
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006000if test "$cross_compiling" = yes; then
6001 RUNSHARED=
6002fi
6003
Matthias Kloseb9621712010-04-24 17:59:49 +00006004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6005$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006008if test -n "$ac_tool_prefix"; then
6009 for ac_prog in ar aal
6010 do
6011 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6012set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6014$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006015if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017else
6018 if test -n "$AR"; then
6019 ac_cv_prog_AR="$AR" # Let the user override the test.
6020else
6021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024 IFS=$as_save_IFS
6025 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006028 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030 break 2
6031 fi
6032done
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034IFS=$as_save_IFS
6035
6036fi
6037fi
6038AR=$ac_cv_prog_AR
6039if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6041$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042else
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045fi
6046
6047
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006048 test -n "$AR" && break
6049 done
6050fi
6051if test -z "$AR"; then
6052 ac_ct_AR=$AR
6053 for ac_prog in ar aal
6054do
6055 # Extract the first word of "$ac_prog", so it can be a program name with args.
6056set dummy $ac_prog; ac_word=$2
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6058$as_echo_n "checking for $ac_word... " >&6; }
6059if ${ac_cv_prog_ac_ct_AR+:} false; then :
6060 $as_echo_n "(cached) " >&6
6061else
6062 if test -n "$ac_ct_AR"; then
6063 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6064else
6065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6066for as_dir in $PATH
6067do
6068 IFS=$as_save_IFS
6069 test -z "$as_dir" && as_dir=.
6070 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006072 ac_cv_prog_ac_ct_AR="$ac_prog"
6073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6074 break 2
6075 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006077 done
6078IFS=$as_save_IFS
6079
6080fi
6081fi
6082ac_ct_AR=$ac_cv_prog_ac_ct_AR
6083if test -n "$ac_ct_AR"; then
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6085$as_echo "$ac_ct_AR" >&6; }
6086else
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6088$as_echo "no" >&6; }
6089fi
6090
6091
6092 test -n "$ac_ct_AR" && break
6093done
6094
6095 if test "x$ac_ct_AR" = x; then
6096 AR="ar"
6097 else
6098 case $cross_compiling:$ac_tool_warned in
6099yes:)
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6102ac_tool_warned=yes ;;
6103esac
6104 AR=$ac_ct_AR
6105 fi
6106fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107
6108
6109# tweak ARFLAGS only if the user didn't set it on the command line
6110
6111if test -z "$ARFLAGS"
6112then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006113 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114fi
6115
doko@ubuntu.com58844492012-06-30 18:25:32 +02006116if test -n "$ac_tool_prefix"; then
6117 for ac_prog in readelf
6118 do
6119 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6120set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6122$as_echo_n "checking for $ac_word... " >&6; }
6123if ${ac_cv_prog_READELF+:} false; then :
6124 $as_echo_n "(cached) " >&6
6125else
6126 if test -n "$READELF"; then
6127 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6128else
6129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130for as_dir in $PATH
6131do
6132 IFS=$as_save_IFS
6133 test -z "$as_dir" && as_dir=.
6134 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006136 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6138 break 2
6139 fi
6140done
6141 done
6142IFS=$as_save_IFS
6143
6144fi
6145fi
6146READELF=$ac_cv_prog_READELF
6147if test -n "$READELF"; then
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6149$as_echo "$READELF" >&6; }
6150else
6151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6152$as_echo "no" >&6; }
6153fi
6154
6155
6156 test -n "$READELF" && break
6157 done
6158fi
6159if test -z "$READELF"; then
6160 ac_ct_READELF=$READELF
6161 for ac_prog in readelf
6162do
6163 # Extract the first word of "$ac_prog", so it can be a program name with args.
6164set dummy $ac_prog; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6168 $as_echo_n "(cached) " >&6
6169else
6170 if test -n "$ac_ct_READELF"; then
6171 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6172else
6173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176 IFS=$as_save_IFS
6177 test -z "$as_dir" && as_dir=.
6178 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006180 ac_cv_prog_ac_ct_READELF="$ac_prog"
6181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182 break 2
6183 fi
6184done
6185 done
6186IFS=$as_save_IFS
6187
6188fi
6189fi
6190ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6191if test -n "$ac_ct_READELF"; then
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6193$as_echo "$ac_ct_READELF" >&6; }
6194else
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200 test -n "$ac_ct_READELF" && break
6201done
6202
6203 if test "x$ac_ct_READELF" = x; then
6204 READELF=":"
6205 else
6206 case $cross_compiling:$ac_tool_warned in
6207yes:)
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6210ac_tool_warned=yes ;;
6211esac
6212 READELF=$ac_ct_READELF
6213 fi
6214fi
6215
6216if test "$cross_compiling" = yes; then
6217 case "$READELF" in
6218 readelf|:)
6219 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6220 ;;
6221 esac
6222fi
6223
6224
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006227hp*|HP*)
6228 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229 if test -z "$INSTALL"
6230 then
6231 INSTALL="${srcdir}/install-sh -c"
6232 fi
6233esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234# Find a good install program. We prefer a C program (faster),
6235# so one script is as good as another. But avoid the broken or
6236# incompatible versions:
6237# SysV /etc/install, /usr/sbin/install
6238# SunOS /usr/etc/install
6239# IRIX /sbin/install
6240# AIX /bin/install
6241# AmigaOS /C/install, which installs bootblocks on floppy discs
6242# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6243# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6244# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6245# OS/2's system install, which has a completely different semantic
6246# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006247# Reject install programs that cannot install multiple files.
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6249$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006251if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253else
6254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257 IFS=$as_save_IFS
6258 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 # Account for people who put trailing slashes in PATH elements.
6260case $as_dir/ in #((
6261 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006263 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264 /usr/ucb/* ) ;;
6265 *)
6266 # OSF1 and SCO ODT 3.0 have their own names for install.
6267 # Don't use installbsd from OSF since it installs stuff as root
6268 # by default.
6269 for ac_prog in ginstall scoinst install; do
6270 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006271 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272 if test $ac_prog = install &&
6273 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6274 # AIX install. It has an incompatible calling convention.
6275 :
6276 elif test $ac_prog = install &&
6277 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6278 # program-specific install script used by HP pwplus--don't use.
6279 :
6280 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006281 rm -rf conftest.one conftest.two conftest.dir
6282 echo one > conftest.one
6283 echo two > conftest.two
6284 mkdir conftest.dir
6285 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6286 test -s conftest.one && test -s conftest.two &&
6287 test -s conftest.dir/conftest.one &&
6288 test -s conftest.dir/conftest.two
6289 then
6290 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6291 break 3
6292 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293 fi
6294 fi
6295 done
6296 done
6297 ;;
6298esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006299
6300 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301IFS=$as_save_IFS
6302
Matthias Kloseb9621712010-04-24 17:59:49 +00006303rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304
6305fi
6306 if test "${ac_cv_path_install+set}" = set; then
6307 INSTALL=$ac_cv_path_install
6308 else
6309 # As a last resort, use the slow shell script. Don't cache a
6310 # value for INSTALL within a source directory, because that will
6311 # break other packages using the cache if that directory is
6312 # removed, or if the value is a relative name.
6313 INSTALL=$ac_install_sh
6314 fi
6315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6317$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318
6319# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6320# It thinks the first close brace ends the variable substitution.
6321test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6322
6323test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6324
6325test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6326
Matthias Klose93a0ef12012-03-15 18:08:34 +01006327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6328$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6329if test -z "$MKDIR_P"; then
6330 if ${ac_cv_path_mkdir+:} false; then :
6331 $as_echo_n "(cached) " >&6
6332else
6333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6334for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6335do
6336 IFS=$as_save_IFS
6337 test -z "$as_dir" && as_dir=.
6338 for ac_prog in mkdir gmkdir; do
6339 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006340 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006341 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6342 'mkdir (GNU coreutils) '* | \
6343 'mkdir (coreutils) '* | \
6344 'mkdir (fileutils) '4.1*)
6345 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6346 break 3;;
6347 esac
6348 done
6349 done
6350 done
6351IFS=$as_save_IFS
6352
6353fi
6354
6355 test -d ./--version && rmdir ./--version
6356 if test "${ac_cv_path_mkdir+set}" = set; then
6357 MKDIR_P="$ac_cv_path_mkdir -p"
6358 else
6359 # As a last resort, use the slow shell script. Don't cache a
6360 # value for MKDIR_P within a source directory, because that will
6361 # break other packages using the cache if that directory is
6362 # removed, or if the value is a relative name.
6363 MKDIR_P="$ac_install_sh -d"
6364 fi
6365fi
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6367$as_echo "$MKDIR_P" >&6; }
6368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369
6370# Not every filesystem supports hard links
6371
6372if test -z "$LN" ; then
6373 case $ac_sys_system in
6374 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375 *) LN=ln;;
6376 esac
6377fi
6378
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006379# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006380
6381ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6385$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
6387# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006388if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006389 withval=$with_pydebug;
6390if test "$withval" != no
6391then
6392
Matthias Kloseb9621712010-04-24 17:59:49 +00006393$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006394
Matthias Kloseb9621712010-04-24 17:59:49 +00006395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6396$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006397 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006398 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006399else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401fi
6402else
Matthias Kloseb9621712010-04-24 17:59:49 +00006403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6404$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405fi
6406
6407
Victor Stinnerf4e47032019-04-25 00:56:28 +02006408# Check for --with-trace-refs
6409# --with-trace-refs
6410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6411$as_echo_n "checking for --with-trace-refs... " >&6; }
6412
6413# Check whether --with-trace-refs was given.
6414if test "${with_trace_refs+set}" = set; then :
6415 withval=$with_trace_refs;
6416else
6417 with_trace_refs=no
6418fi
6419
6420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6421$as_echo "$with_trace_refs" >&6; }
6422
6423if test "$with_trace_refs" = "yes"
6424then
6425
6426$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6427
6428fi
6429
6430# Check for --with-assertions.
6431# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006432assertions='false'
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6434$as_echo_n "checking for --with-assertions... " >&6; }
6435
6436# Check whether --with-assertions was given.
6437if test "${with_assertions+set}" = set; then :
6438 withval=$with_assertions;
6439if test "$withval" != no
6440then
6441 assertions='true'
6442fi
6443fi
6444
6445if test "$assertions" = 'true'; then
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6447$as_echo "yes" >&6; }
6448elif test "$Py_DEBUG" = 'true'; then
6449 assertions='true'
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6451$as_echo "implied by --with-pydebug" >&6; }
6452else
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454$as_echo "no" >&6; }
6455fi
6456
Brett Cannon63d98bc2016-09-06 17:12:40 -07006457# Enable optimization flags
6458
6459
6460Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6462$as_echo_n "checking for --enable-optimizations... " >&6; }
6463# Check whether --enable-optimizations was given.
6464if test "${enable_optimizations+set}" = set; then :
6465 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006466if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006467then
6468 Py_OPT='true'
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6470$as_echo "yes" >&6; };
6471else
6472 Py_OPT='false'
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474$as_echo "no" >&6; };
6475fi
6476else
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6478$as_echo "no" >&6; }
6479fi
6480
6481if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006482 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6483 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006484 # 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 +00006485 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006486 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006487 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006488 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006489 case $CC in
6490 *gcc*)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6492$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6493if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6494 $as_echo_n "(cached) " >&6
6495else
6496
6497 ax_check_save_flags=$CFLAGS
6498 CFLAGS="$CFLAGS -fno-semantic-interposition"
6499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6500/* end confdefs.h. */
6501
6502int
6503main ()
6504{
6505
6506 ;
6507 return 0;
6508}
6509_ACEOF
6510if ac_fn_c_try_compile "$LINENO"; then :
6511 ax_cv_check_cflags___fno_semantic_interposition=yes
6512else
6513 ax_cv_check_cflags___fno_semantic_interposition=no
6514fi
6515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6516 CFLAGS=$ax_check_save_flags
6517fi
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6519$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6520if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
6521
Pablo Galindob451b0e2020-10-21 22:46:52 +01006522 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6523 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006524
6525else
6526 :
6527fi
6528
Pablo Galindob451b0e2020-10-21 22:46:52 +01006529 ;;
6530 esac
6531
6532
Brett Cannon63d98bc2016-09-06 17:12:40 -07006533else
6534 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006535 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006536 DEF_MAKE_RULE="all"
6537fi
6538
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006539
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6541$as_echo_n "checking PROFILE_TASK... " >&6; }
6542if test -z "$PROFILE_TASK"
6543then
Victor Stinner67900052021-01-27 11:16:15 +01006544 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006545fi
6546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6547$as_echo "$PROFILE_TASK" >&6; }
6548
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006549# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6550# normal names in the default $PATH (ie: Ubuntu). They exist under the
6551# non-suffixed name in their versioned llvm directory.
6552
6553llvm_bin_dir=''
6554llvm_path="${PATH}"
6555if test "${CC}" = "clang"
6556then
6557 clang_bin=`which clang`
6558 # Some systems install clang elsewhere as a symlink to the real path
6559 # which is where the related llvm tools are located.
6560 if test -L "${clang_bin}"
6561 then
6562 clang_dir=`dirname "${clang_bin}"`
6563 clang_bin=`readlink "${clang_bin}"`
6564 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6565 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6566 fi
6567fi
6568
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006569# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6571$as_echo_n "checking for --with-lto... " >&6; }
6572
6573# Check whether --with-lto was given.
6574if test "${with_lto+set}" = set; then :
6575 withval=$with_lto;
6576if test "$withval" != no
6577then
6578 Py_LTO='true'
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6580$as_echo "yes" >&6; };
6581else
6582 Py_LTO='false'
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; };
6585fi
6586else
6587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588$as_echo "no" >&6; }
6589fi
6590
6591if test "$Py_LTO" = 'true' ; then
6592 case $CC in
6593 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006594
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006595 if test -n "$ac_tool_prefix"; then
6596 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6597set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599$as_echo_n "checking for $ac_word... " >&6; }
6600if ${ac_cv_path_LLVM_AR+:} false; then :
6601 $as_echo_n "(cached) " >&6
6602else
6603 case $LLVM_AR in
6604 [\\/]* | ?:[\\/]*)
6605 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6606 ;;
6607 *)
6608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6609for as_dir in ${llvm_path}
6610do
6611 IFS=$as_save_IFS
6612 test -z "$as_dir" && as_dir=.
6613 for ac_exec_ext in '' $ac_executable_extensions; do
6614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6615 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6617 break 2
6618 fi
6619done
6620 done
6621IFS=$as_save_IFS
6622
6623 ;;
6624esac
6625fi
6626LLVM_AR=$ac_cv_path_LLVM_AR
6627if test -n "$LLVM_AR"; then
6628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6629$as_echo "$LLVM_AR" >&6; }
6630else
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632$as_echo "no" >&6; }
6633fi
6634
6635
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006636fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006637if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006638 ac_pt_LLVM_AR=$LLVM_AR
6639 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006640set dummy llvm-ar; ac_word=$2
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642$as_echo_n "checking for $ac_word... " >&6; }
6643if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6644 $as_echo_n "(cached) " >&6
6645else
6646 case $ac_pt_LLVM_AR in
6647 [\\/]* | ?:[\\/]*)
6648 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6649 ;;
6650 *)
6651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6652for as_dir in ${llvm_path}
6653do
6654 IFS=$as_save_IFS
6655 test -z "$as_dir" && as_dir=.
6656 for ac_exec_ext in '' $ac_executable_extensions; do
6657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6658 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6660 break 2
6661 fi
6662done
6663 done
6664IFS=$as_save_IFS
6665
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006666 ;;
6667esac
6668fi
6669ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6670if test -n "$ac_pt_LLVM_AR"; then
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6672$as_echo "$ac_pt_LLVM_AR" >&6; }
6673else
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6675$as_echo "no" >&6; }
6676fi
6677
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006678 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006679 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006680 else
6681 case $cross_compiling:$ac_tool_warned in
6682yes:)
6683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6685ac_tool_warned=yes ;;
6686esac
6687 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006688 fi
6689else
6690 LLVM_AR="$ac_cv_path_LLVM_AR"
6691fi
6692
6693
6694 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6695 then
6696 LLVM_AR_FOUND="found"
6697 else
6698 LLVM_AR_FOUND="not-found"
6699 fi
6700 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6701 then
6702 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6703 if test -n "${found_llvm_ar}"
6704 then
6705 LLVM_AR='/usr/bin/xcrun llvm-ar'
6706 LLVM_AR_FOUND=found
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6708$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6709 fi
6710 fi
6711 if test $LLVM_AR_FOUND = not-found
6712 then
6713 LLVM_PROFR_ERR=yes
6714 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6715 else
6716 LLVM_AR_ERR=no
6717 fi
6718 AR="${LLVM_AR}"
6719 case $ac_sys_system in
6720 Darwin*)
6721 # Any changes made here should be reflected in the GCC+Darwin case below
6722 LTOFLAGS="-flto -Wl,-export_dynamic"
6723 ;;
6724 *)
6725 LTOFLAGS="-flto"
6726 ;;
6727 esac
6728 ;;
6729 *gcc*)
6730 case $ac_sys_system in
6731 Darwin*)
6732 LTOFLAGS="-flto -Wl,-export_dynamic"
6733 ;;
6734 *)
6735 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6736 ;;
6737 esac
6738 ;;
6739 esac
6740
6741 if test "$ac_cv_prog_cc_g" = "yes"
6742 then
6743 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6744 # to get debug symbols.
6745 LTOFLAGS="$LTOFLAGS -g"
6746 fi
6747
stratakisf92c7aa2018-12-04 15:54:01 +01006748 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006749 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006750fi
6751
6752# Enable PGO flags.
6753
6754
6755
6756
6757
6758
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006759if test -n "$ac_tool_prefix"; then
6760 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6761set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6763$as_echo_n "checking for $ac_word... " >&6; }
6764if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6765 $as_echo_n "(cached) " >&6
6766else
6767 case $LLVM_PROFDATA in
6768 [\\/]* | ?:[\\/]*)
6769 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6770 ;;
6771 *)
6772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6773for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006774do
6775 IFS=$as_save_IFS
6776 test -z "$as_dir" && as_dir=.
6777 for ac_exec_ext in '' $ac_executable_extensions; do
6778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006779 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6781 break 2
6782 fi
6783done
6784 done
6785IFS=$as_save_IFS
6786
Gregory P. Smith799520c2016-09-07 16:10:00 -07006787 ;;
6788esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006789fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6791if test -n "$LLVM_PROFDATA"; then
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6793$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006794else
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6796$as_echo "no" >&6; }
6797fi
6798
6799
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006800fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006801if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006802 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6803 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804set dummy llvm-profdata; ac_word=$2
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6806$as_echo_n "checking for $ac_word... " >&6; }
6807if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6808 $as_echo_n "(cached) " >&6
6809else
6810 case $ac_pt_LLVM_PROFDATA in
6811 [\\/]* | ?:[\\/]*)
6812 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6813 ;;
6814 *)
6815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6816for as_dir in ${llvm_path}
6817do
6818 IFS=$as_save_IFS
6819 test -z "$as_dir" && as_dir=.
6820 for ac_exec_ext in '' $ac_executable_extensions; do
6821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6822 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6823 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6824 break 2
6825 fi
6826done
6827 done
6828IFS=$as_save_IFS
6829
Gregory P. Smith799520c2016-09-07 16:10:00 -07006830 ;;
6831esac
6832fi
6833ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6834if test -n "$ac_pt_LLVM_PROFDATA"; then
6835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6836$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6837else
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839$as_echo "no" >&6; }
6840fi
6841
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006842 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006843 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006844 else
6845 case $cross_compiling:$ac_tool_warned in
6846yes:)
6847{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6848$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6849ac_tool_warned=yes ;;
6850esac
6851 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006852 fi
6853else
6854 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6855fi
6856
6857
6858if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6859then
6860 LLVM_PROF_FOUND="found"
6861else
6862 LLVM_PROF_FOUND="not-found"
6863fi
6864if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6865then
6866 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6867 if test -n "${found_llvm_profdata}"
6868 then
6869 # llvm-profdata isn't directly in $PATH in some cases.
6870 # https://apple.stackexchange.com/questions/197053/
6871 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6872 LLVM_PROF_FOUND=found
6873 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6874$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6875 fi
6876fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006877LLVM_PROF_ERR=no
6878case $CC in
6879 *clang*)
6880 # Any changes made here should be reflected in the GCC+Darwin case below
6881 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6882 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006883 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006884 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6885 if test $LLVM_PROF_FOUND = not-found
6886 then
6887 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006888 if test "${REQUIRE_PGO}" = "yes"
6889 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006890 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 -07006891 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006892 fi
6893 ;;
6894 *gcc*)
6895 case $ac_sys_system in
6896 Darwin*)
6897 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6898 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006899 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006900 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006901 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006902 then
6903 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006904 if test "${REQUIRE_PGO}" = "yes"
6905 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006906 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 -07006907 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006908 fi
6909 ;;
6910 *)
6911 PGO_PROF_GEN_FLAG="-fprofile-generate"
6912 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6913 LLVM_PROF_MERGER="true"
6914 LLVM_PROF_FILE=""
6915 ;;
6916 esac
6917 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006918 *icc*)
6919 PGO_PROF_GEN_FLAG="-prof-gen"
6920 PGO_PROF_USE_FLAG="-prof-use"
6921 LLVM_PROF_MERGER="true"
6922 LLVM_PROF_FILE=""
6923 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006924esac
6925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6927# merged with this chunk of code?
6928
6929# Optimizer/debugger flags
6930# ------------------------
6931# (The following bit of code is complicated enough - please keep things
6932# indented properly. Just pretend you're editing Python code. ;-)
6933
6934# There are two parallel sets of case statements below, one that checks to
6935# see if OPT was set and one that does BASECFLAGS setting based upon
6936# compiler and platform. BASECFLAGS tweaks need to be made even if the
6937# user set OPT.
6938
Victor Stinner23a683a2019-04-12 21:27:37 +02006939case $CC in
6940 *clang*)
6941 cc_is_clang=1
6942 ;;
6943 *)
6944 if $CC --version 2>&1 | grep -q clang
6945 then
6946 cc_is_clang=1
6947 else
6948 cc_is_clang=
6949 fi
6950esac
6951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952# tweak OPT based on compiler and platform, only if the user didn't set
6953# it on the command line
6954
Victor Stinner9ed34a82017-05-02 22:35:58 +02006955
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006956if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006957then
6958 case $GCC in
6959 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006960 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6961 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6962 WRAP="-fwrapv"
6963 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006964
Victor Stinner35f3d242017-04-21 12:35:24 +02006965 if test -n "${cc_is_clang}"
6966 then
6967 # Clang also needs -fwrapv
6968 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006969 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6970 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006971 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006972 fi
6973
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006974 case $ac_cv_prog_cc_g in
6975 yes)
6976 if test "$Py_DEBUG" = 'true' ; then
6977 # Optimization messes up debuggers, so turn it off for
6978 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006979 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006980 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006981 else
Victor Stinner28205b22017-04-21 11:24:34 +02006982 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006983 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 else
Victor Stinner28205b22017-04-21 11:24:34 +02006985 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986 fi
6987 ;;
6988 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006989 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990 ;;
6991 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006992
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 case $ac_sys_system in
6994 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6995 ;;
6996 esac
6997 ;;
6998
6999 *)
7000 OPT="-O"
7001 ;;
7002 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003fi
7004
7005
7006
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007007
stratakiscf10a752018-12-19 18:19:01 +01007008
Ronald Oussoren41761932020-11-08 10:05:27 +01007009# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010UNIVERSAL_ARCH_FLAGS=
7011
7012
7013# tweak BASECFLAGS based on compiler and platform
7014case $GCC in
7015yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007016 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007017
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7019$as_echo_n "checking for -Wextra... " >&6; }
7020 ac_save_cc="$CC"
7021 CC="$CC -Wextra -Werror"
7022 if ${ac_cv_extra_warnings+:} false; then :
7023 $as_echo_n "(cached) " >&6
7024else
7025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026/* end confdefs.h. */
7027
7028
7029int
7030main ()
7031{
7032
7033 ;
7034 return 0;
7035}
7036
7037_ACEOF
7038if ac_fn_c_try_compile "$LINENO"; then :
7039
7040 ac_cv_extra_warnings=yes
7041
7042else
7043
7044 ac_cv_extra_warnings=no
7045
7046fi
7047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7048fi
7049
7050 CC="$ac_save_cc"
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7052$as_echo "$ac_cv_extra_warnings" >&6; }
7053
7054 if test $ac_cv_extra_warnings = yes
7055 then
7056 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7057 fi
7058
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007059 # Python doesn't violate C99 aliasing rules, but older versions of
7060 # GCC produce warnings for legal Python code. Enable
7061 # -fno-strict-aliasing on versions of GCC that support but produce
7062 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7064$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065 ac_save_cc="$CC"
7066 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007067 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007068 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007070else
Matthias Kloseb9621712010-04-24 17:59:49 +00007071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007072/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007073
Matthias Kloseb159a552010-04-25 21:00:44 +00007074
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007075int
7076main ()
7077{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007078
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007079 ;
7080 return 0;
7081}
Matthias Kloseb159a552010-04-25 21:00:44 +00007082
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007084if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007085
7086 CC="$ac_save_cc -fstrict-aliasing"
7087 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007089/* end confdefs.h. */
7090
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007091 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007092int
7093main ()
7094{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007095double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007096 ;
7097 return 0;
7098}
Matthias Kloseb159a552010-04-25 21:00:44 +00007099
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007101if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007102
7103 ac_cv_no_strict_aliasing=no
7104
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007105else
Matthias Kloseb159a552010-04-25 21:00:44 +00007106
7107 ac_cv_no_strict_aliasing=yes
7108
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007109fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007111
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007112else
Matthias Kloseb159a552010-04-25 21:00:44 +00007113
7114 ac_cv_no_strict_aliasing=no
7115
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007116fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118fi
7119
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007120 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007121 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7123$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007124 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007125 then
7126 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7127 fi
7128
Zachary Ware5af85642015-12-21 12:09:17 -06007129 # ICC doesn't recognize the option, but only emits a warning
7130 ## XXX does it emit an unused result warning and can it be disabled?
7131 case "$CC" in
7132 *icc*)
7133 ac_cv_disable_unused_result_warning=no
7134 ;;
7135 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7137$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7138 ac_save_cc="$CC"
7139 CC="$CC -Wunused-result -Werror"
7140 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007141 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007142 $as_echo_n "(cached) " >&6
7143else
7144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7145/* end confdefs.h. */
7146
7147
7148int
7149main ()
7150{
7151
7152 ;
7153 return 0;
7154}
7155
7156_ACEOF
7157if ac_fn_c_try_compile "$LINENO"; then :
7158
7159 ac_cv_disable_unused_result_warning=yes
7160
7161else
7162
7163 ac_cv_disable_unused_result_warning=no
7164
7165fi
7166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7167fi
7168
7169 CFLAGS="$save_CFLAGS"
7170 CC="$ac_save_cc"
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7172$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007173 ;;
7174 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007175
7176 if test $ac_cv_disable_unused_result_warning = yes
7177 then
7178 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007179 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7180 fi
7181
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7183$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7184 ac_save_cc="$CC"
7185 CC="$CC -Wunused-parameter -Werror"
7186 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7187 $as_echo_n "(cached) " >&6
7188else
7189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7190/* end confdefs.h. */
7191
7192
7193int
7194main ()
7195{
7196
7197 ;
7198 return 0;
7199}
7200
7201_ACEOF
7202if ac_fn_c_try_compile "$LINENO"; then :
7203
7204 ac_cv_disable_unused_parameter_warning=yes
7205
7206else
7207
7208 ac_cv_disable_unused_parameter_warning=no
7209
7210fi
7211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7212fi
7213
7214 CC="$ac_save_cc"
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7216$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7217
7218 if test $ac_cv_disable_unused_parameter_warning = yes
7219 then
7220 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7221 fi
7222
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7224$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7225 ac_save_cc="$CC"
7226 CC="$CC -Wmissing-field-initializers -Werror"
7227 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7228 $as_echo_n "(cached) " >&6
7229else
7230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7231/* end confdefs.h. */
7232
7233
7234int
7235main ()
7236{
7237
7238 ;
7239 return 0;
7240}
7241
7242_ACEOF
7243if ac_fn_c_try_compile "$LINENO"; then :
7244
7245 ac_cv_disable_missing_field_initializers=yes
7246
7247else
7248
7249 ac_cv_disable_missing_field_initializers=no
7250
7251fi
7252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7253fi
7254
7255 CC="$ac_save_cc"
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7257$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7258
7259 if test $ac_cv_disable_missing_field_initializers = yes
7260 then
7261 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007262 fi
7263
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7265$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7266 ac_save_cc="$CC"
7267 CC="$CC -Wsign-compare"
7268 save_CFLAGS="$CFLAGS"
7269 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7270 $as_echo_n "(cached) " >&6
7271else
7272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7273/* end confdefs.h. */
7274
7275
7276int
7277main ()
7278{
7279
7280 ;
7281 return 0;
7282}
7283
7284_ACEOF
7285if ac_fn_c_try_compile "$LINENO"; then :
7286
7287 ac_cv_enable_sign_compare_warning=yes
7288
7289else
7290
7291 ac_cv_enable_sign_compare_warning=no
7292
7293fi
7294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7295fi
7296
7297 CFLAGS="$save_CFLAGS"
7298 CC="$ac_save_cc"
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7300$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7301
7302 if test $ac_cv_enable_sign_compare_warning = yes
7303 then
7304 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7305 fi
7306
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7308$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7309 ac_save_cc="$CC"
7310 CC="$CC -Wunreachable-code"
7311 save_CFLAGS="$CFLAGS"
7312 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7313 $as_echo_n "(cached) " >&6
7314else
7315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7316/* end confdefs.h. */
7317
7318
7319int
7320main ()
7321{
7322
7323 ;
7324 return 0;
7325}
7326
7327_ACEOF
7328if ac_fn_c_try_compile "$LINENO"; then :
7329
7330 ac_cv_enable_unreachable_code_warning=yes
7331
7332else
7333
7334 ac_cv_enable_unreachable_code_warning=no
7335
7336fi
7337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7338fi
7339
7340 CFLAGS="$save_CFLAGS"
7341 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007342
7343 # Don't enable unreachable code warning in debug mode, since it usually
7344 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007345 # Issue #24324: Unfortunately, the unreachable code warning does not work
7346 # correctly on gcc and has been silently removed from the compiler.
7347 # It is supported on clang but on OS X systems gcc may be an alias
7348 # for clang. Try to determine if the compiler is not really gcc and,
7349 # if so, only then enable the warning.
7350 if test $ac_cv_enable_unreachable_code_warning = yes && \
7351 test "$Py_DEBUG" != "true" && \
7352 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007353 then
7354 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007355 else
7356 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007357 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7359$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007360
INADA Naokie3364842018-06-05 20:40:53 +09007361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7362$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7363 ac_save_cc="$CC"
7364 CC="$CC -Werror -Wstrict-prototypes"
7365 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7366 $as_echo_n "(cached) " >&6
7367else
7368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7369/* end confdefs.h. */
7370
7371
7372int
7373main ()
7374{
7375
7376 ;
7377 return 0;
7378}
7379
7380_ACEOF
7381if ac_fn_c_try_compile "$LINENO"; then :
7382
7383 ac_cv_enable_strict_prototypes_warning=yes
7384
7385else
7386
7387 ac_cv_enable_strict_prototypes_warning=no
7388
7389fi
7390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7391fi
7392
7393 CC="$ac_save_cc"
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7395$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7396
7397 if test $ac_cv_enable_strict_prototypes_warning = yes
7398 then
7399 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7400 fi
7401
Victor Stinner193ee0a2017-02-06 14:24:00 +01007402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7403$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7404 ac_save_cc="$CC"
7405 CC="$CC -Werror=implicit-function-declaration"
7406 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7407 $as_echo_n "(cached) " >&6
7408else
7409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7410/* end confdefs.h. */
7411
7412
7413int
7414main ()
7415{
7416
7417 ;
7418 return 0;
7419}
7420
7421_ACEOF
7422if ac_fn_c_try_compile "$LINENO"; then :
7423
7424 ac_cv_enable_implicit_function_declaration_error=yes
7425
7426else
7427
7428 ac_cv_enable_implicit_function_declaration_error=no
7429
7430fi
7431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7432fi
7433
7434 CC="$ac_save_cc"
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7436$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7437
7438 if test $ac_cv_enable_implicit_function_declaration_error = yes
7439 then
7440 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7441 fi
7442
Vinay Sajip0b60f642019-10-15 08:26:12 +01007443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7444$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7445 ac_save_cc="$CC"
7446 CC="$CC -fvisibility=hidden"
7447 if ${ac_cv_enable_visibility+:} false; then :
7448 $as_echo_n "(cached) " >&6
7449else
7450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7451/* end confdefs.h. */
7452
7453
7454int
7455main ()
7456{
7457
7458 ;
7459 return 0;
7460}
7461
7462_ACEOF
7463if ac_fn_c_try_compile "$LINENO"; then :
7464
7465 ac_cv_enable_visibility=yes
7466
7467else
7468
7469 ac_cv_enable_visibility=no
7470
7471fi
7472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7473fi
7474
7475 CC="$ac_save_cc"
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7477$as_echo "$ac_cv_enable_visibility" >&6; }
7478
7479 if test $ac_cv_enable_visibility = yes
7480 then
7481 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7482 fi
7483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7485 # support. Without this, treatment of subnormals doesn't follow
7486 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007487 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488 alpha*)
7489 BASECFLAGS="$BASECFLAGS -mieee"
7490 ;;
7491 esac
7492
7493 case $ac_sys_system in
7494 SCO_SV*)
7495 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7496 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007497
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 Darwin*)
7499 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7500 # used to be here, but non-Apple gcc doesn't accept them.
7501 if test "${CC}" = gcc
7502 then
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007504$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 case "${UNIVERSALSDK}" in
7506 */MacOSX10.4u.sdk)
7507 # Build using 10.4 SDK, force usage of gcc when the
7508 # compiler is gcc, otherwise the user will get very
7509 # confusing error messages when building on OSX 10.6
7510 CC=gcc-4.0
7511 CPP=cpp-4.0
7512 ;;
7513 esac
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007515$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007516 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517
Ned Deily87adb6e2013-10-18 21:09:56 -07007518 if test "${enable_universalsdk}"
7519 then
7520 case "$UNIVERSAL_ARCHS" in
7521 32-bit)
7522 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7523 LIPO_32BIT_FLAGS=""
7524 ARCH_RUN_32BIT=""
7525 ;;
7526 64-bit)
7527 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7528 LIPO_32BIT_FLAGS=""
7529 ARCH_RUN_32BIT="true"
7530 ;;
7531 all)
7532 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7533 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7534 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7535 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007536 universal2)
7537 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7538 LIPO_32BIT_FLAGS=""
7539 ARCH_RUN_32BIT="true"
7540 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007541 intel)
7542 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7543 LIPO_32BIT_FLAGS="-extract i386"
7544 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7545 ;;
7546 intel-32)
7547 UNIVERSAL_ARCH_FLAGS="-arch i386"
7548 LIPO_32BIT_FLAGS=""
7549 ARCH_RUN_32BIT=""
7550 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007551 intel-64)
7552 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7553 LIPO_32BIT_FLAGS=""
7554 ARCH_RUN_32BIT="true"
7555 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007556 3-way)
7557 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7558 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7559 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7560 ;;
7561 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007562 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 -07007563 ;;
7564 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565
Ned Deily87adb6e2013-10-18 21:09:56 -07007566 if test "${UNIVERSALSDK}" != "/"
7567 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007568 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7569 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007570 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007571 else
7572 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7573 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007574 fi
7575 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576
Ned Deily87adb6e2013-10-18 21:09:56 -07007577 # Calculate an appropriate deployment target for this build:
7578 # The deployment target value is used explicitly to enable certain
7579 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007580 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007581 # component of the string returned by distutils.get_platform().
7582 #
7583 # Use the value from:
7584 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7585 # 2. the operating system version of the build machine if >= 10.6
7586 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7587 # below to pick either 10.3, 10.4, or 10.5 as the target.
7588 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589
Ned Deily87adb6e2013-10-18 21:09:56 -07007590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7591$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007592 cur_target_major=`sw_vers -productVersion | \
7593 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7594 cur_target_minor=`sw_vers -productVersion | \
7595 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7596 cur_target="${cur_target_major}.${cur_target_minor}"
7597 if test ${cur_target_major} -eq 10 && \
7598 test ${cur_target_minor} -ge 3 && \
7599 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007600 then
Ned Deily36820b62014-06-25 13:44:22 -07007601 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007602 cur_target=10.3
7603 if test ${enable_universalsdk}
7604 then
7605 case "$UNIVERSAL_ARCHS" in
7606 all|3-way|intel|64-bit)
7607 # These configurations were first supported in 10.5
7608 cur_target='10.5'
7609 ;;
7610 esac
7611 else
7612 if test `/usr/bin/arch` = "i386"
7613 then
7614 # 10.4 was the first release to support Intel archs
7615 cur_target="10.4"
7616 fi
7617 fi
7618 fi
7619 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007620
Ned Deily87adb6e2013-10-18 21:09:56 -07007621 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7622 # environment with a value that is the same as what we'll use
7623 # in the Makefile to ensure that we'll get the same compiler
7624 # environment during configure and build time.
7625 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7626 export MACOSX_DEPLOYMENT_TARGET
7627 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7629$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007630
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7632$as_echo_n "checking if specified universal architectures work... " >&6; }
7633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7634/* end confdefs.h. */
7635#include <stdio.h>
7636int
7637main ()
7638{
7639printf("%d", 42);
7640 ;
7641 return 0;
7642}
7643_ACEOF
7644if ac_fn_c_try_link "$LINENO"; then :
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7646$as_echo "yes" >&6; }
7647else
7648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7649$as_echo "no" >&6; }
7650 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7651
7652fi
7653rm -f core conftest.err conftest.$ac_objext \
7654 conftest$ac_exeext conftest.$ac_ext
7655
Ned Deily87adb6e2013-10-18 21:09:56 -07007656 # end of Darwin* tests
7657 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658 esac
7659 ;;
7660
7661*)
7662 case $ac_sys_system in
7663 OpenUNIX*|UnixWare*)
7664 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7665 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666 SCO_SV*)
7667 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7668 ;;
7669 esac
7670 ;;
7671esac
7672
Zachary Ware5af85642015-12-21 12:09:17 -06007673case "$CC" in
7674*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007675 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007676 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7677 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007678*xlc*)
7679 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7680 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007681esac
7682
T. Woutersddbfa2c2017-05-23 01:30:49 +02007683if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684 :
7685else
7686 OPT="-DNDEBUG $OPT"
7687fi
7688
7689if test "$ac_arch_flags"
7690then
7691 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7692fi
7693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694# On some compilers, pthreads are available without further options
7695# (e.g. MacOS X). On some of these systems, the compiler will not
7696# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7697# So we have to see first whether pthreads are available without
7698# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7700$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007701if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703else
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705 ac_cv_pthread_is_default=no
7706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708/* end confdefs.h. */
7709
Stefan Krah7dba5942012-11-22 22:49:11 +01007710#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711#include <pthread.h>
7712
7713void* routine(void* p){return NULL;}
7714
7715int main(){
7716 pthread_t p;
7717 if(pthread_create(&p,NULL,routine,NULL)!=0)
7718 return 1;
7719 (void)pthread_detach(p);
7720 return 0;
7721}
7722
7723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007724if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725
7726 ac_cv_pthread_is_default=yes
7727 ac_cv_kthread=no
7728 ac_cv_pthread=no
7729
7730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735fi
7736
7737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738fi
7739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7741$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742
7743
7744if test $ac_cv_pthread_is_default = yes
7745then
7746 ac_cv_kpthread=no
7747else
7748# -Kpthread, if available, provides the right #defines
7749# and linker options to make pthread_create available
7750# Some compilers won't report that they do not support -Kpthread,
7751# so we need to run a program to see whether it really made the
7752# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7754$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757else
7758 ac_save_cc="$CC"
7759CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 ac_cv_kpthread=no
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764/* end confdefs.h. */
7765
Stefan Krah7dba5942012-11-22 22:49:11 +01007766#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767#include <pthread.h>
7768
7769void* routine(void* p){return NULL;}
7770
7771int main(){
7772 pthread_t p;
7773 if(pthread_create(&p,NULL,routine,NULL)!=0)
7774 return 1;
7775 (void)pthread_detach(p);
7776 return 0;
7777}
7778
7779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781 ac_cv_kpthread=yes
7782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787fi
7788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789CC="$ac_save_cc"
7790fi
7791
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7793$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794fi
7795
7796if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7797then
7798# -Kthread, if available, provides the right #defines
7799# and linker options to make pthread_create available
7800# Some compilers won't report that they do not support -Kthread,
7801# so we need to run a program to see whether it really made the
7802# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7804$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007805if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807else
7808 ac_save_cc="$CC"
7809CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007810if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811 ac_cv_kthread=no
7812else
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007814/* end confdefs.h. */
7815
Stefan Krah7dba5942012-11-22 22:49:11 +01007816#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817#include <pthread.h>
7818
7819void* routine(void* p){return NULL;}
7820
7821int main(){
7822 pthread_t p;
7823 if(pthread_create(&p,NULL,routine,NULL)!=0)
7824 return 1;
7825 (void)pthread_detach(p);
7826 return 0;
7827}
7828
7829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007831 ac_cv_kthread=yes
7832else
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837fi
7838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007839CC="$ac_save_cc"
7840fi
7841
Matthias Kloseb9621712010-04-24 17:59:49 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7843$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844fi
7845
7846if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7847then
7848# -pthread, if available, provides the right #defines
7849# and linker options to make pthread_create available
7850# Some compilers won't report that they do not support -pthread,
7851# so we need to run a program to see whether it really made the
7852# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7854$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007855if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007857else
7858 ac_save_cc="$CC"
7859CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007860if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861 ac_cv_pthread=no
7862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007864/* end confdefs.h. */
7865
Stefan Krah7dba5942012-11-22 22:49:11 +01007866#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007867#include <pthread.h>
7868
7869void* routine(void* p){return NULL;}
7870
7871int main(){
7872 pthread_t p;
7873 if(pthread_create(&p,NULL,routine,NULL)!=0)
7874 return 1;
7875 (void)pthread_detach(p);
7876 return 0;
7877}
7878
7879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881 ac_cv_pthread=yes
7882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007887fi
7888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007889CC="$ac_save_cc"
7890fi
7891
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7893$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007894fi
7895
7896# If we have set a CC compiler flag for thread support then
7897# check if it works for CXX, too.
7898ac_cv_cxx_thread=no
7899if test ! -z "$CXX"
7900then
Matthias Kloseb9621712010-04-24 17:59:49 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7902$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007903ac_save_cxx="$CXX"
7904
7905if test "$ac_cv_kpthread" = "yes"
7906then
7907 CXX="$CXX -Kpthread"
7908 ac_cv_cxx_thread=yes
7909elif test "$ac_cv_kthread" = "yes"
7910then
7911 CXX="$CXX -Kthread"
7912 ac_cv_cxx_thread=yes
7913elif test "$ac_cv_pthread" = "yes"
7914then
7915 CXX="$CXX -pthread"
7916 ac_cv_cxx_thread=yes
7917fi
7918
7919if test $ac_cv_cxx_thread = yes
7920then
7921 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7922 $CXX -c conftest.$ac_ext 2>&5
7923 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7924 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7925 then
7926 ac_cv_cxx_thread=yes
7927 else
7928 ac_cv_cxx_thread=no
7929 fi
7930 rm -fr conftest*
7931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7933$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007934fi
7935CXX="$ac_save_cxx"
7936
7937
7938# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7940$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007941if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007943else
Matthias Kloseb9621712010-04-24 17:59:49 +00007944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007945/* end confdefs.h. */
7946#include <stdlib.h>
7947#include <stdarg.h>
7948#include <string.h>
7949#include <float.h>
7950
7951int
7952main ()
7953{
7954
7955 ;
7956 return 0;
7957}
7958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007959if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007960 ac_cv_header_stdc=yes
7961else
Matthias Kloseb9621712010-04-24 17:59:49 +00007962 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007963fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7965
7966if test $ac_cv_header_stdc = yes; then
7967 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007969/* end confdefs.h. */
7970#include <string.h>
7971
7972_ACEOF
7973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $EGREP "memchr" >/dev/null 2>&1; then :
7975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007976else
7977 ac_cv_header_stdc=no
7978fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007979rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007980
7981fi
7982
7983if test $ac_cv_header_stdc = yes; then
7984 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007986/* end confdefs.h. */
7987#include <stdlib.h>
7988
7989_ACEOF
7990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 $EGREP "free" >/dev/null 2>&1; then :
7992
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007993else
7994 ac_cv_header_stdc=no
7995fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007996rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007997
7998fi
7999
8000if test $ac_cv_header_stdc = yes; then
8001 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008003 :
8004else
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008006/* end confdefs.h. */
8007#include <ctype.h>
8008#include <stdlib.h>
8009#if ((' ' & 0x0FF) == 0x020)
8010# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8011# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8012#else
8013# define ISLOWER(c) \
8014 (('a' <= (c) && (c) <= 'i') \
8015 || ('j' <= (c) && (c) <= 'r') \
8016 || ('s' <= (c) && (c) <= 'z'))
8017# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8018#endif
8019
8020#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8021int
8022main ()
8023{
8024 int i;
8025 for (i = 0; i < 256; i++)
8026 if (XOR (islower (i), ISLOWER (i))
8027 || toupper (i) != TOUPPER (i))
8028 return 2;
8029 return 0;
8030}
8031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008032if ac_fn_c_try_run "$LINENO"; then :
8033
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008039fi
8040
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008041fi
8042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8044$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008045if test $ac_cv_header_stdc = yes; then
8046
Matthias Kloseb9621712010-04-24 17:59:49 +00008047$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008048
8049fi
8050
stratakise768c862018-01-23 16:11:24 +01008051for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008052fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02008053ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07008054sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07008055utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01008056poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01008057sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01008058sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08008059sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01008060sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00008061sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008062libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008063linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimescd9fed62020-11-13 19:48:52 +01008064sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8065sys/mman.h sys/eventfd.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008066do :
8067 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8068ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008069if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008071#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008072_ACEOF
8073
8074fi
8075
Guido van Rossum627b2d71993-12-24 10:39:16 +00008076done
8077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008078ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008079for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008080 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8082$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008085else
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008087/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088#include <sys/types.h>
8089#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008090
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
8094if ((DIR *) 0)
8095return 0;
8096 ;
8097 return 0;
8098}
8099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008102else
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008107eval ac_res=\$$as_ac_Header
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8109$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008110if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008112#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008113_ACEOF
8114
8115ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008116fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008118done
8119# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8120if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8122$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008123if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008125else
Martin v. Löwis11437992002-04-12 09:54:03 +00008126 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130/* Override any GCC internal prototype to avoid an error.
8131 Use char because int might match the return type of a GCC
8132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008133#ifdef __cplusplus
8134extern "C"
8135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008136char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008137int
8138main ()
8139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008141 ;
8142 return 0;
8143}
8144_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145for ac_lib in '' dir; do
8146 if test -z "$ac_lib"; then
8147 ac_res="none required"
8148 else
8149 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008150 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008155rm -f core conftest.err conftest.$ac_objext \
8156 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008157 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160done
Victor Stinnere0be4232011-10-25 13:06:09 +02008161if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163else
8164 ac_cv_search_opendir=no
8165fi
8166rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008167LIBS=$ac_func_search_save_LIBS
8168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8170$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008172if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008176
Michael W. Hudson54241132001-12-07 15:38:26 +00008177else
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8179$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008180if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008182else
8183 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008187/* Override any GCC internal prototype to avoid an error.
8188 Use char because int might match the return type of a GCC
8189 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190#ifdef __cplusplus
8191extern "C"
8192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008193char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008194int
8195main ()
8196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 ;
8199 return 0;
8200}
8201_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202for ac_lib in '' x; do
8203 if test -z "$ac_lib"; then
8204 ac_res="none required"
8205 else
8206 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008207 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008212rm -f core conftest.err conftest.$ac_objext \
8213 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008214 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217done
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220else
8221 ac_cv_search_opendir=no
8222fi
8223rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008224LIBS=$ac_func_search_save_LIBS
8225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8227$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008229if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008232fi
8233
8234fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8237$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008238if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008240else
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008243#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008244int
8245main ()
8246{
8247return makedev(0, 0);
8248 ;
8249 return 0;
8250}
8251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008253 ac_cv_header_sys_types_h_makedev=yes
8254else
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008257rm -f core conftest.err conftest.$ac_objext \
8258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008259
8260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8262$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008263
8264if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008265ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008266if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008267
Matthias Kloseb9621712010-04-24 17:59:49 +00008268$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008269
8270fi
8271
8272
8273
8274 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008277
Matthias Kloseb9621712010-04-24 17:59:49 +00008278$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008279
8280fi
8281
8282
8283 fi
8284fi
8285
Michael W. Hudson54241132001-12-07 15:38:26 +00008286
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008287# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8288# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8289SAVE_CFLAGS=$CFLAGS
8290CFLAGS="-std=c99 $CFLAGS"
8291for ac_header in bluetooth/bluetooth.h
8292do :
8293 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8294if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8295 cat >>confdefs.h <<_ACEOF
8296#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8297_ACEOF
8298
8299fi
8300
8301done
8302
8303CFLAGS=$SAVE_CFLAGS
8304
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008305# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8306for ac_header in net/if.h
8307do :
8308 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8309#ifdef STDC_HEADERS
8310# include <stdlib.h>
8311# include <stddef.h>
8312#else
8313# ifdef HAVE_STDLIB_H
8314# include <stdlib.h>
8315# endif
8316#endif
8317#ifdef HAVE_SYS_SOCKET_H
8318# include <sys/socket.h>
8319#endif
8320
8321"
Victor Stinnere0be4232011-10-25 13:06:09 +02008322if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008323 cat >>confdefs.h <<_ACEOF
8324#define HAVE_NET_IF_H 1
8325_ACEOF
8326
8327fi
8328
8329done
8330
8331
Martin v. Löwis11017b12006-01-14 18:12:57 +00008332# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008333for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008334do :
8335 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00008336#ifdef HAVE_ASM_TYPES_H
8337#include <asm/types.h>
8338#endif
8339#ifdef HAVE_SYS_SOCKET_H
8340#include <sys/socket.h>
8341#endif
8342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343"
Victor Stinnere0be4232011-10-25 13:06:09 +02008344if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008346#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008347_ACEOF
8348
8349fi
8350
8351done
8352
8353
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008354# On Linux, qrtr.h requires asm/types.h
8355for ac_header in linux/qrtr.h
8356do :
8357 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8358#ifdef HAVE_ASM_TYPES_H
8359#include <asm/types.h>
8360#endif
8361#ifdef HAVE_SYS_SOCKET_H
8362#include <sys/socket.h>
8363#endif
8364
8365"
8366if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8367 cat >>confdefs.h <<_ACEOF
8368#define HAVE_LINUX_QRTR_H 1
8369_ACEOF
8370
8371fi
8372
8373done
8374
8375
caaveryeffc12f2017-09-06 18:18:10 -04008376for ac_header in linux/vm_sockets.h
8377do :
8378 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8379#ifdef HAVE_SYS_SOCKET_H
8380#include <sys/socket.h>
8381#endif
8382
8383"
8384if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8385 cat >>confdefs.h <<_ACEOF
8386#define HAVE_LINUX_VM_SOCKETS_H 1
8387_ACEOF
8388
8389fi
8390
8391done
8392
8393
karl ding360371f2020-04-29 15:31:19 -07008394# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8395for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008396do :
8397 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8398ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8399#ifdef HAVE_SYS_SOCKET_H
8400#include <sys/socket.h>
8401#endif
8402
8403"
8404if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8405 cat >>confdefs.h <<_ACEOF
8406#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8407_ACEOF
8408
8409fi
8410
8411done
8412
8413
Guido van Rossum627b2d71993-12-24 10:39:16 +00008414# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008415was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8417$as_echo_n "checking for clock_t in time.h... " >&6; }
8418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008419/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008420#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008421
8422_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008425 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427
8428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008430
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008431
Guido van Rossum627b2d71993-12-24 10:39:16 +00008432fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008433rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008434
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8436$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8439$as_echo_n "checking for makedev... " >&6; }
8440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008442
Jesus Cea740f53a2010-04-28 11:35:30 +00008443#if defined(MAJOR_IN_MKDEV)
8444#include <sys/mkdev.h>
8445#elif defined(MAJOR_IN_SYSMACROS)
8446#include <sys/sysmacros.h>
8447#else
8448#include <sys/types.h>
8449#endif
8450
Neal Norwitz11690112002-07-30 01:08:28 +00008451int
8452main ()
8453{
Jesus Cea740f53a2010-04-28 11:35:30 +00008454
8455 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008456 ;
8457 return 0;
8458}
Matthias Kloseb159a552010-04-25 21:00:44 +00008459
Neal Norwitz11690112002-07-30 01:08:28 +00008460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008461if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008462 ac_cv_has_makedev=yes
8463else
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466rm -f core conftest.err conftest.$ac_objext \
8467 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8469$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008470if test "$ac_cv_has_makedev" = "yes"; then
8471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008473
8474fi
8475
Christian Heimes985ecdc2013-11-20 11:46:18 +01008476# byte swapping
8477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8478$as_echo_n "checking for le64toh... " >&6; }
8479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8480/* end confdefs.h. */
8481
8482#ifdef HAVE_ENDIAN_H
8483#include <endian.h>
8484#elif defined(HAVE_SYS_ENDIAN_H)
8485#include <sys/endian.h>
8486#endif
8487
8488int
8489main ()
8490{
8491
8492 le64toh(1)
8493 ;
8494 return 0;
8495}
8496
8497_ACEOF
8498if ac_fn_c_try_link "$LINENO"; then :
8499 ac_cv_has_le64toh=yes
8500else
8501 ac_cv_has_le64toh=no
8502fi
8503rm -f core conftest.err conftest.$ac_objext \
8504 conftest$ac_exeext conftest.$ac_ext
8505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8506$as_echo "$ac_cv_has_le64toh" >&6; }
8507if test "$ac_cv_has_le64toh" = "yes"; then
8508
8509$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8510
8511fi
8512
Martin v. Löwis399a6892002-10-04 10:22:02 +00008513use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008514# Don't use largefile support for GNU/Hurd
8515case $ac_sys_system in GNU*)
8516 use_lfs=no
8517esac
8518
Martin v. Löwis399a6892002-10-04 10:22:02 +00008519if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008520# Two defines needed to enable largefile support on various platforms
8521# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008522case $ac_sys_system/$ac_sys_release in
8523AIX*)
8524
8525$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8526
8527 ;;
8528esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008529
Matthias Kloseb9621712010-04-24 17:59:49 +00008530$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008531
8532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008534
Martin v. Löwis399a6892002-10-04 10:22:02 +00008535fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008536
Guido van Rossum84e7b241996-08-19 21:59:00 +00008537# Add some code to confdefs.h so that the test for off_t works on SCO
8538cat >> confdefs.h <<\EOF
8539#if defined(SCO_DS)
8540#undef _OFF_T
8541#endif
8542EOF
8543
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008545ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008546if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008548else
Martin v. Löwis11437992002-04-12 09:54:03 +00008549
8550cat >>confdefs.h <<_ACEOF
8551#define mode_t int
8552_ACEOF
8553
8554fi
8555
Matthias Kloseb9621712010-04-24 17:59:49 +00008556ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008557if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008558
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008559else
Martin v. Löwis11437992002-04-12 09:54:03 +00008560
8561cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008563_ACEOF
8564
8565fi
8566
Matthias Kloseb9621712010-04-24 17:59:49 +00008567ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008568if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008570else
Martin v. Löwis11437992002-04-12 09:54:03 +00008571
8572cat >>confdefs.h <<_ACEOF
8573#define pid_t int
8574_ACEOF
8575
8576fi
8577
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008578
Martin v. Löwis11437992002-04-12 09:54:03 +00008579cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008580#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008581_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008584if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008586else
Martin v. Löwis11437992002-04-12 09:54:03 +00008587
8588cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008590_ACEOF
8591
8592fi
8593
Matthias Kloseb9621712010-04-24 17:59:49 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8595$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008596if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008601#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008602
8603_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008606 ac_cv_type_uid_t=yes
8607else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008608 ac_cv_type_uid_t=no
8609fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008610rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008611
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8614$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008615if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008616
Matthias Kloseb9621712010-04-24 17:59:49 +00008617$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008618
8619
Matthias Kloseb9621712010-04-24 17:59:49 +00008620$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008621
8622fi
8623
Mark Dickinson983bc162012-12-02 12:11:38 +00008624
Matthias Kloseb9621712010-04-24 17:59:49 +00008625ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008626if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627
Matthias Kloseb9621712010-04-24 17:59:49 +00008628$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008629
8630fi
8631
Stefan Krah1919b7e2012-03-21 18:25:23 +01008632ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8633if test "x$ac_cv_type___uint128_t" = xyes; then :
8634
8635$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8636
8637fi
8638
Jack Jansendd19cf82001-12-06 22:36:17 +00008639
Michael W. Hudson54241132001-12-07 15:38:26 +00008640# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008641# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642# The cast to long int works around a bug in the HP C Compiler
8643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8647$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008650else
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008652
Martin v. Löwis11437992002-04-12 09:54:03 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 if test "$ac_cv_type_int" = yes; then
8655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008657as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008658See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659 else
8660 ac_cv_sizeof_int=0
8661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8666$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667
8668
8669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008671#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008672_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008673
8674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675# The cast to long int works around a bug in the HP C Compiler
8676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8680$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008681if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008683else
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008685
Martin v. Löwis11437992002-04-12 09:54:03 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 if test "$ac_cv_type_long" = yes; then
8688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008690as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008691See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692 else
8693 ac_cv_sizeof_long=0
8694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8699$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700
8701
8702
Martin v. Löwis11437992002-04-12 09:54:03 +00008703cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008704#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008705_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008706
8707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708# The cast to long int works around a bug in the HP C Compiler
8709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8711# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8713$as_echo_n "checking size of long long... " >&6; }
8714if ${ac_cv_sizeof_long_long+:} false; then :
8715 $as_echo_n "(cached) " >&6
8716else
8717 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8718
8719else
8720 if test "$ac_cv_type_long_long" = yes; then
8721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8723as_fn_error 77 "cannot compute sizeof (long long)
8724See \`config.log' for more details" "$LINENO" 5; }
8725 else
8726 ac_cv_sizeof_long_long=0
8727 fi
8728fi
8729
8730fi
8731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8732$as_echo "$ac_cv_sizeof_long_long" >&6; }
8733
8734
8735
8736cat >>confdefs.h <<_ACEOF
8737#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8738_ACEOF
8739
8740
8741# The cast to long int works around a bug in the HP C Compiler
8742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8744# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8746$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
Martin v. Löwis11437992002-04-12 09:54:03 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 if test "$ac_cv_type_void_p" = yes; then
8754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008756as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008757See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758 else
8759 ac_cv_sizeof_void_p=0
8760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762
Martin v. Löwis11437992002-04-12 09:54:03 +00008763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8765$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766
8767
8768
Martin v. Löwis11437992002-04-12 09:54:03 +00008769cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008770#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008771_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008772
8773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008774# The cast to long int works around a bug in the HP C Compiler
8775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8779$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008780if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008784
Martin v. Löwis11437992002-04-12 09:54:03 +00008785else
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 if test "$ac_cv_type_short" = yes; then
8787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008789as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008790See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791 else
8792 ac_cv_sizeof_short=0
8793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795
Martin v. Löwis11437992002-04-12 09:54:03 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8798$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799
8800
8801
Martin v. Löwis11437992002-04-12 09:54:03 +00008802cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008803#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008804_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008805
8806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807# The cast to long int works around a bug in the HP C Compiler
8808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8810# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8812$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008813if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008817
Martin v. Löwis11437992002-04-12 09:54:03 +00008818else
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 if test "$ac_cv_type_float" = yes; then
8820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008822as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008823See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824 else
8825 ac_cv_sizeof_float=0
8826 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828
Martin v. Löwis11437992002-04-12 09:54:03 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8831$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008832
8833
8834
Martin v. Löwis11437992002-04-12 09:54:03 +00008835cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008836#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008837_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008838
8839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840# The cast to long int works around a bug in the HP C Compiler
8841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8845$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008850
Martin v. Löwis11437992002-04-12 09:54:03 +00008851else
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 if test "$ac_cv_type_double" = yes; then
8853 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008855as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008856See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857 else
8858 ac_cv_sizeof_double=0
8859 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8864$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008865
8866
8867
Martin v. Löwis11437992002-04-12 09:54:03 +00008868cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008869#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008870_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008871
8872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873# The cast to long int works around a bug in the HP C Compiler
8874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8876# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8878$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008879if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008881else
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008883
Martin v. Löwis11437992002-04-12 09:54:03 +00008884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 if test "$ac_cv_type_fpos_t" = yes; then
8886 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008888as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008889See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008890 else
8891 ac_cv_sizeof_fpos_t=0
8892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894
Martin v. Löwis11437992002-04-12 09:54:03 +00008895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8897$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008898
8899
8900
Martin v. Löwis11437992002-04-12 09:54:03 +00008901cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008902#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008903_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008904
Michael W. Hudson54241132001-12-07 15:38:26 +00008905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008906# The cast to long int works around a bug in the HP C Compiler
8907# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8908# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8909# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8911$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008912if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008914else
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008916
Martin v. Löwis18e16552006-02-15 17:27:45 +00008917else
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 if test "$ac_cv_type_size_t" = yes; then
8919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008921as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008922See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008923 else
8924 ac_cv_sizeof_size_t=0
8925 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008927
Martin v. Löwis18e16552006-02-15 17:27:45 +00008928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8930$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931
8932
8933
Martin v. Löwis18e16552006-02-15 17:27:45 +00008934cat >>confdefs.h <<_ACEOF
8935#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8936_ACEOF
8937
8938
Christian Heimes400adb02008-02-01 08:12:03 +00008939# The cast to long int works around a bug in the HP C Compiler
8940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8944$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008945if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008947else
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00008949
Christian Heimes400adb02008-02-01 08:12:03 +00008950else
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 if test "$ac_cv_type_pid_t" = yes; then
8952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008954as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008955See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008956 else
8957 ac_cv_sizeof_pid_t=0
8958 fi
8959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960
Christian Heimes400adb02008-02-01 08:12:03 +00008961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8963$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008964
8965
8966
8967cat >>confdefs.h <<_ACEOF
8968#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8969_ACEOF
8970
8971
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008972# The cast to long int works around a bug in the HP C Compiler
8973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8975# This bug is HP SR number 8606223364.
8976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8977$as_echo_n "checking size of uintptr_t... " >&6; }
8978if ${ac_cv_sizeof_uintptr_t+:} false; then :
8979 $as_echo_n "(cached) " >&6
8980else
8981 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8982
8983else
8984 if test "$ac_cv_type_uintptr_t" = yes; then
8985 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8987as_fn_error 77 "cannot compute sizeof (uintptr_t)
8988See \`config.log' for more details" "$LINENO" 5; }
8989 else
8990 ac_cv_sizeof_uintptr_t=0
8991 fi
8992fi
8993
8994fi
8995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8996$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8997
8998
8999
9000cat >>confdefs.h <<_ACEOF
9001#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
9002_ACEOF
9003
9004
Michael W. Hudson54241132001-12-07 15:38:26 +00009005
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009006
Eitan Adler3055c942018-05-15 22:58:09 -07009007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
9008$as_echo_n "checking for long double... " >&6; }
9009if ${ac_cv_type_long_double+:} false; then :
9010 $as_echo_n "(cached) " >&6
9011else
9012 if test "$GCC" = yes; then
9013 ac_cv_type_long_double=yes
9014 else
9015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9016/* end confdefs.h. */
9017/* The Stardent Vistra knows sizeof (long double), but does
9018 not support it. */
9019 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009020int
9021main ()
9022{
Eitan Adler3055c942018-05-15 22:58:09 -07009023static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9024 sizeof (double) <= sizeof (long double))];
9025test_array [0] = 0;
9026return test_array [0];
9027
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009028 ;
9029 return 0;
9030}
9031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009032if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009033 ac_cv_type_long_double=yes
9034else
9035 ac_cv_type_long_double=no
9036fi
9037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9038 fi
9039fi
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9041$as_echo "$ac_cv_type_long_double" >&6; }
9042 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009045
Eitan Adler3055c942018-05-15 22:58:09 -07009046 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009047
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009048# The cast to long int works around a bug in the HP C Compiler
9049# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9050# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9051# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9053$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009054if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009056else
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009058
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009059else
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 if test "$ac_cv_type_long_double" = yes; then
9061 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009063as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009064See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009065 else
9066 ac_cv_sizeof_long_double=0
9067 fi
9068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009069
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9072$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009073
9074
9075
9076cat >>confdefs.h <<_ACEOF
9077#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9078_ACEOF
9079
9080
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082# The cast to long int works around a bug in the HP C Compiler
9083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9087$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009088if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009090else
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00009092
Thomas Woutersb2137042007-02-01 18:02:27 +00009093else
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 if test "$ac_cv_type__Bool" = yes; then
9095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009097as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009098See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009099 else
9100 ac_cv_sizeof__Bool=0
9101 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009103
Thomas Woutersb2137042007-02-01 18:02:27 +00009104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9106$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107
9108
9109
Thomas Woutersb2137042007-02-01 18:02:27 +00009110cat >>confdefs.h <<_ACEOF
9111#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9112_ACEOF
9113
9114
Thomas Woutersb2137042007-02-01 18:02:27 +00009115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009116# The cast to long int works around a bug in the HP C Compiler
9117# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9118# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9119# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9121$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009122if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009124else
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009126#ifdef HAVE_SYS_TYPES_H
9127#include <sys/types.h>
9128#endif
9129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009132else
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 if test "$ac_cv_type_off_t" = yes; then
9134 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009136as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009137See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009138 else
9139 ac_cv_sizeof_off_t=0
9140 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009142
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9145$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009147
9148
Martin v. Löwis11437992002-04-12 09:54:03 +00009149cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009150#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009151_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009152
Michael W. Hudson54241132001-12-07 15:38:26 +00009153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9156$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009157if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009158 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009159
Matthias Kloseb9621712010-04-24 17:59:49 +00009160$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009161
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9163$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009164else
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009167fi
9168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009169# The cast to long int works around a bug in the HP C Compiler
9170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9172# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9174$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009175if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009177else
Matthias Kloseb9621712010-04-24 17:59:49 +00009178 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009179#ifdef HAVE_SYS_TYPES_H
9180#include <sys/types.h>
9181#endif
9182#ifdef HAVE_TIME_H
9183#include <time.h>
9184#endif
9185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009188else
Matthias Kloseb9621712010-04-24 17:59:49 +00009189 if test "$ac_cv_type_time_t" = yes; then
9190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009192as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009193See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009194 else
9195 ac_cv_sizeof_time_t=0
9196 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009198
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9201$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009203
9204
Martin v. Löwis11437992002-04-12 09:54:03 +00009205cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009206#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009207_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009208
Michael W. Hudson54241132001-12-07 15:38:26 +00009209
9210
Trent Mick635f6fb2000-08-23 21:33:05 +00009211# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009212ac_save_cc="$CC"
9213if test "$ac_cv_kpthread" = "yes"
9214then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009215elif test "$ac_cv_kthread" = "yes"
9216then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009217elif test "$ac_cv_pthread" = "yes"
9218then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009219fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009220
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9222$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009223have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009226
9227 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009228int
9229main ()
9230{
Guido van Rossum12580492000-09-24 16:47:19 +00009231pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 ;
9233 return 0;
9234}
Matthias Kloseb159a552010-04-25 21:00:44 +00009235
Martin v. Löwis11437992002-04-12 09:54:03 +00009236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009237if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009238 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9242$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009243if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009244 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9247# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9249$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009250if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009252else
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009254#ifdef HAVE_PTHREAD_H
9255#include <pthread.h>
9256#endif
9257
Matthias Kloseb9621712010-04-24 17:59:49 +00009258"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009260else
Matthias Kloseb9621712010-04-24 17:59:49 +00009261 if test "$ac_cv_type_pthread_t" = yes; then
9262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009264as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009265See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009266 else
9267 ac_cv_sizeof_pthread_t=0
9268 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009270
Trent Mick635f6fb2000-08-23 21:33:05 +00009271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9273$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009275
9276
Martin v. Löwis11437992002-04-12 09:54:03 +00009277cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009278#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009279_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009280
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009281
Trent Mick635f6fb2000-08-23 21:33:05 +00009282fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009283
9284# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9285# This checking will be unnecessary after removing deprecated TLS API.
9286# The cast to long int works around a bug in the HP C Compiler
9287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9289# This bug is HP SR number 8606223364.
9290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9291$as_echo_n "checking size of pthread_key_t... " >&6; }
9292if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9293 $as_echo_n "(cached) " >&6
9294else
9295 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9296"; then :
9297
9298else
9299 if test "$ac_cv_type_pthread_key_t" = yes; then
9300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9302as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9303See \`config.log' for more details" "$LINENO" 5; }
9304 else
9305 ac_cv_sizeof_pthread_key_t=0
9306 fi
9307fi
9308
9309fi
9310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9311$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9312
9313
9314
9315cat >>confdefs.h <<_ACEOF
9316#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9317_ACEOF
9318
9319
9320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9321$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9322if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9324/* end confdefs.h. */
9325#include <pthread.h>
9326int
9327main ()
9328{
9329pthread_key_t k; k * 1;
9330 ;
9331 return 0;
9332}
9333_ACEOF
9334if ac_fn_c_try_compile "$LINENO"; then :
9335 ac_pthread_key_t_is_arithmetic_type=yes
9336else
9337 ac_pthread_key_t_is_arithmetic_type=no
9338
9339fi
9340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9342$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9343 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9344
9345$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9346
9347 fi
9348else
9349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350$as_echo "no" >&6; }
9351fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009352CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009353
Michael W. Hudson54241132001-12-07 15:38:26 +00009354
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009355case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009356 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009357 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9358 ;;
9359 Darwin/*)
9360 OTHER_LIBTOOL_OPT=""
9361 ;;
9362esac
9363
9364
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009365
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009366case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009367 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009368 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9369 if test "${enable_universalsdk}"; then
9370 :
9371 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009372 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009373 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009375 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009376 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009377 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009378 if test ${gcc_version} '<' 4.0
9379 then
9380 LIBTOOL_CRUFT="-lcc_dynamic"
9381 else
9382 LIBTOOL_CRUFT=""
9383 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009385 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009386else
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009388/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009389
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009390 #include <unistd.h>
9391 int main(int argc, char*argv[])
9392 {
9393 if (sizeof(long) == 4) {
9394 return 0;
9395 } else {
9396 return 1;
9397 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009398 }
9399
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009401if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009402 ac_osx_32bit=yes
9403else
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009408fi
9409
9410
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009411 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009412 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009413 i386)
9414 MACOSX_DEFAULT_ARCH="i386"
9415 ;;
9416 ppc)
9417 MACOSX_DEFAULT_ARCH="ppc"
9418 ;;
9419 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009420 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009421 ;;
9422 esac
9423 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009424 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009425 i386)
9426 MACOSX_DEFAULT_ARCH="x86_64"
9427 ;;
9428 ppc)
9429 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009430 ;;
9431 arm64)
9432 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009433 ;;
9434 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009435 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009436 ;;
9437 esac
9438
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009439 fi
9440
9441 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009442 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009444esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9446$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009447if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009448then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009449 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009450 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009451 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009452
Matthias Kloseb9621712010-04-24 17:59:49 +00009453$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Matthias Kloseb9621712010-04-24 17:59:49 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9456$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009457 if test $enable_shared = "yes"
9458 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009459 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 +00009460 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009461else
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009464fi
9465
Matthias Kloseb9621712010-04-24 17:59:49 +00009466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9467$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009468case $ac_sys_system/$ac_sys_release in
9469 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009470
Matthias Kloseb9621712010-04-24 17:59:49 +00009471$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
Matthias Kloseb9621712010-04-24 17:59:49 +00009473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9474$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009475 ;;
9476 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009479 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009480esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009481
Guido van Rossum0a516c91994-09-12 10:58:40 +00009482# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009483
Michael W. Hudson54241132001-12-07 15:38:26 +00009484
9485
9486
9487
Benjamin Peterson99f03762010-04-11 22:15:28 +00009488
Thomas Wouters477c8d52006-05-27 19:21:47 +00009489
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009490# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9491# -- usually .so, .sl on HP-UX, .dll on Cygwin
9492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9493$as_echo_n "checking the extension of shared libraries... " >&6; }
9494if test -z "$SHLIB_SUFFIX"; then
9495 case $ac_sys_system in
9496 hp*|HP*)
9497 case `uname -m` in
9498 ia64) SHLIB_SUFFIX=.so;;
9499 *) SHLIB_SUFFIX=.sl;;
9500 esac
9501 ;;
9502 CYGWIN*) SHLIB_SUFFIX=.dll;;
9503 *) SHLIB_SUFFIX=.so;;
9504 esac
9505fi
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9507$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009508
Guido van Rossum0a516c91994-09-12 10:58:40 +00009509# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009510# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009511# (Shared libraries in this instance are shared modules to be loaded into
9512# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9514$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009515if test -z "$LDSHARED"
9516then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009517 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009518 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009519 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009520 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009521 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009523 if test "$GCC" = "yes" ; then
9524 LDSHARED='$(CC) -shared'
9525 LDCXXSHARED='$(CXX) -shared'
9526 else
9527 LDSHARED='$(CC) -G'
9528 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009529 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009530 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009531 if test "$GCC" = "yes" ; then
9532 LDSHARED='$(CC) -shared'
9533 LDCXXSHARED='$(CXX) -shared'
9534 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009535 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009536 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009537 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009538 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009539 LDSHARED='$(CC) -bundle'
9540 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009541 if test "$enable_framework" ; then
9542 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009543 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9544 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009545 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009546 else
9547 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009548 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009549 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009550 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009551 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009552 LDSHARED='$(CC) -bundle'
9553 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009554 if test "$enable_framework" ; then
9555 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009556 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9557 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009558 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009559 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009560 # No framework, use the Python app as bundle-loader
9561 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009562 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009563 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009564 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009565 Darwin/*)
9566 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9567 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009568
Ned Deily36820b62014-06-25 13:44:22 -07009569 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9570 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9571 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9572 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9573 if test ${dep_target_major} -eq 10 && \
9574 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009575 then
Ned Deily36820b62014-06-25 13:44:22 -07009576 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009577 LDSHARED='$(CC) -bundle'
9578 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009579 if test "$enable_framework" ; then
9580 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009581 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9582 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009583 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009584 else
9585 # No framework, use the Python app as bundle-loader
9586 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9587 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009588 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009589 fi
Ned Deily36820b62014-06-25 13:44:22 -07009590 else
9591 # building for OS X 10.3 and later
9592 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9593 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9594 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009595 fi
9596 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009597 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009598 LDSHARED='$(CC) -shared'
9599 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009600 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009601 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009602 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009603 LDSHARED='$(CC) -shared'
9604 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009605 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009606 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009607 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009608 OpenBSD*)
9609 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9610 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009611 LDSHARED='$(CC) -shared $(CCSHARED)'
9612 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009613 else
9614 case `uname -r` in
9615 [01].* | 2.[0-7] | 2.[0-7].*)
9616 LDSHARED="ld -Bshareable ${LDFLAGS}"
9617 ;;
9618 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009619 LDSHARED='$(CC) -shared $(CCSHARED)'
9620 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009621 ;;
9622 esac
9623 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009624 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009625 LDSHARED='$(CC) -shared'
9626 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009627 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009628 if test "$GCC" = "yes" ; then
9629 LDSHARED='$(CC) -shared'
9630 LDCXXSHARED='$(CXX) -shared'
9631 else
9632 LDSHARED='$(CC) -G'
9633 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009634 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009635 SCO_SV*)
9636 LDSHARED='$(CC) -Wl,-G,-Bexport'
9637 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9638 CYGWIN*)
9639 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9640 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009641 *) LDSHARED="ld";;
9642 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9645$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009646LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009647BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009648# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009649# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9651$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009652if test -z "$CCSHARED"
9653then
Guido van Rossum07397971997-04-29 21:49:50 +00009654 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009655 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009656 then CCSHARED="-fPIC";
9657 elif test `uname -p` = sparc;
9658 then CCSHARED="-xcode=pic32";
9659 else CCSHARED="-Kpic";
9660 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009661 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009662 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009663 else CCSHARED="+z";
9664 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009665 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009666 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009667 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009668 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009669 if test "$GCC" = "yes"
9670 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009671 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009672 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009673 SCO_SV*)
9674 if test "$GCC" = "yes"
9675 then CCSHARED="-fPIC"
9676 else CCSHARED="-Kpic -belf"
9677 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009678 VxWorks*)
9679 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9683$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009684# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009685# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9687$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009688if test -z "$LINKFORSHARED"
9689then
Guido van Rossum07397971997-04-29 21:49:50 +00009690 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009691 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009692 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009693 LINKFORSHARED="-Wl,-E -Wl,+s";;
9694# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009695 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009696 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009697 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009699 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009700
9701 # Issue #18075: the default maximum stack size (8MBytes) is too
9702 # small for the default recursion limit. Increase the stack size
9703 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009704 # Note: This matches the value of THREAD_STACK_SIZE in
9705 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009706 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9707
Jack Jansene578a632001-08-15 01:27:14 +00009708 if test "$enable_framework"
9709 then
Jack Jansenda49e192005-01-07 13:08:22 +00009710 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009711 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009712 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009713 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009714 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009715 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009716 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009717 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9718 then
9719 LINKFORSHARED="-Wl,--export-dynamic"
9720 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009721 SunOS/5*) case $CC in
9722 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009723 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009724 then
9725 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009726 fi;;
9727 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009728 CYGWIN*)
9729 if test $enable_shared = "no"
9730 then
9731 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9732 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009733 QNX*)
9734 # -Wl,-E causes the symbols to be added to the dynamic
9735 # symbol table so that they can be found when a module
9736 # is loaded. -N 2048K causes the stack size to be set
9737 # to 2048 kilobytes so that the stack doesn't overflow
9738 # when running test_compile.py.
9739 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009740 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009741 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009742 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9745$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009746
Michael W. Hudson54241132001-12-07 15:38:26 +00009747
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9750$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009751if test ! "$LIBRARY" = "$LDLIBRARY"
9752then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009753 case $ac_sys_system in
9754 CYGWIN*)
9755 # Cygwin needs CCSHARED when building extension DLLs
9756 # but not when building the interpreter DLL.
9757 CFLAGSFORSHARED='';;
9758 *)
9759 CFLAGSFORSHARED='$(CCSHARED)'
9760 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9763$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009764
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009765# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9766# library (with --enable-shared).
9767# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009768# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9769# if it is not required, since it creates a dependency of the shared library
9770# to LIBS. This, in turn, means that applications linking the shared libpython
9771# don't need to link LIBS explicitly. The default should be only changed
9772# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009773
Matthias Kloseb9621712010-04-24 17:59:49 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9775$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009776case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009777 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009778 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009779esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9781$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009782
9783
Guido van Rossum627b2d71993-12-24 10:39:16 +00009784# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9786$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009787if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009788 $as_echo_n "(cached) " >&6
9789else
9790 ac_check_lib_save_LIBS=$LIBS
9791LIBS="-lsendfile $LIBS"
9792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9793/* end confdefs.h. */
9794
9795/* Override any GCC internal prototype to avoid an error.
9796 Use char because int might match the return type of a GCC
9797 builtin and then its argument prototype would still apply. */
9798#ifdef __cplusplus
9799extern "C"
9800#endif
9801char sendfile ();
9802int
9803main ()
9804{
9805return sendfile ();
9806 ;
9807 return 0;
9808}
9809_ACEOF
9810if ac_fn_c_try_link "$LINENO"; then :
9811 ac_cv_lib_sendfile_sendfile=yes
9812else
9813 ac_cv_lib_sendfile_sendfile=no
9814fi
9815rm -f core conftest.err conftest.$ac_objext \
9816 conftest$ac_exeext conftest.$ac_ext
9817LIBS=$ac_check_lib_save_LIBS
9818fi
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9820$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009821if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009822 cat >>confdefs.h <<_ACEOF
9823#define HAVE_LIBSENDFILE 1
9824_ACEOF
9825
9826 LIBS="-lsendfile $LIBS"
9827
9828fi
9829
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9831$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009832if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009834else
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009836LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840/* Override any GCC internal prototype to avoid an error.
9841 Use char because int might match the return type of a GCC
9842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009843#ifdef __cplusplus
9844extern "C"
9845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009846char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009847int
9848main ()
9849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ;
9852 return 0;
9853}
9854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009857else
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860rm -f core conftest.err conftest.$ac_objext \
9861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009862LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9865$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009866if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 cat >>confdefs.h <<_ACEOF
9868#define HAVE_LIBDL 1
9869_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009870
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009871 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009872
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009873fi
9874 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9876$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009877if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009879else
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009881LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009891char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9910$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 cat >>confdefs.h <<_ACEOF
9913#define HAVE_LIBDLD 1
9914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009915
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009916 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009918fi
9919 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009920
Michael Felt0d3ccb42017-12-30 22:39:20 +01009921# checks for uuid.h location
9922for ac_header in uuid/uuid.h uuid.h
9923do :
9924 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9925ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9926if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9927 cat >>confdefs.h <<_ACEOF
9928#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9929_ACEOF
9930
9931fi
9932
9933done
9934
9935
Berker Peksag9a10ff42017-11-08 23:09:16 +03009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9937$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9939/* end confdefs.h. */
9940#include <uuid/uuid.h>
9941int
9942main ()
9943{
9944
9945#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009946void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009947#endif
9948
9949 ;
9950 return 0;
9951}
9952_ACEOF
9953if ac_fn_c_try_compile "$LINENO"; then :
9954
9955$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9956
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9958$as_echo "yes" >&6; }
9959else
9960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9961$as_echo "no" >&6; }
9962
9963fi
9964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9965
Michael Felt0d3ccb42017-12-30 22:39:20 +01009966# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009967# FreeBSD and OpenBSD provides support as well
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9969$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971/* end confdefs.h. */
9972#include <uuid.h>
9973int
9974main ()
9975{
9976
9977#ifndef uuid_create
9978void *x = uuid_create
9979#endif
9980
9981 ;
9982 return 0;
9983}
9984_ACEOF
9985if ac_fn_c_try_compile "$LINENO"; then :
9986
9987$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9988
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9990$as_echo "yes" >&6; }
9991else
9992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993$as_echo "no" >&6; }
9994
9995fi
9996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9997
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009998# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9999# stream in big-endian byte-order
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
10001$as_echo_n "checking for uuid_enc_be... " >&6; }
10002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10003/* end confdefs.h. */
10004#include <uuid.h>
10005int
10006main ()
10007{
10008
10009#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010010void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010011#endif
10012
10013 ;
10014 return 0;
10015}
10016_ACEOF
10017if ac_fn_c_try_compile "$LINENO"; then :
10018
10019$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
10020
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10022$as_echo "yes" >&6; }
10023else
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10025$as_echo "no" >&6; }
10026
10027fi
10028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10029
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010030# 'Real Time' functions on Solaris
10031# posix4 on Solaris 2.6
10032# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +030010033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010034$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010035if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010037else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010038 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042/* Override any GCC internal prototype to avoid an error.
10043 Use char because int might match the return type of a GCC
10044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010045#ifdef __cplusplus
10046extern "C"
10047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010048char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010049int
10050main ()
10051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 ;
10054 return 0;
10055}
10056_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057for ac_lib in '' pthread rt posix4; do
10058 if test -z "$ac_lib"; then
10059 ac_res="none required"
10060 else
10061 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010062 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010067rm -f core conftest.err conftest.$ac_objext \
10068 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +020010069 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072done
Victor Stinnere0be4232011-10-25 13:06:09 +020010073if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075else
10076 ac_cv_search_sem_init=no
10077fi
10078rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010079LIBS=$ac_func_search_save_LIBS
10080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10082$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010086
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010087fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010088
Martin v. Löwis519adae2003-09-20 10:47:47 +000010089
Martin v. Löwis19d17342003-06-14 21:03:05 +000010090# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10092$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010093if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010095else
10096 ac_check_lib_save_LIBS=$LIBS
10097LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010099/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101/* Override any GCC internal prototype to avoid an error.
10102 Use char because int might match the return type of a GCC
10103 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010104#ifdef __cplusplus
10105extern "C"
10106#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010107char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010108int
10109main ()
10110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010112 ;
10113 return 0;
10114}
10115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010117 ac_cv_lib_intl_textdomain=yes
10118else
Matthias Kloseb9621712010-04-24 17:59:49 +000010119 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010121rm -f core conftest.err conftest.$ac_objext \
10122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010123LIBS=$ac_check_lib_save_LIBS
10124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10126$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010127if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010128
Matthias Kloseb9621712010-04-24 17:59:49 +000010129$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010130
Brett Cannonc6d936e2009-06-07 20:09:53 +000010131 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010132fi
10133
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010134
10135# checks for system dependent C++ extensions support
10136case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10138$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010140/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010141
Georg Brandl59e87bd2011-02-15 19:48:59 +000010142 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010143int
10144main ()
10145{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010146loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ;
10148 return 0;
10149}
Matthias Kloseb159a552010-04-25 21:00:44 +000010150
Martin v. Löwis11437992002-04-12 09:54:03 +000010151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010152if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010153
Matthias Kloseb159a552010-04-25 21:00:44 +000010154
Matthias Kloseb9621712010-04-24 17:59:49 +000010155$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
Matthias Kloseb159a552010-04-25 21:00:44 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010158$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010159
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010160else
Matthias Kloseb159a552010-04-25 21:00:44 +000010161
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010163$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010164
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010167 conftest$ac_exeext conftest.$ac_ext
10168# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10169# of the AIX system used to build/package Python executable. This tag serves
10170# as a baseline for bdist module packages
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10172$as_echo_n "checking for the system builddate... " >&6; }
10173 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10174
10175cat >>confdefs.h <<_ACEOF
10176#define AIX_BUILDDATE $AIX_BUILDDATE
10177_ACEOF
10178
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10180$as_echo "$AIX_BUILDDATE" >&6; }
10181 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010182 *) ;;
10183esac
10184
Christian Heimes985ecdc2013-11-20 11:46:18 +010010185# check for systems that require aligned memory access
10186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10187$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010188if ${ac_cv_aligned_required+:} false; then :
10189 $as_echo_n "(cached) " >&6
10190else
10191 if test "$cross_compiling" = yes; then :
10192 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010193else
10194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10195/* end confdefs.h. */
10196
10197int main()
10198{
10199 char s[16];
10200 int i, *p1, *p2;
10201 for (i=0; i < 16; i++)
10202 s[i] = i;
10203 p1 = (int*)(s+1);
10204 p2 = (int*)(s+2);
10205 if (*p1 == *p2)
10206 return 1;
10207 return 0;
10208}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010209_ACEOF
10210if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010211 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010212else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010213 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010214fi
10215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10216 conftest.$ac_objext conftest.beam conftest.$ac_ext
10217fi
10218
10219
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010220fi
10221
10222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10223$as_echo "$ac_cv_aligned_required" >&6; }
10224if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010225
10226$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10227
10228fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010229
10230# str, bytes and memoryview hash algorithm
10231
10232
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10234$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10235
10236# Check whether --with-hash_algorithm was given.
10237if test "${with_hash_algorithm+set}" = set; then :
10238 withval=$with_hash_algorithm;
10239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10240$as_echo "$withval" >&6; }
10241case "$withval" in
10242 siphash24)
10243 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10244
10245 ;;
10246 fnv)
10247 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10248
10249 ;;
10250 *)
10251 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10252 ;;
10253esac
10254
10255else
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10257$as_echo "default" >&6; }
10258fi
10259
10260
Paul Ganssle62972d92020-05-16 04:20:06 -040010261validate_tzpath() {
10262 # Checks that each element of hte path is an absolute path
10263 if test -z "$1"; then
10264 # Empty string is allowed: it indicates no system TZPATH
10265 return 0
10266 fi
10267
10268 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010269 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010270 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10271 return 1;
10272 fi
10273}
10274
10275TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10277$as_echo_n "checking for --with-tzpath... " >&6; }
10278
10279# Check whether --with-tzpath was given.
10280if test "${with_tzpath+set}" = set; then :
10281 withval=$with_tzpath;
10282case "$withval" in
10283 yes)
10284 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10285 ;;
10286 *)
10287 validate_tzpath "$withval"
10288 TZPATH="$withval"
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10290$as_echo "\"$withval\"" >&6; }
10291 ;;
10292esac
10293
10294else
10295 validate_tzpath "$TZPATH"
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10297$as_echo "\"$TZPATH\"" >&6; }
10298fi
10299
10300
10301
Charles-François Natalid30b0222014-05-08 23:08:51 +010010302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10303$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10304
10305# Check whether --with-address_sanitizer was given.
10306if test "${with_address_sanitizer+set}" = set; then :
10307 withval=$with_address_sanitizer;
10308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10309$as_echo "$withval" >&6; }
10310BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10311LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010312# ASan works by controlling memory allocation, our own malloc interferes.
10313with_pymalloc="no"
10314
10315else
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317$as_echo "no" >&6; }
10318fi
10319
10320
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10322$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10323
10324# Check whether --with-memory_sanitizer was given.
10325if test "${with_memory_sanitizer+set}" = set; then :
10326 withval=$with_memory_sanitizer;
10327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10328$as_echo "$withval" >&6; }
10329BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10330LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10331# MSan works by controlling memory allocation, our own malloc interferes.
10332with_pymalloc="no"
10333
10334else
10335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10336$as_echo "no" >&6; }
10337fi
10338
10339
10340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10341$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10342
10343# Check whether --with-undefined_behavior_sanitizer was given.
10344if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10345 withval=$with_undefined_behavior_sanitizer;
10346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10347$as_echo "$withval" >&6; }
10348BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10349LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010350
10351else
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
10354fi
10355
10356
Guido van Rossum70c7f481998-03-26 18:44:10 +000010357# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10359$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010360if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010362else
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010364LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368/* Override any GCC internal prototype to avoid an error.
10369 Use char because int might match the return type of a GCC
10370 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010371#ifdef __cplusplus
10372extern "C"
10373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010374char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010375int
10376main ()
10377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010385else
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010388rm -f core conftest.err conftest.$ac_objext \
10389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010390LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10393$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010394if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010395 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010396fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010397 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10399$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010400if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010402else
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010404LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408/* Override any GCC internal prototype to avoid an error.
10409 Use char because int might match the return type of a GCC
10410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010411#ifdef __cplusplus
10412extern "C"
10413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010414char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010415int
10416main ()
10417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010430LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10433$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010434if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010435 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010436fi
10437 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10440$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10446$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010447LIBS="$withval $LIBS"
10448
10449else
Matthias Kloseb9621712010-04-24 17:59:49 +000010450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452fi
10453
Guido van Rossum7f43da71994-08-01 12:15:30 +000010454
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010455
10456
10457
10458
10459
10460
Victor Stinnerb477d192020-01-22 22:48:16 +010010461
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010462if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10463 if test -n "$ac_tool_prefix"; then
10464 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10465set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467$as_echo_n "checking for $ac_word... " >&6; }
10468if ${ac_cv_path_PKG_CONFIG+:} false; then :
10469 $as_echo_n "(cached) " >&6
10470else
10471 case $PKG_CONFIG in
10472 [\\/]* | ?:[\\/]*)
10473 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10474 ;;
10475 *)
10476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477for as_dir in $PATH
10478do
10479 IFS=$as_save_IFS
10480 test -z "$as_dir" && as_dir=.
10481 for ac_exec_ext in '' $ac_executable_extensions; do
10482 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10483 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485 break 2
10486 fi
10487done
10488 done
10489IFS=$as_save_IFS
10490
10491 ;;
10492esac
10493fi
10494PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10495if test -n "$PKG_CONFIG"; then
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10497$as_echo "$PKG_CONFIG" >&6; }
10498else
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
10501fi
10502
10503
10504fi
10505if test -z "$ac_cv_path_PKG_CONFIG"; then
10506 ac_pt_PKG_CONFIG=$PKG_CONFIG
10507 # Extract the first word of "pkg-config", so it can be a program name with args.
10508set dummy pkg-config; ac_word=$2
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10510$as_echo_n "checking for $ac_word... " >&6; }
10511if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10512 $as_echo_n "(cached) " >&6
10513else
10514 case $ac_pt_PKG_CONFIG in
10515 [\\/]* | ?:[\\/]*)
10516 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10517 ;;
10518 *)
10519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10520for as_dir in $PATH
10521do
10522 IFS=$as_save_IFS
10523 test -z "$as_dir" && as_dir=.
10524 for ac_exec_ext in '' $ac_executable_extensions; do
10525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10526 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10528 break 2
10529 fi
10530done
10531 done
10532IFS=$as_save_IFS
10533
10534 ;;
10535esac
10536fi
10537ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10538if test -n "$ac_pt_PKG_CONFIG"; then
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10540$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10541else
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10543$as_echo "no" >&6; }
10544fi
10545
10546 if test "x$ac_pt_PKG_CONFIG" = x; then
10547 PKG_CONFIG=""
10548 else
10549 case $cross_compiling:$ac_tool_warned in
10550yes:)
10551{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10552$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10553ac_tool_warned=yes ;;
10554esac
10555 PKG_CONFIG=$ac_pt_PKG_CONFIG
10556 fi
10557else
10558 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10559fi
10560
10561fi
10562if test -n "$PKG_CONFIG"; then
10563 _pkg_min_version=0.9.0
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10565$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10566 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10568$as_echo "yes" >&6; }
10569 else
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10571$as_echo "no" >&6; }
10572 PKG_CONFIG=""
10573 fi
10574fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010575
10576# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10578$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010579
10580# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010581if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010582 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010583else
10584 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010585fi
10586
10587
Matthias Kloseb9621712010-04-24 17:59:49 +000010588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10589$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010590
10591# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10593$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010594
10595# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010596if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010597 withval=$with_system_ffi;
10598fi
10599
10600
Zachary Waref40d4dd2016-09-17 01:25:24 -050010601if test "$ac_sys_system" = "Darwin"
10602then
10603 case "$with_system_ffi" in
10604 "")
10605 with_system_ffi="no"
10606 ;;
10607 yes|no)
10608 ;;
10609 *)
10610 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10611 ;;
10612 esac
10613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10614$as_echo "$with_system_ffi" >&6; }
10615else
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10617$as_echo "yes" >&6; }
10618 if test "$with_system_ffi" != ""
10619 then
10620 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10621$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10622 fi
10623 with_system_ffi="yes"
10624fi
Zachary Ware935043d2016-09-09 17:01:21 -070010625
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010626if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010627 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10628else
10629 LIBFFI_INCLUDEDIR=""
10630fi
10631
10632
Stefan Krah60187b52012-03-23 19:06:27 +010010633# Check for use of the system libmpdec library
10634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10635$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10636
10637# Check whether --with-system_libmpdec was given.
10638if test "${with_system_libmpdec+set}" = set; then :
10639 withval=$with_system_libmpdec;
10640else
10641 with_system_libmpdec="no"
10642fi
10643
10644
10645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10646$as_echo "$with_system_libmpdec" >&6; }
10647
Stefan Krah815280e2020-02-29 19:43:42 +010010648# Check whether _decimal should use a coroutine-local or thread-local context
10649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10650$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10651
10652# Check whether --with-decimal_contextvar was given.
10653if test "${with_decimal_contextvar+set}" = set; then :
10654 withval=$with_decimal_contextvar;
10655else
10656 with_decimal_contextvar="yes"
10657fi
10658
10659
10660if test "$with_decimal_contextvar" != "no"
10661then
10662
10663$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10664
10665fi
10666
10667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10668$as_echo "$with_decimal_contextvar" >&6; }
10669
Benjamin Peterson076ed002010-10-31 17:11:02 +000010670# Check for support for loadable sqlite extensions
10671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10672$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10673# Check whether --enable-loadable-sqlite-extensions was given.
10674if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10675 enableval=$enable_loadable_sqlite_extensions;
10676else
10677 enable_loadable_sqlite_extensions="no"
10678fi
10679
10680
10681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10682$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10683
Ned Deilyd819b932013-09-06 01:07:05 -070010684# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10685
10686
10687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10688$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10689
10690# Check whether --with-tcltk-includes was given.
10691if test "${with_tcltk_includes+set}" = set; then :
10692 withval=$with_tcltk_includes;
10693else
10694 with_tcltk_includes="default"
10695fi
10696
10697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10698$as_echo "$with_tcltk_includes" >&6; }
10699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10700$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10701
10702# Check whether --with-tcltk-libs was given.
10703if test "${with_tcltk_libs+set}" = set; then :
10704 withval=$with_tcltk_libs;
10705else
10706 with_tcltk_libs="default"
10707fi
10708
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10710$as_echo "$with_tcltk_libs" >&6; }
10711if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10712then
10713 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10714 then
10715 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10716 fi
Manolis Stamatogiannakisd2027942021-03-01 04:29:57 +010010717 if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
10718 TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
10719 TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
10720 else
10721 TCLTK_INCLUDES=""
10722 TCLTK_LIBS=""
10723 fi
Ned Deilyd819b932013-09-06 01:07:05 -070010724else
10725 TCLTK_INCLUDES="$with_tcltk_includes"
10726 TCLTK_LIBS="$with_tcltk_libs"
10727fi
10728
Matthias Klose55708cc2009-04-30 08:06:49 +000010729# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10731$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010732
10733# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010734if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010735 withval=$with_dbmliborder;
10736if test x$with_dbmliborder = xyes
10737then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010738as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010739else
10740 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10741 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10742 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010743 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010744 fi
10745 done
10746fi
10747fi
10748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10750$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010751
Martin v. Löwis11437992002-04-12 09:54:03 +000010752# Templates for things AC_DEFINEd more than once.
10753# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010754
10755
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010756if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010757then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010758 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010760
10761 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010762 if test "$ac_sys_system" = "SunOS"; then
10763 CFLAGS="$CFLAGS -D_REENTRANT"
10764 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010765elif test "$ac_cv_kpthread" = "yes"
10766then
10767 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010768 if test "$ac_cv_cxx_thread" = "yes"; then
10769 CXX="$CXX -Kpthread"
10770 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010771 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010772elif test "$ac_cv_kthread" = "yes"
10773then
10774 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010775 if test "$ac_cv_cxx_thread" = "yes"; then
10776 CXX="$CXX -Kthread"
10777 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010778 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010779elif test "$ac_cv_pthread" = "yes"
10780then
10781 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010782 if test "$ac_cv_cxx_thread" = "yes"; then
10783 CXX="$CXX -pthread"
10784 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010785 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010786else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010787 if test ! -z "$withval" -a -d "$withval"
10788 then LDFLAGS="$LDFLAGS -L$withval"
10789 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010790
10791 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010792 # define _POSIX_THREADS in unistd.h. Some apparently don't
10793 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10795$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010798
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010799#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010800#ifdef _POSIX_THREADS
10801yes
10802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010803
10804_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010807 unistd_defines_pthreads=yes
10808else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010809 unistd_defines_pthreads=no
10810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010811rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010812
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10814$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010817
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010818 # Just looking for pthread_create in libpthread is not enough:
10819 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10820 # So we really have to include pthread.h, and then link.
10821 _libs=$LIBS
10822 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10824$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010826/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010827
10828#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010829#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010830
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010831void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010832int
10833main ()
10834{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010835
10836pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 ;
10838 return 0;
10839}
10840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10844$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010845 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010846
Guido van Rossum02a1c402000-02-25 19:26:31 +000010847else
Martin v. Löwis11437992002-04-12 09:54:03 +000010848
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010849 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010851if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010852
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010853 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010854
Guido van Rossumad678af1998-10-02 14:42:15 +000010855else
Guido van Rossumad678af1998-10-02 14:42:15 +000010856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10858$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010859if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010861else
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010863LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010867/* Override any GCC internal prototype to avoid an error.
10868 Use char because int might match the return type of a GCC
10869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010870#ifdef __cplusplus
10871extern "C"
10872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010873char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010874int
10875main ()
10876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ;
10879 return 0;
10880}
10881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010884else
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010887rm -f core conftest.err conftest.$ac_objext \
10888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010889LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10892$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010893if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010894
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010895 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010896 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010897
Greg Steinadf63d62000-07-05 10:38:09 +000010898else
Greg Steinadf63d62000-07-05 10:38:09 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10901$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010902if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010904else
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010906LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010910/* Override any GCC internal prototype to avoid an error.
10911 Use char because int might match the return type of a GCC
10912 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010913#ifdef __cplusplus
10914extern "C"
10915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010916char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010917int
10918main ()
10919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 ;
10922 return 0;
10923}
10924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010925if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010926 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010927else
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010930rm -f core conftest.err conftest.$ac_objext \
10931 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010932LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10935$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010936if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010937
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010938 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010939 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010940
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010941else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10944$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010945if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010947else
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010949LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953/* Override any GCC internal prototype to avoid an error.
10954 Use char because int might match the return type of a GCC
10955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010956#ifdef __cplusplus
10957extern "C"
10958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010959char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 ;
10965 return 0;
10966}
10967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010970else
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010973rm -f core conftest.err conftest.$ac_objext \
10974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10978$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010979if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010980
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010981 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010982 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010983
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010984else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10987$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010988if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010990else
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010992LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996/* Override any GCC internal prototype to avoid an error.
10997 Use char because int might match the return type of a GCC
10998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010999#ifdef __cplusplus
11000extern "C"
11001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011002char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011003int
11004main ()
11005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ;
11008 return 0;
11009}
11010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011016rm -f core conftest.err conftest.$ac_objext \
11017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011018LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11021$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011022if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011023
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011024 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011025 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011026
Guido van Rossumb93a8621998-05-07 13:27:32 +000011027else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011028
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011029 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11030
Guido van Rossum2d38f911996-06-26 19:47:01 +000011031fi
11032
Guido van Rossum627b2d71993-12-24 10:39:16 +000011033
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011034fi
11035
Guido van Rossum0be3e491997-05-22 20:33:33 +000011036fi
11037
Guido van Rossum49545951997-12-02 19:28:29 +000011038fi
11039
Guido van Rossumb93a8621998-05-07 13:27:32 +000011040fi
11041
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011043rm -f core conftest.err conftest.$ac_objext \
11044 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11047$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011048if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011052LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056/* Override any GCC internal prototype to avoid an error.
11057 Use char because int might match the return type of a GCC
11058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011059#ifdef __cplusplus
11060extern "C"
11061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011062char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011063int
11064main ()
11065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 ;
11068 return 0;
11069}
11070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011073else
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011076rm -f core conftest.err conftest.$ac_objext \
11077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011078LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11081$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011082if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011083
Martin v. Löwis130fb172001-07-19 11:00:41 +000011084 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011085
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086fi
11087
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011088
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011089fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011090
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011091if test "$posix_threads" = "yes"; then
11092 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011093
Matthias Kloseb9621712010-04-24 17:59:49 +000011094$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011095
11096 fi
11097
11098 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11099 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011100 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011101$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011102
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011103 ;;
11104 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011105$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011106
11107 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011108 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011110
11111 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011112 esac
11113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11115$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011116 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011120 ac_cv_pthread_system_supported=no
11121else
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011123/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011124
11125 #include <stdio.h>
11126 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011127 void *foo(void *parm) {
11128 return NULL;
11129 }
11130 main() {
11131 pthread_attr_t attr;
11132 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011133 if (pthread_attr_init(&attr)) return (-1);
11134 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11135 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11136 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011137 }
11138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011139if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011140 ac_cv_pthread_system_supported=yes
11141else
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011146fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148
Guido van Rossum627b2d71993-12-24 10:39:16 +000011149fi
11150
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11152$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011153 if test "$ac_cv_pthread_system_supported" = "yes"; then
11154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011156
11157 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 for ac_func in pthread_sigmask
11159do :
11160 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011161if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011162 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011163#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011164_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011165 case $ac_sys_system in
11166 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011169
11170 ;;
11171 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011172fi
11173done
11174
pdoxe14679c2017-10-05 00:01:56 -070011175 for ac_func in pthread_getcpuclockid
11176do :
11177 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11178if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11179 cat >>confdefs.h <<_ACEOF
11180#define HAVE_PTHREAD_GETCPUCLOCKID 1
11181_ACEOF
11182
11183fi
11184done
11185
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011186fi
11187
11188
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011189# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011190
Matthias Kloseb9621712010-04-24 17:59:49 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11192$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011196 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011199 ipv6=no
11200 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11202$as_echo "yes" >&6; }
11203 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011204
11205 ipv6=yes
11206 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011208else
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011211/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212 /* AF_INET6 available check */
11213#include <sys/types.h>
11214#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011215int
11216main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011217{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011218int domain = AF_INET6;
11219 ;
11220 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011221}
Martin v. Löwis11437992002-04-12 09:54:03 +000011222_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011223if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011224
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11226$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011227 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011229else
Matthias Kloseb159a552010-04-25 21:00:44 +000011230
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011233 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011234
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011238if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11240$as_echo_n "checking if RFC2553 API is available... " >&6; }
11241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011243
11244 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011245#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011246int
11247main ()
11248{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011249struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011250 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 ;
11252 return 0;
11253}
Matthias Kloseb159a552010-04-25 21:00:44 +000011254
Martin v. Löwis11437992002-04-12 09:54:03 +000011255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011257
11258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011259$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011260 ipv6=yes
11261
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011262else
Matthias Kloseb159a552010-04-25 21:00:44 +000011263
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011266 ipv6=no
11267
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011270fi
11271
11272if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011274
11275fi
11276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277fi
11278
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011279
11280ipv6type=unknown
11281ipv6lib=none
11282ipv6trylibc=no
11283
11284if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11286$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011287 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11288 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011289 case $i in
11290 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011293
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011294#include <netinet/in.h>
11295#ifdef IPV6_INRIA_VERSION
11296yes
11297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011298_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011300 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011301 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011302fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011303rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304
11305 ;;
11306 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011309
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011310#include <netinet/in.h>
11311#ifdef __KAME__
11312yes
11313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011314_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317 ipv6type=$i;
11318 ipv6lib=inet6
11319 ipv6libdir=/usr/local/v6/lib
11320 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011321fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011322rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011323
11324 ;;
11325 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011328
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011329#include <features.h>
11330#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11331yes
11332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011333_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011336 ipv6type=$i;
11337 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011338fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011339rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011340
11341 ;;
11342 linux-inet6)
11343 if test -d /usr/inet6; then
11344 ipv6type=$i
11345 ipv6lib=inet6
11346 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011347 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011348 fi
11349 ;;
11350 solaris)
11351 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011352 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011353 ipv6type=$i
11354 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011355 fi
11356 fi
11357 ;;
11358 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011360/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011361
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362#include <sys/param.h>
11363#ifdef _TOSHIBA_INET6
11364yes
11365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011366_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011367if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369 ipv6type=$i;
11370 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011371 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011372fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011373rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011374
11375 ;;
11376 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011379
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011380#include </usr/local/v6/include/sys/v6config.h>
11381#ifdef __V6D__
11382yes
11383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011384_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011387 ipv6type=$i;
11388 ipv6lib=v6;
11389 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011390 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011391fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011392rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011393
11394 ;;
11395 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011398
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011399#include <sys/param.h>
11400#ifdef _ZETA_MINAMI_INET6
11401yes
11402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011403_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011405 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011406 ipv6type=$i;
11407 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011408 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011409fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011410rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011411
11412 ;;
11413 esac
11414 if test "$ipv6type" != "unknown"; then
11415 break
11416 fi
11417 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11419$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011420fi
11421
11422if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11423 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11424 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11425 echo "using lib$ipv6lib"
11426 else
11427 if test $ipv6trylibc = "yes"; then
11428 echo "using libc"
11429 else
11430 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11431 echo "You need to fetch lib$ipv6lib.a from appropriate"
11432 echo 'ipv6 kit and compile beforehand.'
11433 exit 1
11434 fi
11435 fi
11436fi
11437
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11439$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11441/* end confdefs.h. */
11442 /* CAN_RAW_FD_FRAMES available check */
11443#include <linux/can/raw.h>
11444int
11445main ()
11446{
11447int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11448 ;
11449 return 0;
11450}
11451_ACEOF
11452if ac_fn_c_try_compile "$LINENO"; then :
11453
11454
11455$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11456
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11458$as_echo "yes" >&6; }
11459
11460else
11461
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
11464
11465fi
11466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11467
Zackery Spytz97e0de02020-04-09 06:03:49 -060011468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11469$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471/* end confdefs.h. */
11472
11473#include <linux/can/raw.h>
11474int
11475main ()
11476{
11477int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11478 ;
11479 return 0;
11480}
11481_ACEOF
11482if ac_fn_c_try_compile "$LINENO"; then :
11483
11484
11485$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11486
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11488$as_echo "yes" >&6; }
11489
11490else
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
11494
11495fi
11496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11497
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011498# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11500$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011503if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504 withval=$with_doc_strings;
11505fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011506
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011507
11508if test -z "$with_doc_strings"
11509then with_doc_strings="yes"
11510fi
11511if test "$with_doc_strings" != "no"
11512then
11513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011515
11516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11518$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011519
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011520# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11522$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011525if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526 withval=$with_pymalloc;
11527fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011528
Neil Schemenauera35c6882001-02-27 04:45:05 +000011529
Neil Schemenauer16c22972002-03-22 15:34:49 +000011530if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011531then
11532 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011533fi
11534if test "$with_pymalloc" != "no"
11535then
Martin v. Löwis11437992002-04-12 09:54:03 +000011536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011538
11539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11541$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011542
Nick Coghlan6ea41862017-06-11 13:16:15 +100011543# Check for --with-c-locale-coercion
11544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11545$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11546
11547# Check whether --with-c-locale-coercion was given.
11548if test "${with_c_locale_coercion+set}" = set; then :
11549 withval=$with_c_locale_coercion;
11550fi
11551
11552
11553if test -z "$with_c_locale_coercion"
11554then
11555 with_c_locale_coercion="yes"
11556fi
11557if test "$with_c_locale_coercion" != "no"
11558then
11559
11560$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11561
11562fi
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11564$as_echo "$with_c_locale_coercion" >&6; }
11565
Benjamin Peterson05159c42009-12-03 03:01:27 +000011566# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11568$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011569
11570# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011571if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011572 withval=$with_valgrind;
11573else
11574 with_valgrind=no
11575fi
11576
Matthias Kloseb9621712010-04-24 17:59:49 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11578$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011579if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011580 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011581if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011584
11585else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011586 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011587
11588fi
11589
11590
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011591 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011592fi
11593
Łukasz Langaa785c872016-09-09 17:37:37 -070011594# Check for DTrace support
11595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11596$as_echo_n "checking for --with-dtrace... " >&6; }
11597
11598# Check whether --with-dtrace was given.
11599if test "${with_dtrace+set}" = set; then :
11600 withval=$with_dtrace;
11601else
11602 with_dtrace=no
11603fi
11604
11605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11606$as_echo "$with_dtrace" >&6; }
11607
11608
11609
11610
11611
11612DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011613DTRACE_HEADERS=
11614DTRACE_OBJS=
11615
11616if test "$with_dtrace" = "yes"
11617then
11618 # Extract the first word of "dtrace", so it can be a program name with args.
11619set dummy dtrace; ac_word=$2
11620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11621$as_echo_n "checking for $ac_word... " >&6; }
11622if ${ac_cv_path_DTRACE+:} false; then :
11623 $as_echo_n "(cached) " >&6
11624else
11625 case $DTRACE in
11626 [\\/]* | ?:[\\/]*)
11627 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11628 ;;
11629 *)
11630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11631for as_dir in $PATH
11632do
11633 IFS=$as_save_IFS
11634 test -z "$as_dir" && as_dir=.
11635 for ac_exec_ext in '' $ac_executable_extensions; do
11636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11637 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11639 break 2
11640 fi
11641done
11642 done
11643IFS=$as_save_IFS
11644
11645 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11646 ;;
11647esac
11648fi
11649DTRACE=$ac_cv_path_DTRACE
11650if test -n "$DTRACE"; then
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11652$as_echo "$DTRACE" >&6; }
11653else
11654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655$as_echo "no" >&6; }
11656fi
11657
11658
11659 if test "$DTRACE" = "not found"; then
11660 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11661 fi
11662
11663$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11664
11665 DTRACE_HEADERS="Include/pydtrace_probes.h"
11666
11667 # On OS X, DTrace providers do not need to be explicitly compiled and
11668 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11669 # generation flag '-G'. We check for presence of this flag, rather than
11670 # hardcoding support by OS, in the interest of robustness.
11671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11672$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11673if ${ac_cv_dtrace_link+:} false; then :
11674 $as_echo_n "(cached) " >&6
11675else
11676 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011677 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011678 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011679 ac_cv_dtrace_link=yes
11680
11681fi
11682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11683$as_echo "$ac_cv_dtrace_link" >&6; }
11684 if test "$ac_cv_dtrace_link" = "yes"; then
11685 DTRACE_OBJS="Python/pydtrace.o"
11686 fi
11687fi
11688
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011689# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011690
Guido van Rossum98935bf2001-09-05 19:13:16 +000011691DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011692
Guido van Rossume97ee181999-12-20 21:27:22 +000011693# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011694# platforms have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011695for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011696do :
11697 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011698if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011701_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011702
Guido van Rossume97ee181999-12-20 21:27:22 +000011703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011704done
Guido van Rossume97ee181999-12-20 21:27:22 +000011705
Michael W. Hudson54241132001-12-07 15:38:26 +000011706
Guido van Rossume97ee181999-12-20 21:27:22 +000011707# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11708# loading of modules.
11709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11711$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011712if test -z "$DYNLOADFILE"
11713then
11714 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011715 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011716 *)
11717 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11718 # out any dynamic loading
11719 if test "$ac_cv_func_dlopen" = yes
11720 then DYNLOADFILE="dynload_shlib.o"
11721 else DYNLOADFILE="dynload_stub.o"
11722 fi
11723 ;;
11724 esac
11725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11727$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011728if test "$DYNLOADFILE" != "dynload_stub.o"
11729then
Martin v. Löwis11437992002-04-12 09:54:03 +000011730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011732
11733fi
11734
Neil Schemenauer4e425612001-06-19 15:44:15 +000011735# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11736
Michael W. Hudson54241132001-12-07 15:38:26 +000011737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11739$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011740if test -z "$MACHDEP_OBJS"
11741then
Jack Jansene578a632001-08-15 01:27:14 +000011742 MACHDEP_OBJS=$extra_machdep_objs
11743else
11744 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011745fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011746if test -z "$MACHDEP_OBJS"; then
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11748$as_echo "none" >&6; }
11749else
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11751$as_echo "$MACHDEP_OBJS" >&6; }
11752fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011753
Guido van Rossum627b2d71993-12-24 10:39:16 +000011754# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011755for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Kyle Evans1800c602020-10-11 15:18:53 -050011756 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11757 explicit_memset faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011758 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011759 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011760 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011761 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011762 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011763 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011764 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011765 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011766 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011767 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011768 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011769 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011770 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011771 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011772 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011773 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11774 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011775 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Pablo Galindoa57b3d32020-11-17 00:00:38 +000011776 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011777 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Alexey Izbyshev976da902020-10-24 03:47:01 +030011778 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011779 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011780do :
11781 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11782ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011783if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011785#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011786_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011788fi
11789done
11790
Michael W. Hudson54241132001-12-07 15:38:26 +000011791
Benjamin Peterson40caa052018-09-12 15:52:40 -070011792# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11793# links. Some libc implementations have a stub lchmod implementation that always
11794# returns an error.
11795if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011796 for ac_func in lchmod
11797do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011798 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11799if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011800 cat >>confdefs.h <<_ACEOF
11801#define HAVE_LCHMOD 1
11802_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011803
11804fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011805done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011806
11807fi
11808
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011809ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11810 #include <dirent.h>
11811"
11812if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11813
11814$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11815
11816fi
11817
11818
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011819# For some functions, having a definition is not sufficient, since
11820# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11822$as_echo_n "checking for chroot... " >&6; }
11823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011824/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011825#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011826int
11827main ()
11828{
11829void *x=chroot
11830 ;
11831 return 0;
11832}
11833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011835
Matthias Kloseb9621712010-04-24 17:59:49 +000011836$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011837
Matthias Kloseb159a552010-04-25 21:00:44 +000011838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011840else
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11842$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011843
11844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11847$as_echo_n "checking for link... " >&6; }
11848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011849/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011850#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011851int
11852main ()
11853{
11854void *x=link
11855 ;
11856 return 0;
11857}
11858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011862
Matthias Kloseb159a552010-04-25 21:00:44 +000011863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011864$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11867$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011868
11869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11872$as_echo_n "checking for symlink... " >&6; }
11873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011874/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011875#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011876int
11877main ()
11878{
11879void *x=symlink
11880 ;
11881 return 0;
11882}
11883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011885
Matthias Kloseb9621712010-04-24 17:59:49 +000011886$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011887
Matthias Kloseb159a552010-04-25 21:00:44 +000011888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011889$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11892$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011893
11894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11897$as_echo_n "checking for fchdir... " >&6; }
11898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011899/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011900#include <unistd.h>
11901int
11902main ()
11903{
11904void *x=fchdir
11905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011912
Matthias Kloseb159a552010-04-25 21:00:44 +000011913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011915else
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11917$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011918
11919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11922$as_echo_n "checking for fsync... " >&6; }
11923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011924/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011925#include <unistd.h>
11926int
11927main ()
11928{
11929void *x=fsync
11930 ;
11931 return 0;
11932}
11933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011934if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011935
Matthias Kloseb9621712010-04-24 17:59:49 +000011936$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011937
Matthias Kloseb159a552010-04-25 21:00:44 +000011938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011939$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11942$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011943
11944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11947$as_echo_n "checking for fdatasync... " >&6; }
11948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011949/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011950#include <unistd.h>
11951int
11952main ()
11953{
11954void *x=fdatasync
11955 ;
11956 return 0;
11957}
11958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011959if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011962
Matthias Kloseb159a552010-04-25 21:00:44 +000011963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011964$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011965else
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011968
11969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11972$as_echo_n "checking for epoll... " >&6; }
11973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011974/* end confdefs.h. */
11975#include <sys/epoll.h>
11976int
11977main ()
11978{
11979void *x=epoll_create
11980 ;
11981 return 0;
11982}
11983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011987
Matthias Kloseb159a552010-04-25 21:00:44 +000011988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011989$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011993
11994fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11997$as_echo_n "checking for epoll_create1... " >&6; }
11998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11999/* end confdefs.h. */
12000#include <sys/epoll.h>
12001int
12002main ()
12003{
12004void *x=epoll_create1
12005 ;
12006 return 0;
12007}
12008_ACEOF
12009if ac_fn_c_try_compile "$LINENO"; then :
12010
12011$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
12012
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12014$as_echo "yes" >&6; }
12015else
12016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12017$as_echo "no" >&6; }
12018
12019fi
12020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12022$as_echo_n "checking for kqueue... " >&6; }
12023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012024/* end confdefs.h. */
12025
12026#include <sys/types.h>
12027#include <sys/event.h>
12028
12029int
12030main ()
12031{
12032int x=kqueue()
12033 ;
12034 return 0;
12035}
12036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012038
Matthias Kloseb9621712010-04-24 17:59:49 +000012039$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012040
Matthias Kloseb159a552010-04-25 21:00:44 +000012041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012042$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012043else
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12045$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012046
12047fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12050$as_echo_n "checking for prlimit... " >&6; }
12051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12052/* end confdefs.h. */
12053
12054#include <sys/time.h>
12055#include <sys/resource.h>
12056
12057int
12058main ()
12059{
12060void *x=prlimit
12061 ;
12062 return 0;
12063}
12064_ACEOF
12065if ac_fn_c_try_compile "$LINENO"; then :
12066
12067$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
12068
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12070$as_echo "yes" >&6; }
12071else
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12073$as_echo "no" >&6; }
12074
12075fi
12076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren41761932020-11-08 10:05:27 +010012077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12078$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
12079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080/* end confdefs.h. */
12081#include <mach-o/dyld.h>
12082int
12083main ()
12084{
12085void *x=_dyld_shared_cache_contains_path
12086 ;
12087 return 0;
12088}
12089_ACEOF
12090if ac_fn_c_try_compile "$LINENO"; then :
12091
12092$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
12093
12094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12095$as_echo "yes" >&6; }
12096else
12097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12098$as_echo "no" >&6; }
12099
12100fi
12101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012102
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12104$as_echo_n "checking for memfd_create... " >&6; }
12105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12106/* end confdefs.h. */
12107
12108#ifdef HAVE_SYS_MMAN_H
12109#include <sys/mman.h>
12110#endif
12111#ifdef HAVE_SYS_MEMFD_H
12112#include <sys/memfd.h>
12113#endif
12114
12115int
12116main ()
12117{
12118void *x=memfd_create
12119 ;
12120 return 0;
12121}
12122_ACEOF
12123if ac_fn_c_try_compile "$LINENO"; then :
12124
12125$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12126
12127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12128$as_echo "yes" >&6; }
12129else
12130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12131$as_echo "no" >&6; }
12132
12133fi
12134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12135
Christian Heimescd9fed62020-11-13 19:48:52 +010012136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12137$as_echo_n "checking for eventfd... " >&6; }
12138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12139/* end confdefs.h. */
12140
12141#ifdef HAVE_SYS_EVENTFD_H
12142#include <sys/eventfd.h>
12143#endif
12144
12145int
12146main ()
12147{
12148int x = eventfd(0, EFD_CLOEXEC)
12149 ;
12150 return 0;
12151}
12152_ACEOF
12153if ac_fn_c_try_compile "$LINENO"; then :
12154
12155$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
12156
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12158$as_echo "yes" >&6; }
12159else
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12161$as_echo "no" >&6; }
12162
12163fi
12164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12165
Martin v. Löwisd5843682002-11-21 20:41:28 +000012166# On some systems (eg. FreeBSD 5), we would find a definition of the
12167# functions ctermid_r, setgroups in the library, but no prototype
12168# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12169# address to avoid compiler warnings and potential miscompilations
12170# because of the missing prototypes.
12171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12173$as_echo_n "checking for ctermid_r... " >&6; }
12174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012176
Martin v. Löwisd5843682002-11-21 20:41:28 +000012177#include <stdio.h>
12178
Martin v. Löwisd5843682002-11-21 20:41:28 +000012179int
12180main ()
12181{
12182void* p = ctermid_r
12183 ;
12184 return 0;
12185}
12186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012188
Matthias Kloseb9621712010-04-24 17:59:49 +000012189$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012190
Matthias Kloseb159a552010-04-25 21:00:44 +000012191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012192$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12195$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012196
12197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12201$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012202if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012203 $as_echo_n "(cached) " >&6
12204else
12205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012206/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012207#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012208int
12209main ()
12210{
12211void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012212
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012213 ;
12214 return 0;
12215}
12216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012218 ac_cv_flock_decl=yes
12219else
12220 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012221
12222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012224
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012225fi
12226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12227$as_echo "$ac_cv_flock_decl" >&6; }
12228if test "x${ac_cv_flock_decl}" = xyes; then
12229 for ac_func in flock
12230do :
12231 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012233 cat >>confdefs.h <<_ACEOF
12234#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012235_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012236
Antoine Pitroua3000072010-09-07 14:52:42 +000012237else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012239$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012240if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012241 $as_echo_n "(cached) " >&6
12242else
12243 ac_check_lib_save_LIBS=$LIBS
12244LIBS="-lbsd $LIBS"
12245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246/* end confdefs.h. */
12247
12248/* Override any GCC internal prototype to avoid an error.
12249 Use char because int might match the return type of a GCC
12250 builtin and then its argument prototype would still apply. */
12251#ifdef __cplusplus
12252extern "C"
12253#endif
12254char flock ();
12255int
12256main ()
12257{
12258return flock ();
12259 ;
12260 return 0;
12261}
12262_ACEOF
12263if ac_fn_c_try_link "$LINENO"; then :
12264 ac_cv_lib_bsd_flock=yes
12265else
12266 ac_cv_lib_bsd_flock=no
12267fi
12268rm -f core conftest.err conftest.$ac_objext \
12269 conftest$ac_exeext conftest.$ac_ext
12270LIBS=$ac_check_lib_save_LIBS
12271fi
12272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12273$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012274if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012275 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012276
12277
12278$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12279
12280
12281fi
12282
12283
12284fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012285done
12286
Antoine Pitroua3000072010-09-07 14:52:42 +000012287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12290$as_echo_n "checking for getpagesize... " >&6; }
12291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012292/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012293
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012294#include <unistd.h>
12295
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012296int
12297main ()
12298{
12299void* p = getpagesize
12300 ;
12301 return 0;
12302}
12303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012305
Matthias Kloseb9621712010-04-24 17:59:49 +000012306$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012307
Matthias Kloseb159a552010-04-25 21:00:44 +000012308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012309$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12312$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012313
12314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012316
Victor Stinner984890f2011-11-24 13:53:38 +010012317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12318$as_echo_n "checking for broken unsetenv... " >&6; }
12319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12320/* end confdefs.h. */
12321
12322#include <stdlib.h>
12323
12324int
12325main ()
12326{
12327int res = unsetenv("DUMMY")
12328 ;
12329 return 0;
12330}
12331_ACEOF
12332if ac_fn_c_try_compile "$LINENO"; then :
12333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12334$as_echo "no" >&6; }
12335else
12336
12337$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12338
12339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12340$as_echo "yes" >&6; }
12341
12342fi
12343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12344
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012345for ac_prog in true
12346do
12347 # Extract the first word of "$ac_prog", so it can be a program name with args.
12348set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12350$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012351if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012353else
12354 if test -n "$TRUE"; then
12355 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12356else
12357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12358for as_dir in $PATH
12359do
12360 IFS=$as_save_IFS
12361 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012364 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012366 break 2
12367 fi
12368done
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012371
12372fi
12373fi
12374TRUE=$ac_cv_prog_TRUE
12375if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12377$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12380$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012381fi
12382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012384 test -n "$TRUE" && break
12385done
12386test -n "$TRUE" || TRUE="/bin/true"
12387
12388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12390$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012391if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012393else
12394 ac_check_lib_save_LIBS=$LIBS
12395LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012397/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399/* Override any GCC internal prototype to avoid an error.
12400 Use char because int might match the return type of a GCC
12401 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012402#ifdef __cplusplus
12403extern "C"
12404#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012405char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012406int
12407main ()
12408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012415 ac_cv_lib_c_inet_aton=yes
12416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012419rm -f core conftest.err conftest.$ac_objext \
12420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012421LIBS=$ac_check_lib_save_LIBS
12422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12424$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012425if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012426 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012427else
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12429$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012430if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012432else
12433 ac_check_lib_save_LIBS=$LIBS
12434LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438/* Override any GCC internal prototype to avoid an error.
12439 Use char because int might match the return type of a GCC
12440 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012441#ifdef __cplusplus
12442extern "C"
12443#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012444char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012445int
12446main ()
12447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012449 ;
12450 return 0;
12451}
12452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012454 ac_cv_lib_resolv_inet_aton=yes
12455else
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012458rm -f core conftest.err conftest.$ac_objext \
12459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012460LIBS=$ac_check_lib_save_LIBS
12461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12463$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012464if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012465 cat >>confdefs.h <<_ACEOF
12466#define HAVE_LIBRESOLV 1
12467_ACEOF
12468
12469 LIBS="-lresolv $LIBS"
12470
12471fi
12472
12473
12474fi
12475
12476
Christian Heimesd0764e22007-12-04 15:00:33 +000012477# On Tru64, chflags seems to be present, but calling it will
12478# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12480$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012481if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012483else
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012485 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012486else
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012488/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012489
Christian Heimesd0764e22007-12-04 15:00:33 +000012490#include <sys/stat.h>
12491#include <unistd.h>
12492int main(int argc, char*argv[])
12493{
12494 if(chflags(argv[0], 0) != 0)
12495 return 1;
12496 return 0;
12497}
Ned Deily3eb67d52011-06-28 00:00:28 -070012498
Christian Heimesd0764e22007-12-04 15:00:33 +000012499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012500if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012501 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012507fi
12508
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012509
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12512$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012513if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012515if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012516 ac_cv_have_chflags="yes"
12517else
12518 ac_cv_have_chflags="no"
12519fi
12520
12521fi
12522if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012523
Matthias Kloseb9621712010-04-24 17:59:49 +000012524$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012525
12526fi
12527
Matthias Kloseb9621712010-04-24 17:59:49 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12529$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012530if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012534 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012537/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012538
Christian Heimesd0764e22007-12-04 15:00:33 +000012539#include <sys/stat.h>
12540#include <unistd.h>
12541int main(int argc, char*argv[])
12542{
12543 if(lchflags(argv[0], 0) != 0)
12544 return 1;
12545 return 0;
12546}
Ned Deily3eb67d52011-06-28 00:00:28 -070012547
Christian Heimesd0764e22007-12-04 15:00:33 +000012548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012550 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012556fi
12557
12558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12561$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012562if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012564if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012565 ac_cv_have_lchflags="yes"
12566else
12567 ac_cv_have_lchflags="no"
12568fi
12569
12570fi
12571if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012574
12575fi
12576
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012577case $ac_sys_system/$ac_sys_release in
12578Darwin/*)
12579 _CUR_CFLAGS="${CFLAGS}"
12580 _CUR_LDFLAGS="${LDFLAGS}"
12581 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12582 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12583 ;;
12584esac
12585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12587$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012588if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012590else
12591 ac_check_lib_save_LIBS=$LIBS
12592LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012594/* end confdefs.h. */
12595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596/* Override any GCC internal prototype to avoid an error.
12597 Use char because int might match the return type of a GCC
12598 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012599#ifdef __cplusplus
12600extern "C"
12601#endif
12602char inflateCopy ();
12603int
12604main ()
12605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012607 ;
12608 return 0;
12609}
12610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012612 ac_cv_lib_z_inflateCopy=yes
12613else
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012616rm -f core conftest.err conftest.$ac_objext \
12617 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012618LIBS=$ac_check_lib_save_LIBS
12619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12621$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012622if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012625
12626fi
12627
12628
12629case $ac_sys_system/$ac_sys_release in
12630Darwin/*)
12631 CFLAGS="${_CUR_CFLAGS}"
12632 LDFLAGS="${_CUR_LDFLAGS}"
12633 ;;
12634esac
12635
Matthias Kloseb9621712010-04-24 17:59:49 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12637$as_echo_n "checking for hstrerror... " >&6; }
12638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012639/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012640
Martin v. Löwise9416172003-05-03 10:12:45 +000012641#include <netdb.h>
12642
Martin v. Löwise9416172003-05-03 10:12:45 +000012643int
12644main ()
12645{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012646void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012647 ;
12648 return 0;
12649}
12650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012651if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012652
Matthias Kloseb9621712010-04-24 17:59:49 +000012653$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012654
Matthias Kloseb159a552010-04-25 21:00:44 +000012655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012656$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12659$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012660
12661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662rm -f core conftest.err conftest.$ac_objext \
12663 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12666$as_echo_n "checking for inet_aton... " >&6; }
12667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012669
Martin v. Löwis86d66262006-02-17 08:40:11 +000012670#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012671#include <sys/socket.h>
12672#include <netinet/in.h>
12673#include <arpa/inet.h>
12674
Martin v. Löwise9416172003-05-03 10:12:45 +000012675int
12676main ()
12677{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012678void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012679 ;
12680 return 0;
12681}
12682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012684
Matthias Kloseb9621712010-04-24 17:59:49 +000012685$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012686
Matthias Kloseb159a552010-04-25 21:00:44 +000012687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012688$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12691$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012692
12693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012694rm -f core conftest.err conftest.$ac_objext \
12695 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12698$as_echo_n "checking for inet_pton... " >&6; }
12699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012700/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012701
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012702#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012703#include <sys/socket.h>
12704#include <netinet/in.h>
12705#include <arpa/inet.h>
12706
Martin v. Löwise9416172003-05-03 10:12:45 +000012707int
12708main ()
12709{
12710void* p = inet_pton
12711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012718
Matthias Kloseb159a552010-04-25 21:00:44 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012721else
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012724
12725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012727
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012728# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12730$as_echo_n "checking for setgroups... " >&6; }
12731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012732/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012733
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012734#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012735#ifdef HAVE_GRP_H
12736#include <grp.h>
12737#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012738
Martin v. Löwisd5843682002-11-21 20:41:28 +000012739int
12740main ()
12741{
12742void* p = setgroups
12743 ;
12744 return 0;
12745}
12746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012750
Matthias Kloseb159a552010-04-25 21:00:44 +000012751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012752$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012753else
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12755$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012756
12757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012759
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012760# check for openpty and forkpty
12761
12762for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012763do :
12764 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012765if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012767#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012768_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012769
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012770else
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12772$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012773if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012775else
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012777LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781/* Override any GCC internal prototype to avoid an error.
12782 Use char because int might match the return type of a GCC
12783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012784#ifdef __cplusplus
12785extern "C"
12786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012787char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ;
12793 return 0;
12794}
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801rm -f core conftest.err conftest.$ac_objext \
12802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012803LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12806$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012807if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012809 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12812$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012813if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012815else
12816 ac_check_lib_save_LIBS=$LIBS
12817LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012819/* end confdefs.h. */
12820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821/* Override any GCC internal prototype to avoid an error.
12822 Use char because int might match the return type of a GCC
12823 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012824#ifdef __cplusplus
12825extern "C"
12826#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012827char openpty ();
12828int
12829main ()
12830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012832 ;
12833 return 0;
12834}
12835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012837 ac_cv_lib_bsd_openpty=yes
12838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012841rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012843LIBS=$ac_check_lib_save_LIBS
12844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12846$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012847if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012849 LIBS="$LIBS -lbsd"
12850fi
12851
12852
12853fi
12854
Fred Drake8cef4cf2000-06-28 16:40:38 +000012855
12856fi
12857done
12858
12859for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012860do :
12861 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012862if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012864#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012865_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012866
Fred Drake8cef4cf2000-06-28 16:40:38 +000012867else
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12869$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012870if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012872else
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012874LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878/* Override any GCC internal prototype to avoid an error.
12879 Use char because int might match the return type of a GCC
12880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012881#ifdef __cplusplus
12882extern "C"
12883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012884char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012885int
12886main ()
12887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 ;
12890 return 0;
12891}
12892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012895else
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012898rm -f core conftest.err conftest.$ac_objext \
12899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012900LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12903$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012904if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012906 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12909$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012910if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012912else
12913 ac_check_lib_save_LIBS=$LIBS
12914LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012916/* end confdefs.h. */
12917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918/* Override any GCC internal prototype to avoid an error.
12919 Use char because int might match the return type of a GCC
12920 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012921#ifdef __cplusplus
12922extern "C"
12923#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012924char forkpty ();
12925int
12926main ()
12927{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012929 ;
12930 return 0;
12931}
12932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012934 ac_cv_lib_bsd_forkpty=yes
12935else
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012938rm -f core conftest.err conftest.$ac_objext \
12939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012940LIBS=$ac_check_lib_save_LIBS
12941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12943$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012944if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012946 LIBS="$LIBS -lbsd"
12947fi
12948
12949
12950fi
12951
Fred Drake8cef4cf2000-06-28 16:40:38 +000012952
12953fi
12954done
12955
Jack Jansendd19cf82001-12-06 22:36:17 +000012956
Michael W. Hudson54241132001-12-07 15:38:26 +000012957# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012958for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012959do :
12960 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12961ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012962if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012964#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012965_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012968done
12969
Michael W. Hudson54241132001-12-07 15:38:26 +000012970
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012971ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012972if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012973 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012974
Martin v. Löwis1142de32002-03-29 16:28:31 +000012975else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012977 *" dup2.$ac_objext "* ) ;;
12978 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012980esac
12981
Martin v. Löwis1142de32002-03-29 16:28:31 +000012982fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012983
Martin v. Löwis1142de32002-03-29 16:28:31 +000012984
12985for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012986do :
12987 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012988if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012995int
12996main ()
12997{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 ;
13000 return 0;
13001}
13002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013006
Guido van Rossum627b2d71993-12-24 10:39:16 +000013007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013009
Guido van Rossum627b2d71993-12-24 10:39:16 +000013010fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013011done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013012
Jack Jansen150753c2003-03-29 22:07:47 +000013013for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013014do :
13015 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020013016if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000013017 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013018#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000013019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013021/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013022#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013023int
13024main ()
13025{
13026setpgrp(0,0);
13027 ;
13028 return 0;
13029}
13030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013034
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013037
13038fi
13039done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013040
Michael W. Hudson54241132001-12-07 15:38:26 +000013041
Gregory P. Smith387512c2018-12-30 15:42:32 -080013042# We search for both crypt and crypt_r as one or the other may be defined
13043# This gets us our -lcrypt in LIBS when required on the target platform.
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13045$as_echo_n "checking for library containing crypt... " >&6; }
13046if ${ac_cv_search_crypt+:} false; then :
13047 $as_echo_n "(cached) " >&6
13048else
13049 ac_func_search_save_LIBS=$LIBS
13050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051/* end confdefs.h. */
13052
13053/* Override any GCC internal prototype to avoid an error.
13054 Use char because int might match the return type of a GCC
13055 builtin and then its argument prototype would still apply. */
13056#ifdef __cplusplus
13057extern "C"
13058#endif
13059char crypt ();
13060int
13061main ()
13062{
13063return crypt ();
13064 ;
13065 return 0;
13066}
13067_ACEOF
13068for ac_lib in '' crypt; do
13069 if test -z "$ac_lib"; then
13070 ac_res="none required"
13071 else
13072 ac_res=-l$ac_lib
13073 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13074 fi
13075 if ac_fn_c_try_link "$LINENO"; then :
13076 ac_cv_search_crypt=$ac_res
13077fi
13078rm -f core conftest.err conftest.$ac_objext \
13079 conftest$ac_exeext
13080 if ${ac_cv_search_crypt+:} false; then :
13081 break
13082fi
13083done
13084if ${ac_cv_search_crypt+:} false; then :
13085
13086else
13087 ac_cv_search_crypt=no
13088fi
13089rm conftest.$ac_ext
13090LIBS=$ac_func_search_save_LIBS
13091fi
13092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13093$as_echo "$ac_cv_search_crypt" >&6; }
13094ac_res=$ac_cv_search_crypt
13095if test "$ac_res" != no; then :
13096 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13097
13098fi
13099
13100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13101$as_echo_n "checking for library containing crypt_r... " >&6; }
13102if ${ac_cv_search_crypt_r+:} false; then :
13103 $as_echo_n "(cached) " >&6
13104else
13105 ac_func_search_save_LIBS=$LIBS
13106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107/* end confdefs.h. */
13108
13109/* Override any GCC internal prototype to avoid an error.
13110 Use char because int might match the return type of a GCC
13111 builtin and then its argument prototype would still apply. */
13112#ifdef __cplusplus
13113extern "C"
13114#endif
13115char crypt_r ();
13116int
13117main ()
13118{
13119return crypt_r ();
13120 ;
13121 return 0;
13122}
13123_ACEOF
13124for ac_lib in '' crypt; do
13125 if test -z "$ac_lib"; then
13126 ac_res="none required"
13127 else
13128 ac_res=-l$ac_lib
13129 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13130 fi
13131 if ac_fn_c_try_link "$LINENO"; then :
13132 ac_cv_search_crypt_r=$ac_res
13133fi
13134rm -f core conftest.err conftest.$ac_objext \
13135 conftest$ac_exeext
13136 if ${ac_cv_search_crypt_r+:} false; then :
13137 break
13138fi
13139done
13140if ${ac_cv_search_crypt_r+:} false; then :
13141
13142else
13143 ac_cv_search_crypt_r=no
13144fi
13145rm conftest.$ac_ext
13146LIBS=$ac_func_search_save_LIBS
13147fi
13148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13149$as_echo "$ac_cv_search_crypt_r" >&6; }
13150ac_res=$ac_cv_search_crypt_r
13151if test "$ac_res" != no; then :
13152 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13153
13154fi
13155
13156
13157ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13158if test "x$ac_cv_func_crypt_r" = xyes; then :
13159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160/* end confdefs.h. */
13161
13162#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13163#include <crypt.h>
13164
13165int
13166main ()
13167{
13168
13169struct crypt_data d;
13170char *r = crypt_r("", "", &d);
13171
13172 ;
13173 return 0;
13174}
13175_ACEOF
13176if ac_fn_c_try_compile "$LINENO"; then :
13177
13178$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13179
13180fi
13181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13182
13183fi
13184
13185
Victor Stinnere0be4232011-10-25 13:06:09 +020013186for ac_func in clock_gettime
13187do :
13188 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13189if test "x$ac_cv_func_clock_gettime" = xyes; then :
13190 cat >>confdefs.h <<_ACEOF
13191#define HAVE_CLOCK_GETTIME 1
13192_ACEOF
13193
13194else
13195
13196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13197$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13198if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13199 $as_echo_n "(cached) " >&6
13200else
13201 ac_check_lib_save_LIBS=$LIBS
13202LIBS="-lrt $LIBS"
13203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13204/* end confdefs.h. */
13205
13206/* Override any GCC internal prototype to avoid an error.
13207 Use char because int might match the return type of a GCC
13208 builtin and then its argument prototype would still apply. */
13209#ifdef __cplusplus
13210extern "C"
13211#endif
13212char clock_gettime ();
13213int
13214main ()
13215{
13216return clock_gettime ();
13217 ;
13218 return 0;
13219}
13220_ACEOF
13221if ac_fn_c_try_link "$LINENO"; then :
13222 ac_cv_lib_rt_clock_gettime=yes
13223else
13224 ac_cv_lib_rt_clock_gettime=no
13225fi
13226rm -f core conftest.err conftest.$ac_objext \
13227 conftest$ac_exeext conftest.$ac_ext
13228LIBS=$ac_check_lib_save_LIBS
13229fi
13230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13231$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13232if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13233
Victor Stinner7efb8332014-08-29 15:41:08 +020013234 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013235 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13236
13237
13238$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13239
13240
13241fi
13242
13243
13244fi
13245done
13246
13247
13248for ac_func in clock_getres
13249do :
13250 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13251if test "x$ac_cv_func_clock_getres" = xyes; then :
13252 cat >>confdefs.h <<_ACEOF
13253#define HAVE_CLOCK_GETRES 1
13254_ACEOF
13255
13256else
13257
13258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13259$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13260if ${ac_cv_lib_rt_clock_getres+:} false; then :
13261 $as_echo_n "(cached) " >&6
13262else
13263 ac_check_lib_save_LIBS=$LIBS
13264LIBS="-lrt $LIBS"
13265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13266/* end confdefs.h. */
13267
13268/* Override any GCC internal prototype to avoid an error.
13269 Use char because int might match the return type of a GCC
13270 builtin and then its argument prototype would still apply. */
13271#ifdef __cplusplus
13272extern "C"
13273#endif
13274char clock_getres ();
13275int
13276main ()
13277{
13278return clock_getres ();
13279 ;
13280 return 0;
13281}
13282_ACEOF
13283if ac_fn_c_try_link "$LINENO"; then :
13284 ac_cv_lib_rt_clock_getres=yes
13285else
13286 ac_cv_lib_rt_clock_getres=no
13287fi
13288rm -f core conftest.err conftest.$ac_objext \
13289 conftest$ac_exeext conftest.$ac_ext
13290LIBS=$ac_check_lib_save_LIBS
13291fi
13292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13293$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13294if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13295
13296 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13297
13298
13299fi
13300
13301
13302fi
13303done
13304
13305
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013306for ac_func in clock_settime
13307do :
13308 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13309if test "x$ac_cv_func_clock_settime" = xyes; then :
13310 cat >>confdefs.h <<_ACEOF
13311#define HAVE_CLOCK_SETTIME 1
13312_ACEOF
13313
13314else
13315
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13317$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13318if ${ac_cv_lib_rt_clock_settime+:} false; then :
13319 $as_echo_n "(cached) " >&6
13320else
13321 ac_check_lib_save_LIBS=$LIBS
13322LIBS="-lrt $LIBS"
13323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324/* end confdefs.h. */
13325
13326/* Override any GCC internal prototype to avoid an error.
13327 Use char because int might match the return type of a GCC
13328 builtin and then its argument prototype would still apply. */
13329#ifdef __cplusplus
13330extern "C"
13331#endif
13332char clock_settime ();
13333int
13334main ()
13335{
13336return clock_settime ();
13337 ;
13338 return 0;
13339}
13340_ACEOF
13341if ac_fn_c_try_link "$LINENO"; then :
13342 ac_cv_lib_rt_clock_settime=yes
13343else
13344 ac_cv_lib_rt_clock_settime=no
13345fi
13346rm -f core conftest.err conftest.$ac_objext \
13347 conftest$ac_exeext conftest.$ac_ext
13348LIBS=$ac_check_lib_save_LIBS
13349fi
13350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13351$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13352if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13353
13354 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13355
13356
13357fi
13358
13359
13360fi
13361done
13362
13363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13365$as_echo_n "checking for major... " >&6; }
13366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013367/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013368
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013369#if defined(MAJOR_IN_MKDEV)
13370#include <sys/mkdev.h>
13371#elif defined(MAJOR_IN_SYSMACROS)
13372#include <sys/sysmacros.h>
13373#else
13374#include <sys/types.h>
13375#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013376
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013377int
13378main ()
13379{
13380
13381 makedev(major(0),minor(0));
13382
13383 ;
13384 return 0;
13385}
13386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013388
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13393$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013394
13395else
Skip Montanaro6dead952003-09-25 14:50:04 +000013396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13398$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013399
13400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013401rm -f core conftest.err conftest.$ac_objext \
13402 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013403
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013404# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013405# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13407$as_echo_n "checking for getaddrinfo... " >&6; }
13408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013409/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013410
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013411#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013412#include <sys/socket.h>
13413#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013414#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416int
13417main ()
13418{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013419getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ;
13421 return 0;
13422}
13423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013424if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013425 have_getaddrinfo=yes
13426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013429rm -f core conftest.err conftest.$ac_objext \
13430 conftest$ac_exeext conftest.$ac_ext
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13432$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013433if test $have_getaddrinfo = yes
13434then
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13436$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013437 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013441
13442if test "${enable_ipv6+set}" = set; then
13443 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13444else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013445 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013446fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013449/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013450
Stefan Krah19c21392012-11-22 23:47:32 +010013451#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013452#include <sys/types.h>
13453#include <netdb.h>
13454#include <string.h>
13455#include <sys/socket.h>
13456#include <netinet/in.h>
13457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013458int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013459{
13460 int passive, gaierr, inet4 = 0, inet6 = 0;
13461 struct addrinfo hints, *ai, *aitop;
13462 char straddr[INET6_ADDRSTRLEN], strport[16];
13463
13464 for (passive = 0; passive <= 1; passive++) {
13465 memset(&hints, 0, sizeof(hints));
13466 hints.ai_family = AF_UNSPEC;
13467 hints.ai_flags = passive ? AI_PASSIVE : 0;
13468 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013469 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013470 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13471 (void)gai_strerror(gaierr);
13472 goto bad;
13473 }
13474 for (ai = aitop; ai; ai = ai->ai_next) {
13475 if (ai->ai_addr == NULL ||
13476 ai->ai_addrlen == 0 ||
13477 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13478 straddr, sizeof(straddr), strport, sizeof(strport),
13479 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13480 goto bad;
13481 }
13482 switch (ai->ai_family) {
13483 case AF_INET:
13484 if (strcmp(strport, "54321") != 0) {
13485 goto bad;
13486 }
13487 if (passive) {
13488 if (strcmp(straddr, "0.0.0.0") != 0) {
13489 goto bad;
13490 }
13491 } else {
13492 if (strcmp(straddr, "127.0.0.1") != 0) {
13493 goto bad;
13494 }
13495 }
13496 inet4++;
13497 break;
13498 case AF_INET6:
13499 if (strcmp(strport, "54321") != 0) {
13500 goto bad;
13501 }
13502 if (passive) {
13503 if (strcmp(straddr, "::") != 0) {
13504 goto bad;
13505 }
13506 } else {
13507 if (strcmp(straddr, "::1") != 0) {
13508 goto bad;
13509 }
13510 }
13511 inet6++;
13512 break;
13513 case AF_UNSPEC:
13514 goto bad;
13515 break;
13516 default:
13517 /* another family support? */
13518 break;
13519 }
13520 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013521 freeaddrinfo(aitop);
13522 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013523 }
13524
13525 if (!(inet4 == 0 || inet4 == 2))
13526 goto bad;
13527 if (!(inet6 == 0 || inet6 == 2))
13528 goto bad;
13529
13530 if (aitop)
13531 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013532 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013533
13534 bad:
13535 if (aitop)
13536 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013537 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013538}
13539
Martin v. Löwis11437992002-04-12 09:54:03 +000013540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013542 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013550fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013551
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13555$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13556
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013557if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013558then
13559 if test $ipv6 = yes
13560 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013561 echo 'Fatal: You must get working getaddrinfo() function.'
13562 echo ' or you can specify "--disable-ipv6"'.
13563 exit 1
13564 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013565else
Martin v. Löwis11437992002-04-12 09:54:03 +000013566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013568
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013569fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013570
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013571for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013572do :
13573 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013574if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013576#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013577_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013578
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013579fi
13580done
13581
Michael W. Hudson54241132001-12-07 15:38:26 +000013582
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13585$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013586if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013590/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591#include <sys/types.h>
13592#include <sys/time.h>
13593#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013594
Martin v. Löwis11437992002-04-12 09:54:03 +000013595int
13596main ()
13597{
13598if ((struct tm *) 0)
13599return 0;
13600 ;
13601 return 0;
13602}
13603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013605 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13612$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013613if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013616
13617fi
13618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13620$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013621if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013625/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013626#include <sys/types.h>
13627#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629int
13630main ()
13631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013632struct tm tm;
13633 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 ;
13636 return 0;
13637}
13638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013639if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640 ac_cv_struct_tm=time.h
13641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13647$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013648if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651
13652fi
13653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654ac_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 +000013655#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657"
Victor Stinnere0be4232011-10-25 13:06:09 +020013658if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
13660cat >>confdefs.h <<_ACEOF
13661#define HAVE_STRUCT_TM_TM_ZONE 1
13662_ACEOF
13663
13664
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013665fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013666
Martin v. Löwis11437992002-04-12 09:54:03 +000013667if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013670
13671else
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13673"
Victor Stinnere0be4232011-10-25 13:06:09 +020013674if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013678fi
13679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013680cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013681#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013682_ACEOF
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13685$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013686if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013688else
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013690/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013691#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692#if !HAVE_DECL_TZNAME
13693extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013695
Martin v. Löwis11437992002-04-12 09:54:03 +000013696int
13697main ()
13698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 ;
13701 return 0;
13702}
13703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013705 ac_cv_var_tzname=yes
13706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013709rm -f core conftest.err conftest.$ac_objext \
13710 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13713$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013714 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718 fi
13719fi
13720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013722if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013723
13724cat >>confdefs.h <<_ACEOF
13725#define HAVE_STRUCT_STAT_ST_RDEV 1
13726_ACEOF
13727
13728
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013729fi
13730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013732if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734cat >>confdefs.h <<_ACEOF
13735#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13736_ACEOF
13737
13738
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013739fi
13740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013742if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013743
13744cat >>confdefs.h <<_ACEOF
13745#define HAVE_STRUCT_STAT_ST_FLAGS 1
13746_ACEOF
13747
13748
13749fi
13750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013752if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013753
13754cat >>confdefs.h <<_ACEOF
13755#define HAVE_STRUCT_STAT_ST_GEN 1
13756_ACEOF
13757
13758
13759fi
13760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013762if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013763
13764cat >>confdefs.h <<_ACEOF
13765#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13766_ACEOF
13767
13768
13769fi
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013772if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013773
Martin v. Löwis11437992002-04-12 09:54:03 +000013774cat >>confdefs.h <<_ACEOF
13775#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13776_ACEOF
13777
13778
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013779fi
13780
Stefan Krah267b6392016-04-26 01:09:18 +020013781ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13782 #include <sys/types.h>
13783 #include <pwd.h>
13784
13785"
13786if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13787
13788cat >>confdefs.h <<_ACEOF
13789#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13790_ACEOF
13791
13792
13793fi
13794ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13795 #include <sys/types.h>
13796 #include <pwd.h>
13797
13798"
13799if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13800
13801cat >>confdefs.h <<_ACEOF
13802#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13803_ACEOF
13804
13805
13806fi
13807
Zachary Ware6a6967e2016-10-01 00:47:27 -050013808# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13809ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13810"
13811if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13812
13813cat >>confdefs.h <<_ACEOF
13814#define HAVE_SIGINFO_T_SI_BAND 1
13815_ACEOF
13816
13817
13818fi
13819
Michael W. Hudson54241132001-12-07 15:38:26 +000013820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13822$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013823if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013825else
Matthias Kloseb159a552010-04-25 21:00:44 +000013826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013828/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013833return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839 ac_cv_header_time_altzone=yes
13840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845fi
13846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13848$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013850
Matthias Kloseb9621712010-04-24 17:59:49 +000013851$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852
13853fi
13854
Guido van Rossumda88dad1995-01-26 00:46:29 +000013855was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13857$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013859/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013860
13861#include <sys/types.h>
13862#include <sys/select.h>
13863#include <sys/time.h>
13864
Martin v. Löwis11437992002-04-12 09:54:03 +000013865int
13866main ()
13867{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868;
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 ;
13870 return 0;
13871}
13872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
13875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013878 was_it_defined=yes
13879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13883$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13886$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013887if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013889else
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013891/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013892#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013893int
13894main ()
13895{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013896struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 ;
13898 return 0;
13899}
13900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013902 ac_cv_struct_addrinfo=yes
13903else
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13907fi
13908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13910$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013911if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013912
Matthias Kloseb9621712010-04-24 17:59:49 +000013913$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013914
13915fi
13916
Matthias Kloseb9621712010-04-24 17:59:49 +000013917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13918$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013919if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013921else
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013923/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924
13925# include <sys/types.h>
13926# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013927int
13928main ()
13929{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013930struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;
13932 return 0;
13933}
13934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013936 ac_cv_struct_sockaddr_storage=yes
13937else
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13941fi
13942
Matthias Kloseb9621712010-04-24 17:59:49 +000013943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13944$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013945if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013948
13949fi
13950
Christian Heimesdffa3942016-09-05 23:54:41 +020013951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13952$as_echo_n "checking for sockaddr_alg... " >&6; }
13953if ${ac_cv_struct_sockaddr_alg+:} false; then :
13954 $as_echo_n "(cached) " >&6
13955else
13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13957/* end confdefs.h. */
13958
13959# include <sys/types.h>
13960# include <sys/socket.h>
13961# include <linux/if_alg.h>
13962int
13963main ()
13964{
13965struct sockaddr_alg s
13966 ;
13967 return 0;
13968}
13969_ACEOF
13970if ac_fn_c_try_compile "$LINENO"; then :
13971 ac_cv_struct_sockaddr_alg=yes
13972else
13973 ac_cv_struct_sockaddr_alg=no
13974fi
13975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13976fi
13977
13978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13979$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13980if test $ac_cv_struct_sockaddr_alg = yes; then
13981
13982$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13983
13984fi
13985
Guido van Rossum627b2d71993-12-24 10:39:16 +000013986# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13989$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013990if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013992else
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013995$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013996int
13997main ()
13998{
13999static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014000test_array [0] = 0;
14001return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
14003 ;
14004 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014005}
Martin v. Löwis11437992002-04-12 09:54:03 +000014006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014007if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014008 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014009else
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14015$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018
14019fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014020
Matthias Kloseb9621712010-04-24 17:59:49 +000014021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14022$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014023if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014025else
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014027/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014028
Martin v. Löwis11437992002-04-12 09:54:03 +000014029int
14030main ()
14031{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014032
Martin v. Löwis11437992002-04-12 09:54:03 +000014033#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014034 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014036 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014037 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014038 char const *const *pcpcc;
14039 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 /* NEC SVR4.0.2 mips cc rejects this. */
14041 struct point {int x, y;};
14042 static struct point const zero = {0,0};
14043 /* AIX XL C 1.02.0.0 rejects this.
14044 It does not let you subtract one const X* pointer from another in
14045 an arm of an if-expression whose if-part is not a constant
14046 expression */
14047 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014048 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050 ++pcpcc;
14051 ppc = (char**) pcpcc;
14052 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014053 { /* SCO 3.2v4 cc rejects this sort of thing. */
14054 char tx;
14055 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 }
14061 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14062 int x[] = {25, 17};
14063 const int *foo = &x[0];
14064 ++foo;
14065 }
14066 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14067 typedef const int *iptr;
14068 iptr p = 0;
14069 ++p;
14070 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014071 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014073 struct s { int j; const int *ap[3]; } bx;
14074 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 }
14076 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14077 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014081#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014082
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 ;
14084 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014085}
Martin v. Löwis11437992002-04-12 09:54:03 +000014086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014087if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088 ac_cv_c_const=yes
14089else
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14095$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014096if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014097
Matthias Kloseb9621712010-04-24 17:59:49 +000014098$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014099
14100fi
14101
Michael W. Hudson54241132001-12-07 15:38:26 +000014102
Guido van Rossumda88dad1995-01-26 00:46:29 +000014103works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14105$as_echo_n "checking for working signed char... " >&6; }
14106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014107/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014108
Martin v. Löwis11437992002-04-12 09:54:03 +000014109int
14110main ()
14111{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 ;
14114 return 0;
14115}
14116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014117if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014118 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014119else
Skip Montanaro6dead952003-09-25 14:50:04 +000014120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014122
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014123
Guido van Rossum7f43da71994-08-01 12:15:30 +000014124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14127$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014128
Guido van Rossumda88dad1995-01-26 00:46:29 +000014129have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14131$as_echo_n "checking for prototypes... " >&6; }
14132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014133/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014134int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014135int
14136main ()
14137{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014138return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 ;
14140 return 0;
14141}
14142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014144
Matthias Kloseb9621712010-04-24 17:59:49 +000014145$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
Matthias Kloseb159a552010-04-25 21:00:44 +000014147 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14151$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014152
Guido van Rossumda88dad1995-01-26 00:46:29 +000014153works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14155$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014157/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014158
14159#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014160int foo(int x, ...) {
14161 va_list va;
14162 va_start(va, x);
14163 va_arg(va, int);
14164 va_arg(va, char *);
14165 va_arg(va, double);
14166 return 0;
14167}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169int
14170main ()
14171{
Guido van Rossum90eea071996-08-30 20:58:57 +000014172return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 ;
14174 return 0;
14175}
14176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014178
14179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014182 works=yes
14183
Guido van Rossum627b2d71993-12-24 10:39:16 +000014184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14187$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014188
Martin v. Löwisd6320502004-08-12 13:45:08 +000014189# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14191$as_echo_n "checking for socketpair... " >&6; }
14192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014193/* end confdefs.h. */
14194
14195#include <sys/types.h>
14196#include <sys/socket.h>
14197
14198int
14199main ()
14200{
14201void *x=socketpair
14202 ;
14203 return 0;
14204}
14205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014207
Matthias Kloseb9621712010-04-24 17:59:49 +000014208$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014209
Matthias Kloseb159a552010-04-25 21:00:44 +000014210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014211$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14214$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014215
14216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014218
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014219# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14221$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014223/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014224#include <sys/types.h>
14225#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014226int
14227main ()
14228{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014229struct sockaddr x;
14230x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 ;
14232 return 0;
14233}
14234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014235if ac_fn_c_try_compile "$LINENO"; then :
14236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14237$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014240
14241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14243$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014244
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014247
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014248# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
14250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014252if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14257$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014258 OLD_CFLAGS=$CFLAGS
14259 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014261/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014262
14263# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014264
Martin v. Löwis11437992002-04-12 09:54:03 +000014265int
14266main ()
14267{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014268
14269 char *name;
14270 struct hostent *he, *res;
14271 char buffer[2048];
14272 int buflen = 2048;
14273 int h_errnop;
14274
14275 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
14277 ;
14278 return 0;
14279}
14280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014284
Martin v. Löwis11437992002-04-12 09:54:03 +000014285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14289$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014291else
Skip Montanaro6dead952003-09-25 14:50:04 +000014292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14294$as_echo "no" >&6; }
14295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14296$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014298/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014299
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014300# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Martin v. Löwis11437992002-04-12 09:54:03 +000014302int
14303main ()
14304{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014305
14306 char *name;
14307 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014308 char buffer[2048];
14309 int buflen = 2048;
14310 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014311
Matthias Kloseb159a552010-04-25 21:00:44 +000014312 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014313
14314 ;
14315 return 0;
14316}
14317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014321
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Matthias Kloseb159a552010-04-25 21:00:44 +000014323$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14326$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014327
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014328else
Skip Montanaro6dead952003-09-25 14:50:04 +000014329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14331$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14333$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14335/* end confdefs.h. */
14336
14337# include <netdb.h>
14338
14339int
14340main ()
14341{
14342
14343 char *name;
14344 struct hostent *he;
14345 struct hostent_data data;
14346
14347 (void) gethostbyname_r(name, he, &data);
14348
14349 ;
14350 return 0;
14351}
14352_ACEOF
14353if ac_fn_c_try_compile "$LINENO"; then :
14354
14355 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14356
14357
14358$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14359
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14361$as_echo "yes" >&6; }
14362
14363else
14364
14365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014376 CFLAGS=$OLD_CFLAGS
14377
14378else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014379
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 for ac_func in gethostbyname
14381do :
14382 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014383if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014385#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014386_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014387
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014388fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014389done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014390
Michael W. Hudson54241132001-12-07 15:38:26 +000014391
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014392fi
14393
Michael W. Hudson54241132001-12-07 15:38:26 +000014394
14395
14396
14397
14398
14399
Guido van Rossum627b2d71993-12-24 10:39:16 +000014400# checks for system services
14401# (none yet)
14402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014403# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014404ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014405if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014406
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14409$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014410if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014412else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014414LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418/* Override any GCC internal prototype to avoid an error.
14419 Use char because int might match the return type of a GCC
14420 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014421#ifdef __cplusplus
14422extern "C"
14423#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014424char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014425int
14426main ()
14427{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 ;
14430 return 0;
14431}
14432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014433if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014435else
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014438rm -f core conftest.err conftest.$ac_objext \
14439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014440LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14443$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014444if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 cat >>confdefs.h <<_ACEOF
14446#define HAVE_LIBIEEE 1
14447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014448
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014449 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014450
Guido van Rossum627b2d71993-12-24 10:39:16 +000014451fi
14452
Michael W. Hudson54241132001-12-07 15:38:26 +000014453
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014454fi
14455
Michael W. Hudson54241132001-12-07 15:38:26 +000014456
Guido van Rossum7f43da71994-08-01 12:15:30 +000014457# check for --with-libm=...
14458
Guido van Rossum563e7081996-09-10 18:20:48 +000014459case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014460Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014461*) LIBM=-lm
14462esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14464$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014467if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014469if test "$withval" = no
14470then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14472$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014473elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014474then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14476$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014477else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014478fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014479else
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14481$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482fi
14483
Guido van Rossum7f43da71994-08-01 12:15:30 +000014484
14485# check for --with-libc=...
14486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14488$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014491if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014493if test "$withval" = no
14494then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14496$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014497elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014498then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14500$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014501else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014502fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014503else
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14505$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506fi
14507
Guido van Rossum7f43da71994-08-01 12:15:30 +000014508
Stefan Krah1919b7e2012-03-21 18:25:23 +010014509# **************************************
14510# * Check for gcc x64 inline assembler *
14511# **************************************
14512
14513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14514$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516/* end confdefs.h. */
14517
14518int
14519main ()
14520{
14521
14522 __asm__ __volatile__ ("movq %rcx, %rax");
14523
14524 ;
14525 return 0;
14526}
14527_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014528if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014529 have_gcc_asm_for_x64=yes
14530else
14531 have_gcc_asm_for_x64=no
14532fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014533rm -f core conftest.err conftest.$ac_objext \
14534 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14536$as_echo "$have_gcc_asm_for_x64" >&6; }
14537if test "$have_gcc_asm_for_x64" = yes
14538then
14539
14540$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14541
14542fi
14543
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014544# **************************************************
14545# * Check for various properties of floating point *
14546# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014547
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14549$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14550if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014552else
14553
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014554
14555ax_cv_c_float_words_bigendian=unknown
14556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014557/* end confdefs.h. */
14558
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014559
14560double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14561
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014562
14563_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014564if ac_fn_c_try_compile "$LINENO"; then :
14565
14566
Arnon Yaari5dd83602020-04-01 18:19:09 +030014567if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014568 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014569fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014570if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014571 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14572 ax_cv_c_float_words_bigendian=no
14573 else
14574 ax_cv_c_float_words_bigendian=unknown
14575 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014576fi
14577
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014578
14579fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014581fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14583$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014584
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014585case $ax_cv_c_float_words_bigendian in
14586 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014587
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014588$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14589 ;;
14590 no)
14591 ;;
14592 *)
14593 as_fn_error $? "
14594
14595Unknown float word ordering. You need to manually preset
14596ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14597
14598 " "$LINENO" 5 ;;
14599esac
14600
14601
14602if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014603then
14604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014606
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014607elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014608then
14609
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014610$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14611
14612else
14613 # Some ARM platforms use a mixed-endian representation for doubles.
14614 # While Python doesn't currently have full support for these platforms
14615 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14616 # conversions work.
14617 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14618 # or little, then it must be this?
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014621
14622fi
14623
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014624# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014625# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014626# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014627# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014628# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014629# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014630
14631# This inline assembler syntax may also work for suncc and icc,
14632# so we try it on all platforms.
14633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14635$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014637/* end confdefs.h. */
14638
14639int
14640main ()
14641{
14642
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014643 unsigned short cw;
14644 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14645 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014646
14647 ;
14648 return 0;
14649}
14650_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014651if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014652 have_gcc_asm_for_x87=yes
14653else
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014655fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014656rm -f core conftest.err conftest.$ac_objext \
14657 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14659$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014660if test "$have_gcc_asm_for_x87" = yes
14661then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014664
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014666
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14668$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14670/* end confdefs.h. */
14671
14672int
14673main ()
14674{
14675
14676 unsigned int fpcr;
14677 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14678 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14679
14680 ;
14681 return 0;
14682}
14683_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014684if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014685 have_gcc_asm_for_mc68881=yes
14686else
14687 have_gcc_asm_for_mc68881=no
14688fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014689rm -f core conftest.err conftest.$ac_objext \
14690 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14692$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14693if test "$have_gcc_asm_for_mc68881" = yes
14694then
14695
14696$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14697
14698fi
14699
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014700# Detect whether system arithmetic is subject to x87-style double
14701# rounding issues. The result of this test has little meaning on non
14702# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14703# mode is round-to-nearest and double rounding issues are present, and
14704# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14706$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014707# $BASECFLAGS may affect the result
14708ac_save_cc="$CC"
14709CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014710if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014711 ac_cv_x87_double_rounding=no
14712else
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014714/* end confdefs.h. */
14715
14716#include <stdlib.h>
14717#include <math.h>
14718int main() {
14719 volatile double x, y, z;
14720 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14721 x = 0.99999999999999989; /* 1-2**-53 */
14722 y = 1./x;
14723 if (y != 1.)
14724 exit(0);
14725 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14726 x = 1e16;
14727 y = 2.99999;
14728 z = x + y;
14729 if (z != 1e16+4.)
14730 exit(0);
14731 /* both tests show evidence of double rounding */
14732 exit(1);
14733}
14734
14735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014736if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014737 ac_cv_x87_double_rounding=no
14738else
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014743fi
14744
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014745CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14747$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014748if test "$ac_cv_x87_double_rounding" = yes
14749then
14750
Matthias Kloseb9621712010-04-24 17:59:49 +000014751$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014752
14753fi
14754
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014755# ************************************
14756# * Check for mathematical functions *
14757# ************************************
14758
14759LIBS_SAVE=$LIBS
14760LIBS="$LIBS $LIBM"
14761
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014762for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14763do :
14764 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14765ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014766if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014767 cat >>confdefs.h <<_ACEOF
14768#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14769_ACEOF
14770
14771fi
14772done
14773
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014774for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014775do :
14776 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14777ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014778if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014779 cat >>confdefs.h <<_ACEOF
14780#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14781_ACEOF
14782
14783fi
14784done
14785
14786ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14787"
Victor Stinnere0be4232011-10-25 13:06:09 +020014788if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014789 ac_have_decl=1
14790else
14791 ac_have_decl=0
14792fi
14793
14794cat >>confdefs.h <<_ACEOF
14795#define HAVE_DECL_ISINF $ac_have_decl
14796_ACEOF
14797ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14798"
Victor Stinnere0be4232011-10-25 13:06:09 +020014799if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014800 ac_have_decl=1
14801else
14802 ac_have_decl=0
14803fi
14804
14805cat >>confdefs.h <<_ACEOF
14806#define HAVE_DECL_ISNAN $ac_have_decl
14807_ACEOF
14808ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14809"
Victor Stinnere0be4232011-10-25 13:06:09 +020014810if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014811 ac_have_decl=1
14812else
14813 ac_have_decl=0
14814fi
14815
14816cat >>confdefs.h <<_ACEOF
14817#define HAVE_DECL_ISFINITE $ac_have_decl
14818_ACEOF
14819
14820
Mark Dickinsona614f042009-11-28 12:48:43 +000014821# For multiprocessing module, check that sem_open
14822# actually works. For FreeBSD versions <= 7.2,
14823# the kernel module that provides POSIX semaphores
14824# isn't loaded by default, so an attempt to call
14825# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14827$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014828if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014830else
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014832 ac_cv_posix_semaphores_enabled=yes
14833else
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014835/* end confdefs.h. */
14836
14837#include <unistd.h>
14838#include <fcntl.h>
14839#include <stdio.h>
14840#include <semaphore.h>
14841#include <sys/stat.h>
14842
14843int main(void) {
14844 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14845 if (a == SEM_FAILED) {
14846 perror("sem_open");
14847 return 1;
14848 }
14849 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014850 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014851 return 0;
14852}
14853
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014856 ac_cv_posix_semaphores_enabled=yes
14857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014862fi
14863
14864
Mark Dickinsona614f042009-11-28 12:48:43 +000014865fi
14866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14868$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014869if test $ac_cv_posix_semaphores_enabled = no
14870then
14871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014873
14874fi
14875
Mark Dickinson10683072009-04-18 21:18:19 +000014876# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14878$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014879if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014883 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014884else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014886/* end confdefs.h. */
14887
14888#include <unistd.h>
14889#include <fcntl.h>
14890#include <stdio.h>
14891#include <semaphore.h>
14892#include <sys/stat.h>
14893
14894int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014895 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014896 int count;
14897 int res;
14898 if(a==SEM_FAILED){
14899 perror("sem_open");
14900 return 1;
14901
14902 }
14903 res = sem_getvalue(a, &count);
14904 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014905 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014906 return res==-1 ? 1 : 0;
14907}
14908
Mark Dickinson10683072009-04-18 21:18:19 +000014909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014910if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014911 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014912else
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14916 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014917fi
14918
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014919
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014920fi
14921
Matthias Kloseb9621712010-04-24 17:59:49 +000014922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14923$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014924if test $ac_cv_broken_sem_getvalue = yes
14925then
14926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014928
14929fi
14930
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014931ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14932"
14933if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14934 ac_have_decl=1
14935else
14936 ac_have_decl=0
14937fi
14938
14939cat >>confdefs.h <<_ACEOF
14940#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14941_ACEOF
14942ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14943"
14944if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14945 ac_have_decl=1
14946else
14947 ac_have_decl=0
14948fi
14949
14950cat >>confdefs.h <<_ACEOF
14951#define HAVE_DECL_RTLD_NOW $ac_have_decl
14952_ACEOF
14953ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14954"
14955if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14956 ac_have_decl=1
14957else
14958 ac_have_decl=0
14959fi
14960
14961cat >>confdefs.h <<_ACEOF
14962#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14963_ACEOF
14964ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14965"
14966if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14967 ac_have_decl=1
14968else
14969 ac_have_decl=0
14970fi
14971
14972cat >>confdefs.h <<_ACEOF
14973#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14974_ACEOF
14975ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14976"
14977if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14978 ac_have_decl=1
14979else
14980 ac_have_decl=0
14981fi
14982
14983cat >>confdefs.h <<_ACEOF
14984#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14985_ACEOF
14986ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14987"
14988if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14989 ac_have_decl=1
14990else
14991 ac_have_decl=0
14992fi
14993
14994cat >>confdefs.h <<_ACEOF
14995#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14996_ACEOF
14997ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14998"
14999if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
15000 ac_have_decl=1
15001else
15002 ac_have_decl=0
15003fi
15004
15005cat >>confdefs.h <<_ACEOF
15006#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
15007_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010015008ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
15009"
15010if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
15011 ac_have_decl=1
15012else
15013 ac_have_decl=0
15014fi
15015
15016cat >>confdefs.h <<_ACEOF
15017#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15018_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015019
15020
Mark Dickinsonbd792642009-03-18 20:06:12 +000015021# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000015022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15023$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015024# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015025if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015026 enableval=$enable_big_digits; case $enable_big_digits in
15027yes)
15028 enable_big_digits=30 ;;
15029no)
15030 enable_big_digits=15 ;;
1503115|30)
15032 ;;
15033*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015034 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 +000015035esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15037$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015038
15039cat >>confdefs.h <<_ACEOF
15040#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15041_ACEOF
15042
15043
15044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15046$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015047fi
15048
15049
Guido van Rossumef2255b2000-03-10 22:30:29 +000015050# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015051ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020015052if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015053
15054
Matthias Kloseb9621712010-04-24 17:59:49 +000015055$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015056
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015057 wchar_h="yes"
15058
Guido van Rossumef2255b2000-03-10 22:30:29 +000015059else
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015061
15062fi
15063
Michael W. Hudson54241132001-12-07 15:38:26 +000015064
Martin v. Löwis11437992002-04-12 09:54:03 +000015065
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015066# determine wchar_t size
15067if test "$wchar_h" = yes
15068then
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15071# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15072# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000015073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15074$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015075if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
15079"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015080
Martin v. Löwis11437992002-04-12 09:54:03 +000015081else
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 if test "$ac_cv_type_wchar_t" = yes; then
15083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015085as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015086See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087 else
15088 ac_cv_sizeof_wchar_t=0
15089 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015091
Martin v. Löwis11437992002-04-12 09:54:03 +000015092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15094$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095
15096
15097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015099#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015100_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015101
Michael W. Hudson54241132001-12-07 15:38:26 +000015102
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015103fi
15104
Matthias Kloseb9621712010-04-24 17:59:49 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15106$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015107have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015109/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015110
15111#include <tcl.h>
15112#if TCL_UTF_MAX != 6
15113# error "NOT UCS4_TCL"
15114#endif
15115int
15116main ()
15117{
15118
15119 ;
15120 return 0;
15121}
15122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015124
15125
Matthias Kloseb9621712010-04-24 17:59:49 +000015126$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015127
15128 have_ucs4_tcl=yes
15129
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15133$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015134
Skip Montanaro6dead952003-09-25 14:50:04 +000015135# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015136if test "$wchar_h" = yes
15137then
15138 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15140$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015141 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015143else
15144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015146 ac_cv_wchar_t_signed=yes
15147else
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015149/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015150
15151 #include <wchar.h>
15152 int main()
15153 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015154 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015155 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015156 }
15157
15158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015159if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015160 ac_cv_wchar_t_signed=yes
15161else
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015166fi
15167
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015168fi
15169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15171$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172fi
15173
Michael Osipov3738fad2018-08-24 18:17:19 +020015174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15175$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015176# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015177if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015178 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015179then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015180
Matthias Kloseb9621712010-04-24 17:59:49 +000015181$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015182
Michael Osipov3738fad2018-08-24 18:17:19 +020015183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15184$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015185else
Michael Osipov3738fad2018-08-24 18:17:19 +020015186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15187$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015188fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015189
15190# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15192$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015193if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015194 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015195else
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 ac_cv_c_bigendian=unknown
15197 # See if we're dealing with a universal compiler.
15198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15199/* end confdefs.h. */
15200#ifndef __APPLE_CC__
15201 not a universal capable compiler
15202 #endif
15203 typedef int dummy;
15204
Skip Montanaro6dead952003-09-25 14:50:04 +000015205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015206if ac_fn_c_try_compile "$LINENO"; then :
15207
15208 # Check for potential -arch flags. It is not universal unless
15209 # there are at least two -arch flags with different values.
15210 ac_arch=
15211 ac_prev=
15212 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15213 if test -n "$ac_prev"; then
15214 case $ac_word in
15215 i?86 | x86_64 | ppc | ppc64)
15216 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15217 ac_arch=$ac_word
15218 else
15219 ac_cv_c_bigendian=universal
15220 break
15221 fi
15222 ;;
15223 esac
15224 ac_prev=
15225 elif test "x$ac_word" = "x-arch"; then
15226 ac_prev=arch
15227 fi
15228 done
15229fi
15230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15231 if test $ac_cv_c_bigendian = unknown; then
15232 # See if sys/param.h defines the BYTE_ORDER macro.
15233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015234/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015235#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015237
Martin v. Löwis11437992002-04-12 09:54:03 +000015238int
15239main ()
15240{
Matthias Kloseb9621712010-04-24 17:59:49 +000015241#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15242 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15243 && LITTLE_ENDIAN)
15244 bogus endian macros
15245 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015246
15247 ;
15248 return 0;
15249}
15250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015251if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015252 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015255#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015257
Martin v. Löwis11437992002-04-12 09:54:03 +000015258int
15259main ()
15260{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015261#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015262 not big endian
15263 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015264
15265 ;
15266 return 0;
15267}
15268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015269if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015270 ac_cv_c_bigendian=yes
15271else
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015275fi
15276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15277 fi
15278 if test $ac_cv_c_bigendian = unknown; then
15279 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015281/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015282#include <limits.h>
15283
Martin v. Löwis11437992002-04-12 09:54:03 +000015284int
15285main ()
15286{
Matthias Kloseb9621712010-04-24 17:59:49 +000015287#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15288 bogus endian macros
15289 #endif
15290
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ;
15292 return 0;
15293}
15294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015295if ac_fn_c_try_compile "$LINENO"; then :
15296 # It does; now see whether it defined to _BIG_ENDIAN or not.
15297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15298/* end confdefs.h. */
15299#include <limits.h>
15300
15301int
15302main ()
15303{
15304#ifndef _BIG_ENDIAN
15305 not big endian
15306 #endif
15307
15308 ;
15309 return 0;
15310}
15311_ACEOF
15312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015314else
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15318fi
15319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15320 fi
15321 if test $ac_cv_c_bigendian = unknown; then
15322 # Compile a test program.
15323 if test "$cross_compiling" = yes; then :
15324 # Try to guess by grepping values from an object file.
15325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15326/* end confdefs.h. */
15327short int ascii_mm[] =
15328 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15329 short int ascii_ii[] =
15330 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15331 int use_ascii (int i) {
15332 return ascii_mm[i] + ascii_ii[i];
15333 }
15334 short int ebcdic_ii[] =
15335 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15336 short int ebcdic_mm[] =
15337 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15338 int use_ebcdic (int i) {
15339 return ebcdic_mm[i] + ebcdic_ii[i];
15340 }
15341 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343int
15344main ()
15345{
15346return use_ascii (foo) == use_ebcdic (foo);
15347 ;
15348 return 0;
15349}
15350_ACEOF
15351if ac_fn_c_try_compile "$LINENO"; then :
15352 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15353 ac_cv_c_bigendian=yes
15354 fi
15355 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15356 if test "$ac_cv_c_bigendian" = unknown; then
15357 ac_cv_c_bigendian=no
15358 else
15359 # finding both strings is unlikely to happen, but who knows?
15360 ac_cv_c_bigendian=unknown
15361 fi
15362 fi
15363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015365else
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015367/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015369int
15370main ()
15371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 /* Are we little or big endian? From Harbison&Steele. */
15374 union
15375 {
15376 long int l;
15377 char c[sizeof (long int)];
15378 } u;
15379 u.l = 1;
15380 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381
15382 ;
15383 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015384}
Martin v. Löwis11437992002-04-12 09:54:03 +000015385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015386if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015387 ac_cv_c_bigendian=no
15388else
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15398$as_echo "$ac_cv_c_bigendian" >&6; }
15399 case $ac_cv_c_bigendian in #(
15400 yes)
15401 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15402;; #(
15403 no)
15404 ;; #(
15405 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015406
Matthias Kloseb9621712010-04-24 17:59:49 +000015407$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409 ;; #(
15410 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015411 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015412 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015414
Michael W. Hudson54241132001-12-07 15:38:26 +000015415
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015416# ABI version string for Python extension modules. This appears between the
15417# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15418# from the following attributes which affect the ABI of this Python build (in
15419# this order):
15420#
15421# * The Python implementation (always 'cpython-' for us)
15422# * The major and minor version numbers
15423# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015424#
15425# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015426# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15427# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015428#
15429# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15430# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015431
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15433$as_echo_n "checking ABIFLAGS... " >&6; }
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15435$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15437$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015438SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15440$as_echo "$SOABI" >&6; }
15441
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015442# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15443if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015444 # Similar to SOABI but remove "d" flag from ABIFLAGS
15445
15446 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15447
15448cat >>confdefs.h <<_ACEOF
15449#define ALT_SOABI "${ALT_SOABI}"
15450_ACEOF
15451
15452fi
15453
Victor Stinner52a327c2020-12-23 03:41:08 +010015454
Matti Picusa44ce6c2020-12-20 04:56:57 +020015455EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015456
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15458$as_echo_n "checking LDVERSION... " >&6; }
15459LDVERSION='$(VERSION)$(ABIFLAGS)'
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15461$as_echo "$LDVERSION" >&6; }
15462
E. M. Brayc994c8f2019-05-24 17:33:47 +020015463# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015464
E. M. Brayb1fc4172019-05-24 18:39:39 +020015465if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015466 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015467else
15468 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015469fi
15470
doko@python.org87421192013-01-26 11:39:31 +010015471
Victor Stinner51ae31e2020-06-09 15:32:43 +020015472
15473BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15474
15475
15476# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015477# /usr/$LIDIRNAME/python$VERSION
15478
15479PLATLIBDIR="lib"
15480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15481$as_echo_n "checking for --with-platlibdir... " >&6; }
15482
15483# Check whether --with-platlibdir was given.
15484if test "${with_platlibdir+set}" = set; then :
15485 withval=$with_platlibdir;
15486# ignore 3 options:
15487# --with-platlibdir
15488# --with-platlibdir=
15489# --without-platlibdir
15490if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15491then
15492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15493$as_echo "yes" >&6; }
15494 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015495 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015496else
Victor Stinner8510f432020-03-10 09:53:09 +010015497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15498$as_echo "no" >&6; }
15499fi
15500else
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15502$as_echo "no" >&6; }
15503fi
15504
15505
15506
15507
15508if test x$PLATFORM_TRIPLET = x; then
15509 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15510else
15511 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015512fi
doko@python.org87421192013-01-26 11:39:31 +010015513
15514
Victor Stinner75e59a92021-01-20 17:07:21 +010015515# Check for --with-wheel-pkg-dir=PATH
15516
15517WHEEL_PKG_DIR=""
15518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15519$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
15520
15521# Check whether --with-wheel-pkg-dir was given.
15522if test "${with_wheel_pkg_dir+set}" = set; then :
15523 withval=$with_wheel_pkg_dir;
15524if test -n "$withval"; then
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15526$as_echo "yes" >&6; }
15527 WHEEL_PKG_DIR="$withval"
15528else
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15530$as_echo "no" >&6; }
15531fi
15532else
15533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15534$as_echo "no" >&6; }
15535fi
15536
15537
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015538# Check whether right shifting a negative integer extends the sign bit
15539# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15541$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015542if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015544else
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015547 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015548else
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015550/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015551
15552int main()
15553{
Joshua Root674fa0a2020-12-14 07:56:34 +110015554 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015555}
15556
Martin v. Löwis11437992002-04-12 09:54:03 +000015557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015558if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015559 ac_cv_rshift_extends_sign=yes
15560else
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015565fi
15566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567fi
15568
Matthias Kloseb9621712010-04-24 17:59:49 +000015569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15570$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015571if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015572then
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015575
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015576fi
15577
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015578# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15580$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015581if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015583else
Martin v. Löwis11437992002-04-12 09:54:03 +000015584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015586/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015587#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015588int
15589main ()
15590{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015591
15592 FILE *f = fopen("/dev/null", "r");
15593 flockfile(f);
15594 getc_unlocked(f);
15595 funlockfile(f);
15596
Martin v. Löwis11437992002-04-12 09:54:03 +000015597 ;
15598 return 0;
15599}
15600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015601if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015602 ac_cv_have_getc_unlocked=yes
15603else
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 ac_cv_have_getc_unlocked=no
15605fi
15606rm -f core conftest.err conftest.$ac_objext \
15607 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15611$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015612if test "$ac_cv_have_getc_unlocked" = yes
15613then
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015616
15617fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015618
Roland Hiebere1f77692021-02-09 02:05:25 +010015619
15620# Check whether --with-readline was given.
15621if test "${with_readline+set}" = set; then :
15622 withval=$with_readline;
15623else
15624 with_readline=yes
15625fi
15626
15627
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015628# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015629py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015630# save the value of LIBS so we don't actually link Python with readline
15631LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015632
Roland Hiebere1f77692021-02-09 02:05:25 +010015633if test "$with_readline" != no; then
15634 case "$with_readline" in
15635 editline|edit)
15636 LIBREADLINE=edit
15637
15638$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
15639
15640 ;;
15641 yes|readline)
15642 LIBREADLINE=readline
15643 ;;
15644 *)
15645 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15646 ;;
15647 esac
15648
15649 # On some systems we need to link readline to a termcap compatible
15650 # library. NOTE: Keep the precedence of listed libraries synchronised
15651 # with setup.py.
15652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015653$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015654 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15655 if test -z "$py_libtermcap"; then
15656 READLINE_LIBS="-l$LIBREADLINE"
15657 else
15658 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15659 fi
15660 LIBS="$READLINE_LIBS $LIBS_no_readline"
15661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015662/* end confdefs.h. */
15663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664/* Override any GCC internal prototype to avoid an error.
15665 Use char because int might match the return type of a GCC
15666 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015667#ifdef __cplusplus
15668extern "C"
15669#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015670char readline ();
15671int
15672main ()
15673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015674return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015675 ;
15676 return 0;
15677}
15678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015679if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015680 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015682rm -f core conftest.err conftest.$ac_objext \
15683 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015684 if test $py_cv_lib_readline = yes; then
15685 break
15686 fi
15687 done
15688
15689 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15690 #AC_SUBST([READLINE_LIBS])
15691 if test $py_cv_lib_readline = no; then
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015693$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015694 else
15695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015696$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015697
Matthias Kloseb9621712010-04-24 17:59:49 +000015698$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015699
Roland Hiebere1f77692021-02-09 02:05:25 +010015700 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015701fi
15702
Roland Hiebere1f77692021-02-09 02:05:25 +010015703if test "$py_cv_lib_readline" = yes; then
15704 # check for readline 2.2
15705 ac_fn_c_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
15706#include <stdio.h> /* Must be first for Gnu Readline */
15707#ifdef WITH_EDITLINE
15708# include <editline/readline.h>
15709#else
15710# include <readline/readline.h>
15711#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015712
Roland Hiebere1f77692021-02-09 02:05:25 +010015713"
15714if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015717
15718fi
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015719
Roland Hiebere1f77692021-02-09 02:05:25 +010015720 ac_fn_c_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
15721#include <stdio.h> /* Must be first for Gnu Readline */
15722#ifdef WITH_EDITLINE
15723# include <editline/readline.h>
15724#else
15725# include <readline/readline.h>
15726#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015727
Roland Hiebere1f77692021-02-09 02:05:25 +010015728"
15729if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015730
Matthias Kloseb9621712010-04-24 17:59:49 +000015731$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015732
15733fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015734
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015735
Roland Hiebere1f77692021-02-09 02:05:25 +010015736 # check for readline 4.0
15737 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15739$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15740if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015741 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015742else
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015744LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748/* Override any GCC internal prototype to avoid an error.
15749 Use char because int might match the return type of a GCC
15750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015751#ifdef __cplusplus
15752extern "C"
15753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015754char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015755int
15756main ()
15757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 ;
15760 return 0;
15761}
15762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015763if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015764 eval "$as_ac_Lib=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015765else
Roland Hiebere1f77692021-02-09 02:05:25 +010015766 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015768rm -f core conftest.err conftest.$ac_objext \
15769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015770LIBS=$ac_check_lib_save_LIBS
15771fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015772eval ac_res=\$$as_ac_Lib
15773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15774$as_echo "$ac_res" >&6; }
15775if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015776
Matthias Kloseb9621712010-04-24 17:59:49 +000015777$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015778
Martin v. Löwis0daad592001-09-30 21:09:59 +000015779fi
15780
Michael W. Hudson54241132001-12-07 15:38:26 +000015781
Roland Hiebere1f77692021-02-09 02:05:25 +010015782 # also in 4.0
15783 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15785$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15786if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015788else
15789 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015790LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015792/* end confdefs.h. */
15793
15794/* Override any GCC internal prototype to avoid an error.
15795 Use char because int might match the return type of a GCC
15796 builtin and then its argument prototype would still apply. */
15797#ifdef __cplusplus
15798extern "C"
15799#endif
15800char rl_completion_display_matches_hook ();
15801int
15802main ()
15803{
15804return rl_completion_display_matches_hook ();
15805 ;
15806 return 0;
15807}
15808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015809if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015810 eval "$as_ac_Lib=yes"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015811else
Roland Hiebere1f77692021-02-09 02:05:25 +010015812 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015814rm -f core conftest.err conftest.$ac_objext \
15815 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015816LIBS=$ac_check_lib_save_LIBS
15817fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015818eval ac_res=\$$as_ac_Lib
15819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15820$as_echo "$ac_res" >&6; }
15821if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015824
15825fi
15826
15827
Roland Hiebere1f77692021-02-09 02:05:25 +010015828 # also in 4.0, but not in editline
15829 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15831$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15832if eval \${$as_ac_Lib+:} false; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015833 $as_echo_n "(cached) " >&6
15834else
15835 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015836LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15838/* end confdefs.h. */
15839
15840/* Override any GCC internal prototype to avoid an error.
15841 Use char because int might match the return type of a GCC
15842 builtin and then its argument prototype would still apply. */
15843#ifdef __cplusplus
15844extern "C"
15845#endif
15846char rl_resize_terminal ();
15847int
15848main ()
15849{
15850return rl_resize_terminal ();
15851 ;
15852 return 0;
15853}
15854_ACEOF
15855if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015856 eval "$as_ac_Lib=yes"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015857else
Roland Hiebere1f77692021-02-09 02:05:25 +010015858 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015859fi
15860rm -f core conftest.err conftest.$ac_objext \
15861 conftest$ac_exeext conftest.$ac_ext
15862LIBS=$ac_check_lib_save_LIBS
15863fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015864eval ac_res=\$$as_ac_Lib
15865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15866$as_echo "$ac_res" >&6; }
15867if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015868
15869$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15870
15871fi
15872
15873
Roland Hiebere1f77692021-02-09 02:05:25 +010015874 # check for readline 4.2
15875 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15877$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15878if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015880else
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015882LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886/* Override any GCC internal prototype to avoid an error.
15887 Use char because int might match the return type of a GCC
15888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015889#ifdef __cplusplus
15890extern "C"
15891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015892char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015893int
15894main ()
15895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 ;
15898 return 0;
15899}
15900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015901if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015902 eval "$as_ac_Lib=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +000015903else
Roland Hiebere1f77692021-02-09 02:05:25 +010015904 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000015905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015906rm -f core conftest.err conftest.$ac_objext \
15907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015908LIBS=$ac_check_lib_save_LIBS
15909fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015910eval ac_res=\$$as_ac_Lib
15911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15912$as_echo "$ac_res" >&6; }
15913if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015916
Guido van Rossum353ae582001-07-10 16:45:32 +000015917fi
15918
Jack Jansendd19cf82001-12-06 22:36:17 +000015919
Roland Hiebere1f77692021-02-09 02:05:25 +010015920 # also in readline 4.2
15921 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
15922#include <stdio.h> /* Must be first for Gnu Readline */
15923#ifdef WITH_EDITLINE
15924# include <editline/readline.h>
15925#else
15926# include <readline/readline.h>
15927#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015928
Roland Hiebere1f77692021-02-09 02:05:25 +010015929"
15930if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015931
Matthias Kloseb9621712010-04-24 17:59:49 +000015932$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015933
15934fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015935
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015936
Roland Hiebere1f77692021-02-09 02:05:25 +010015937 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
15938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
15939$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
15940if eval \${$as_ac_Lib+:} false; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015941 $as_echo_n "(cached) " >&6
15942else
15943 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015944LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946/* end confdefs.h. */
15947
15948/* Override any GCC internal prototype to avoid an error.
15949 Use char because int might match the return type of a GCC
15950 builtin and then its argument prototype would still apply. */
15951#ifdef __cplusplus
15952extern "C"
15953#endif
15954char append_history ();
15955int
15956main ()
15957{
15958return append_history ();
15959 ;
15960 return 0;
15961}
15962_ACEOF
15963if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015964 eval "$as_ac_Lib=yes"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015965else
Roland Hiebere1f77692021-02-09 02:05:25 +010015966 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015967fi
15968rm -f core conftest.err conftest.$ac_objext \
15969 conftest$ac_exeext conftest.$ac_ext
15970LIBS=$ac_check_lib_save_LIBS
15971fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015972eval ac_res=\$$as_ac_Lib
15973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15974$as_echo "$ac_res" >&6; }
15975if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015976
15977$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15978
15979fi
15980
Roland Hiebere1f77692021-02-09 02:05:25 +010015981fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015982
Martin v. Löwis82bca632006-02-10 20:49:30 +000015983# End of readline checks: restore LIBS
15984LIBS=$LIBS_no_readline
15985
Matthias Kloseb9621712010-04-24 17:59:49 +000015986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15987$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015988if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015989 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015990else
Martin v. Löwis11437992002-04-12 09:54:03 +000015991
Matthias Kloseb9621712010-04-24 17:59:49 +000015992if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015993 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015994else
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015996/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015997
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015998#include <stdlib.h>
15999#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016000int main()
16001{
16002 int val1 = nice(1);
16003 if (val1 != -1 && val1 == nice(2))
16004 exit(0);
16005 exit(1);
16006}
16007
Martin v. Löwis11437992002-04-12 09:54:03 +000016008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016009if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016010 ac_cv_broken_nice=yes
16011else
Matthias Kloseb9621712010-04-24 17:59:49 +000016012 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016016fi
16017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018fi
16019
Matthias Kloseb9621712010-04-24 17:59:49 +000016020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
16021$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016022if test "$ac_cv_broken_nice" = yes
16023then
Martin v. Löwis11437992002-04-12 09:54:03 +000016024
Matthias Kloseb9621712010-04-24 17:59:49 +000016025$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016026
16027fi
16028
Matthias Kloseb9621712010-04-24 17:59:49 +000016029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16030$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016031if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016032 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016033else
Matthias Kloseb9621712010-04-24 17:59:49 +000016034 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016035 ac_cv_broken_poll=no
16036else
Matthias Kloseb9621712010-04-24 17:59:49 +000016037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016038/* end confdefs.h. */
16039
16040#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016041#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016042
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016043int main()
16044{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016045 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016046 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016047
16048 close (42);
16049
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016050 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016051 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016052 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016053 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016054 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016055 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016056 return 1;
16057}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016058
16059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016060if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016061 ac_cv_broken_poll=yes
16062else
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16066 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016069fi
16070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16072$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016073if test "$ac_cv_broken_poll" = yes
16074then
16075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016077
16078fi
16079
Martin v. Löwis1d459062005-03-14 21:23:33 +000016080# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000016081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16082$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016083if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016084 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016085else
16086
Matthias Kloseb9621712010-04-24 17:59:49 +000016087if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016088 ac_cv_working_tzset=no
16089else
Matthias Kloseb9621712010-04-24 17:59:49 +000016090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016091/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016092
16093#include <stdlib.h>
16094#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016095#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016096
16097#if HAVE_TZNAME
16098extern char *tzname[];
16099#endif
16100
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016101int main()
16102{
Brett Cannon18367812003-09-19 00:59:16 +000016103 /* Note that we need to ensure that not only does tzset(3)
16104 do 'something' with localtime, but it works as documented
16105 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016106 This includes making sure that tzname is set properly if
16107 tm->tm_zone does not exist since it is the alternative way
16108 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016109
16110 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016111 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016112 */
16113
Martin v. Löwis1d459062005-03-14 21:23:33 +000016114 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016115 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16116
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016117 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016118 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016119 if (localtime(&groundhogday)->tm_hour != 0)
16120 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016121#if HAVE_TZNAME
16122 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16123 if (strcmp(tzname[0], "UTC") ||
16124 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16125 exit(1);
16126#endif
Brett Cannon18367812003-09-19 00:59:16 +000016127
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016128 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016129 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016130 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016131 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016132#if HAVE_TZNAME
16133 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16134 exit(1);
16135#endif
Brett Cannon18367812003-09-19 00:59:16 +000016136
16137 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16138 tzset();
16139 if (localtime(&groundhogday)->tm_hour != 11)
16140 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016141#if HAVE_TZNAME
16142 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16143 exit(1);
16144#endif
16145
16146#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016147 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16148 exit(1);
16149 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16150 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016151#endif
Brett Cannon18367812003-09-19 00:59:16 +000016152
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016153 exit(0);
16154}
16155
16156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016157if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016158 ac_cv_working_tzset=yes
16159else
Matthias Kloseb9621712010-04-24 17:59:49 +000016160 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16163 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016164fi
16165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166fi
16167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16169$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016170if test "$ac_cv_working_tzset" = yes
16171then
16172
Matthias Kloseb9621712010-04-24 17:59:49 +000016173$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016174
16175fi
16176
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016177# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16179$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016180if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016181 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016182else
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016184/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016185#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016186int
16187main ()
16188{
16189
16190struct stat st;
16191st.st_mtim.tv_nsec = 1;
16192
16193 ;
16194 return 0;
16195}
16196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016198 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016199else
Matthias Kloseb9621712010-04-24 17:59:49 +000016200 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16203fi
16204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16206$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016207if test "$ac_cv_stat_tv_nsec" = yes
16208then
16209
Matthias Kloseb9621712010-04-24 17:59:49 +000016210$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016211
16212fi
16213
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016214# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16216$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016217if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016218 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016219else
Matthias Kloseb9621712010-04-24 17:59:49 +000016220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016221/* end confdefs.h. */
16222#include <sys/stat.h>
16223int
16224main ()
16225{
16226
16227struct stat st;
16228st.st_mtimespec.tv_nsec = 1;
16229
16230 ;
16231 return 0;
16232}
16233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016235 ac_cv_stat_tv_nsec2=yes
16236else
Matthias Kloseb9621712010-04-24 17:59:49 +000016237 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16240fi
16241
Matthias Kloseb9621712010-04-24 17:59:49 +000016242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16243$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016244if test "$ac_cv_stat_tv_nsec2" = yes
16245then
16246
Matthias Kloseb9621712010-04-24 17:59:49 +000016247$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016248
16249fi
16250
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016251# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016252ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016253if test "$cross_compiling" = no; then
16254 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16255fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016256
16257for ac_header in curses.h ncurses.h
16258do :
16259 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16260ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16261if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16262 cat >>confdefs.h <<_ACEOF
16263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16264_ACEOF
16265
16266fi
16267
16268done
16269
16270
16271# On Solaris, term.h requires curses.h
16272for ac_header in term.h
16273do :
16274 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16275#ifdef HAVE_CURSES_H
16276#include <curses.h>
16277#endif
16278
16279"
16280if test "x$ac_cv_header_term_h" = xyes; then :
16281 cat >>confdefs.h <<_ACEOF
16282#define HAVE_TERM_H 1
16283_ACEOF
16284
16285fi
16286
16287done
16288
16289
Jack Jansen666b1e72001-10-31 12:11:48 +000016290# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16292$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016293if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016294 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016295else
Matthias Kloseb9621712010-04-24 17:59:49 +000016296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016297/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016298#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016299int
16300main ()
16301{
Jack Jansen666b1e72001-10-31 12:11:48 +000016302
16303 int rtn;
16304 rtn = mvwdelch(0,0,0);
16305
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ;
16307 return 0;
16308}
16309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016310if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016311 ac_cv_mvwdelch_is_expression=yes
16312else
Matthias Kloseb9621712010-04-24 17:59:49 +000016313 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16316fi
16317
Matthias Kloseb9621712010-04-24 17:59:49 +000016318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16319$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016320
16321if test "$ac_cv_mvwdelch_is_expression" = yes
16322then
Martin v. Löwis11437992002-04-12 09:54:03 +000016323
Matthias Kloseb9621712010-04-24 17:59:49 +000016324$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016325
16326fi
16327
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016328# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16329# structs since version 5.7. If the macro is defined as zero before including
16330# [n]curses.h, ncurses will expose fields of the structs regardless of the
16331# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16333$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016334if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016335 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016336else
Matthias Kloseb9621712010-04-24 17:59:49 +000016337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016338/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016339
16340 #define NCURSES_OPAQUE 0
16341 #include <curses.h>
16342
Martin v. Löwis11437992002-04-12 09:54:03 +000016343int
16344main ()
16345{
Jack Jansen666b1e72001-10-31 12:11:48 +000016346
16347 WINDOW *w;
16348 w->_flags = 0;
16349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ;
16351 return 0;
16352}
16353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016354if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016355 ac_cv_window_has_flags=yes
16356else
Matthias Kloseb9621712010-04-24 17:59:49 +000016357 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16360fi
16361
Matthias Kloseb9621712010-04-24 17:59:49 +000016362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16363$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016364
Jack Jansen666b1e72001-10-31 12:11:48 +000016365
16366if test "$ac_cv_window_has_flags" = yes
16367then
Martin v. Löwis11437992002-04-12 09:54:03 +000016368
Matthias Kloseb9621712010-04-24 17:59:49 +000016369$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016370
16371fi
16372
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16374$as_echo_n "checking for is_pad... " >&6; }
16375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16376/* end confdefs.h. */
16377#include <curses.h>
16378int
16379main ()
16380{
16381
16382#ifndef is_pad
16383void *x=is_pad
16384#endif
16385
16386 ;
16387 return 0;
16388}
16389_ACEOF
16390if ac_fn_c_try_compile "$LINENO"; then :
16391
16392$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16393
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16395$as_echo "yes" >&6; }
16396else
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16398$as_echo "no" >&6; }
16399
16400fi
16401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16402
Matthias Kloseb9621712010-04-24 17:59:49 +000016403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16404$as_echo_n "checking for is_term_resized... " >&6; }
16405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016406/* end confdefs.h. */
16407#include <curses.h>
16408int
16409main ()
16410{
16411void *x=is_term_resized
16412 ;
16413 return 0;
16414}
16415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016416if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016417
Matthias Kloseb9621712010-04-24 17:59:49 +000016418$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016419
Matthias Kloseb159a552010-04-25 21:00:44 +000016420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016421$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016422else
Matthias Kloseb9621712010-04-24 17:59:49 +000016423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16424$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016425
16426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16428
Matthias Kloseb9621712010-04-24 17:59:49 +000016429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16430$as_echo_n "checking for resize_term... " >&6; }
16431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016432/* end confdefs.h. */
16433#include <curses.h>
16434int
16435main ()
16436{
16437void *x=resize_term
16438 ;
16439 return 0;
16440}
16441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016442if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016443
Matthias Kloseb9621712010-04-24 17:59:49 +000016444$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016445
Matthias Kloseb159a552010-04-25 21:00:44 +000016446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016447$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016448else
Matthias Kloseb9621712010-04-24 17:59:49 +000016449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16450$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016451
16452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16454
Matthias Kloseb9621712010-04-24 17:59:49 +000016455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16456$as_echo_n "checking for resizeterm... " >&6; }
16457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016458/* end confdefs.h. */
16459#include <curses.h>
16460int
16461main ()
16462{
16463void *x=resizeterm
16464 ;
16465 return 0;
16466}
16467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016468if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016469
Matthias Kloseb9621712010-04-24 17:59:49 +000016470$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016471
Matthias Kloseb159a552010-04-25 21:00:44 +000016472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016473$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016474else
Matthias Kloseb9621712010-04-24 17:59:49 +000016475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16476$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016477
16478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016480
16481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16482$as_echo_n "checking for immedok... " >&6; }
16483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16484/* end confdefs.h. */
16485#include <curses.h>
16486int
16487main ()
16488{
16489
16490#ifndef immedok
16491void *x=immedok
16492#endif
16493
16494 ;
16495 return 0;
16496}
16497_ACEOF
16498if ac_fn_c_try_compile "$LINENO"; then :
16499
16500$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16501
16502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16503$as_echo "yes" >&6; }
16504else
16505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16506$as_echo "no" >&6; }
16507
16508fi
16509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16510
16511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16512$as_echo_n "checking for syncok... " >&6; }
16513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16514/* end confdefs.h. */
16515#include <curses.h>
16516int
16517main ()
16518{
16519
16520#ifndef syncok
16521void *x=syncok
16522#endif
16523
16524 ;
16525 return 0;
16526}
16527_ACEOF
16528if ac_fn_c_try_compile "$LINENO"; then :
16529
16530$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16531
16532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16533$as_echo "yes" >&6; }
16534else
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16536$as_echo "no" >&6; }
16537
16538fi
16539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16540
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16542$as_echo_n "checking for wchgat... " >&6; }
16543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16544/* end confdefs.h. */
16545#include <curses.h>
16546int
16547main ()
16548{
16549
16550#ifndef wchgat
16551void *x=wchgat
16552#endif
16553
16554 ;
16555 return 0;
16556}
16557_ACEOF
16558if ac_fn_c_try_compile "$LINENO"; then :
16559
16560$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16561
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16563$as_echo "yes" >&6; }
16564else
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16566$as_echo "no" >&6; }
16567
16568fi
16569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16570
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16572$as_echo_n "checking for filter... " >&6; }
16573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16574/* end confdefs.h. */
16575#include <curses.h>
16576int
16577main ()
16578{
16579
16580#ifndef filter
16581void *x=filter
16582#endif
16583
16584 ;
16585 return 0;
16586}
16587_ACEOF
16588if ac_fn_c_try_compile "$LINENO"; then :
16589
16590$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16591
16592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16593$as_echo "yes" >&6; }
16594else
16595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16596$as_echo "no" >&6; }
16597
16598fi
16599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16600
16601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16602$as_echo_n "checking for has_key... " >&6; }
16603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16604/* end confdefs.h. */
16605#include <curses.h>
16606int
16607main ()
16608{
16609
16610#ifndef has_key
16611void *x=has_key
16612#endif
16613
16614 ;
16615 return 0;
16616}
16617_ACEOF
16618if ac_fn_c_try_compile "$LINENO"; then :
16619
16620$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16621
16622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16623$as_echo "yes" >&6; }
16624else
16625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16626$as_echo "no" >&6; }
16627
16628fi
16629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16630
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16632$as_echo_n "checking for typeahead... " >&6; }
16633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16634/* end confdefs.h. */
16635#include <curses.h>
16636int
16637main ()
16638{
16639
16640#ifndef typeahead
16641void *x=typeahead
16642#endif
16643
16644 ;
16645 return 0;
16646}
16647_ACEOF
16648if ac_fn_c_try_compile "$LINENO"; then :
16649
16650$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16651
16652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16653$as_echo "yes" >&6; }
16654else
16655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16656$as_echo "no" >&6; }
16657
16658fi
16659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16660
16661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16662$as_echo_n "checking for use_env... " >&6; }
16663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16664/* end confdefs.h. */
16665#include <curses.h>
16666int
16667main ()
16668{
16669
16670#ifndef use_env
16671void *x=use_env
16672#endif
16673
16674 ;
16675 return 0;
16676}
16677_ACEOF
16678if ac_fn_c_try_compile "$LINENO"; then :
16679
16680$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16681
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16683$as_echo "yes" >&6; }
16684else
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16686$as_echo "no" >&6; }
16687
16688fi
16689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016690# last curses configure check
16691CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16694$as_echo "$as_me: checking for device files" >&6;}
16695
16696if test "x$cross_compiling" = xyes; then
16697 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16699$as_echo_n "checking for /dev/ptmx... " >&6; }
16700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16701$as_echo "not set" >&6; }
16702 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16703 fi
16704 if test "${ac_cv_file__dev_ptc+set}" != set; then
16705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16706$as_echo_n "checking for /dev/ptc... " >&6; }
16707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16708$as_echo "not set" >&6; }
16709 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16710 fi
16711fi
16712
Matthias Kloseb9621712010-04-24 17:59:49 +000016713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16714$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016715if ${ac_cv_file__dev_ptmx+:} false; then :
16716 $as_echo_n "(cached) " >&6
16717else
16718 test "$cross_compiling" = yes &&
16719 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16720if test -r "/dev/ptmx"; then
16721 ac_cv_file__dev_ptmx=yes
16722else
16723 ac_cv_file__dev_ptmx=no
16724fi
16725fi
16726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16727$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16728if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016729
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016730fi
16731
16732if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016733
Matthias Kloseb9621712010-04-24 17:59:49 +000016734$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016735
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16738$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016739if ${ac_cv_file__dev_ptc+:} false; then :
16740 $as_echo_n "(cached) " >&6
16741else
16742 test "$cross_compiling" = yes &&
16743 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16744if test -r "/dev/ptc"; then
16745 ac_cv_file__dev_ptc=yes
16746else
16747 ac_cv_file__dev_ptc=no
16748fi
16749fi
16750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16751$as_echo "$ac_cv_file__dev_ptc" >&6; }
16752if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016753
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016754fi
16755
16756if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016757
Matthias Kloseb9621712010-04-24 17:59:49 +000016758$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016759
Neal Norwitz865400f2003-03-21 01:42:58 +000016760fi
16761
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016762if test $ac_sys_system = Darwin
16763then
16764 LIBS="$LIBS -framework CoreFoundation"
16765fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016766
Matthias Kloseb9621712010-04-24 17:59:49 +000016767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16768$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016769if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016770 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016771else
Matthias Kloseb9621712010-04-24 17:59:49 +000016772 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016773 ac_cv_have_size_t_format="cross -- assuming yes"
16774
Thomas Wouters477c8d52006-05-27 19:21:47 +000016775else
Matthias Kloseb9621712010-04-24 17:59:49 +000016776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016777/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016778
Thomas Wouters477c8d52006-05-27 19:21:47 +000016779#include <stdio.h>
16780#include <stddef.h>
16781#include <string.h>
16782
Christian Heimes2c181612007-12-17 20:04:13 +000016783#ifdef HAVE_SYS_TYPES_H
16784#include <sys/types.h>
16785#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016786
16787#ifdef HAVE_SSIZE_T
16788typedef ssize_t Py_ssize_t;
16789#elif SIZEOF_VOID_P == SIZEOF_LONG
16790typedef long Py_ssize_t;
16791#else
16792typedef int Py_ssize_t;
16793#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016794
Christian Heimes2c181612007-12-17 20:04:13 +000016795int main()
16796{
16797 char buffer[256];
16798
Thomas Wouters477c8d52006-05-27 19:21:47 +000016799 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16800 return 1;
16801
Thomas Wouters89f507f2006-12-13 04:49:30 +000016802 if (strcmp(buffer, "123"))
16803 return 1;
16804
16805 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16806 return 1;
16807
16808 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016809 return 1;
16810
16811 return 0;
16812}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016813
Thomas Wouters477c8d52006-05-27 19:21:47 +000016814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016815if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016816 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016817else
Matthias Kloseb9621712010-04-24 17:59:49 +000016818 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016822fi
16823
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16826$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016827if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016828
Matthias Kloseb9621712010-04-24 17:59:49 +000016829$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016830
16831fi
16832
Matthias Kloseb9621712010-04-24 17:59:49 +000016833ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016834#ifdef HAVE_SYS_TYPES_H
16835#include <sys/types.h>
16836#endif
16837#ifdef HAVE_SYS_SOCKET_H
16838#include <sys/socket.h>
16839#endif
16840
Matthias Kloseb9621712010-04-24 17:59:49 +000016841"
Victor Stinnere0be4232011-10-25 13:06:09 +020016842if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016845
Matthias Kloseb9621712010-04-24 17:59:49 +000016846$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016847
16848fi
16849
Michael W. Hudson54241132001-12-07 15:38:26 +000016850
Matthias Kloseb9621712010-04-24 17:59:49 +000016851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16852$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016853if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016854 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016855else
Matthias Kloseb9621712010-04-24 17:59:49 +000016856 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016857 ac_cv_broken_mbstowcs=no
16858else
Matthias Kloseb9621712010-04-24 17:59:49 +000016859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016860/* end confdefs.h. */
16861
Stefan Krah19c21392012-11-22 23:47:32 +010016862#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016863#include<stdlib.h>
16864int main() {
16865 size_t len = -1;
16866 const char *str = "text";
16867 len = mbstowcs(NULL, str, 0);
16868 return (len != 4);
16869}
16870
16871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016872if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016873 ac_cv_broken_mbstowcs=no
16874else
Matthias Kloseb9621712010-04-24 17:59:49 +000016875 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016879fi
16880
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016881fi
16882
Matthias Kloseb9621712010-04-24 17:59:49 +000016883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16884$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016885if test "$ac_cv_broken_mbstowcs" = yes
16886then
16887
Matthias Kloseb9621712010-04-24 17:59:49 +000016888$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016889
16890fi
16891
Antoine Pitroub52ec782009-01-25 16:34:23 +000016892# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16894$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016895
16896# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016897if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016898 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016899if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016900then
16901
Matthias Kloseb9621712010-04-24 17:59:49 +000016902$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016903
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16905$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016906fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016907if test "$withval" = no
16908then
16909
16910$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16911
Matthias Kloseb9621712010-04-24 17:59:49 +000016912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16913$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016914fi
16915
Antoine Pitrou042b1282010-08-13 21:15:58 +000016916else
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16918$as_echo "no value specified" >&6; }
16919fi
16920
Antoine Pitroub52ec782009-01-25 16:34:23 +000016921
Matthias Kloseb17289e2012-03-15 19:51:34 +010016922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16923$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16924if ${ac_cv_computed_gotos+:} false; then :
16925 $as_echo_n "(cached) " >&6
16926else
16927 if test "$cross_compiling" = yes; then :
16928 if test "${with_computed_gotos+set}" = set; then
16929 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16930 else
16931 ac_cv_computed_gotos=no
16932 fi
16933else
16934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16935/* end confdefs.h. */
16936
16937int main(int argc, char **argv)
16938{
16939 static void *targets[1] = { &&LABEL1 };
16940 goto LABEL2;
16941LABEL1:
16942 return 0;
16943LABEL2:
16944 goto *targets[0];
16945 return 1;
16946}
16947
16948_ACEOF
16949if ac_fn_c_try_run "$LINENO"; then :
16950 ac_cv_computed_gotos=yes
16951else
16952 ac_cv_computed_gotos=no
16953fi
16954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16955 conftest.$ac_objext conftest.beam conftest.$ac_ext
16956fi
16957
16958fi
16959
16960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16961$as_echo "$ac_cv_computed_gotos" >&6; }
16962case "$ac_cv_computed_gotos" in yes*)
16963
16964$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16965
16966esac
16967
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016968case $ac_sys_system in
16969AIX*)
16970
16971$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16972 ;;
16973esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016974
Michael W. Hudson54241132001-12-07 15:38:26 +000016975
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016976
16977
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016978for h in `(cd $srcdir;echo Python/thread_*.h)`
16979do
16980 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16981done
16982
Michael W. Hudson54241132001-12-07 15:38:26 +000016983
Ned Deily8d02f912020-06-25 10:46:44 -040016984SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16986$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016987for dir in $SRCDIRS; do
16988 if test ! -d $dir; then
16989 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016990 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016991done
Matthias Kloseb9621712010-04-24 17:59:49 +000016992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16993$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016994
Stefan Krah1919b7e2012-03-21 18:25:23 +010016995# Availability of -O2:
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16997$as_echo_n "checking for -O2... " >&6; }
16998saved_cflags="$CFLAGS"
16999CFLAGS="-O2"
17000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17001/* end confdefs.h. */
17002
17003int
17004main ()
17005{
17006
17007
17008 ;
17009 return 0;
17010}
17011_ACEOF
17012if ac_fn_c_try_compile "$LINENO"; then :
17013 have_O2=yes
17014else
17015 have_O2=no
17016fi
17017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
17019$as_echo "$have_O2" >&6; }
17020CFLAGS="$saved_cflags"
17021
17022# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
17023# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
17024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
17025$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
17026saved_cflags="$CFLAGS"
17027CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17028if test "$have_O2" = no; then
17029 CFLAGS=""
17030fi
17031if test "$cross_compiling" = yes; then :
17032 have_glibc_memmove_bug=undefined
17033else
17034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17035/* end confdefs.h. */
17036
17037#include <stdio.h>
17038#include <stdlib.h>
17039#include <string.h>
17040void foo(void *p, void *q) { memmove(p, q, 19); }
17041int main() {
17042 char a[32] = "123456789000000000";
17043 foo(&a[9], a);
17044 if (strcmp(a, "123456789123456789000000000") != 0)
17045 return 1;
17046 foo(a, &a[9]);
17047 if (strcmp(a, "123456789000000000") != 0)
17048 return 1;
17049 return 0;
17050}
17051
17052_ACEOF
17053if ac_fn_c_try_run "$LINENO"; then :
17054 have_glibc_memmove_bug=no
17055else
17056 have_glibc_memmove_bug=yes
17057fi
17058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17059 conftest.$ac_objext conftest.beam conftest.$ac_ext
17060fi
17061
17062CFLAGS="$saved_cflags"
17063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17064$as_echo "$have_glibc_memmove_bug" >&6; }
17065if test "$have_glibc_memmove_bug" = yes; then
17066
17067$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
17068
17069fi
17070
17071if test "$have_gcc_asm_for_x87" = yes; then
17072 # Some versions of gcc miscompile inline asm:
17073 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17074 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17075 case $CC in
17076 *gcc*)
17077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17078$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
17079 saved_cflags="$CFLAGS"
17080 CFLAGS="-O2"
17081 if test "$cross_compiling" = yes; then :
17082 have_ipa_pure_const_bug=undefined
17083else
17084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17085/* end confdefs.h. */
17086
17087 __attribute__((noinline)) int
17088 foo(int *p) {
17089 int r;
17090 asm ( "movl \$6, (%1)\n\t"
17091 "xorl %0, %0\n\t"
17092 : "=r" (r) : "r" (p) : "memory"
17093 );
17094 return r;
17095 }
17096 int main() {
17097 int p = 8;
17098 if ((foo(&p) ? : p) != 6)
17099 return 1;
17100 return 0;
17101 }
17102
17103_ACEOF
17104if ac_fn_c_try_run "$LINENO"; then :
17105 have_ipa_pure_const_bug=no
17106else
17107 have_ipa_pure_const_bug=yes
17108fi
17109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17110 conftest.$ac_objext conftest.beam conftest.$ac_ext
17111fi
17112
17113 CFLAGS="$saved_cflags"
17114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17115$as_echo "$have_ipa_pure_const_bug" >&6; }
17116 if test "$have_ipa_pure_const_bug" = yes; then
17117
17118$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
17119
17120 fi
17121 ;;
17122 esac
17123fi
17124
Victor Stinner4f5366e2015-01-09 02:13:19 +010017125# Check for stdatomic.h
17126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17127$as_echo_n "checking for stdatomic.h... " >&6; }
17128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17129/* end confdefs.h. */
17130
17131
17132 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017133 atomic_int int_var;
17134 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017135 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017136 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17137 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17138 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017139 return 0;
17140 }
17141
17142
17143_ACEOF
17144if ac_fn_c_try_link "$LINENO"; then :
17145 have_stdatomic_h=yes
17146else
17147 have_stdatomic_h=no
17148fi
17149rm -f core conftest.err conftest.$ac_objext \
17150 conftest$ac_exeext conftest.$ac_ext
17151
17152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17153$as_echo "$have_stdatomic_h" >&6; }
17154
17155if test "$have_stdatomic_h" = yes; then
17156
17157$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
17158
17159fi
17160
Victor Stinner52a327c2020-12-23 03:41:08 +010017161# Check for GCC >= 4.7 and clang __atomic builtin functions
17162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17163$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17165/* end confdefs.h. */
17166
17167
Victor Stinner52a327c2020-12-23 03:41:08 +010017168 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017169 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017170 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17171 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017172 return 0;
17173 }
17174
17175
17176_ACEOF
17177if ac_fn_c_try_link "$LINENO"; then :
17178 have_builtin_atomic=yes
17179else
17180 have_builtin_atomic=no
17181fi
17182rm -f core conftest.err conftest.$ac_objext \
17183 conftest$ac_exeext conftest.$ac_ext
17184
17185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17186$as_echo "$have_builtin_atomic" >&6; }
17187
17188if test "$have_builtin_atomic" = yes; then
17189
17190$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17191
17192fi
17193
Ned Deily322f5ba2013-11-21 23:01:59 -080017194# ensurepip option
17195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17196$as_echo_n "checking for ensurepip... " >&6; }
17197
17198# Check whether --with-ensurepip was given.
17199if test "${with_ensurepip+set}" = set; then :
17200 withval=$with_ensurepip;
17201else
17202 with_ensurepip=upgrade
17203fi
17204
17205case $with_ensurepip in #(
17206 yes|upgrade) :
17207 ENSUREPIP=upgrade ;; #(
17208 install) :
17209 ENSUREPIP=install ;; #(
17210 no) :
17211 ENSUREPIP=no ;; #(
17212 *) :
17213 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17214esac
17215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17216$as_echo "$ENSUREPIP" >&6; }
17217
17218
Victor Stinner35a97c02015-03-08 02:59:09 +010017219# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17221$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17223/* end confdefs.h. */
17224
17225
17226 #include <dirent.h>
17227
17228 int main() {
17229 struct dirent entry;
17230 return entry.d_type == DT_UNKNOWN;
17231 }
17232
17233
17234_ACEOF
17235if ac_fn_c_try_link "$LINENO"; then :
17236 have_dirent_d_type=yes
17237else
17238 have_dirent_d_type=no
17239fi
17240rm -f core conftest.err conftest.$ac_objext \
17241 conftest$ac_exeext conftest.$ac_ext
17242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17243$as_echo "$have_dirent_d_type" >&6; }
17244
17245if test "$have_dirent_d_type" = yes; then
17246
17247$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17248
17249fi
17250
Victor Stinner9eb57c52015-03-19 22:21:49 +010017251# check if the Linux getrandom() syscall is available
17252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17253$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17255/* end confdefs.h. */
17256
17257
Victor Stinner1b80b242016-04-12 22:34:58 +020017258 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017259 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017260 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017261
17262 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017263 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017264 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017265 const int flags = GRND_NONBLOCK;
17266 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017267 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017268 return 0;
17269 }
17270
17271
17272_ACEOF
17273if ac_fn_c_try_link "$LINENO"; then :
17274 have_getrandom_syscall=yes
17275else
17276 have_getrandom_syscall=no
17277fi
17278rm -f core conftest.err conftest.$ac_objext \
17279 conftest$ac_exeext conftest.$ac_ext
17280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17281$as_echo "$have_getrandom_syscall" >&6; }
17282
17283if test "$have_getrandom_syscall" = yes; then
17284
17285$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17286
17287fi
17288
Victor Stinner3abf44e2015-09-18 15:38:37 +020017289# check if the getrandom() function is available
17290# the test was written for the Solaris function of <sys/random.h>
17291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17292$as_echo_n "checking for the getrandom() function... " >&6; }
17293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17294/* end confdefs.h. */
17295
17296
17297 #include <sys/random.h>
17298
17299 int main() {
17300 char buffer[1];
17301 const size_t buflen = sizeof(buffer);
17302 const int flags = 0;
17303 /* ignore the result, Python checks for ENOSYS at runtime */
17304 (void)getrandom(buffer, buflen, flags);
17305 return 0;
17306 }
17307
17308
17309_ACEOF
17310if ac_fn_c_try_link "$LINENO"; then :
17311 have_getrandom=yes
17312else
17313 have_getrandom=no
17314fi
17315rm -f core conftest.err conftest.$ac_objext \
17316 conftest$ac_exeext conftest.$ac_ext
17317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17318$as_echo "$have_getrandom" >&6; }
17319
17320if test "$have_getrandom" = yes; then
17321
17322$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17323
17324fi
17325
Neil Schemenauer5741c452019-02-08 10:48:46 -080017326# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17327# shm_* may only be available if linking against librt
17328save_LIBS="$LIBS"
17329save_includes_default="$ac_includes_default"
17330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17331$as_echo_n "checking for library containing shm_open... " >&6; }
17332if ${ac_cv_search_shm_open+:} false; then :
17333 $as_echo_n "(cached) " >&6
17334else
17335 ac_func_search_save_LIBS=$LIBS
17336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17337/* end confdefs.h. */
17338
17339/* Override any GCC internal prototype to avoid an error.
17340 Use char because int might match the return type of a GCC
17341 builtin and then its argument prototype would still apply. */
17342#ifdef __cplusplus
17343extern "C"
17344#endif
17345char shm_open ();
17346int
17347main ()
17348{
17349return shm_open ();
17350 ;
17351 return 0;
17352}
17353_ACEOF
17354for ac_lib in '' rt; do
17355 if test -z "$ac_lib"; then
17356 ac_res="none required"
17357 else
17358 ac_res=-l$ac_lib
17359 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17360 fi
17361 if ac_fn_c_try_link "$LINENO"; then :
17362 ac_cv_search_shm_open=$ac_res
17363fi
17364rm -f core conftest.err conftest.$ac_objext \
17365 conftest$ac_exeext
17366 if ${ac_cv_search_shm_open+:} false; then :
17367 break
17368fi
17369done
17370if ${ac_cv_search_shm_open+:} false; then :
17371
17372else
17373 ac_cv_search_shm_open=no
17374fi
17375rm conftest.$ac_ext
17376LIBS=$ac_func_search_save_LIBS
17377fi
17378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17379$as_echo "$ac_cv_search_shm_open" >&6; }
17380ac_res=$ac_cv_search_shm_open
17381if test "$ac_res" != no; then :
17382 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17383
17384fi
17385
17386if test "$ac_cv_search_shm_open" = "-lrt"; then
17387
17388$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17389
17390fi
17391for ac_header in sys/mman.h
17392do :
17393 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17394if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17395 cat >>confdefs.h <<_ACEOF
17396#define HAVE_SYS_MMAN_H 1
17397_ACEOF
17398
17399fi
17400
17401done
17402
17403# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17404ac_includes_default="\
17405${ac_includes_default}
17406#ifndef __cplusplus
17407# ifdef HAVE_SYS_MMAN_H
17408# include <sys/mman.h>
17409# endif
17410#endif
17411"
17412for ac_func in shm_open shm_unlink
17413do :
17414 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17415ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17416if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17417 cat >>confdefs.h <<_ACEOF
17418#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17419_ACEOF
17420
17421fi
17422done
17423
17424# we don't want to link with librt always, restore LIBS
17425LIBS="$save_LIBS"
17426ac_includes_default="$save_includes_default"
17427
Christian Heimesff5be6e2018-01-20 13:19:21 +010017428# Check for usable OpenSSL
17429
17430 found=false
17431
17432# Check whether --with-openssl was given.
17433if test "${with_openssl+set}" = set; then :
17434 withval=$with_openssl;
17435 case "$withval" in
17436 "" | y | ye | yes | n | no)
17437 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17438 ;;
17439 *) ssldirs="$withval"
17440 ;;
17441 esac
17442
17443else
17444
17445 # if pkg-config is installed and openssl has installed a .pc file,
17446 # then use that information and don't search ssldirs
17447 if test -n "$ac_tool_prefix"; then
17448 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17449set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17451$as_echo_n "checking for $ac_word... " >&6; }
17452if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17453 $as_echo_n "(cached) " >&6
17454else
17455 if test -n "$PKG_CONFIG"; then
17456 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17457else
17458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17459for as_dir in $PATH
17460do
17461 IFS=$as_save_IFS
17462 test -z "$as_dir" && as_dir=.
17463 for ac_exec_ext in '' $ac_executable_extensions; do
17464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17465 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17467 break 2
17468 fi
17469done
17470 done
17471IFS=$as_save_IFS
17472
17473fi
17474fi
17475PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17476if test -n "$PKG_CONFIG"; then
17477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17478$as_echo "$PKG_CONFIG" >&6; }
17479else
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17481$as_echo "no" >&6; }
17482fi
17483
17484
17485fi
17486if test -z "$ac_cv_prog_PKG_CONFIG"; then
17487 ac_ct_PKG_CONFIG=$PKG_CONFIG
17488 # Extract the first word of "pkg-config", so it can be a program name with args.
17489set dummy pkg-config; ac_word=$2
17490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17491$as_echo_n "checking for $ac_word... " >&6; }
17492if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17493 $as_echo_n "(cached) " >&6
17494else
17495 if test -n "$ac_ct_PKG_CONFIG"; then
17496 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17497else
17498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17499for as_dir in $PATH
17500do
17501 IFS=$as_save_IFS
17502 test -z "$as_dir" && as_dir=.
17503 for ac_exec_ext in '' $ac_executable_extensions; do
17504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17505 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17507 break 2
17508 fi
17509done
17510 done
17511IFS=$as_save_IFS
17512
17513fi
17514fi
17515ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17516if test -n "$ac_ct_PKG_CONFIG"; then
17517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17518$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17519else
17520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521$as_echo "no" >&6; }
17522fi
17523
17524 if test "x$ac_ct_PKG_CONFIG" = x; then
17525 PKG_CONFIG=""
17526 else
17527 case $cross_compiling:$ac_tool_warned in
17528yes:)
17529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17531ac_tool_warned=yes ;;
17532esac
17533 PKG_CONFIG=$ac_ct_PKG_CONFIG
17534 fi
17535else
17536 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17537fi
17538
17539 if test x"$PKG_CONFIG" != x""; then
17540 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17541 if test $? = 0; then
17542 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17543 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17544 found=true
17545 fi
17546 fi
17547
17548 # no such luck; use some default ssldirs
17549 if ! $found; then
17550 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17551 fi
17552
17553
17554fi
17555
17556
17557
17558 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17559 # an 'openssl' subdirectory
17560
17561 if ! $found; then
17562 OPENSSL_INCLUDES=
17563 for ssldir in $ssldirs; do
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17565$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17566 if test -f "$ssldir/include/openssl/ssl.h"; then
17567 OPENSSL_INCLUDES="-I$ssldir/include"
17568 OPENSSL_LDFLAGS="-L$ssldir/lib"
17569 OPENSSL_LIBS="-lssl -lcrypto"
17570 found=true
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17572$as_echo "yes" >&6; }
17573 break
17574 else
17575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17576$as_echo "no" >&6; }
17577 fi
17578 done
17579
17580 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17581 # it will just work!
17582 fi
17583
17584 # try the preprocessor and linker with our new flags,
17585 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17586
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17588$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17589 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17590 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17591
17592 save_LIBS="$LIBS"
17593 save_LDFLAGS="$LDFLAGS"
17594 save_CPPFLAGS="$CPPFLAGS"
17595 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17596 LIBS="$OPENSSL_LIBS $LIBS"
17597 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17599/* end confdefs.h. */
17600#include <openssl/ssl.h>
17601int
17602main ()
17603{
17604SSL_new(NULL)
17605 ;
17606 return 0;
17607}
17608_ACEOF
17609if ac_fn_c_try_link "$LINENO"; then :
17610
17611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17612$as_echo "yes" >&6; }
17613 have_openssl=yes
17614
17615else
17616
17617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17618$as_echo "no" >&6; }
17619 have_openssl=no
17620
17621fi
17622rm -f core conftest.err conftest.$ac_objext \
17623 conftest$ac_exeext conftest.$ac_ext
17624 CPPFLAGS="$save_CPPFLAGS"
17625 LDFLAGS="$save_LDFLAGS"
17626 LIBS="$save_LIBS"
17627
17628
17629
17630
17631
17632
17633if test "$have_openssl" = yes; then
17634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17635$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17636
17637 save_LIBS="$LIBS"
17638 save_LDFLAGS="$LDFLAGS"
17639 save_CPPFLAGS="$CPPFLAGS"
17640 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17641 LIBS="$OPENSSL_LIBS $LIBS"
17642 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17643
17644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17645/* end confdefs.h. */
17646
17647 #include <openssl/x509_vfy.h>
17648
17649int
17650main ()
17651{
17652
17653 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17654 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17655 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17656 X509_VERIFY_PARAM_set_hostflags(p, 0);
17657
17658 ;
17659 return 0;
17660}
17661
17662_ACEOF
17663if ac_fn_c_try_link "$LINENO"; then :
17664
17665 ac_cv_has_x509_verify_param_set1_host=yes
17666
17667else
17668
17669 ac_cv_has_x509_verify_param_set1_host=no
17670
17671fi
17672rm -f core conftest.err conftest.$ac_objext \
17673 conftest$ac_exeext conftest.$ac_ext
17674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17675$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17676 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17677
17678$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17679
17680 fi
17681
17682 CPPFLAGS="$save_CPPFLAGS"
17683 LDFLAGS="$save_LDFLAGS"
17684 LIBS="$save_LIBS"
17685fi
17686
Christian Heimes892d66e2018-01-29 14:10:18 +010017687# ssl module default cipher suite string
17688
17689
17690
17691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17692$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17693
17694# Check whether --with-ssl-default-suites was given.
17695if test "${with_ssl_default_suites+set}" = set; then :
17696 withval=$with_ssl_default_suites;
17697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17698$as_echo "$withval" >&6; }
17699case "$withval" in
17700 python)
17701 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17702
17703 ;;
17704 openssl)
17705 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17706
17707 ;;
17708 *)
17709 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17710
17711 cat >>confdefs.h <<_ACEOF
17712#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17713_ACEOF
17714
17715 ;;
17716esac
17717
17718else
17719
17720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17721$as_echo "python" >&6; }
17722$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17723
17724
17725fi
17726
17727
Christian Heimes9b60e552020-05-15 23:54:53 +020017728# builtin hash modules
17729default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17730
17731$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17732
17733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17734$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17735
17736# Check whether --with-builtin-hashlib-hashes was given.
17737if test "${with_builtin_hashlib_hashes+set}" = set; then :
17738 withval=$with_builtin_hashlib_hashes;
17739case "$withval" in
17740 yes)
17741 withval=$default_hashlib_hashes
17742 ;;
17743 no)
17744 withval=""
17745 ;;
17746esac
17747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17748$as_echo "$withval" >&6; }
17749cat >>confdefs.h <<_ACEOF
17750#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17751_ACEOF
17752
17753
17754else
17755
17756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17757$as_echo "$default_hashlib_hashes" >&6; };
17758cat >>confdefs.h <<_ACEOF
17759#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17760_ACEOF
17761
17762
17763fi
17764
17765
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017766# --with-experimental-isolated-subinterpreters
17767
17768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17769$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17770
17771# Check whether --with-experimental-isolated-subinterpreters was given.
17772if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17773 withval=$with_experimental_isolated_subinterpreters;
17774if test "$withval" != no
17775then
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17777$as_echo "yes" >&6; };
17778 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17779
17780else
17781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17782$as_echo "no" >&6; };
17783fi
17784else
17785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17786$as_echo "no" >&6; }
17787fi
17788
17789
Victor Stinner801bb0b2021-02-17 11:14:42 +010017790# --with-static-libpython
17791STATIC_LIBPYTHON=1
17792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
17793$as_echo_n "checking for --with-static-libpython... " >&6; }
17794
17795# Check whether --with-static-libpython was given.
17796if test "${with_static_libpython+set}" = set; then :
17797 withval=$with_static_libpython;
17798if test "$withval" = no
17799then
17800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17801$as_echo "no" >&6; };
17802 STATIC_LIBPYTHON=0
17803else
17804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17805$as_echo "yes" >&6; };
17806fi
17807else
17808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17809$as_echo "yes" >&6; }
17810fi
17811
17812LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
17813if test "$PY_ENABLE_SHARED" = 1; then
17814 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
17815 if test "$STATIC_LIBPYTHON" = 1; then
17816 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17817 fi
17818else
17819 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17820fi
17821
17822
17823
pxinwr277ce302020-12-30 20:50:39 +080017824# Check whether to disable test modules. Once set, setup.py will not build
17825# test extension modules and "make install" will not install test suites.
17826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17827$as_echo_n "checking for --disable-test-modules... " >&6; }
17828# Check whether --enable-test-modules was given.
17829if test "${enable_test_modules+set}" = set; then :
17830 enableval=$enable_test_modules;
17831fi
17832
17833if test "$enable_test_modules" = no; then
17834 TEST_MODULES=no
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17836$as_echo "yes" >&6; }
17837else
17838 TEST_MODULES=yes
17839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17840$as_echo "no" >&6; }
17841fi
17842
17843
Christian Heimes892d66e2018-01-29 14:10:18 +010017844
Guido van Rossum627b2d71993-12-24 10:39:16 +000017845# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017846ac_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 +000017847
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017848ac_config_files="$ac_config_files Modules/ld_so_aix"
17849
Martin v. Löwis11437992002-04-12 09:54:03 +000017850cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017851# This file is a shell script that caches the results of configure
17852# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017853# scripts and configure runs, see configure's option --config-cache.
17854# It is not useful on other systems. If it contains results you don't
17855# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017856#
Martin v. Löwis11437992002-04-12 09:54:03 +000017857# config.status only pays attention to the cache file if you give it
17858# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017859#
Skip Montanaro6dead952003-09-25 14:50:04 +000017860# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017861# loading this file, other *unset* `ac_cv_foo' will be assigned the
17862# following values.
17863
17864_ACEOF
17865
Guido van Rossumf78abae1997-01-21 22:02:36 +000017866# The following way of writing the cache mishandles newlines in values,
17867# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017869# Ultrix sh set writes to stderr and can't be redirected directly,
17870# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871(
17872 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17873 eval ac_val=\$$ac_var
17874 case $ac_val in #(
17875 *${as_nl}*)
17876 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017877 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17878$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879 esac
17880 case $ac_var in #(
17881 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017882 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17883 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884 esac ;;
17885 esac
17886 done
17887
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017889 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17890 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017891 # `set' does not quote correctly, so add quotes: double-quote
17892 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017894 "s/'/'\\\\''/g;
17895 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 *)
17898 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901 esac |
17902 sort
17903) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17909 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17911 :end' >>confcache
17912if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17913 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017914 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17916$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017917 if test ! -f "$cache_file" || test -h "$cache_file"; then
17918 cat confcache >"$cache_file"
17919 else
17920 case $cache_file in #(
17921 */* | ?:*)
17922 mv -f confcache "$cache_file"$$ &&
17923 mv -f "$cache_file"$$ "$cache_file" ;; #(
17924 *)
17925 mv -f confcache "$cache_file" ;;
17926 esac
17927 fi
17928 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017929 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017930 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17931$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017932 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017933fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017934rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017936test "x$prefix" = xNONE && prefix=$ac_default_prefix
17937# Let make expand exec_prefix.
17938test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017939
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017940DEFS=-DHAVE_CONFIG_H
17941
Skip Montanaro6dead952003-09-25 14:50:04 +000017942ac_libobjs=
17943ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017944U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017945for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17946 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017948 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17950 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017951 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17952 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017953done
17954LIBOBJS=$ac_libobjs
17955
17956LTLIBOBJS=$ac_ltlibobjs
17957
17958
Martin v. Löwis11437992002-04-12 09:54:03 +000017959
Matthias Kloseb9621712010-04-24 17:59:49 +000017960
Victor Stinnere0be4232011-10-25 13:06:09 +020017961: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017962ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017963ac_clean_files_save=$ac_clean_files
17964ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017965{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17966$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17967as_write_fail=0
17968cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017969#! $SHELL
17970# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017971# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017972# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017973# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017974
Martin v. Löwis11437992002-04-12 09:54:03 +000017975debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017976ac_cs_recheck=false
17977ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017978
Matthias Kloseb9621712010-04-24 17:59:49 +000017979SHELL=\${CONFIG_SHELL-$SHELL}
17980export SHELL
17981_ASEOF
17982cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17983## -------------------- ##
17984## M4sh Initialization. ##
17985## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987# Be more Bourne compatible
17988DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017989if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 emulate sh
17991 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017992 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017993 # is contrary to our usage. Disable this feature.
17994 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017996else
Matthias Kloseb9621712010-04-24 17:59:49 +000017997 case `(set -o) 2>/dev/null` in #(
17998 *posix*) :
17999 set -o posix ;; #(
18000 *) :
18001 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002esac
Michael W. Hudson54241132001-12-07 15:38:26 +000018003fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000018004
18005
Matthias Kloseb9621712010-04-24 17:59:49 +000018006as_nl='
18007'
18008export as_nl
18009# Printing a long string crashes Solaris 7 /usr/bin/printf.
18010as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18011as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18012as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18013# Prefer a ksh shell builtin over an external printf program on Solaris,
18014# but without wasting forks for bash or zsh.
18015if test -z "$BASH_VERSION$ZSH_VERSION" \
18016 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18017 as_echo='print -r --'
18018 as_echo_n='print -rn --'
18019elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18020 as_echo='printf %s\n'
18021 as_echo_n='printf %s'
18022else
18023 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18024 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18025 as_echo_n='/usr/ucb/echo -n'
18026 else
18027 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18028 as_echo_n_body='eval
18029 arg=$1;
18030 case $arg in #(
18031 *"$as_nl"*)
18032 expr "X$arg" : "X\\(.*\\)$as_nl";
18033 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18034 esac;
18035 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18036 '
18037 export as_echo_n_body
18038 as_echo_n='sh -c $as_echo_n_body as_echo'
18039 fi
18040 export as_echo_body
18041 as_echo='sh -c $as_echo_body as_echo'
18042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018043
18044# The user is always right.
18045if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018046 PATH_SEPARATOR=:
18047 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18048 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18049 PATH_SEPARATOR=';'
18050 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053
18054# IFS
18055# We need space, tab and new line, in precisely that order. Quoting is
18056# there to prevent editors from complaining about space-tab.
18057# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18058# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059IFS=" "" $as_nl"
18060
18061# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018062as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018063case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064 *[\\/]* ) as_myself=$0 ;;
18065 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018066for as_dir in $PATH
18067do
18068 IFS=$as_save_IFS
18069 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000018070 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18071 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074 ;;
18075esac
18076# We did not find ourselves, most probably we were run as `sh COMMAND'
18077# in which case we are not to be found in the path.
18078if test "x$as_myself" = x; then
18079 as_myself=$0
18080fi
18081if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018082 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18083 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084fi
18085
Matthias Kloseb9621712010-04-24 17:59:49 +000018086# Unset variables that we do not need and which cause bugs (e.g. in
18087# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18088# suppresses any "Segmentation fault" message there. '((' could
18089# trigger a bug in pdksh 5.2.14.
18090for as_var in BASH_ENV ENV MAIL MAILPATH
18091do eval test x\${$as_var+set} = xset \
18092 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093done
18094PS1='$ '
18095PS2='> '
18096PS4='+ '
18097
18098# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000018099LC_ALL=C
18100export LC_ALL
18101LANGUAGE=C
18102export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103
Matthias Kloseb9621712010-04-24 17:59:49 +000018104# CDPATH.
18105(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18106
18107
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018108# as_fn_error STATUS ERROR [LINENO LOG_FD]
18109# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018110# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18111# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018112# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018113as_fn_error ()
18114{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018115 as_status=$1; test $as_status -eq 0 && as_status=1
18116 if test "$4"; then
18117 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18118 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018119 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018120 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018121 as_fn_exit $as_status
18122} # as_fn_error
18123
18124
18125# as_fn_set_status STATUS
18126# -----------------------
18127# Set $? to STATUS, without forking.
18128as_fn_set_status ()
18129{
18130 return $1
18131} # as_fn_set_status
18132
18133# as_fn_exit STATUS
18134# -----------------
18135# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18136as_fn_exit ()
18137{
18138 set +e
18139 as_fn_set_status $1
18140 exit $1
18141} # as_fn_exit
18142
18143# as_fn_unset VAR
18144# ---------------
18145# Portably unset VAR.
18146as_fn_unset ()
18147{
18148 { eval $1=; unset $1;}
18149}
18150as_unset=as_fn_unset
18151# as_fn_append VAR VALUE
18152# ----------------------
18153# Append the text in VALUE to the end of the definition contained in VAR. Take
18154# advantage of any shell optimizations that allow amortized linear growth over
18155# repeated appends, instead of the typical quadratic growth present in naive
18156# implementations.
18157if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18158 eval 'as_fn_append ()
18159 {
18160 eval $1+=\$2
18161 }'
18162else
18163 as_fn_append ()
18164 {
18165 eval $1=\$$1\$2
18166 }
18167fi # as_fn_append
18168
18169# as_fn_arith ARG...
18170# ------------------
18171# Perform arithmetic evaluation on the ARGs, and store the result in the
18172# global $as_val. Take advantage of shells that can avoid forks. The arguments
18173# must be portable across $(()) and expr.
18174if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18175 eval 'as_fn_arith ()
18176 {
18177 as_val=$(( $* ))
18178 }'
18179else
18180 as_fn_arith ()
18181 {
18182 as_val=`expr "$@" || test $? -eq 1`
18183 }
18184fi # as_fn_arith
18185
18186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018187if expr a : '\(a\)' >/dev/null 2>&1 &&
18188 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18189 as_expr=expr
18190else
18191 as_expr=false
18192fi
18193
18194if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18195 as_basename=basename
18196else
18197 as_basename=false
18198fi
18199
Matthias Kloseb9621712010-04-24 17:59:49 +000018200if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18201 as_dirname=dirname
18202else
18203 as_dirname=false
18204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206as_me=`$as_basename -- "$0" ||
18207$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18208 X"$0" : 'X\(//\)$' \| \
18209 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018210$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018211 sed '/^.*\/\([^/][^/]*\)\/*$/{
18212 s//\1/
18213 q
18214 }
18215 /^X\/\(\/\/\)$/{
18216 s//\1/
18217 q
18218 }
18219 /^X\/\(\/\).*/{
18220 s//\1/
18221 q
18222 }
18223 s/.*/./; q'`
18224
Matthias Kloseb9621712010-04-24 17:59:49 +000018225# Avoid depending upon Character Ranges.
18226as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18227as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18228as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18229as_cr_digits='0123456789'
18230as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231
18232ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018233case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018235 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018237 xy) ECHO_C='\c';;
18238 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18239 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018240 esac;;
18241*)
18242 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018244
Martin v. Löwis11437992002-04-12 09:54:03 +000018245rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246if test -d conf$$.dir; then
18247 rm -f conf$$.dir/conf$$.file
18248else
18249 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018250 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018252if (echo >conf$$.file) 2>/dev/null; then
18253 if ln -s conf$$.file conf$$ 2>/dev/null; then
18254 as_ln_s='ln -s'
18255 # ... but there are two gotchas:
18256 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18257 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018258 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018259 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018260 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018261 elif ln conf$$.file conf$$ 2>/dev/null; then
18262 as_ln_s=ln
18263 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018264 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018266else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018267 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018269rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18270rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018271
Matthias Kloseb9621712010-04-24 17:59:49 +000018272
18273# as_fn_mkdir_p
18274# -------------
18275# Create "$as_dir" as a directory, including parents if necessary.
18276as_fn_mkdir_p ()
18277{
18278
18279 case $as_dir in #(
18280 -*) as_dir=./$as_dir;;
18281 esac
18282 test -d "$as_dir" || eval $as_mkdir_p || {
18283 as_dirs=
18284 while :; do
18285 case $as_dir in #(
18286 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18287 *) as_qdir=$as_dir;;
18288 esac
18289 as_dirs="'$as_qdir' $as_dirs"
18290 as_dir=`$as_dirname -- "$as_dir" ||
18291$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18292 X"$as_dir" : 'X\(//\)[^/]' \| \
18293 X"$as_dir" : 'X\(//\)$' \| \
18294 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18295$as_echo X"$as_dir" |
18296 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18297 s//\1/
18298 q
18299 }
18300 /^X\(\/\/\)[^/].*/{
18301 s//\1/
18302 q
18303 }
18304 /^X\(\/\/\)$/{
18305 s//\1/
18306 q
18307 }
18308 /^X\(\/\).*/{
18309 s//\1/
18310 q
18311 }
18312 s/.*/./; q'`
18313 test -d "$as_dir" && break
18314 done
18315 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018316 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018317
18318
18319} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018320if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018321 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018322else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018323 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018324 as_mkdir_p=false
18325fi
18326
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018327
18328# as_fn_executable_p FILE
18329# -----------------------
18330# Test if FILE is an executable regular file.
18331as_fn_executable_p ()
18332{
18333 test -f "$1" && test -x "$1"
18334} # as_fn_executable_p
18335as_test_x='test -x'
18336as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018337
18338# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018339as_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 +000018340
18341# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018342as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018343
18344
Martin v. Löwis11437992002-04-12 09:54:03 +000018345exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018346## ----------------------------------- ##
18347## Main body of $CONFIG_STATUS script. ##
18348## ----------------------------------- ##
18349_ASEOF
18350test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018351
Matthias Kloseb9621712010-04-24 17:59:49 +000018352cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18353# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018354# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355# values after options handling.
18356ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018357This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018358generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018359
18360 CONFIG_FILES = $CONFIG_FILES
18361 CONFIG_HEADERS = $CONFIG_HEADERS
18362 CONFIG_LINKS = $CONFIG_LINKS
18363 CONFIG_COMMANDS = $CONFIG_COMMANDS
18364 $ $0 $@
18365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018366on `(hostname || uname -n) 2>/dev/null | sed 1q`
18367"
18368
Martin v. Löwis11437992002-04-12 09:54:03 +000018369_ACEOF
18370
Matthias Kloseb9621712010-04-24 17:59:49 +000018371case $ac_config_files in *"
18372"*) set x $ac_config_files; shift; ac_config_files=$*;;
18373esac
18374
18375case $ac_config_headers in *"
18376"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18377esac
18378
18379
18380cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018381# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018382config_files="$ac_config_files"
18383config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018386
Matthias Kloseb9621712010-04-24 17:59:49 +000018387cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018388ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018389\`$as_me' instantiates files and other configuration actions
18390from templates according to the current configuration. Unless the files
18391and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018392
Matthias Kloseb9621712010-04-24 17:59:49 +000018393Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018394
18395 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018397 --config print configuration, then exit
18398 -q, --quiet, --silent
18399 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 -d, --debug don't remove temporary files
18401 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018402 --file=FILE[:TEMPLATE]
18403 instantiate the configuration file FILE
18404 --header=FILE[:TEMPLATE]
18405 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018406
18407Configuration files:
18408$config_files
18409
18410Configuration headers:
18411$config_headers
18412
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018413Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18417ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018418ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018419python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018420configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018421 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018422
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018423Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018424This config.status script is free software; the Free Software Foundation
18425gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426
18427ac_pwd='$ac_pwd'
18428srcdir='$srcdir'
18429INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018430MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018431test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018432_ACEOF
18433
Matthias Kloseb9621712010-04-24 17:59:49 +000018434cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18435# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018436ac_need_defaults=:
18437while test $# != 0
18438do
18439 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018440 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18442 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018443 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018444 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018445 --*=)
18446 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18447 ac_optarg=
18448 ac_shift=:
18449 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018451 ac_option=$1
18452 ac_optarg=$2
18453 ac_shift=shift
18454 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 esac
18456
Skip Montanaro6dead952003-09-25 14:50:04 +000018457 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018459 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18460 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018461 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018462 $as_echo "$ac_cs_version"; exit ;;
18463 --config | --confi | --conf | --con | --co | --c )
18464 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018466 debug=: ;;
18467 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018468 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018469 case $ac_optarg in
18470 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018471 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018472 esac
18473 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 ac_need_defaults=false;;
18475 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018476 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018477 case $ac_optarg in
18478 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18479 esac
18480 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018481 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482 --he | --h)
18483 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018484 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018485Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018487 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018488 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18489 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18490 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018491
18492 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018493 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018494Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018495
Matthias Kloseb9621712010-04-24 17:59:49 +000018496 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018498
18499 esac
18500 shift
18501done
18502
Skip Montanaro6dead952003-09-25 14:50:04 +000018503ac_configure_extra_args=
18504
18505if $ac_cs_silent; then
18506 exec 6>/dev/null
18507 ac_configure_extra_args="$ac_configure_extra_args --silent"
18508fi
18509
18510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018512if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018513 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018514 shift
18515 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18516 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018517 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018518 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018519fi
18520
Martin v. Löwis11437992002-04-12 09:54:03 +000018521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018522cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523exec 5>>config.log
18524{
18525 echo
18526 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18527## Running $as_me. ##
18528_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018529 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018533cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018535
Matthias Kloseb9621712010-04-24 17:59:49 +000018536cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537
18538# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018539for ac_config_target in $ac_config_targets
18540do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018541 case $ac_config_target in
18542 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18543 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18544 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018545 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18546 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018548 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018549 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018550 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018551 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552
Victor Stinnere0be4232011-10-25 13:06:09 +020018553 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 esac
18555done
18556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018557
Martin v. Löwis11437992002-04-12 09:54:03 +000018558# If the user did not use the arguments to specify the items to instantiate,
18559# then the envvar interface is used. Set only those that are not.
18560# We use the long form for the default assignment because of an extremely
18561# bizarre bug on SunOS 4.1.3.
18562if $ac_need_defaults; then
18563 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18564 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18565fi
18566
Skip Montanaro6dead952003-09-25 14:50:04 +000018567# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018568# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018569# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570# Hook for its removal unless debugging.
18571# Note that there is a small window in which the directory will not be cleaned:
18572# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018573$debug ||
18574{
Victor Stinnere0be4232011-10-25 13:06:09 +020018575 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018577 : "${ac_tmp:=$tmp}"
18578 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018579' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018580 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018581}
Martin v. Löwis11437992002-04-12 09:54:03 +000018582# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018583
Martin v. Löwis11437992002-04-12 09:54:03 +000018584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018585 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018586 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018587} ||
18588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018589 tmp=./conf$$-$RANDOM
18590 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018591} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018592ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018593
Matthias Kloseb9621712010-04-24 17:59:49 +000018594# Set up the scripts for CONFIG_FILES section.
18595# No need to generate them if there are no CONFIG_FILES.
18596# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018598
Matthias Kloseb9621712010-04-24 17:59:49 +000018599
18600ac_cr=`echo X | tr X '\015'`
18601# On cygwin, bash can eat \r inside `` if the user requested igncr.
18602# But we know of no other shell where ac_cr would be empty at this
18603# point, so we can use a bashism as a fallback.
18604if test "x$ac_cr" = x; then
18605 eval ac_cr=\$\'\\r\'
18606fi
18607ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18608if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018609 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018610else
18611 ac_cs_awk_cr=$ac_cr
18612fi
18613
Victor Stinnere0be4232011-10-25 13:06:09 +020018614echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018615_ACEOF
18616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617
Matthias Kloseb9621712010-04-24 17:59:49 +000018618{
18619 echo "cat >conf$$subs.awk <<_ACEOF" &&
18620 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18621 echo "_ACEOF"
18622} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018623 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18624ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625ac_delim='%!_!# '
18626for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018627 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018628 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629
Matthias Kloseb9621712010-04-24 17:59:49 +000018630 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18631 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018632 break
18633 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018634 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635 else
18636 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018637 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638done
Matthias Kloseb9621712010-04-24 17:59:49 +000018639rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018640
Matthias Kloseb9621712010-04-24 17:59:49 +000018641cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018642cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018644sed -n '
18645h
18646s/^/S["/; s/!.*/"]=/
18647p
18648g
18649s/^[^!]*!//
18650:repl
18651t repl
18652s/'"$ac_delim"'$//
18653t delim
18654:nl
18655h
18656s/\(.\{148\}\)..*/\1/
18657t more1
18658s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18659p
18660n
18661b repl
18662:more1
18663s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18664p
18665g
18666s/.\{148\}//
18667t nl
18668:delim
18669h
18670s/\(.\{148\}\)..*/\1/
18671t more2
18672s/["\\]/\\&/g; s/^/"/; s/$/"/
18673p
18674b
18675:more2
18676s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18677p
18678g
18679s/.\{148\}//
18680t delim
18681' <conf$$subs.awk | sed '
18682/^[^""]/{
18683 N
18684 s/\n//
18685}
18686' >>$CONFIG_STATUS || ac_write_fail=1
18687rm -f conf$$subs.awk
18688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18689_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018690cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018691 for (key in S) S_is_set[key] = 1
18692 FS = ""
18693
18694}
18695{
18696 line = $ 0
18697 nfields = split(line, field, "@")
18698 substed = 0
18699 len = length(field[1])
18700 for (i = 2; i < nfields; i++) {
18701 key = field[i]
18702 keylen = length(key)
18703 if (S_is_set[key]) {
18704 value = S[key]
18705 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18706 len += length(value) + length(field[++i])
18707 substed = 1
18708 } else
18709 len += 1 + keylen
18710 }
18711
18712 print line
18713}
18714
18715_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18718if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18719 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18720else
18721 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018722fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018723 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018724_ACEOF
18725
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018726# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18727# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018728# trailing colons and then remove the whole line if VPATH becomes empty
18729# (actually we leave an empty line to preserve line numbers).
18730if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018731 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18732h
18733s///
18734s/^/:/
18735s/[ ]*$/:/
18736s/:\$(srcdir):/:/g
18737s/:\${srcdir}:/:/g
18738s/:@srcdir@:/:/g
18739s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018740s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018741x
18742s/\(=[ ]*\).*/\1/
18743G
18744s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745s/^[^=]*=[ ]*$//
18746}'
18747fi
18748
Matthias Kloseb9621712010-04-24 17:59:49 +000018749cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018750fi # test -n "$CONFIG_FILES"
18751
Matthias Kloseb9621712010-04-24 17:59:49 +000018752# Set up the scripts for CONFIG_HEADERS section.
18753# No need to generate them if there are no CONFIG_HEADERS.
18754# This happens for instance with `./config.status Makefile'.
18755if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018756cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018757BEGIN {
18758_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759
Matthias Kloseb9621712010-04-24 17:59:49 +000018760# Transform confdefs.h into an awk script `defines.awk', embedded as
18761# here-document in config.status, that substitutes the proper values into
18762# config.h.in to produce config.h.
18763
18764# Create a delimiter string that does not exist in confdefs.h, to ease
18765# handling of long lines.
18766ac_delim='%!_!# '
18767for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018768 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18769 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018770 break
18771 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018772 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018773 else
18774 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18775 fi
18776done
18777
18778# For the awk script, D is an array of macro values keyed by name,
18779# likewise P contains macro parameters if any. Preserve backslash
18780# newline sequences.
18781
18782ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18783sed -n '
18784s/.\{148\}/&'"$ac_delim"'/g
18785t rset
18786:rset
18787s/^[ ]*#[ ]*define[ ][ ]*/ /
18788t def
18789d
18790:def
18791s/\\$//
18792t bsnl
18793s/["\\]/\\&/g
18794s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18795D["\1"]=" \3"/p
18796s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18797d
18798:bsnl
18799s/["\\]/\\&/g
18800s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18801D["\1"]=" \3\\\\\\n"\\/p
18802t cont
18803s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18804t cont
18805d
18806:cont
18807n
18808s/.\{148\}/&'"$ac_delim"'/g
18809t clear
18810:clear
18811s/\\$//
18812t bsnlc
18813s/["\\]/\\&/g; s/^/"/; s/$/"/p
18814d
18815:bsnlc
18816s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18817b cont
18818' <confdefs.h | sed '
18819s/'"$ac_delim"'/"\\\
18820"/g' >>$CONFIG_STATUS || ac_write_fail=1
18821
18822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18823 for (key in D) D_is_set[key] = 1
18824 FS = ""
18825}
18826/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18827 line = \$ 0
18828 split(line, arg, " ")
18829 if (arg[1] == "#") {
18830 defundef = arg[2]
18831 mac1 = arg[3]
18832 } else {
18833 defundef = substr(arg[1], 2)
18834 mac1 = arg[2]
18835 }
18836 split(mac1, mac2, "(") #)
18837 macro = mac2[1]
18838 prefix = substr(line, 1, index(line, defundef) - 1)
18839 if (D_is_set[macro]) {
18840 # Preserve the white space surrounding the "#".
18841 print prefix "define", macro P[macro] D[macro]
18842 next
18843 } else {
18844 # Replace #undef with comments. This is necessary, for example,
18845 # in the case of _POSIX_SOURCE, which is predefined and required
18846 # on some systems where configure will not decide to define it.
18847 if (defundef == "undef") {
18848 print "/*", prefix defundef, macro, "*/"
18849 next
18850 }
18851 }
18852}
18853{ print }
18854_ACAWK
18855_ACEOF
18856cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018857 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018858fi # test -n "$CONFIG_HEADERS"
18859
18860
18861eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18862shift
18863for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018864do
18865 case $ac_tag in
18866 :[FHLC]) ac_mode=$ac_tag; continue;;
18867 esac
18868 case $ac_mode$ac_tag in
18869 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018870 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018871 :[FH]-) ac_tag=-:-;;
18872 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18873 esac
18874 ac_save_IFS=$IFS
18875 IFS=:
18876 set x $ac_tag
18877 IFS=$ac_save_IFS
18878 shift
18879 ac_file=$1
18880 shift
18881
18882 case $ac_mode in
18883 :L) ac_source=$1;;
18884 :[FH])
18885 ac_file_inputs=
18886 for ac_f
18887 do
18888 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018889 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018890 *) # Look for the file first in the build tree, then in the source tree
18891 # (if the path is not absolute). The absolute path cannot be DOS-style,
18892 # because $ac_f cannot contain `:'.
18893 test -f "$ac_f" ||
18894 case $ac_f in
18895 [\\/$]*) false;;
18896 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18897 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018898 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018899 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018900 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18901 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018902 done
18903
18904 # Let's still pretend it is `configure' which instantiates (i.e., don't
18905 # use $as_me), people would be surprised to read:
18906 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018907 configure_input='Generated from '`
18908 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18909 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910 if test x"$ac_file" != x-; then
18911 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018912 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18913$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018914 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018915 # Neutralize special characters interpreted by sed in replacement strings.
18916 case $configure_input in #(
18917 *\&* | *\|* | *\\* )
18918 ac_sed_conf_input=`$as_echo "$configure_input" |
18919 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18920 *) ac_sed_conf_input=$configure_input;;
18921 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018922
18923 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018924 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18925 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018926 esac
18927 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018928 esac
18929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018930 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018931$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018932 X"$ac_file" : 'X\(//\)[^/]' \| \
18933 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018934 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018935$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018936 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18937 s//\1/
18938 q
18939 }
18940 /^X\(\/\/\)[^/].*/{
18941 s//\1/
18942 q
18943 }
18944 /^X\(\/\/\)$/{
18945 s//\1/
18946 q
18947 }
18948 /^X\(\/\).*/{
18949 s//\1/
18950 q
18951 }
18952 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018953 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018954 ac_builddir=.
18955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018956case "$ac_dir" in
18957.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18958*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018959 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018961 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018962 case $ac_top_builddir_sub in
18963 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18964 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18965 esac ;;
18966esac
18967ac_abs_top_builddir=$ac_pwd
18968ac_abs_builddir=$ac_pwd$ac_dir_suffix
18969# for backward compatibility:
18970ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018971
18972case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018973 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018974 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018975 ac_top_srcdir=$ac_top_builddir_sub
18976 ac_abs_top_srcdir=$ac_pwd ;;
18977 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018978 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018979 ac_top_srcdir=$srcdir
18980 ac_abs_top_srcdir=$srcdir ;;
18981 *) # Relative name.
18982 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18983 ac_top_srcdir=$ac_top_build_prefix$srcdir
18984 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018985esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018986ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018987
Martin v. Löwis11437992002-04-12 09:54:03 +000018988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018989 case $ac_mode in
18990 :F)
18991 #
18992 # CONFIG_FILE
18993 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018994
18995 case $INSTALL in
18996 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018997 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018998 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018999 ac_MKDIR_P=$MKDIR_P
19000 case $MKDIR_P in
19001 [\\/$]* | ?:[\\/]* ) ;;
19002 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19003 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000019004_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019005
Matthias Kloseb9621712010-04-24 17:59:49 +000019006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019007# If the template does not know about datarootdir, expand it.
19008# FIXME: This hack should be removed a few years after 2.60.
19009ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000019010ac_sed_dataroot='
19011/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019012 p
19013 q
19014}
19015/@datadir@/p
19016/@docdir@/p
19017/@infodir@/p
19018/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000019019/@mandir@/p'
19020case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019021*datarootdir*) ac_datarootdir_seen=yes;;
19022*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000019023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19024$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027 ac_datarootdir_hack='
19028 s&@datadir@&$datadir&g
19029 s&@docdir@&$docdir&g
19030 s&@infodir@&$infodir&g
19031 s&@localedir@&$localedir&g
19032 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000019033 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034esac
19035_ACEOF
19036
19037# Neutralize VPATH when `$srcdir' = `.'.
19038# Shell code in configure.ac might set extrasub.
19039# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000019040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19041ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000019042$extrasub
19043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000019045:t
19046/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000019047s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019048s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000019049s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019050s&@srcdir@&$ac_srcdir&;t t
19051s&@abs_srcdir@&$ac_abs_srcdir&;t t
19052s&@top_srcdir@&$ac_top_srcdir&;t t
19053s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19054s&@builddir@&$ac_builddir&;t t
19055s&@abs_builddir@&$ac_abs_builddir&;t t
19056s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19057s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019058s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019060"
Victor Stinnere0be4232011-10-25 13:06:09 +020019061eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19062 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019064test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019065 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19066 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19067 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000019068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019069which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000019070$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019071which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019072
Victor Stinnere0be4232011-10-25 13:06:09 +020019073 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019074 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019075 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19076 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019077 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019078 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019079 ;;
19080 :H)
19081 #
19082 # CONFIG_HEADER
19083 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019084 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019085 {
19086 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019087 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19088 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019089 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019090 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019091 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19092$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019093 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019094 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019095 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019096 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 fi
19098 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019099 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019100 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019101 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019102 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019103 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019105
19106 esac
19107
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019108
19109 case $ac_file$ac_mode in
19110 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19111
19112 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019113done # for ac_tag
19114
Guido van Rossum627b2d71993-12-24 10:39:16 +000019115
Matthias Kloseb9621712010-04-24 17:59:49 +000019116as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019117_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019118ac_clean_files=$ac_clean_files_save
19119
Matthias Kloseb9621712010-04-24 17:59:49 +000019120test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019121 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019122
Martin v. Löwis11437992002-04-12 09:54:03 +000019123
19124# configure is writing to config.log, and then calls config.status.
19125# config.status does its own redirection, appending to config.log.
19126# Unfortunately, on DOS this fails, as config.log is still kept open
19127# by configure, so config.status won't be able to write to it; its
19128# output is simply discarded. So we exec the FD to /dev/null,
19129# effectively closing config.log, so it can be properly (re)opened and
19130# appended to by config.status. When coming back to configure, we
19131# need to make the FD available again.
19132if test "$no_create" != yes; then
19133 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019134 ac_config_status_args=
19135 test "$silent" = yes &&
19136 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019137 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019138 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019139 exec 5>>config.log
19140 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19141 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019142 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019143fi
19144if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19146$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019147fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019148
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019149
Christian Heimes75ed8902013-11-20 01:11:18 +010019150echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019151if test ! -f Modules/Setup.local
19152then
19153 echo "# Edit this file for local setup changes" >Modules/Setup.local
19154fi
19155
Christian Heimes75ed8902013-11-20 01:11:18 +010019156echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019157$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019158 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019159 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019160mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019161
19162if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19163 echo "" >&6
19164 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019165 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 +000019166 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019167 echo "" >&6
19168 echo "" >&6
19169fi