blob: 8c948250e41e47ea8684d2752b79aa592ab8daf3 [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
10717 TCLTK_INCLUDES=""
10718 TCLTK_LIBS=""
10719else
10720 TCLTK_INCLUDES="$with_tcltk_includes"
10721 TCLTK_LIBS="$with_tcltk_libs"
10722fi
10723
Matthias Klose55708cc2009-04-30 08:06:49 +000010724# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10726$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010727
10728# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010729if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010730 withval=$with_dbmliborder;
10731if test x$with_dbmliborder = xyes
10732then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010733as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010734else
10735 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10736 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10737 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010738 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010739 fi
10740 done
10741fi
10742fi
10743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10745$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010746
Martin v. Löwis11437992002-04-12 09:54:03 +000010747# Templates for things AC_DEFINEd more than once.
10748# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010749
10750
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010751if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010752then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010753 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010755
10756 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010757 if test "$ac_sys_system" = "SunOS"; then
10758 CFLAGS="$CFLAGS -D_REENTRANT"
10759 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010760elif test "$ac_cv_kpthread" = "yes"
10761then
10762 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010763 if test "$ac_cv_cxx_thread" = "yes"; then
10764 CXX="$CXX -Kpthread"
10765 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010766 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010767elif test "$ac_cv_kthread" = "yes"
10768then
10769 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010770 if test "$ac_cv_cxx_thread" = "yes"; then
10771 CXX="$CXX -Kthread"
10772 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010773 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010774elif test "$ac_cv_pthread" = "yes"
10775then
10776 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010777 if test "$ac_cv_cxx_thread" = "yes"; then
10778 CXX="$CXX -pthread"
10779 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010780 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010781else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010782 if test ! -z "$withval" -a -d "$withval"
10783 then LDFLAGS="$LDFLAGS -L$withval"
10784 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010785
10786 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010787 # define _POSIX_THREADS in unistd.h. Some apparently don't
10788 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10790$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010792/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010793
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010794#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010795#ifdef _POSIX_THREADS
10796yes
10797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
10799_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010802 unistd_defines_pthreads=yes
10803else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010804 unistd_defines_pthreads=no
10805fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010806rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10809$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010810
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010812
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010813 # Just looking for pthread_create in libpthread is not enough:
10814 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10815 # So we really have to include pthread.h, and then link.
10816 _libs=$LIBS
10817 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10819$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010822
10823#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010824#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010825
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010826void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010830
10831pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010832 ;
10833 return 0;
10834}
10835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10839$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010840 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010841
Guido van Rossum02a1c402000-02-25 19:26:31 +000010842else
Martin v. Löwis11437992002-04-12 09:54:03 +000010843
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010844 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010846if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010847
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010848 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010849
Guido van Rossumad678af1998-10-02 14:42:15 +000010850else
Guido van Rossumad678af1998-10-02 14:42:15 +000010851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10853$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010854if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010856else
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010858LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862/* Override any GCC internal prototype to avoid an error.
10863 Use char because int might match the return type of a GCC
10864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010865#ifdef __cplusplus
10866extern "C"
10867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010868char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010869int
10870main ()
10871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010873 ;
10874 return 0;
10875}
10876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010882rm -f core conftest.err conftest.$ac_objext \
10883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010884LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10887$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010888if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010889
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010890 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010891 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010892
Greg Steinadf63d62000-07-05 10:38:09 +000010893else
Greg Steinadf63d62000-07-05 10:38:09 +000010894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10896$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010897if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010899else
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010901LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905/* Override any GCC internal prototype to avoid an error.
10906 Use char because int might match the return type of a GCC
10907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908#ifdef __cplusplus
10909extern "C"
10910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010911char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010912int
10913main ()
10914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010916 ;
10917 return 0;
10918}
10919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010922else
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010925rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010927LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10930$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010931if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010932
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010933 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010934 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010935
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010936else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10939$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010940if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010942else
Martin v. Löwis11437992002-04-12 09:54:03 +000010943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010944LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948/* Override any GCC internal prototype to avoid an error.
10949 Use char because int might match the return type of a GCC
10950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010951#ifdef __cplusplus
10952extern "C"
10953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010954char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010955int
10956main ()
10957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 ;
10960 return 0;
10961}
10962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010968rm -f core conftest.err conftest.$ac_objext \
10969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010970LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10973$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010974if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010975
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010976 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010977 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010978
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010979else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10982$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010983if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010985else
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010987LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991/* Override any GCC internal prototype to avoid an error.
10992 Use char because int might match the return type of a GCC
10993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010994#ifdef __cplusplus
10995extern "C"
10996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010997char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010998int
10999main ()
11000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 ;
11003 return 0;
11004}
11005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011008else
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011011rm -f core conftest.err conftest.$ac_objext \
11012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011013LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11016$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011017if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011018
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011019 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011020 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011021
Guido van Rossumb93a8621998-05-07 13:27:32 +000011022else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011023
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011024 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11025
Guido van Rossum2d38f911996-06-26 19:47:01 +000011026fi
11027
Guido van Rossum627b2d71993-12-24 10:39:16 +000011028
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011029fi
11030
Guido van Rossum0be3e491997-05-22 20:33:33 +000011031fi
11032
Guido van Rossum49545951997-12-02 19:28:29 +000011033fi
11034
Guido van Rossumb93a8621998-05-07 13:27:32 +000011035fi
11036
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011038rm -f core conftest.err conftest.$ac_objext \
11039 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11042$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011043if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011045else
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011047LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051/* Override any GCC internal prototype to avoid an error.
11052 Use char because int might match the return type of a GCC
11053 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011054#ifdef __cplusplus
11055extern "C"
11056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011057char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011058int
11059main ()
11060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 ;
11063 return 0;
11064}
11065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011066if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068else
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011071rm -f core conftest.err conftest.$ac_objext \
11072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011073LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11076$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011077if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011078
Martin v. Löwis130fb172001-07-19 11:00:41 +000011079 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011080
Guido van Rossum627b2d71993-12-24 10:39:16 +000011081fi
11082
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011083
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011084fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011086if test "$posix_threads" = "yes"; then
11087 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011088
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011090
11091 fi
11092
11093 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11094 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011095 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011096$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011097
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011098 ;;
11099 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011100$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011101
11102 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011103 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011104$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011105
11106 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011107 esac
11108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11110$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011111 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011113else
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011115 ac_cv_pthread_system_supported=no
11116else
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011118/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011119
11120 #include <stdio.h>
11121 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011122 void *foo(void *parm) {
11123 return NULL;
11124 }
11125 main() {
11126 pthread_attr_t attr;
11127 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011128 if (pthread_attr_init(&attr)) return (-1);
11129 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11130 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11131 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011132 }
11133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011134if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011135 ac_cv_pthread_system_supported=yes
11136else
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011141fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143
Guido van Rossum627b2d71993-12-24 10:39:16 +000011144fi
11145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11147$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011148 if test "$ac_cv_pthread_system_supported" = "yes"; then
11149
Matthias Kloseb9621712010-04-24 17:59:49 +000011150$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011151
11152 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 for ac_func in pthread_sigmask
11154do :
11155 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011156if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011158#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011159_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011160 case $ac_sys_system in
11161 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011164
11165 ;;
11166 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011167fi
11168done
11169
pdoxe14679c2017-10-05 00:01:56 -070011170 for ac_func in pthread_getcpuclockid
11171do :
11172 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11173if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11174 cat >>confdefs.h <<_ACEOF
11175#define HAVE_PTHREAD_GETCPUCLOCKID 1
11176_ACEOF
11177
11178fi
11179done
11180
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011181fi
11182
11183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011184# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011185
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11187$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011189if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011191 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011194 ipv6=no
11195 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011196 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11197$as_echo "yes" >&6; }
11198 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011199
11200 ipv6=yes
11201 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011203else
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011207 /* AF_INET6 available check */
11208#include <sys/types.h>
11209#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011210int
11211main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011213int domain = AF_INET6;
11214 ;
11215 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216}
Martin v. Löwis11437992002-04-12 09:54:03 +000011217_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011218if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011219
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11221$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011222 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011223
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011224else
Matthias Kloseb159a552010-04-25 21:00:44 +000011225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11227$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011228 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011229
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011230fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011233if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11235$as_echo_n "checking if RFC2553 API is available... " >&6; }
11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011237/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011238
11239 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011240#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011241int
11242main ()
11243{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011244struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011245 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 ;
11247 return 0;
11248}
Matthias Kloseb159a552010-04-25 21:00:44 +000011249
Martin v. Löwis11437992002-04-12 09:54:03 +000011250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011251if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011252
11253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011255 ipv6=yes
11256
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011257else
Matthias Kloseb159a552010-04-25 21:00:44 +000011258
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011261 ipv6=no
11262
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011265fi
11266
11267if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011269
11270fi
11271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272fi
11273
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011274
11275ipv6type=unknown
11276ipv6lib=none
11277ipv6trylibc=no
11278
11279if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11281$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011282 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11283 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011284 case $i in
11285 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011287/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011288
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011289#include <netinet/in.h>
11290#ifdef IPV6_INRIA_VERSION
11291yes
11292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011293_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011295 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011296 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011297fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011298rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011299
11300 ;;
11301 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011304
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011305#include <netinet/in.h>
11306#ifdef __KAME__
11307yes
11308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011309_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011312 ipv6type=$i;
11313 ipv6lib=inet6
11314 ipv6libdir=/usr/local/v6/lib
11315 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011316fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011317rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011318
11319 ;;
11320 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011323
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011324#include <features.h>
11325#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11326yes
11327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011328_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011330 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011331 ipv6type=$i;
11332 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011333fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011334rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011335
11336 ;;
11337 linux-inet6)
11338 if test -d /usr/inet6; then
11339 ipv6type=$i
11340 ipv6lib=inet6
11341 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011342 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011343 fi
11344 ;;
11345 solaris)
11346 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011347 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011348 ipv6type=$i
11349 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011350 fi
11351 fi
11352 ;;
11353 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011356
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011357#include <sys/param.h>
11358#ifdef _TOSHIBA_INET6
11359yes
11360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011361_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011364 ipv6type=$i;
11365 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011366 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011367fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011368rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369
11370 ;;
11371 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011373/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011374
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011375#include </usr/local/v6/include/sys/v6config.h>
11376#ifdef __V6D__
11377yes
11378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011379_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011382 ipv6type=$i;
11383 ipv6lib=v6;
11384 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011385 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011386fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011387rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011388
11389 ;;
11390 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011393
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011394#include <sys/param.h>
11395#ifdef _ZETA_MINAMI_INET6
11396yes
11397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011398_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011401 ipv6type=$i;
11402 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011403 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011404fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011405rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011406
11407 ;;
11408 esac
11409 if test "$ipv6type" != "unknown"; then
11410 break
11411 fi
11412 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11414$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011415fi
11416
11417if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11418 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11419 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11420 echo "using lib$ipv6lib"
11421 else
11422 if test $ipv6trylibc = "yes"; then
11423 echo "using libc"
11424 else
11425 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11426 echo "You need to fetch lib$ipv6lib.a from appropriate"
11427 echo 'ipv6 kit and compile beforehand.'
11428 exit 1
11429 fi
11430 fi
11431fi
11432
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11434$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11436/* end confdefs.h. */
11437 /* CAN_RAW_FD_FRAMES available check */
11438#include <linux/can/raw.h>
11439int
11440main ()
11441{
11442int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11443 ;
11444 return 0;
11445}
11446_ACEOF
11447if ac_fn_c_try_compile "$LINENO"; then :
11448
11449
11450$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11451
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11453$as_echo "yes" >&6; }
11454
11455else
11456
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11458$as_echo "no" >&6; }
11459
11460fi
11461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11462
Zackery Spytz97e0de02020-04-09 06:03:49 -060011463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11464$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466/* end confdefs.h. */
11467
11468#include <linux/can/raw.h>
11469int
11470main ()
11471{
11472int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11473 ;
11474 return 0;
11475}
11476_ACEOF
11477if ac_fn_c_try_compile "$LINENO"; then :
11478
11479
11480$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11481
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11483$as_echo "yes" >&6; }
11484
11485else
11486
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
11489
11490fi
11491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11492
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011493# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11495$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011498if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499 withval=$with_doc_strings;
11500fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011501
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011502
11503if test -z "$with_doc_strings"
11504then with_doc_strings="yes"
11505fi
11506if test "$with_doc_strings" != "no"
11507then
11508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011510
11511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11513$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011514
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011515# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11517$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 withval=$with_pymalloc;
11522fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011523
Neil Schemenauera35c6882001-02-27 04:45:05 +000011524
Neil Schemenauer16c22972002-03-22 15:34:49 +000011525if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011526then
11527 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011528fi
11529if test "$with_pymalloc" != "no"
11530then
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011533
11534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11536$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011537
Nick Coghlan6ea41862017-06-11 13:16:15 +100011538# Check for --with-c-locale-coercion
11539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11540$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11541
11542# Check whether --with-c-locale-coercion was given.
11543if test "${with_c_locale_coercion+set}" = set; then :
11544 withval=$with_c_locale_coercion;
11545fi
11546
11547
11548if test -z "$with_c_locale_coercion"
11549then
11550 with_c_locale_coercion="yes"
11551fi
11552if test "$with_c_locale_coercion" != "no"
11553then
11554
11555$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11556
11557fi
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11559$as_echo "$with_c_locale_coercion" >&6; }
11560
Benjamin Peterson05159c42009-12-03 03:01:27 +000011561# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11563$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011564
11565# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011567 withval=$with_valgrind;
11568else
11569 with_valgrind=no
11570fi
11571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11573$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011574if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 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 +020011576if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011577
Matthias Kloseb9621712010-04-24 17:59:49 +000011578$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011579
11580else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011581 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011582
11583fi
11584
11585
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011586 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011587fi
11588
Łukasz Langaa785c872016-09-09 17:37:37 -070011589# Check for DTrace support
11590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11591$as_echo_n "checking for --with-dtrace... " >&6; }
11592
11593# Check whether --with-dtrace was given.
11594if test "${with_dtrace+set}" = set; then :
11595 withval=$with_dtrace;
11596else
11597 with_dtrace=no
11598fi
11599
11600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11601$as_echo "$with_dtrace" >&6; }
11602
11603
11604
11605
11606
11607DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011608DTRACE_HEADERS=
11609DTRACE_OBJS=
11610
11611if test "$with_dtrace" = "yes"
11612then
11613 # Extract the first word of "dtrace", so it can be a program name with args.
11614set dummy dtrace; ac_word=$2
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616$as_echo_n "checking for $ac_word... " >&6; }
11617if ${ac_cv_path_DTRACE+:} false; then :
11618 $as_echo_n "(cached) " >&6
11619else
11620 case $DTRACE in
11621 [\\/]* | ?:[\\/]*)
11622 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11623 ;;
11624 *)
11625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH
11627do
11628 IFS=$as_save_IFS
11629 test -z "$as_dir" && as_dir=.
11630 for ac_exec_ext in '' $ac_executable_extensions; do
11631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11632 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634 break 2
11635 fi
11636done
11637 done
11638IFS=$as_save_IFS
11639
11640 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11641 ;;
11642esac
11643fi
11644DTRACE=$ac_cv_path_DTRACE
11645if test -n "$DTRACE"; then
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11647$as_echo "$DTRACE" >&6; }
11648else
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654 if test "$DTRACE" = "not found"; then
11655 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11656 fi
11657
11658$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11659
11660 DTRACE_HEADERS="Include/pydtrace_probes.h"
11661
11662 # On OS X, DTrace providers do not need to be explicitly compiled and
11663 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11664 # generation flag '-G'. We check for presence of this flag, rather than
11665 # hardcoding support by OS, in the interest of robustness.
11666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11667$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11668if ${ac_cv_dtrace_link+:} false; then :
11669 $as_echo_n "(cached) " >&6
11670else
11671 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011672 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011673 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011674 ac_cv_dtrace_link=yes
11675
11676fi
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11678$as_echo "$ac_cv_dtrace_link" >&6; }
11679 if test "$ac_cv_dtrace_link" = "yes"; then
11680 DTRACE_OBJS="Python/pydtrace.o"
11681 fi
11682fi
11683
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011684# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011685
Guido van Rossum98935bf2001-09-05 19:13:16 +000011686DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011687
Guido van Rossume97ee181999-12-20 21:27:22 +000011688# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011689# platforms have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011690for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011691do :
11692 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011693if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011695#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011696_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011697
Guido van Rossume97ee181999-12-20 21:27:22 +000011698fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011699done
Guido van Rossume97ee181999-12-20 21:27:22 +000011700
Michael W. Hudson54241132001-12-07 15:38:26 +000011701
Guido van Rossume97ee181999-12-20 21:27:22 +000011702# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11703# loading of modules.
11704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11706$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011707if test -z "$DYNLOADFILE"
11708then
11709 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011710 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011711 *)
11712 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11713 # out any dynamic loading
11714 if test "$ac_cv_func_dlopen" = yes
11715 then DYNLOADFILE="dynload_shlib.o"
11716 else DYNLOADFILE="dynload_stub.o"
11717 fi
11718 ;;
11719 esac
11720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11722$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011723if test "$DYNLOADFILE" != "dynload_stub.o"
11724then
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011727
11728fi
11729
Neil Schemenauer4e425612001-06-19 15:44:15 +000011730# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11731
Michael W. Hudson54241132001-12-07 15:38:26 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11734$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011735if test -z "$MACHDEP_OBJS"
11736then
Jack Jansene578a632001-08-15 01:27:14 +000011737 MACHDEP_OBJS=$extra_machdep_objs
11738else
11739 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011740fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011741if test -z "$MACHDEP_OBJS"; then
11742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11743$as_echo "none" >&6; }
11744else
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11746$as_echo "$MACHDEP_OBJS" >&6; }
11747fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011748
Guido van Rossum627b2d71993-12-24 10:39:16 +000011749# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011750for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Kyle Evans1800c602020-10-11 15:18:53 -050011751 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11752 explicit_memset faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011753 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011754 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011755 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011756 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011757 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011758 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011759 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011760 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011761 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011762 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011763 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011764 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011765 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011766 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011767 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011768 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11769 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011770 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Pablo Galindoa57b3d32020-11-17 00:00:38 +000011771 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011772 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Alexey Izbyshev976da902020-10-24 03:47:01 +030011773 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011774 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011775do :
11776 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11777ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011778if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011781_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011782
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011783fi
11784done
11785
Michael W. Hudson54241132001-12-07 15:38:26 +000011786
Benjamin Peterson40caa052018-09-12 15:52:40 -070011787# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11788# links. Some libc implementations have a stub lchmod implementation that always
11789# returns an error.
11790if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011791 for ac_func in lchmod
11792do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011793 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11794if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011795 cat >>confdefs.h <<_ACEOF
11796#define HAVE_LCHMOD 1
11797_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011798
11799fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011800done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011801
11802fi
11803
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011804ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11805 #include <dirent.h>
11806"
11807if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11808
11809$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11810
11811fi
11812
11813
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011814# For some functions, having a definition is not sufficient, since
11815# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11817$as_echo_n "checking for chroot... " >&6; }
11818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011819/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011820#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011821int
11822main ()
11823{
11824void *x=chroot
11825 ;
11826 return 0;
11827}
11828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011830
Matthias Kloseb9621712010-04-24 17:59:49 +000011831$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011832
Matthias Kloseb159a552010-04-25 21:00:44 +000011833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011834$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11837$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011838
11839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11842$as_echo_n "checking for link... " >&6; }
11843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011844/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011845#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011846int
11847main ()
11848{
11849void *x=link
11850 ;
11851 return 0;
11852}
11853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011857
Matthias Kloseb159a552010-04-25 21:00:44 +000011858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011859$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11862$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011863
11864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11867$as_echo_n "checking for symlink... " >&6; }
11868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011870#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011871int
11872main ()
11873{
11874void *x=symlink
11875 ;
11876 return 0;
11877}
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011882
Matthias Kloseb159a552010-04-25 21:00:44 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011888
11889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11892$as_echo_n "checking for fchdir... " >&6; }
11893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011894/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011895#include <unistd.h>
11896int
11897main ()
11898{
11899void *x=fchdir
11900 ;
11901 return 0;
11902}
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011907
Matthias Kloseb159a552010-04-25 21:00:44 +000011908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011909$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11912$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011913
11914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11917$as_echo_n "checking for fsync... " >&6; }
11918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011919/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011920#include <unistd.h>
11921int
11922main ()
11923{
11924void *x=fsync
11925 ;
11926 return 0;
11927}
11928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011929if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011932
Matthias Kloseb159a552010-04-25 21:00:44 +000011933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011935else
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11937$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011938
11939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11942$as_echo_n "checking for fdatasync... " >&6; }
11943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011944/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011945#include <unistd.h>
11946int
11947main ()
11948{
11949void *x=fdatasync
11950 ;
11951 return 0;
11952}
11953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011954if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011957
Matthias Kloseb159a552010-04-25 21:00:44 +000011958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011959$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011963
11964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11967$as_echo_n "checking for epoll... " >&6; }
11968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011969/* end confdefs.h. */
11970#include <sys/epoll.h>
11971int
11972main ()
11973{
11974void *x=epoll_create
11975 ;
11976 return 0;
11977}
11978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011979if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011982
Matthias Kloseb159a552010-04-25 21:00:44 +000011983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011984$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011985else
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11987$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011988
11989fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11992$as_echo_n "checking for epoll_create1... " >&6; }
11993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994/* end confdefs.h. */
11995#include <sys/epoll.h>
11996int
11997main ()
11998{
11999void *x=epoll_create1
12000 ;
12001 return 0;
12002}
12003_ACEOF
12004if ac_fn_c_try_compile "$LINENO"; then :
12005
12006$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
12007
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12009$as_echo "yes" >&6; }
12010else
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12012$as_echo "no" >&6; }
12013
12014fi
12015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12017$as_echo_n "checking for kqueue... " >&6; }
12018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012019/* end confdefs.h. */
12020
12021#include <sys/types.h>
12022#include <sys/event.h>
12023
12024int
12025main ()
12026{
12027int x=kqueue()
12028 ;
12029 return 0;
12030}
12031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012032if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012035
Matthias Kloseb159a552010-04-25 21:00:44 +000012036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012037$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012038else
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12040$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012041
12042fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12045$as_echo_n "checking for prlimit... " >&6; }
12046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12047/* end confdefs.h. */
12048
12049#include <sys/time.h>
12050#include <sys/resource.h>
12051
12052int
12053main ()
12054{
12055void *x=prlimit
12056 ;
12057 return 0;
12058}
12059_ACEOF
12060if ac_fn_c_try_compile "$LINENO"; then :
12061
12062$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
12063
12064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12065$as_echo "yes" >&6; }
12066else
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12068$as_echo "no" >&6; }
12069
12070fi
12071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren41761932020-11-08 10:05:27 +010012072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12073$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
12074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12075/* end confdefs.h. */
12076#include <mach-o/dyld.h>
12077int
12078main ()
12079{
12080void *x=_dyld_shared_cache_contains_path
12081 ;
12082 return 0;
12083}
12084_ACEOF
12085if ac_fn_c_try_compile "$LINENO"; then :
12086
12087$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
12088
12089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12090$as_echo "yes" >&6; }
12091else
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12093$as_echo "no" >&6; }
12094
12095fi
12096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012097
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12099$as_echo_n "checking for memfd_create... " >&6; }
12100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12101/* end confdefs.h. */
12102
12103#ifdef HAVE_SYS_MMAN_H
12104#include <sys/mman.h>
12105#endif
12106#ifdef HAVE_SYS_MEMFD_H
12107#include <sys/memfd.h>
12108#endif
12109
12110int
12111main ()
12112{
12113void *x=memfd_create
12114 ;
12115 return 0;
12116}
12117_ACEOF
12118if ac_fn_c_try_compile "$LINENO"; then :
12119
12120$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12121
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12123$as_echo "yes" >&6; }
12124else
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12126$as_echo "no" >&6; }
12127
12128fi
12129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12130
Christian Heimescd9fed62020-11-13 19:48:52 +010012131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12132$as_echo_n "checking for eventfd... " >&6; }
12133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12134/* end confdefs.h. */
12135
12136#ifdef HAVE_SYS_EVENTFD_H
12137#include <sys/eventfd.h>
12138#endif
12139
12140int
12141main ()
12142{
12143int x = eventfd(0, EFD_CLOEXEC)
12144 ;
12145 return 0;
12146}
12147_ACEOF
12148if ac_fn_c_try_compile "$LINENO"; then :
12149
12150$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
12151
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12153$as_echo "yes" >&6; }
12154else
12155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12156$as_echo "no" >&6; }
12157
12158fi
12159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12160
Martin v. Löwisd5843682002-11-21 20:41:28 +000012161# On some systems (eg. FreeBSD 5), we would find a definition of the
12162# functions ctermid_r, setgroups in the library, but no prototype
12163# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12164# address to avoid compiler warnings and potential miscompilations
12165# because of the missing prototypes.
12166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12168$as_echo_n "checking for ctermid_r... " >&6; }
12169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012170/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012171
Martin v. Löwisd5843682002-11-21 20:41:28 +000012172#include <stdio.h>
12173
Martin v. Löwisd5843682002-11-21 20:41:28 +000012174int
12175main ()
12176{
12177void* p = ctermid_r
12178 ;
12179 return 0;
12180}
12181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012185
Matthias Kloseb159a552010-04-25 21:00:44 +000012186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012187$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12190$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012191
12192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12194
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12196$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012198 $as_echo_n "(cached) " >&6
12199else
12200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012201/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012202#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012203int
12204main ()
12205{
12206void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012207
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012208 ;
12209 return 0;
12210}
12211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012213 ac_cv_flock_decl=yes
12214else
12215 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012216
12217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012219
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12222$as_echo "$ac_cv_flock_decl" >&6; }
12223if test "x${ac_cv_flock_decl}" = xyes; then
12224 for ac_func in flock
12225do :
12226 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012227if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012228 cat >>confdefs.h <<_ACEOF
12229#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012230_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012231
Antoine Pitroua3000072010-09-07 14:52:42 +000012232else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012234$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012236 $as_echo_n "(cached) " >&6
12237else
12238 ac_check_lib_save_LIBS=$LIBS
12239LIBS="-lbsd $LIBS"
12240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241/* end confdefs.h. */
12242
12243/* Override any GCC internal prototype to avoid an error.
12244 Use char because int might match the return type of a GCC
12245 builtin and then its argument prototype would still apply. */
12246#ifdef __cplusplus
12247extern "C"
12248#endif
12249char flock ();
12250int
12251main ()
12252{
12253return flock ();
12254 ;
12255 return 0;
12256}
12257_ACEOF
12258if ac_fn_c_try_link "$LINENO"; then :
12259 ac_cv_lib_bsd_flock=yes
12260else
12261 ac_cv_lib_bsd_flock=no
12262fi
12263rm -f core conftest.err conftest.$ac_objext \
12264 conftest$ac_exeext conftest.$ac_ext
12265LIBS=$ac_check_lib_save_LIBS
12266fi
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12268$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012270 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012271
12272
12273$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12274
12275
12276fi
12277
12278
12279fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012280done
12281
Antoine Pitroua3000072010-09-07 14:52:42 +000012282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12285$as_echo_n "checking for getpagesize... " >&6; }
12286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012287/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012288
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012289#include <unistd.h>
12290
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012291int
12292main ()
12293{
12294void* p = getpagesize
12295 ;
12296 return 0;
12297}
12298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012302
Matthias Kloseb159a552010-04-25 21:00:44 +000012303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012304$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012305else
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12307$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012308
12309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012311
Victor Stinner984890f2011-11-24 13:53:38 +010012312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12313$as_echo_n "checking for broken unsetenv... " >&6; }
12314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315/* end confdefs.h. */
12316
12317#include <stdlib.h>
12318
12319int
12320main ()
12321{
12322int res = unsetenv("DUMMY")
12323 ;
12324 return 0;
12325}
12326_ACEOF
12327if ac_fn_c_try_compile "$LINENO"; then :
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329$as_echo "no" >&6; }
12330else
12331
12332$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12333
12334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12335$as_echo "yes" >&6; }
12336
12337fi
12338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12339
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012340for ac_prog in true
12341do
12342 # Extract the first word of "$ac_prog", so it can be a program name with args.
12343set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12345$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012346if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012348else
12349 if test -n "$TRUE"; then
12350 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12351else
12352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12353for as_dir in $PATH
12354do
12355 IFS=$as_save_IFS
12356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012358 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012359 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 $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 +000012361 break 2
12362 fi
12363done
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012366
12367fi
12368fi
12369TRUE=$ac_cv_prog_TRUE
12370if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12372$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012373else
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012376fi
12377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012379 test -n "$TRUE" && break
12380done
12381test -n "$TRUE" || TRUE="/bin/true"
12382
12383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12385$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012386if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012388else
12389 ac_check_lib_save_LIBS=$LIBS
12390LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012392/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394/* Override any GCC internal prototype to avoid an error.
12395 Use char because int might match the return type of a GCC
12396 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012397#ifdef __cplusplus
12398extern "C"
12399#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012400char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012401int
12402main ()
12403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012405 ;
12406 return 0;
12407}
12408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012410 ac_cv_lib_c_inet_aton=yes
12411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012414rm -f core conftest.err conftest.$ac_objext \
12415 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012416LIBS=$ac_check_lib_save_LIBS
12417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12419$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012420if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012421 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012422else
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12424$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012425if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012426 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012427else
12428 ac_check_lib_save_LIBS=$LIBS
12429LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433/* Override any GCC internal prototype to avoid an error.
12434 Use char because int might match the return type of a GCC
12435 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012436#ifdef __cplusplus
12437extern "C"
12438#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012439char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012440int
12441main ()
12442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012444 ;
12445 return 0;
12446}
12447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012449 ac_cv_lib_resolv_inet_aton=yes
12450else
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012453rm -f core conftest.err conftest.$ac_objext \
12454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012455LIBS=$ac_check_lib_save_LIBS
12456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12458$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012459if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012460 cat >>confdefs.h <<_ACEOF
12461#define HAVE_LIBRESOLV 1
12462_ACEOF
12463
12464 LIBS="-lresolv $LIBS"
12465
12466fi
12467
12468
12469fi
12470
12471
Christian Heimesd0764e22007-12-04 15:00:33 +000012472# On Tru64, chflags seems to be present, but calling it will
12473# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12475$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012476if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012478else
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012480 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012481else
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012483/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012484
Christian Heimesd0764e22007-12-04 15:00:33 +000012485#include <sys/stat.h>
12486#include <unistd.h>
12487int main(int argc, char*argv[])
12488{
12489 if(chflags(argv[0], 0) != 0)
12490 return 1;
12491 return 0;
12492}
Ned Deily3eb67d52011-06-28 00:00:28 -070012493
Christian Heimesd0764e22007-12-04 15:00:33 +000012494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012495if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012496 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012497else
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12501 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012502fi
12503
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012504
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12507$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012508if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012509 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012511 ac_cv_have_chflags="yes"
12512else
12513 ac_cv_have_chflags="no"
12514fi
12515
12516fi
12517if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012518
Matthias Kloseb9621712010-04-24 17:59:49 +000012519$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012520
12521fi
12522
Matthias Kloseb9621712010-04-24 17:59:49 +000012523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12524$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012525if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012527else
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012529 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012532/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012533
Christian Heimesd0764e22007-12-04 15:00:33 +000012534#include <sys/stat.h>
12535#include <unistd.h>
12536int main(int argc, char*argv[])
12537{
12538 if(lchflags(argv[0], 0) != 0)
12539 return 1;
12540 return 0;
12541}
Ned Deily3eb67d52011-06-28 00:00:28 -070012542
Christian Heimesd0764e22007-12-04 15:00:33 +000012543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012544if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012545 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012546else
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012551fi
12552
12553
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12556$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012557if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012559if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012560 ac_cv_have_lchflags="yes"
12561else
12562 ac_cv_have_lchflags="no"
12563fi
12564
12565fi
12566if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012567
Matthias Kloseb9621712010-04-24 17:59:49 +000012568$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012569
12570fi
12571
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012572case $ac_sys_system/$ac_sys_release in
12573Darwin/*)
12574 _CUR_CFLAGS="${CFLAGS}"
12575 _CUR_LDFLAGS="${LDFLAGS}"
12576 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12577 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12578 ;;
12579esac
12580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12582$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012583if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012585else
12586 ac_check_lib_save_LIBS=$LIBS
12587LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012589/* end confdefs.h. */
12590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591/* Override any GCC internal prototype to avoid an error.
12592 Use char because int might match the return type of a GCC
12593 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012594#ifdef __cplusplus
12595extern "C"
12596#endif
12597char inflateCopy ();
12598int
12599main ()
12600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012601return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012602 ;
12603 return 0;
12604}
12605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012606if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012607 ac_cv_lib_z_inflateCopy=yes
12608else
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012611rm -f core conftest.err conftest.$ac_objext \
12612 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012613LIBS=$ac_check_lib_save_LIBS
12614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12616$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012617if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012618
Matthias Kloseb9621712010-04-24 17:59:49 +000012619$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012620
12621fi
12622
12623
12624case $ac_sys_system/$ac_sys_release in
12625Darwin/*)
12626 CFLAGS="${_CUR_CFLAGS}"
12627 LDFLAGS="${_CUR_LDFLAGS}"
12628 ;;
12629esac
12630
Matthias Kloseb9621712010-04-24 17:59:49 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12632$as_echo_n "checking for hstrerror... " >&6; }
12633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012635
Martin v. Löwise9416172003-05-03 10:12:45 +000012636#include <netdb.h>
12637
Martin v. Löwise9416172003-05-03 10:12:45 +000012638int
12639main ()
12640{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012641void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012642 ;
12643 return 0;
12644}
12645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012646if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012649
Matthias Kloseb159a552010-04-25 21:00:44 +000012650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012651$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012652else
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12654$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012655
12656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012657rm -f core conftest.err conftest.$ac_objext \
12658 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659
Matthias Kloseb9621712010-04-24 17:59:49 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12661$as_echo_n "checking for inet_aton... " >&6; }
12662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012663/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012664
Martin v. Löwis86d66262006-02-17 08:40:11 +000012665#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012666#include <sys/socket.h>
12667#include <netinet/in.h>
12668#include <arpa/inet.h>
12669
Martin v. Löwise9416172003-05-03 10:12:45 +000012670int
12671main ()
12672{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012673void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012674 ;
12675 return 0;
12676}
12677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012681
Matthias Kloseb159a552010-04-25 21:00:44 +000012682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012683$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012684else
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12686$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012687
12688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689rm -f core conftest.err conftest.$ac_objext \
12690 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12693$as_echo_n "checking for inet_pton... " >&6; }
12694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012696
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012697#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012698#include <sys/socket.h>
12699#include <netinet/in.h>
12700#include <arpa/inet.h>
12701
Martin v. Löwise9416172003-05-03 10:12:45 +000012702int
12703main ()
12704{
12705void* p = inet_pton
12706 ;
12707 return 0;
12708}
12709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012713
Matthias Kloseb159a552010-04-25 21:00:44 +000012714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12718$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012719
12720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012722
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012723# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12725$as_echo_n "checking for setgroups... " >&6; }
12726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012728
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012729#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012730#ifdef HAVE_GRP_H
12731#include <grp.h>
12732#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012733
Martin v. Löwisd5843682002-11-21 20:41:28 +000012734int
12735main ()
12736{
12737void* p = setgroups
12738 ;
12739 return 0;
12740}
12741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012745
Matthias Kloseb159a552010-04-25 21:00:44 +000012746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012748else
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012751
12752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012755# check for openpty and forkpty
12756
12757for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012758do :
12759 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012760if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012762#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012763_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012764
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012765else
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12767$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012768if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012770else
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012772LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776/* Override any GCC internal prototype to avoid an error.
12777 Use char because int might match the return type of a GCC
12778 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012779#ifdef __cplusplus
12780extern "C"
12781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012782char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 ;
12788 return 0;
12789}
12790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012793else
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796rm -f core conftest.err conftest.$ac_objext \
12797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12801$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012802if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012804 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12807$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012808if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012810else
12811 ac_check_lib_save_LIBS=$LIBS
12812LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012814/* end confdefs.h. */
12815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012816/* Override any GCC internal prototype to avoid an error.
12817 Use char because int might match the return type of a GCC
12818 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012819#ifdef __cplusplus
12820extern "C"
12821#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012822char openpty ();
12823int
12824main ()
12825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012827 ;
12828 return 0;
12829}
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012832 ac_cv_lib_bsd_openpty=yes
12833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836rm -f core conftest.err conftest.$ac_objext \
12837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012838LIBS=$ac_check_lib_save_LIBS
12839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12841$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012842if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012844 LIBS="$LIBS -lbsd"
12845fi
12846
12847
12848fi
12849
Fred Drake8cef4cf2000-06-28 16:40:38 +000012850
12851fi
12852done
12853
12854for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012855do :
12856 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012857if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012859#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012860_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012861
Fred Drake8cef4cf2000-06-28 16:40:38 +000012862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12864$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012865if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012867else
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012869LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873/* Override any GCC internal prototype to avoid an error.
12874 Use char because int might match the return type of a GCC
12875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012876#ifdef __cplusplus
12877extern "C"
12878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012879char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012880int
12881main ()
12882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 ;
12885 return 0;
12886}
12887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012893rm -f core conftest.err conftest.$ac_objext \
12894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012895LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12898$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012899if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012901 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012902else
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12904$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012905if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012907else
12908 ac_check_lib_save_LIBS=$LIBS
12909LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012911/* end confdefs.h. */
12912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913/* Override any GCC internal prototype to avoid an error.
12914 Use char because int might match the return type of a GCC
12915 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012916#ifdef __cplusplus
12917extern "C"
12918#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012919char forkpty ();
12920int
12921main ()
12922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012924 ;
12925 return 0;
12926}
12927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012929 ac_cv_lib_bsd_forkpty=yes
12930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012933rm -f core conftest.err conftest.$ac_objext \
12934 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012935LIBS=$ac_check_lib_save_LIBS
12936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12938$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012939if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012941 LIBS="$LIBS -lbsd"
12942fi
12943
12944
12945fi
12946
Fred Drake8cef4cf2000-06-28 16:40:38 +000012947
12948fi
12949done
12950
Jack Jansendd19cf82001-12-06 22:36:17 +000012951
Michael W. Hudson54241132001-12-07 15:38:26 +000012952# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012953for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012954do :
12955 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12956ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012957if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012959#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012960_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012961
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012963done
12964
Michael W. Hudson54241132001-12-07 15:38:26 +000012965
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012966ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012967if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012968 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012969
Martin v. Löwis1142de32002-03-29 16:28:31 +000012970else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012972 *" dup2.$ac_objext "* ) ;;
12973 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012975esac
12976
Martin v. Löwis1142de32002-03-29 16:28:31 +000012977fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012978
Martin v. Löwis1142de32002-03-29 16:28:31 +000012979
12980for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012981do :
12982 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012983if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012985#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012988/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012990int
12991main ()
12992{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012994 ;
12995 return 0;
12996}
12997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012998if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013001
Guido van Rossum627b2d71993-12-24 10:39:16 +000013002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013004
Guido van Rossum627b2d71993-12-24 10:39:16 +000013005fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013006done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013007
Jack Jansen150753c2003-03-29 22:07:47 +000013008for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013009do :
13010 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020013011if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000013012 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013013#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000013014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013016/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013017#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013018int
13019main ()
13020{
13021setpgrp(0,0);
13022 ;
13023 return 0;
13024}
13025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013029
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013032
13033fi
13034done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013035
Michael W. Hudson54241132001-12-07 15:38:26 +000013036
Gregory P. Smith387512c2018-12-30 15:42:32 -080013037# We search for both crypt and crypt_r as one or the other may be defined
13038# This gets us our -lcrypt in LIBS when required on the target platform.
13039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13040$as_echo_n "checking for library containing crypt... " >&6; }
13041if ${ac_cv_search_crypt+:} false; then :
13042 $as_echo_n "(cached) " >&6
13043else
13044 ac_func_search_save_LIBS=$LIBS
13045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046/* end confdefs.h. */
13047
13048/* Override any GCC internal prototype to avoid an error.
13049 Use char because int might match the return type of a GCC
13050 builtin and then its argument prototype would still apply. */
13051#ifdef __cplusplus
13052extern "C"
13053#endif
13054char crypt ();
13055int
13056main ()
13057{
13058return crypt ();
13059 ;
13060 return 0;
13061}
13062_ACEOF
13063for ac_lib in '' crypt; do
13064 if test -z "$ac_lib"; then
13065 ac_res="none required"
13066 else
13067 ac_res=-l$ac_lib
13068 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13069 fi
13070 if ac_fn_c_try_link "$LINENO"; then :
13071 ac_cv_search_crypt=$ac_res
13072fi
13073rm -f core conftest.err conftest.$ac_objext \
13074 conftest$ac_exeext
13075 if ${ac_cv_search_crypt+:} false; then :
13076 break
13077fi
13078done
13079if ${ac_cv_search_crypt+:} false; then :
13080
13081else
13082 ac_cv_search_crypt=no
13083fi
13084rm conftest.$ac_ext
13085LIBS=$ac_func_search_save_LIBS
13086fi
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13088$as_echo "$ac_cv_search_crypt" >&6; }
13089ac_res=$ac_cv_search_crypt
13090if test "$ac_res" != no; then :
13091 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13092
13093fi
13094
13095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13096$as_echo_n "checking for library containing crypt_r... " >&6; }
13097if ${ac_cv_search_crypt_r+:} false; then :
13098 $as_echo_n "(cached) " >&6
13099else
13100 ac_func_search_save_LIBS=$LIBS
13101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13102/* end confdefs.h. */
13103
13104/* Override any GCC internal prototype to avoid an error.
13105 Use char because int might match the return type of a GCC
13106 builtin and then its argument prototype would still apply. */
13107#ifdef __cplusplus
13108extern "C"
13109#endif
13110char crypt_r ();
13111int
13112main ()
13113{
13114return crypt_r ();
13115 ;
13116 return 0;
13117}
13118_ACEOF
13119for ac_lib in '' crypt; do
13120 if test -z "$ac_lib"; then
13121 ac_res="none required"
13122 else
13123 ac_res=-l$ac_lib
13124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13125 fi
13126 if ac_fn_c_try_link "$LINENO"; then :
13127 ac_cv_search_crypt_r=$ac_res
13128fi
13129rm -f core conftest.err conftest.$ac_objext \
13130 conftest$ac_exeext
13131 if ${ac_cv_search_crypt_r+:} false; then :
13132 break
13133fi
13134done
13135if ${ac_cv_search_crypt_r+:} false; then :
13136
13137else
13138 ac_cv_search_crypt_r=no
13139fi
13140rm conftest.$ac_ext
13141LIBS=$ac_func_search_save_LIBS
13142fi
13143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13144$as_echo "$ac_cv_search_crypt_r" >&6; }
13145ac_res=$ac_cv_search_crypt_r
13146if test "$ac_res" != no; then :
13147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13148
13149fi
13150
13151
13152ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13153if test "x$ac_cv_func_crypt_r" = xyes; then :
13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13155/* end confdefs.h. */
13156
13157#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13158#include <crypt.h>
13159
13160int
13161main ()
13162{
13163
13164struct crypt_data d;
13165char *r = crypt_r("", "", &d);
13166
13167 ;
13168 return 0;
13169}
13170_ACEOF
13171if ac_fn_c_try_compile "$LINENO"; then :
13172
13173$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13174
13175fi
13176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13177
13178fi
13179
13180
Victor Stinnere0be4232011-10-25 13:06:09 +020013181for ac_func in clock_gettime
13182do :
13183 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13184if test "x$ac_cv_func_clock_gettime" = xyes; then :
13185 cat >>confdefs.h <<_ACEOF
13186#define HAVE_CLOCK_GETTIME 1
13187_ACEOF
13188
13189else
13190
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13192$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13193if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13194 $as_echo_n "(cached) " >&6
13195else
13196 ac_check_lib_save_LIBS=$LIBS
13197LIBS="-lrt $LIBS"
13198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199/* end confdefs.h. */
13200
13201/* Override any GCC internal prototype to avoid an error.
13202 Use char because int might match the return type of a GCC
13203 builtin and then its argument prototype would still apply. */
13204#ifdef __cplusplus
13205extern "C"
13206#endif
13207char clock_gettime ();
13208int
13209main ()
13210{
13211return clock_gettime ();
13212 ;
13213 return 0;
13214}
13215_ACEOF
13216if ac_fn_c_try_link "$LINENO"; then :
13217 ac_cv_lib_rt_clock_gettime=yes
13218else
13219 ac_cv_lib_rt_clock_gettime=no
13220fi
13221rm -f core conftest.err conftest.$ac_objext \
13222 conftest$ac_exeext conftest.$ac_ext
13223LIBS=$ac_check_lib_save_LIBS
13224fi
13225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13226$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13227if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13228
Victor Stinner7efb8332014-08-29 15:41:08 +020013229 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013230 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13231
13232
13233$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13234
13235
13236fi
13237
13238
13239fi
13240done
13241
13242
13243for ac_func in clock_getres
13244do :
13245 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13246if test "x$ac_cv_func_clock_getres" = xyes; then :
13247 cat >>confdefs.h <<_ACEOF
13248#define HAVE_CLOCK_GETRES 1
13249_ACEOF
13250
13251else
13252
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13254$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13255if ${ac_cv_lib_rt_clock_getres+:} false; then :
13256 $as_echo_n "(cached) " >&6
13257else
13258 ac_check_lib_save_LIBS=$LIBS
13259LIBS="-lrt $LIBS"
13260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261/* end confdefs.h. */
13262
13263/* Override any GCC internal prototype to avoid an error.
13264 Use char because int might match the return type of a GCC
13265 builtin and then its argument prototype would still apply. */
13266#ifdef __cplusplus
13267extern "C"
13268#endif
13269char clock_getres ();
13270int
13271main ()
13272{
13273return clock_getres ();
13274 ;
13275 return 0;
13276}
13277_ACEOF
13278if ac_fn_c_try_link "$LINENO"; then :
13279 ac_cv_lib_rt_clock_getres=yes
13280else
13281 ac_cv_lib_rt_clock_getres=no
13282fi
13283rm -f core conftest.err conftest.$ac_objext \
13284 conftest$ac_exeext conftest.$ac_ext
13285LIBS=$ac_check_lib_save_LIBS
13286fi
13287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13288$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13289if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13290
13291 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13292
13293
13294fi
13295
13296
13297fi
13298done
13299
13300
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013301for ac_func in clock_settime
13302do :
13303 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13304if test "x$ac_cv_func_clock_settime" = xyes; then :
13305 cat >>confdefs.h <<_ACEOF
13306#define HAVE_CLOCK_SETTIME 1
13307_ACEOF
13308
13309else
13310
13311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13312$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13313if ${ac_cv_lib_rt_clock_settime+:} false; then :
13314 $as_echo_n "(cached) " >&6
13315else
13316 ac_check_lib_save_LIBS=$LIBS
13317LIBS="-lrt $LIBS"
13318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319/* end confdefs.h. */
13320
13321/* Override any GCC internal prototype to avoid an error.
13322 Use char because int might match the return type of a GCC
13323 builtin and then its argument prototype would still apply. */
13324#ifdef __cplusplus
13325extern "C"
13326#endif
13327char clock_settime ();
13328int
13329main ()
13330{
13331return clock_settime ();
13332 ;
13333 return 0;
13334}
13335_ACEOF
13336if ac_fn_c_try_link "$LINENO"; then :
13337 ac_cv_lib_rt_clock_settime=yes
13338else
13339 ac_cv_lib_rt_clock_settime=no
13340fi
13341rm -f core conftest.err conftest.$ac_objext \
13342 conftest$ac_exeext conftest.$ac_ext
13343LIBS=$ac_check_lib_save_LIBS
13344fi
13345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13346$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13347if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13348
13349 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13350
13351
13352fi
13353
13354
13355fi
13356done
13357
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13360$as_echo_n "checking for major... " >&6; }
13361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013362/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013363
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013364#if defined(MAJOR_IN_MKDEV)
13365#include <sys/mkdev.h>
13366#elif defined(MAJOR_IN_SYSMACROS)
13367#include <sys/sysmacros.h>
13368#else
13369#include <sys/types.h>
13370#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013371
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013372int
13373main ()
13374{
13375
13376 makedev(major(0),minor(0));
13377
13378 ;
13379 return 0;
13380}
13381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013382if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013383
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13388$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013389
13390else
Skip Montanaro6dead952003-09-25 14:50:04 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13393$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013394
13395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013396rm -f core conftest.err conftest.$ac_objext \
13397 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013398
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013399# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013400# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13402$as_echo_n "checking for getaddrinfo... " >&6; }
13403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013404/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013405
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013406#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013407#include <sys/socket.h>
13408#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013409#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411int
13412main ()
13413{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013414getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 ;
13416 return 0;
13417}
13418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013420 have_getaddrinfo=yes
13421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013424rm -f core conftest.err conftest.$ac_objext \
13425 conftest$ac_exeext conftest.$ac_ext
13426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13427$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428if test $have_getaddrinfo = yes
13429then
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13431$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013432 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013436
13437if test "${enable_ipv6+set}" = set; then
13438 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13439else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013441fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013442else
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013444/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013445
Stefan Krah19c21392012-11-22 23:47:32 +010013446#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013447#include <sys/types.h>
13448#include <netdb.h>
13449#include <string.h>
13450#include <sys/socket.h>
13451#include <netinet/in.h>
13452
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013453int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013454{
13455 int passive, gaierr, inet4 = 0, inet6 = 0;
13456 struct addrinfo hints, *ai, *aitop;
13457 char straddr[INET6_ADDRSTRLEN], strport[16];
13458
13459 for (passive = 0; passive <= 1; passive++) {
13460 memset(&hints, 0, sizeof(hints));
13461 hints.ai_family = AF_UNSPEC;
13462 hints.ai_flags = passive ? AI_PASSIVE : 0;
13463 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013464 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013465 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13466 (void)gai_strerror(gaierr);
13467 goto bad;
13468 }
13469 for (ai = aitop; ai; ai = ai->ai_next) {
13470 if (ai->ai_addr == NULL ||
13471 ai->ai_addrlen == 0 ||
13472 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13473 straddr, sizeof(straddr), strport, sizeof(strport),
13474 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13475 goto bad;
13476 }
13477 switch (ai->ai_family) {
13478 case AF_INET:
13479 if (strcmp(strport, "54321") != 0) {
13480 goto bad;
13481 }
13482 if (passive) {
13483 if (strcmp(straddr, "0.0.0.0") != 0) {
13484 goto bad;
13485 }
13486 } else {
13487 if (strcmp(straddr, "127.0.0.1") != 0) {
13488 goto bad;
13489 }
13490 }
13491 inet4++;
13492 break;
13493 case AF_INET6:
13494 if (strcmp(strport, "54321") != 0) {
13495 goto bad;
13496 }
13497 if (passive) {
13498 if (strcmp(straddr, "::") != 0) {
13499 goto bad;
13500 }
13501 } else {
13502 if (strcmp(straddr, "::1") != 0) {
13503 goto bad;
13504 }
13505 }
13506 inet6++;
13507 break;
13508 case AF_UNSPEC:
13509 goto bad;
13510 break;
13511 default:
13512 /* another family support? */
13513 break;
13514 }
13515 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013516 freeaddrinfo(aitop);
13517 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013518 }
13519
13520 if (!(inet4 == 0 || inet4 == 2))
13521 goto bad;
13522 if (!(inet6 == 0 || inet6 == 2))
13523 goto bad;
13524
13525 if (aitop)
13526 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013527 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013528
13529 bad:
13530 if (aitop)
13531 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013532 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013533}
13534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013536if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013537 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13542 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013545fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013546
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13550$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13551
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013552if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013553then
13554 if test $ipv6 = yes
13555 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013556 echo 'Fatal: You must get working getaddrinfo() function.'
13557 echo ' or you can specify "--disable-ipv6"'.
13558 exit 1
13559 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013560else
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013563
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013564fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013565
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013566for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013567do :
13568 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013569if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013571#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013572_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013573
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013574fi
13575done
13576
Michael W. Hudson54241132001-12-07 15:38:26 +000013577
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13580$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013581if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013585/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013586#include <sys/types.h>
13587#include <sys/time.h>
13588#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
Martin v. Löwis11437992002-04-12 09:54:03 +000013590int
13591main ()
13592{
13593if ((struct tm *) 0)
13594return 0;
13595 ;
13596 return 0;
13597}
13598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013599if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013600 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013601else
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13607$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013608if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013611
13612fi
13613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13615$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013616if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621#include <sys/types.h>
13622#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013623
Martin v. Löwis11437992002-04-12 09:54:03 +000013624int
13625main ()
13626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013627struct tm tm;
13628 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 ;
13631 return 0;
13632}
13633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013634if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013635 ac_cv_struct_tm=time.h
13636else
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13642$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013643if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646
13647fi
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649ac_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 +000013650#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652"
Victor Stinnere0be4232011-10-25 13:06:09 +020013653if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
13655cat >>confdefs.h <<_ACEOF
13656#define HAVE_STRUCT_TM_TM_ZONE 1
13657_ACEOF
13658
13659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013660fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013661
Martin v. Löwis11437992002-04-12 09:54:03 +000013662if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013665
13666else
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13668"
Victor Stinnere0be4232011-10-25 13:06:09 +020013669if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013671else
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013673fi
13674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013675cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013676#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677_ACEOF
13678
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13680$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013681if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013683else
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013685/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013687#if !HAVE_DECL_TZNAME
13688extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
Martin v. Löwis11437992002-04-12 09:54:03 +000013691int
13692main ()
13693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ;
13696 return 0;
13697}
13698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013700 ac_cv_var_tzname=yes
13701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013704rm -f core conftest.err conftest.$ac_objext \
13705 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13708$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013709 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013712
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713 fi
13714fi
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716ac_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 +020013717if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
13719cat >>confdefs.h <<_ACEOF
13720#define HAVE_STRUCT_STAT_ST_RDEV 1
13721_ACEOF
13722
13723
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013724fi
13725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726ac_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 +020013727if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013728
Martin v. Löwis11437992002-04-12 09:54:03 +000013729cat >>confdefs.h <<_ACEOF
13730#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13731_ACEOF
13732
13733
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013734fi
13735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736ac_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 +020013737if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013738
13739cat >>confdefs.h <<_ACEOF
13740#define HAVE_STRUCT_STAT_ST_FLAGS 1
13741_ACEOF
13742
13743
13744fi
13745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746ac_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 +020013747if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013748
13749cat >>confdefs.h <<_ACEOF
13750#define HAVE_STRUCT_STAT_ST_GEN 1
13751_ACEOF
13752
13753
13754fi
13755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756ac_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 +020013757if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013758
13759cat >>confdefs.h <<_ACEOF
13760#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13761_ACEOF
13762
13763
13764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766ac_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 +020013767if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013768
Martin v. Löwis11437992002-04-12 09:54:03 +000013769cat >>confdefs.h <<_ACEOF
13770#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13771_ACEOF
13772
13773
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013774fi
13775
Stefan Krah267b6392016-04-26 01:09:18 +020013776ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13777 #include <sys/types.h>
13778 #include <pwd.h>
13779
13780"
13781if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13782
13783cat >>confdefs.h <<_ACEOF
13784#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13785_ACEOF
13786
13787
13788fi
13789ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13790 #include <sys/types.h>
13791 #include <pwd.h>
13792
13793"
13794if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13795
13796cat >>confdefs.h <<_ACEOF
13797#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13798_ACEOF
13799
13800
13801fi
13802
Zachary Ware6a6967e2016-10-01 00:47:27 -050013803# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13804ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13805"
13806if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13807
13808cat >>confdefs.h <<_ACEOF
13809#define HAVE_SIGINFO_T_SI_BAND 1
13810_ACEOF
13811
13812
13813fi
13814
Michael W. Hudson54241132001-12-07 15:38:26 +000013815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13817$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013818if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820else
Matthias Kloseb159a552010-04-25 21:00:44 +000013821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013823/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013824#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013825int
13826main ()
13827{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 ;
13830 return 0;
13831}
13832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013833if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834 ac_cv_header_time_altzone=yes
13835else
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840fi
13841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13843$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013844if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013847
13848fi
13849
Guido van Rossumda88dad1995-01-26 00:46:29 +000013850was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13852$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013855
13856#include <sys/types.h>
13857#include <sys/select.h>
13858#include <sys/time.h>
13859
Martin v. Löwis11437992002-04-12 09:54:03 +000013860int
13861main ()
13862{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863;
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 ;
13865 return 0;
13866}
13867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013868if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013872
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013873 was_it_defined=yes
13874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13878$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13881$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013882if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013884else
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013886/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013887#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013888int
13889main ()
13890{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013891struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 ;
13893 return 0;
13894}
13895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013897 ac_cv_struct_addrinfo=yes
13898else
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13902fi
13903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13905$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013906if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013909
13910fi
13911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13913$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013914if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013916else
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013918/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919
13920# include <sys/types.h>
13921# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013922int
13923main ()
13924{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013925struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 ;
13927 return 0;
13928}
13929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013930if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013931 ac_cv_struct_sockaddr_storage=yes
13932else
Matthias Kloseb9621712010-04-24 17:59:49 +000013933 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13936fi
13937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13939$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013940if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013943
13944fi
13945
Christian Heimesdffa3942016-09-05 23:54:41 +020013946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13947$as_echo_n "checking for sockaddr_alg... " >&6; }
13948if ${ac_cv_struct_sockaddr_alg+:} false; then :
13949 $as_echo_n "(cached) " >&6
13950else
13951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13952/* end confdefs.h. */
13953
13954# include <sys/types.h>
13955# include <sys/socket.h>
13956# include <linux/if_alg.h>
13957int
13958main ()
13959{
13960struct sockaddr_alg s
13961 ;
13962 return 0;
13963}
13964_ACEOF
13965if ac_fn_c_try_compile "$LINENO"; then :
13966 ac_cv_struct_sockaddr_alg=yes
13967else
13968 ac_cv_struct_sockaddr_alg=no
13969fi
13970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13971fi
13972
13973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13974$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13975if test $ac_cv_struct_sockaddr_alg = yes; then
13976
13977$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13978
13979fi
13980
Guido van Rossum627b2d71993-12-24 10:39:16 +000013981# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13984$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013985if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013987else
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013991int
13992main ()
13993{
13994static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013995test_array [0] = 0;
13996return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
13998 ;
13999 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014000}
Martin v. Löwis11437992002-04-12 09:54:03 +000014001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014002if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014003 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014004else
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14010$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014011if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014013
14014fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014015
Matthias Kloseb9621712010-04-24 17:59:49 +000014016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14017$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014018if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014020else
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014022/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024int
14025main ()
14026{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014027
Martin v. Löwis11437992002-04-12 09:54:03 +000014028#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014029 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014031 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 char const *const *pcpcc;
14034 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 /* NEC SVR4.0.2 mips cc rejects this. */
14036 struct point {int x, y;};
14037 static struct point const zero = {0,0};
14038 /* AIX XL C 1.02.0.0 rejects this.
14039 It does not let you subtract one const X* pointer from another in
14040 an arm of an if-expression whose if-part is not a constant
14041 expression */
14042 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045 ++pcpcc;
14046 ppc = (char**) pcpcc;
14047 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014048 { /* SCO 3.2v4 cc rejects this sort of thing. */
14049 char tx;
14050 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 }
14056 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14057 int x[] = {25, 17};
14058 const int *foo = &x[0];
14059 ++foo;
14060 }
14061 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14062 typedef const int *iptr;
14063 iptr p = 0;
14064 ++p;
14065 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014066 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014068 struct s { int j; const int *ap[3]; } bx;
14069 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 }
14071 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14072 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014076#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014077
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ;
14079 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014080}
Martin v. Löwis11437992002-04-12 09:54:03 +000014081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014082if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014083 ac_cv_c_const=yes
14084else
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14090$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014091if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Matthias Kloseb9621712010-04-24 17:59:49 +000014093$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014094
14095fi
14096
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
Guido van Rossumda88dad1995-01-26 00:46:29 +000014098works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14100$as_echo_n "checking for working signed char... " >&6; }
14101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014102/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014103
Martin v. Löwis11437992002-04-12 09:54:03 +000014104int
14105main ()
14106{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014107signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 ;
14109 return 0;
14110}
14111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014112if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014113 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014114else
Skip Montanaro6dead952003-09-25 14:50:04 +000014115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014117
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014118
Guido van Rossum7f43da71994-08-01 12:15:30 +000014119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14122$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014123
Guido van Rossumda88dad1995-01-26 00:46:29 +000014124have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14126$as_echo_n "checking for prototypes... " >&6; }
14127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014128/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014129int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014130int
14131main ()
14132{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014133return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ;
14135 return 0;
14136}
14137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014141
Matthias Kloseb159a552010-04-25 21:00:44 +000014142 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14146$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014147
Guido van Rossumda88dad1995-01-26 00:46:29 +000014148works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14150$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014152/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014153
14154#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014155int foo(int x, ...) {
14156 va_list va;
14157 va_start(va, x);
14158 va_arg(va, int);
14159 va_arg(va, char *);
14160 va_arg(va, double);
14161 return 0;
14162}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164int
14165main ()
14166{
Guido van Rossum90eea071996-08-30 20:58:57 +000014167return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 ;
14169 return 0;
14170}
14171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014177 works=yes
14178
Guido van Rossum627b2d71993-12-24 10:39:16 +000014179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14182$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014183
Martin v. Löwisd6320502004-08-12 13:45:08 +000014184# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14186$as_echo_n "checking for socketpair... " >&6; }
14187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014188/* end confdefs.h. */
14189
14190#include <sys/types.h>
14191#include <sys/socket.h>
14192
14193int
14194main ()
14195{
14196void *x=socketpair
14197 ;
14198 return 0;
14199}
14200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014204
Matthias Kloseb159a552010-04-25 21:00:44 +000014205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014206$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014207else
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14209$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014210
14211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014213
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014214# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14216$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014218/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014219#include <sys/types.h>
14220#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014221int
14222main ()
14223{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014224struct sockaddr x;
14225x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 ;
14227 return 0;
14228}
14229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014230if ac_fn_c_try_compile "$LINENO"; then :
14231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14232$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014233
Matthias Kloseb9621712010-04-24 17:59:49 +000014234$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014235
14236else
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14238$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014239
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014242
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014243# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
14245
Matthias Kloseb9621712010-04-24 17:59:49 +000014246ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014247if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14252$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014253 OLD_CFLAGS=$CFLAGS
14254 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014256/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014257
14258# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014259
Martin v. Löwis11437992002-04-12 09:54:03 +000014260int
14261main ()
14262{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014263
14264 char *name;
14265 struct hostent *he, *res;
14266 char buffer[2048];
14267 int buflen = 2048;
14268 int h_errnop;
14269
14270 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
14272 ;
14273 return 0;
14274}
14275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014279
Martin v. Löwis11437992002-04-12 09:54:03 +000014280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14284$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014285
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014286else
Skip Montanaro6dead952003-09-25 14:50:04 +000014287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14289$as_echo "no" >&6; }
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14291$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014293/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014294
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014295# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014296
Martin v. Löwis11437992002-04-12 09:54:03 +000014297int
14298main ()
14299{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014300
14301 char *name;
14302 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014303 char buffer[2048];
14304 int buflen = 2048;
14305 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014306
Matthias Kloseb159a552010-04-25 21:00:44 +000014307 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309 ;
14310 return 0;
14311}
14312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
Matthias Kloseb159a552010-04-25 21:00:44 +000014318$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14321$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014323else
Skip Montanaro6dead952003-09-25 14:50:04 +000014324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14326$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14328$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14330/* end confdefs.h. */
14331
14332# include <netdb.h>
14333
14334int
14335main ()
14336{
14337
14338 char *name;
14339 struct hostent *he;
14340 struct hostent_data data;
14341
14342 (void) gethostbyname_r(name, he, &data);
14343
14344 ;
14345 return 0;
14346}
14347_ACEOF
14348if ac_fn_c_try_compile "$LINENO"; then :
14349
14350 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14351
14352
14353$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14354
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14356$as_echo "yes" >&6; }
14357
14358else
14359
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14361$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014368
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014371 CFLAGS=$OLD_CFLAGS
14372
14373else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014374
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 for ac_func in gethostbyname
14376do :
14377 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014378if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014380#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014381_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014382
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014383fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014384done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014385
Michael W. Hudson54241132001-12-07 15:38:26 +000014386
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014387fi
14388
Michael W. Hudson54241132001-12-07 15:38:26 +000014389
14390
14391
14392
14393
14394
Guido van Rossum627b2d71993-12-24 10:39:16 +000014395# checks for system services
14396# (none yet)
14397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014398# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014399ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014400if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014401
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14404$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014405if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014407else
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014409LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413/* Override any GCC internal prototype to avoid an error.
14414 Use char because int might match the return type of a GCC
14415 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014416#ifdef __cplusplus
14417extern "C"
14418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014419char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014420int
14421main ()
14422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 ;
14425 return 0;
14426}
14427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014428if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014430else
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014433rm -f core conftest.err conftest.$ac_objext \
14434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014435LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14438$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014439if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014440 cat >>confdefs.h <<_ACEOF
14441#define HAVE_LIBIEEE 1
14442_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014443
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014444 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014445
Guido van Rossum627b2d71993-12-24 10:39:16 +000014446fi
14447
Michael W. Hudson54241132001-12-07 15:38:26 +000014448
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014449fi
14450
Michael W. Hudson54241132001-12-07 15:38:26 +000014451
Guido van Rossum7f43da71994-08-01 12:15:30 +000014452# check for --with-libm=...
14453
Guido van Rossum563e7081996-09-10 18:20:48 +000014454case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014455Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014456*) LIBM=-lm
14457esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14459$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014462if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014464if test "$withval" = no
14465then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14467$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014468elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014469then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14471$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014472else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014473fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14476$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477fi
14478
Guido van Rossum7f43da71994-08-01 12:15:30 +000014479
14480# check for --with-libc=...
14481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14483$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014486if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014488if test "$withval" = no
14489then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14491$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014492elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014493then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14495$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014496else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014497fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014498else
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14500$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501fi
14502
Guido van Rossum7f43da71994-08-01 12:15:30 +000014503
Stefan Krah1919b7e2012-03-21 18:25:23 +010014504# **************************************
14505# * Check for gcc x64 inline assembler *
14506# **************************************
14507
14508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14509$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14511/* end confdefs.h. */
14512
14513int
14514main ()
14515{
14516
14517 __asm__ __volatile__ ("movq %rcx, %rax");
14518
14519 ;
14520 return 0;
14521}
14522_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014523if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014524 have_gcc_asm_for_x64=yes
14525else
14526 have_gcc_asm_for_x64=no
14527fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014528rm -f core conftest.err conftest.$ac_objext \
14529 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14531$as_echo "$have_gcc_asm_for_x64" >&6; }
14532if test "$have_gcc_asm_for_x64" = yes
14533then
14534
14535$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14536
14537fi
14538
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014539# **************************************************
14540# * Check for various properties of floating point *
14541# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014542
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14544$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14545if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014547else
14548
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014549
14550ax_cv_c_float_words_bigendian=unknown
14551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014552/* end confdefs.h. */
14553
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014554
14555double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14556
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014557
14558_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014559if ac_fn_c_try_compile "$LINENO"; then :
14560
14561
Arnon Yaari5dd83602020-04-01 18:19:09 +030014562if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014563 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014564fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014565if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014566 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14567 ax_cv_c_float_words_bigendian=no
14568 else
14569 ax_cv_c_float_words_bigendian=unknown
14570 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014571fi
14572
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014573
14574fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014576fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14578$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014579
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014580case $ax_cv_c_float_words_bigendian in
14581 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014582
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014583$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14584 ;;
14585 no)
14586 ;;
14587 *)
14588 as_fn_error $? "
14589
14590Unknown float word ordering. You need to manually preset
14591ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14592
14593 " "$LINENO" 5 ;;
14594esac
14595
14596
14597if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014598then
14599
Matthias Kloseb9621712010-04-24 17:59:49 +000014600$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014601
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014602elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014603then
14604
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014605$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14606
14607else
14608 # Some ARM platforms use a mixed-endian representation for doubles.
14609 # While Python doesn't currently have full support for these platforms
14610 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14611 # conversions work.
14612 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14613 # or little, then it must be this?
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014616
14617fi
14618
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014619# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014620# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014621# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014622# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014623# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014624# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014625
14626# This inline assembler syntax may also work for suncc and icc,
14627# so we try it on all platforms.
14628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14630$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014632/* end confdefs.h. */
14633
14634int
14635main ()
14636{
14637
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014638 unsigned short cw;
14639 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14640 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014641
14642 ;
14643 return 0;
14644}
14645_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014646if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014647 have_gcc_asm_for_x87=yes
14648else
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014650fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014651rm -f core conftest.err conftest.$ac_objext \
14652 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14654$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014655if test "$have_gcc_asm_for_x87" = yes
14656then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014659
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014661
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14663$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14665/* end confdefs.h. */
14666
14667int
14668main ()
14669{
14670
14671 unsigned int fpcr;
14672 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14673 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14674
14675 ;
14676 return 0;
14677}
14678_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014679if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014680 have_gcc_asm_for_mc68881=yes
14681else
14682 have_gcc_asm_for_mc68881=no
14683fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014684rm -f core conftest.err conftest.$ac_objext \
14685 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14687$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14688if test "$have_gcc_asm_for_mc68881" = yes
14689then
14690
14691$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14692
14693fi
14694
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014695# Detect whether system arithmetic is subject to x87-style double
14696# rounding issues. The result of this test has little meaning on non
14697# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14698# mode is round-to-nearest and double rounding issues are present, and
14699# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14701$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014702# $BASECFLAGS may affect the result
14703ac_save_cc="$CC"
14704CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014705if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014706 ac_cv_x87_double_rounding=no
14707else
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014709/* end confdefs.h. */
14710
14711#include <stdlib.h>
14712#include <math.h>
14713int main() {
14714 volatile double x, y, z;
14715 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14716 x = 0.99999999999999989; /* 1-2**-53 */
14717 y = 1./x;
14718 if (y != 1.)
14719 exit(0);
14720 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14721 x = 1e16;
14722 y = 2.99999;
14723 z = x + y;
14724 if (z != 1e16+4.)
14725 exit(0);
14726 /* both tests show evidence of double rounding */
14727 exit(1);
14728}
14729
14730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014731if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014732 ac_cv_x87_double_rounding=no
14733else
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014738fi
14739
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014740CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14742$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014743if test "$ac_cv_x87_double_rounding" = yes
14744then
14745
Matthias Kloseb9621712010-04-24 17:59:49 +000014746$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014747
14748fi
14749
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014750# ************************************
14751# * Check for mathematical functions *
14752# ************************************
14753
14754LIBS_SAVE=$LIBS
14755LIBS="$LIBS $LIBM"
14756
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014757for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14758do :
14759 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14760ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014761if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014762 cat >>confdefs.h <<_ACEOF
14763#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14764_ACEOF
14765
14766fi
14767done
14768
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014769for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014770do :
14771 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14772ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014773if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014774 cat >>confdefs.h <<_ACEOF
14775#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14776_ACEOF
14777
14778fi
14779done
14780
14781ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14782"
Victor Stinnere0be4232011-10-25 13:06:09 +020014783if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014784 ac_have_decl=1
14785else
14786 ac_have_decl=0
14787fi
14788
14789cat >>confdefs.h <<_ACEOF
14790#define HAVE_DECL_ISINF $ac_have_decl
14791_ACEOF
14792ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14793"
Victor Stinnere0be4232011-10-25 13:06:09 +020014794if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014795 ac_have_decl=1
14796else
14797 ac_have_decl=0
14798fi
14799
14800cat >>confdefs.h <<_ACEOF
14801#define HAVE_DECL_ISNAN $ac_have_decl
14802_ACEOF
14803ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14804"
Victor Stinnere0be4232011-10-25 13:06:09 +020014805if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014806 ac_have_decl=1
14807else
14808 ac_have_decl=0
14809fi
14810
14811cat >>confdefs.h <<_ACEOF
14812#define HAVE_DECL_ISFINITE $ac_have_decl
14813_ACEOF
14814
14815
Mark Dickinsona614f042009-11-28 12:48:43 +000014816# For multiprocessing module, check that sem_open
14817# actually works. For FreeBSD versions <= 7.2,
14818# the kernel module that provides POSIX semaphores
14819# isn't loaded by default, so an attempt to call
14820# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14822$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014823if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014825else
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014827 ac_cv_posix_semaphores_enabled=yes
14828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014830/* end confdefs.h. */
14831
14832#include <unistd.h>
14833#include <fcntl.h>
14834#include <stdio.h>
14835#include <semaphore.h>
14836#include <sys/stat.h>
14837
14838int main(void) {
14839 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14840 if (a == SEM_FAILED) {
14841 perror("sem_open");
14842 return 1;
14843 }
14844 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014845 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014846 return 0;
14847}
14848
14849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014851 ac_cv_posix_semaphores_enabled=yes
14852else
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014857fi
14858
14859
Mark Dickinsona614f042009-11-28 12:48:43 +000014860fi
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14863$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014864if test $ac_cv_posix_semaphores_enabled = no
14865then
14866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014868
14869fi
14870
Mark Dickinson10683072009-04-18 21:18:19 +000014871# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14873$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014874if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014876else
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014878 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014879else
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014881/* end confdefs.h. */
14882
14883#include <unistd.h>
14884#include <fcntl.h>
14885#include <stdio.h>
14886#include <semaphore.h>
14887#include <sys/stat.h>
14888
14889int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014890 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014891 int count;
14892 int res;
14893 if(a==SEM_FAILED){
14894 perror("sem_open");
14895 return 1;
14896
14897 }
14898 res = sem_getvalue(a, &count);
14899 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014900 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014901 return res==-1 ? 1 : 0;
14902}
14903
Mark Dickinson10683072009-04-18 21:18:19 +000014904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014906 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014907else
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014912fi
14913
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014915fi
14916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14918$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014919if test $ac_cv_broken_sem_getvalue = yes
14920then
14921
Matthias Kloseb9621712010-04-24 17:59:49 +000014922$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014923
14924fi
14925
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014926ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14927"
14928if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14929 ac_have_decl=1
14930else
14931 ac_have_decl=0
14932fi
14933
14934cat >>confdefs.h <<_ACEOF
14935#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14936_ACEOF
14937ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14938"
14939if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14940 ac_have_decl=1
14941else
14942 ac_have_decl=0
14943fi
14944
14945cat >>confdefs.h <<_ACEOF
14946#define HAVE_DECL_RTLD_NOW $ac_have_decl
14947_ACEOF
14948ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14949"
14950if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14951 ac_have_decl=1
14952else
14953 ac_have_decl=0
14954fi
14955
14956cat >>confdefs.h <<_ACEOF
14957#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14958_ACEOF
14959ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14960"
14961if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14962 ac_have_decl=1
14963else
14964 ac_have_decl=0
14965fi
14966
14967cat >>confdefs.h <<_ACEOF
14968#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14969_ACEOF
14970ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14971"
14972if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14973 ac_have_decl=1
14974else
14975 ac_have_decl=0
14976fi
14977
14978cat >>confdefs.h <<_ACEOF
14979#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14980_ACEOF
14981ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14982"
14983if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14984 ac_have_decl=1
14985else
14986 ac_have_decl=0
14987fi
14988
14989cat >>confdefs.h <<_ACEOF
14990#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14991_ACEOF
14992ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14993"
14994if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14995 ac_have_decl=1
14996else
14997 ac_have_decl=0
14998fi
14999
15000cat >>confdefs.h <<_ACEOF
15001#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
15002_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010015003ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
15004"
15005if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
15006 ac_have_decl=1
15007else
15008 ac_have_decl=0
15009fi
15010
15011cat >>confdefs.h <<_ACEOF
15012#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15013_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015014
15015
Mark Dickinsonbd792642009-03-18 20:06:12 +000015016# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000015017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15018$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015019# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015020if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015021 enableval=$enable_big_digits; case $enable_big_digits in
15022yes)
15023 enable_big_digits=30 ;;
15024no)
15025 enable_big_digits=15 ;;
1502615|30)
15027 ;;
15028*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015029 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 +000015030esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15032$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015033
15034cat >>confdefs.h <<_ACEOF
15035#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15036_ACEOF
15037
15038
15039else
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15041$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015042fi
15043
15044
Guido van Rossumef2255b2000-03-10 22:30:29 +000015045# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015046ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020015047if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015048
15049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015052 wchar_h="yes"
15053
Guido van Rossumef2255b2000-03-10 22:30:29 +000015054else
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015056
15057fi
15058
Michael W. Hudson54241132001-12-07 15:38:26 +000015059
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015061# determine wchar_t size
15062if test "$wchar_h" = yes
15063then
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000015068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15069$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015070if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
15074"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
Martin v. Löwis11437992002-04-12 09:54:03 +000015076else
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 if test "$ac_cv_type_wchar_t" = yes; then
15078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015080as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015081See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082 else
15083 ac_cv_sizeof_wchar_t=0
15084 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015086
Martin v. Löwis11437992002-04-12 09:54:03 +000015087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15089$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090
15091
15092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015094#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015095_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015096
Michael W. Hudson54241132001-12-07 15:38:26 +000015097
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015098fi
15099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15101$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015102have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015104/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015105
15106#include <tcl.h>
15107#if TCL_UTF_MAX != 6
15108# error "NOT UCS4_TCL"
15109#endif
15110int
15111main ()
15112{
15113
15114 ;
15115 return 0;
15116}
15117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015119
15120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015122
15123 have_ucs4_tcl=yes
15124
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15128$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015129
Skip Montanaro6dead952003-09-25 14:50:04 +000015130# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015131if test "$wchar_h" = yes
15132then
15133 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15135$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015136 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015138else
15139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015141 ac_cv_wchar_t_signed=yes
15142else
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015144/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015145
15146 #include <wchar.h>
15147 int main()
15148 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015149 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015150 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015151 }
15152
15153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015154if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015155 ac_cv_wchar_t_signed=yes
15156else
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015161fi
15162
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015163fi
15164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15166$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167fi
15168
Michael Osipov3738fad2018-08-24 18:17:19 +020015169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15170$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015171# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015172if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015173 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015174then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
Michael Osipov3738fad2018-08-24 18:17:19 +020015178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15179$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015180else
Michael Osipov3738fad2018-08-24 18:17:19 +020015181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15182$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015183fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015184
15185# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15187$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015188if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190else
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 ac_cv_c_bigendian=unknown
15192 # See if we're dealing with a universal compiler.
15193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15194/* end confdefs.h. */
15195#ifndef __APPLE_CC__
15196 not a universal capable compiler
15197 #endif
15198 typedef int dummy;
15199
Skip Montanaro6dead952003-09-25 14:50:04 +000015200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015201if ac_fn_c_try_compile "$LINENO"; then :
15202
15203 # Check for potential -arch flags. It is not universal unless
15204 # there are at least two -arch flags with different values.
15205 ac_arch=
15206 ac_prev=
15207 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15208 if test -n "$ac_prev"; then
15209 case $ac_word in
15210 i?86 | x86_64 | ppc | ppc64)
15211 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15212 ac_arch=$ac_word
15213 else
15214 ac_cv_c_bigendian=universal
15215 break
15216 fi
15217 ;;
15218 esac
15219 ac_prev=
15220 elif test "x$ac_word" = "x-arch"; then
15221 ac_prev=arch
15222 fi
15223 done
15224fi
15225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15226 if test $ac_cv_c_bigendian = unknown; then
15227 # See if sys/param.h defines the BYTE_ORDER macro.
15228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015229/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015230#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015232
Martin v. Löwis11437992002-04-12 09:54:03 +000015233int
15234main ()
15235{
Matthias Kloseb9621712010-04-24 17:59:49 +000015236#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15237 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15238 && LITTLE_ENDIAN)
15239 bogus endian macros
15240 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
15242 ;
15243 return 0;
15244}
15245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015246if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015247 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015250#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015252
Martin v. Löwis11437992002-04-12 09:54:03 +000015253int
15254main ()
15255{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015256#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 not big endian
15258 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
15260 ;
15261 return 0;
15262}
15263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015264if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015265 ac_cv_c_bigendian=yes
15266else
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015270fi
15271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15272 fi
15273 if test $ac_cv_c_bigendian = unknown; then
15274 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015276/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015277#include <limits.h>
15278
Martin v. Löwis11437992002-04-12 09:54:03 +000015279int
15280main ()
15281{
Matthias Kloseb9621712010-04-24 17:59:49 +000015282#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15283 bogus endian macros
15284 #endif
15285
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 ;
15287 return 0;
15288}
15289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015290if ac_fn_c_try_compile "$LINENO"; then :
15291 # It does; now see whether it defined to _BIG_ENDIAN or not.
15292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293/* end confdefs.h. */
15294#include <limits.h>
15295
15296int
15297main ()
15298{
15299#ifndef _BIG_ENDIAN
15300 not big endian
15301 #endif
15302
15303 ;
15304 return 0;
15305}
15306_ACEOF
15307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15313fi
15314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15315 fi
15316 if test $ac_cv_c_bigendian = unknown; then
15317 # Compile a test program.
15318 if test "$cross_compiling" = yes; then :
15319 # Try to guess by grepping values from an object file.
15320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15321/* end confdefs.h. */
15322short int ascii_mm[] =
15323 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15324 short int ascii_ii[] =
15325 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15326 int use_ascii (int i) {
15327 return ascii_mm[i] + ascii_ii[i];
15328 }
15329 short int ebcdic_ii[] =
15330 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15331 short int ebcdic_mm[] =
15332 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15333 int use_ebcdic (int i) {
15334 return ebcdic_mm[i] + ebcdic_ii[i];
15335 }
15336 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338int
15339main ()
15340{
15341return use_ascii (foo) == use_ebcdic (foo);
15342 ;
15343 return 0;
15344}
15345_ACEOF
15346if ac_fn_c_try_compile "$LINENO"; then :
15347 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15348 ac_cv_c_bigendian=yes
15349 fi
15350 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15351 if test "$ac_cv_c_bigendian" = unknown; then
15352 ac_cv_c_bigendian=no
15353 else
15354 # finding both strings is unlikely to happen, but who knows?
15355 ac_cv_c_bigendian=unknown
15356 fi
15357 fi
15358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015360else
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015362/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015364int
15365main ()
15366{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 /* Are we little or big endian? From Harbison&Steele. */
15369 union
15370 {
15371 long int l;
15372 char c[sizeof (long int)];
15373 } u;
15374 u.l = 1;
15375 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376
15377 ;
15378 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015379}
Martin v. Löwis11437992002-04-12 09:54:03 +000015380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015381if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015382 ac_cv_c_bigendian=no
15383else
Matthias Kloseb9621712010-04-24 17:59:49 +000015384 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15387 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15393$as_echo "$ac_cv_c_bigendian" >&6; }
15394 case $ac_cv_c_bigendian in #(
15395 yes)
15396 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15397;; #(
15398 no)
15399 ;; #(
15400 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015403
Matthias Kloseb9621712010-04-24 17:59:49 +000015404 ;; #(
15405 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015406 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015407 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015409
Michael W. Hudson54241132001-12-07 15:38:26 +000015410
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015411# ABI version string for Python extension modules. This appears between the
15412# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15413# from the following attributes which affect the ABI of this Python build (in
15414# this order):
15415#
15416# * The Python implementation (always 'cpython-' for us)
15417# * The major and minor version numbers
15418# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015419#
15420# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015421# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15422# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015423#
15424# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15425# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015426
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15428$as_echo_n "checking ABIFLAGS... " >&6; }
15429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15430$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15432$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015433SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15435$as_echo "$SOABI" >&6; }
15436
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015437# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15438if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015439 # Similar to SOABI but remove "d" flag from ABIFLAGS
15440
15441 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15442
15443cat >>confdefs.h <<_ACEOF
15444#define ALT_SOABI "${ALT_SOABI}"
15445_ACEOF
15446
15447fi
15448
Victor Stinner52a327c2020-12-23 03:41:08 +010015449
Matti Picusa44ce6c2020-12-20 04:56:57 +020015450EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015451
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15453$as_echo_n "checking LDVERSION... " >&6; }
15454LDVERSION='$(VERSION)$(ABIFLAGS)'
15455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15456$as_echo "$LDVERSION" >&6; }
15457
E. M. Brayc994c8f2019-05-24 17:33:47 +020015458# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015459
E. M. Brayb1fc4172019-05-24 18:39:39 +020015460if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015461 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015462else
15463 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015464fi
15465
doko@python.org87421192013-01-26 11:39:31 +010015466
Victor Stinner51ae31e2020-06-09 15:32:43 +020015467
15468BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15469
15470
15471# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015472# /usr/$LIDIRNAME/python$VERSION
15473
15474PLATLIBDIR="lib"
15475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15476$as_echo_n "checking for --with-platlibdir... " >&6; }
15477
15478# Check whether --with-platlibdir was given.
15479if test "${with_platlibdir+set}" = set; then :
15480 withval=$with_platlibdir;
15481# ignore 3 options:
15482# --with-platlibdir
15483# --with-platlibdir=
15484# --without-platlibdir
15485if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15486then
15487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15488$as_echo "yes" >&6; }
15489 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015490 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015491else
Victor Stinner8510f432020-03-10 09:53:09 +010015492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15493$as_echo "no" >&6; }
15494fi
15495else
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15497$as_echo "no" >&6; }
15498fi
15499
15500
15501
15502
15503if test x$PLATFORM_TRIPLET = x; then
15504 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15505else
15506 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015507fi
doko@python.org87421192013-01-26 11:39:31 +010015508
15509
Victor Stinner75e59a92021-01-20 17:07:21 +010015510# Check for --with-wheel-pkg-dir=PATH
15511
15512WHEEL_PKG_DIR=""
15513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15514$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
15515
15516# Check whether --with-wheel-pkg-dir was given.
15517if test "${with_wheel_pkg_dir+set}" = set; then :
15518 withval=$with_wheel_pkg_dir;
15519if test -n "$withval"; then
15520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15521$as_echo "yes" >&6; }
15522 WHEEL_PKG_DIR="$withval"
15523else
15524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15525$as_echo "no" >&6; }
15526fi
15527else
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15529$as_echo "no" >&6; }
15530fi
15531
15532
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015533# Check whether right shifting a negative integer extends the sign bit
15534# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15536$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015537if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015539else
Martin v. Löwis11437992002-04-12 09:54:03 +000015540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015542 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015545/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015546
15547int main()
15548{
Joshua Root674fa0a2020-12-14 07:56:34 +110015549 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015550}
15551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015553if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015554 ac_cv_rshift_extends_sign=yes
15555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015560fi
15561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562fi
15563
Matthias Kloseb9621712010-04-24 17:59:49 +000015564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15565$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015566if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015567then
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
Matthias Kloseb9621712010-04-24 17:59:49 +000015569$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015570
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015571fi
15572
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015573# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15575$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015576if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015578else
Martin v. Löwis11437992002-04-12 09:54:03 +000015579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015581/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015582#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015583int
15584main ()
15585{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015586
15587 FILE *f = fopen("/dev/null", "r");
15588 flockfile(f);
15589 getc_unlocked(f);
15590 funlockfile(f);
15591
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 ;
15593 return 0;
15594}
15595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015596if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015597 ac_cv_have_getc_unlocked=yes
15598else
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 ac_cv_have_getc_unlocked=no
15600fi
15601rm -f core conftest.err conftest.$ac_objext \
15602 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15606$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015607if test "$ac_cv_have_getc_unlocked" = yes
15608then
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015611
15612fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015613
Roland Hiebere1f77692021-02-09 02:05:25 +010015614
15615# Check whether --with-readline was given.
15616if test "${with_readline+set}" = set; then :
15617 withval=$with_readline;
15618else
15619 with_readline=yes
15620fi
15621
15622
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015623# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015624py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015625# save the value of LIBS so we don't actually link Python with readline
15626LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015627
Roland Hiebere1f77692021-02-09 02:05:25 +010015628if test "$with_readline" != no; then
15629 case "$with_readline" in
15630 editline|edit)
15631 LIBREADLINE=edit
15632
15633$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
15634
15635 ;;
15636 yes|readline)
15637 LIBREADLINE=readline
15638 ;;
15639 *)
15640 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15641 ;;
15642 esac
15643
15644 # On some systems we need to link readline to a termcap compatible
15645 # library. NOTE: Keep the precedence of listed libraries synchronised
15646 # with setup.py.
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015648$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015649 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15650 if test -z "$py_libtermcap"; then
15651 READLINE_LIBS="-l$LIBREADLINE"
15652 else
15653 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15654 fi
15655 LIBS="$READLINE_LIBS $LIBS_no_readline"
15656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015657/* end confdefs.h. */
15658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659/* Override any GCC internal prototype to avoid an error.
15660 Use char because int might match the return type of a GCC
15661 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015662#ifdef __cplusplus
15663extern "C"
15664#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015665char readline ();
15666int
15667main ()
15668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015670 ;
15671 return 0;
15672}
15673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015674if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015675 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015677rm -f core conftest.err conftest.$ac_objext \
15678 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015679 if test $py_cv_lib_readline = yes; then
15680 break
15681 fi
15682 done
15683
15684 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15685 #AC_SUBST([READLINE_LIBS])
15686 if test $py_cv_lib_readline = no; then
15687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015688$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015689 else
15690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015691$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015692
Matthias Kloseb9621712010-04-24 17:59:49 +000015693$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015694
Roland Hiebere1f77692021-02-09 02:05:25 +010015695 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015696fi
15697
Roland Hiebere1f77692021-02-09 02:05:25 +010015698if test "$py_cv_lib_readline" = yes; then
15699 # check for readline 2.2
15700 ac_fn_c_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
15701#include <stdio.h> /* Must be first for Gnu Readline */
15702#ifdef WITH_EDITLINE
15703# include <editline/readline.h>
15704#else
15705# include <readline/readline.h>
15706#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015707
Roland Hiebere1f77692021-02-09 02:05:25 +010015708"
15709if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015710
Matthias Kloseb9621712010-04-24 17:59:49 +000015711$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015712
15713fi
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015714
Roland Hiebere1f77692021-02-09 02:05:25 +010015715 ac_fn_c_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
15716#include <stdio.h> /* Must be first for Gnu Readline */
15717#ifdef WITH_EDITLINE
15718# include <editline/readline.h>
15719#else
15720# include <readline/readline.h>
15721#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015722
Roland Hiebere1f77692021-02-09 02:05:25 +010015723"
15724if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015727
15728fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015729
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015730
Roland Hiebere1f77692021-02-09 02:05:25 +010015731 # check for readline 4.0
15732 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15734$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15735if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015737else
Martin v. Löwis11437992002-04-12 09:54:03 +000015738 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015739LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743/* Override any GCC internal prototype to avoid an error.
15744 Use char because int might match the return type of a GCC
15745 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015746#ifdef __cplusplus
15747extern "C"
15748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015749char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015750int
15751main ()
15752{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 ;
15755 return 0;
15756}
15757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015758if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015759 eval "$as_ac_Lib=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015760else
Roland Hiebere1f77692021-02-09 02:05:25 +010015761 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015763rm -f core conftest.err conftest.$ac_objext \
15764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015765LIBS=$ac_check_lib_save_LIBS
15766fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015767eval ac_res=\$$as_ac_Lib
15768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15769$as_echo "$ac_res" >&6; }
15770if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015773
Martin v. Löwis0daad592001-09-30 21:09:59 +000015774fi
15775
Michael W. Hudson54241132001-12-07 15:38:26 +000015776
Roland Hiebere1f77692021-02-09 02:05:25 +010015777 # also in 4.0
15778 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15780$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15781if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015783else
15784 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015785LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015787/* end confdefs.h. */
15788
15789/* Override any GCC internal prototype to avoid an error.
15790 Use char because int might match the return type of a GCC
15791 builtin and then its argument prototype would still apply. */
15792#ifdef __cplusplus
15793extern "C"
15794#endif
15795char rl_completion_display_matches_hook ();
15796int
15797main ()
15798{
15799return rl_completion_display_matches_hook ();
15800 ;
15801 return 0;
15802}
15803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015804if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015805 eval "$as_ac_Lib=yes"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015806else
Roland Hiebere1f77692021-02-09 02:05:25 +010015807 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015809rm -f core conftest.err conftest.$ac_objext \
15810 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015811LIBS=$ac_check_lib_save_LIBS
15812fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015813eval ac_res=\$$as_ac_Lib
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15815$as_echo "$ac_res" >&6; }
15816if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015819
15820fi
15821
15822
Roland Hiebere1f77692021-02-09 02:05:25 +010015823 # also in 4.0, but not in editline
15824 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15826$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15827if eval \${$as_ac_Lib+:} false; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015828 $as_echo_n "(cached) " >&6
15829else
15830 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015831LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15833/* end confdefs.h. */
15834
15835/* Override any GCC internal prototype to avoid an error.
15836 Use char because int might match the return type of a GCC
15837 builtin and then its argument prototype would still apply. */
15838#ifdef __cplusplus
15839extern "C"
15840#endif
15841char rl_resize_terminal ();
15842int
15843main ()
15844{
15845return rl_resize_terminal ();
15846 ;
15847 return 0;
15848}
15849_ACEOF
15850if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015851 eval "$as_ac_Lib=yes"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015852else
Roland Hiebere1f77692021-02-09 02:05:25 +010015853 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015854fi
15855rm -f core conftest.err conftest.$ac_objext \
15856 conftest$ac_exeext conftest.$ac_ext
15857LIBS=$ac_check_lib_save_LIBS
15858fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015859eval ac_res=\$$as_ac_Lib
15860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15861$as_echo "$ac_res" >&6; }
15862if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015863
15864$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15865
15866fi
15867
15868
Roland Hiebere1f77692021-02-09 02:05:25 +010015869 # check for readline 4.2
15870 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15872$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15873if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015875else
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015877LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881/* Override any GCC internal prototype to avoid an error.
15882 Use char because int might match the return type of a GCC
15883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015884#ifdef __cplusplus
15885extern "C"
15886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015887char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015888int
15889main ()
15890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 ;
15893 return 0;
15894}
15895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015896if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015897 eval "$as_ac_Lib=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +000015898else
Roland Hiebere1f77692021-02-09 02:05:25 +010015899 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000015900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015901rm -f core conftest.err conftest.$ac_objext \
15902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015903LIBS=$ac_check_lib_save_LIBS
15904fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015905eval ac_res=\$$as_ac_Lib
15906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15907$as_echo "$ac_res" >&6; }
15908if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015911
Guido van Rossum353ae582001-07-10 16:45:32 +000015912fi
15913
Jack Jansendd19cf82001-12-06 22:36:17 +000015914
Roland Hiebere1f77692021-02-09 02:05:25 +010015915 # also in readline 4.2
15916 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
15917#include <stdio.h> /* Must be first for Gnu Readline */
15918#ifdef WITH_EDITLINE
15919# include <editline/readline.h>
15920#else
15921# include <readline/readline.h>
15922#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015923
Roland Hiebere1f77692021-02-09 02:05:25 +010015924"
15925if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015928
15929fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015930
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015931
Roland Hiebere1f77692021-02-09 02:05:25 +010015932 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
15933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
15934$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
15935if eval \${$as_ac_Lib+:} false; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015936 $as_echo_n "(cached) " >&6
15937else
15938 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015939LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15941/* end confdefs.h. */
15942
15943/* Override any GCC internal prototype to avoid an error.
15944 Use char because int might match the return type of a GCC
15945 builtin and then its argument prototype would still apply. */
15946#ifdef __cplusplus
15947extern "C"
15948#endif
15949char append_history ();
15950int
15951main ()
15952{
15953return append_history ();
15954 ;
15955 return 0;
15956}
15957_ACEOF
15958if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015959 eval "$as_ac_Lib=yes"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015960else
Roland Hiebere1f77692021-02-09 02:05:25 +010015961 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015962fi
15963rm -f core conftest.err conftest.$ac_objext \
15964 conftest$ac_exeext conftest.$ac_ext
15965LIBS=$ac_check_lib_save_LIBS
15966fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015967eval ac_res=\$$as_ac_Lib
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15969$as_echo "$ac_res" >&6; }
15970if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015971
15972$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15973
15974fi
15975
Roland Hiebere1f77692021-02-09 02:05:25 +010015976fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015977
Martin v. Löwis82bca632006-02-10 20:49:30 +000015978# End of readline checks: restore LIBS
15979LIBS=$LIBS_no_readline
15980
Matthias Kloseb9621712010-04-24 17:59:49 +000015981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15982$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015983if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015985else
Martin v. Löwis11437992002-04-12 09:54:03 +000015986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015988 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015989else
Matthias Kloseb9621712010-04-24 17:59:49 +000015990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015991/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015992
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015993#include <stdlib.h>
15994#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015995int main()
15996{
15997 int val1 = nice(1);
15998 if (val1 != -1 && val1 == nice(2))
15999 exit(0);
16000 exit(1);
16001}
16002
Martin v. Löwis11437992002-04-12 09:54:03 +000016003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016004if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016005 ac_cv_broken_nice=yes
16006else
Matthias Kloseb9621712010-04-24 17:59:49 +000016007 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016011fi
16012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013fi
16014
Matthias Kloseb9621712010-04-24 17:59:49 +000016015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
16016$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016017if test "$ac_cv_broken_nice" = yes
16018then
Martin v. Löwis11437992002-04-12 09:54:03 +000016019
Matthias Kloseb9621712010-04-24 17:59:49 +000016020$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016021
16022fi
16023
Matthias Kloseb9621712010-04-24 17:59:49 +000016024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16025$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016026if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016027 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016028else
Matthias Kloseb9621712010-04-24 17:59:49 +000016029 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016030 ac_cv_broken_poll=no
16031else
Matthias Kloseb9621712010-04-24 17:59:49 +000016032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016033/* end confdefs.h. */
16034
16035#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016036#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016038int main()
16039{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016040 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016041 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016042
16043 close (42);
16044
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016045 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016046 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016047 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016048 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016049 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016050 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016051 return 1;
16052}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016053
16054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016055if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016056 ac_cv_broken_poll=yes
16057else
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16061 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016064fi
16065
Matthias Kloseb9621712010-04-24 17:59:49 +000016066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16067$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016068if test "$ac_cv_broken_poll" = yes
16069then
16070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016072
16073fi
16074
Martin v. Löwis1d459062005-03-14 21:23:33 +000016075# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000016076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16077$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016078if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016080else
16081
Matthias Kloseb9621712010-04-24 17:59:49 +000016082if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016083 ac_cv_working_tzset=no
16084else
Matthias Kloseb9621712010-04-24 17:59:49 +000016085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016086/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016087
16088#include <stdlib.h>
16089#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016090#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016091
16092#if HAVE_TZNAME
16093extern char *tzname[];
16094#endif
16095
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016096int main()
16097{
Brett Cannon18367812003-09-19 00:59:16 +000016098 /* Note that we need to ensure that not only does tzset(3)
16099 do 'something' with localtime, but it works as documented
16100 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016101 This includes making sure that tzname is set properly if
16102 tm->tm_zone does not exist since it is the alternative way
16103 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016104
16105 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016106 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016107 */
16108
Martin v. Löwis1d459062005-03-14 21:23:33 +000016109 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016110 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16111
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016112 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016113 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016114 if (localtime(&groundhogday)->tm_hour != 0)
16115 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016116#if HAVE_TZNAME
16117 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16118 if (strcmp(tzname[0], "UTC") ||
16119 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16120 exit(1);
16121#endif
Brett Cannon18367812003-09-19 00:59:16 +000016122
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016123 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016124 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016125 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016126 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016127#if HAVE_TZNAME
16128 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16129 exit(1);
16130#endif
Brett Cannon18367812003-09-19 00:59:16 +000016131
16132 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16133 tzset();
16134 if (localtime(&groundhogday)->tm_hour != 11)
16135 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016136#if HAVE_TZNAME
16137 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16138 exit(1);
16139#endif
16140
16141#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016142 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16143 exit(1);
16144 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16145 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016146#endif
Brett Cannon18367812003-09-19 00:59:16 +000016147
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016148 exit(0);
16149}
16150
16151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016152if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016153 ac_cv_working_tzset=yes
16154else
Matthias Kloseb9621712010-04-24 17:59:49 +000016155 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16158 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016159fi
16160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161fi
16162
Matthias Kloseb9621712010-04-24 17:59:49 +000016163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16164$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016165if test "$ac_cv_working_tzset" = yes
16166then
16167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016169
16170fi
16171
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016172# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16174$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016175if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016177else
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016179/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016180#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016181int
16182main ()
16183{
16184
16185struct stat st;
16186st.st_mtim.tv_nsec = 1;
16187
16188 ;
16189 return 0;
16190}
16191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016193 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016194else
Matthias Kloseb9621712010-04-24 17:59:49 +000016195 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16198fi
16199
Matthias Kloseb9621712010-04-24 17:59:49 +000016200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16201$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016202if test "$ac_cv_stat_tv_nsec" = yes
16203then
16204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016206
16207fi
16208
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016209# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16211$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016212if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016214else
Matthias Kloseb9621712010-04-24 17:59:49 +000016215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016216/* end confdefs.h. */
16217#include <sys/stat.h>
16218int
16219main ()
16220{
16221
16222struct stat st;
16223st.st_mtimespec.tv_nsec = 1;
16224
16225 ;
16226 return 0;
16227}
16228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016229if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016230 ac_cv_stat_tv_nsec2=yes
16231else
Matthias Kloseb9621712010-04-24 17:59:49 +000016232 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16235fi
16236
Matthias Kloseb9621712010-04-24 17:59:49 +000016237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16238$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016239if test "$ac_cv_stat_tv_nsec2" = yes
16240then
16241
Matthias Kloseb9621712010-04-24 17:59:49 +000016242$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016243
16244fi
16245
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016246# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016247ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016248if test "$cross_compiling" = no; then
16249 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16250fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016251
16252for ac_header in curses.h ncurses.h
16253do :
16254 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16255ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16256if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16257 cat >>confdefs.h <<_ACEOF
16258#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16259_ACEOF
16260
16261fi
16262
16263done
16264
16265
16266# On Solaris, term.h requires curses.h
16267for ac_header in term.h
16268do :
16269 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16270#ifdef HAVE_CURSES_H
16271#include <curses.h>
16272#endif
16273
16274"
16275if test "x$ac_cv_header_term_h" = xyes; then :
16276 cat >>confdefs.h <<_ACEOF
16277#define HAVE_TERM_H 1
16278_ACEOF
16279
16280fi
16281
16282done
16283
16284
Jack Jansen666b1e72001-10-31 12:11:48 +000016285# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16287$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016288if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016289 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016290else
Matthias Kloseb9621712010-04-24 17:59:49 +000016291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016292/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016293#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016294int
16295main ()
16296{
Jack Jansen666b1e72001-10-31 12:11:48 +000016297
16298 int rtn;
16299 rtn = mvwdelch(0,0,0);
16300
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 ;
16302 return 0;
16303}
16304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016305if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016306 ac_cv_mvwdelch_is_expression=yes
16307else
Matthias Kloseb9621712010-04-24 17:59:49 +000016308 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16311fi
16312
Matthias Kloseb9621712010-04-24 17:59:49 +000016313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16314$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016315
16316if test "$ac_cv_mvwdelch_is_expression" = yes
16317then
Martin v. Löwis11437992002-04-12 09:54:03 +000016318
Matthias Kloseb9621712010-04-24 17:59:49 +000016319$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016320
16321fi
16322
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016323# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16324# structs since version 5.7. If the macro is defined as zero before including
16325# [n]curses.h, ncurses will expose fields of the structs regardless of the
16326# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16328$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016329if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016330 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016331else
Matthias Kloseb9621712010-04-24 17:59:49 +000016332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016333/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016334
16335 #define NCURSES_OPAQUE 0
16336 #include <curses.h>
16337
Martin v. Löwis11437992002-04-12 09:54:03 +000016338int
16339main ()
16340{
Jack Jansen666b1e72001-10-31 12:11:48 +000016341
16342 WINDOW *w;
16343 w->_flags = 0;
16344
Martin v. Löwis11437992002-04-12 09:54:03 +000016345 ;
16346 return 0;
16347}
16348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016349if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016350 ac_cv_window_has_flags=yes
16351else
Matthias Kloseb9621712010-04-24 17:59:49 +000016352 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16355fi
16356
Matthias Kloseb9621712010-04-24 17:59:49 +000016357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16358$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016359
Jack Jansen666b1e72001-10-31 12:11:48 +000016360
16361if test "$ac_cv_window_has_flags" = yes
16362then
Martin v. Löwis11437992002-04-12 09:54:03 +000016363
Matthias Kloseb9621712010-04-24 17:59:49 +000016364$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016365
16366fi
16367
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16369$as_echo_n "checking for is_pad... " >&6; }
16370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16371/* end confdefs.h. */
16372#include <curses.h>
16373int
16374main ()
16375{
16376
16377#ifndef is_pad
16378void *x=is_pad
16379#endif
16380
16381 ;
16382 return 0;
16383}
16384_ACEOF
16385if ac_fn_c_try_compile "$LINENO"; then :
16386
16387$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16388
16389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16390$as_echo "yes" >&6; }
16391else
16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16393$as_echo "no" >&6; }
16394
16395fi
16396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16397
Matthias Kloseb9621712010-04-24 17:59:49 +000016398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16399$as_echo_n "checking for is_term_resized... " >&6; }
16400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016401/* end confdefs.h. */
16402#include <curses.h>
16403int
16404main ()
16405{
16406void *x=is_term_resized
16407 ;
16408 return 0;
16409}
16410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016412
Matthias Kloseb9621712010-04-24 17:59:49 +000016413$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016414
Matthias Kloseb159a552010-04-25 21:00:44 +000016415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016416$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016417else
Matthias Kloseb9621712010-04-24 17:59:49 +000016418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16419$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016420
16421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16423
Matthias Kloseb9621712010-04-24 17:59:49 +000016424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16425$as_echo_n "checking for resize_term... " >&6; }
16426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016427/* end confdefs.h. */
16428#include <curses.h>
16429int
16430main ()
16431{
16432void *x=resize_term
16433 ;
16434 return 0;
16435}
16436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016437if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016438
Matthias Kloseb9621712010-04-24 17:59:49 +000016439$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016440
Matthias Kloseb159a552010-04-25 21:00:44 +000016441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016442$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016443else
Matthias Kloseb9621712010-04-24 17:59:49 +000016444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16445$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016446
16447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16449
Matthias Kloseb9621712010-04-24 17:59:49 +000016450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16451$as_echo_n "checking for resizeterm... " >&6; }
16452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016453/* end confdefs.h. */
16454#include <curses.h>
16455int
16456main ()
16457{
16458void *x=resizeterm
16459 ;
16460 return 0;
16461}
16462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016463if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016464
Matthias Kloseb9621712010-04-24 17:59:49 +000016465$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016466
Matthias Kloseb159a552010-04-25 21:00:44 +000016467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016468$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016469else
Matthias Kloseb9621712010-04-24 17:59:49 +000016470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16471$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016472
16473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016475
16476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16477$as_echo_n "checking for immedok... " >&6; }
16478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16479/* end confdefs.h. */
16480#include <curses.h>
16481int
16482main ()
16483{
16484
16485#ifndef immedok
16486void *x=immedok
16487#endif
16488
16489 ;
16490 return 0;
16491}
16492_ACEOF
16493if ac_fn_c_try_compile "$LINENO"; then :
16494
16495$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16496
16497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16498$as_echo "yes" >&6; }
16499else
16500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16501$as_echo "no" >&6; }
16502
16503fi
16504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16505
16506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16507$as_echo_n "checking for syncok... " >&6; }
16508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16509/* end confdefs.h. */
16510#include <curses.h>
16511int
16512main ()
16513{
16514
16515#ifndef syncok
16516void *x=syncok
16517#endif
16518
16519 ;
16520 return 0;
16521}
16522_ACEOF
16523if ac_fn_c_try_compile "$LINENO"; then :
16524
16525$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16526
16527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16528$as_echo "yes" >&6; }
16529else
16530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16531$as_echo "no" >&6; }
16532
16533fi
16534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16535
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16537$as_echo_n "checking for wchgat... " >&6; }
16538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16539/* end confdefs.h. */
16540#include <curses.h>
16541int
16542main ()
16543{
16544
16545#ifndef wchgat
16546void *x=wchgat
16547#endif
16548
16549 ;
16550 return 0;
16551}
16552_ACEOF
16553if ac_fn_c_try_compile "$LINENO"; then :
16554
16555$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16556
16557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16558$as_echo "yes" >&6; }
16559else
16560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16561$as_echo "no" >&6; }
16562
16563fi
16564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16565
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16567$as_echo_n "checking for filter... " >&6; }
16568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16569/* end confdefs.h. */
16570#include <curses.h>
16571int
16572main ()
16573{
16574
16575#ifndef filter
16576void *x=filter
16577#endif
16578
16579 ;
16580 return 0;
16581}
16582_ACEOF
16583if ac_fn_c_try_compile "$LINENO"; then :
16584
16585$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16586
16587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16588$as_echo "yes" >&6; }
16589else
16590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16591$as_echo "no" >&6; }
16592
16593fi
16594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16595
16596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16597$as_echo_n "checking for has_key... " >&6; }
16598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16599/* end confdefs.h. */
16600#include <curses.h>
16601int
16602main ()
16603{
16604
16605#ifndef has_key
16606void *x=has_key
16607#endif
16608
16609 ;
16610 return 0;
16611}
16612_ACEOF
16613if ac_fn_c_try_compile "$LINENO"; then :
16614
16615$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16616
16617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16618$as_echo "yes" >&6; }
16619else
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16621$as_echo "no" >&6; }
16622
16623fi
16624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16625
16626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16627$as_echo_n "checking for typeahead... " >&6; }
16628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16629/* end confdefs.h. */
16630#include <curses.h>
16631int
16632main ()
16633{
16634
16635#ifndef typeahead
16636void *x=typeahead
16637#endif
16638
16639 ;
16640 return 0;
16641}
16642_ACEOF
16643if ac_fn_c_try_compile "$LINENO"; then :
16644
16645$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16646
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16648$as_echo "yes" >&6; }
16649else
16650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16651$as_echo "no" >&6; }
16652
16653fi
16654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16655
16656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16657$as_echo_n "checking for use_env... " >&6; }
16658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16659/* end confdefs.h. */
16660#include <curses.h>
16661int
16662main ()
16663{
16664
16665#ifndef use_env
16666void *x=use_env
16667#endif
16668
16669 ;
16670 return 0;
16671}
16672_ACEOF
16673if ac_fn_c_try_compile "$LINENO"; then :
16674
16675$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16676
16677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16678$as_echo "yes" >&6; }
16679else
16680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16681$as_echo "no" >&6; }
16682
16683fi
16684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016685# last curses configure check
16686CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16689$as_echo "$as_me: checking for device files" >&6;}
16690
16691if test "x$cross_compiling" = xyes; then
16692 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16694$as_echo_n "checking for /dev/ptmx... " >&6; }
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16696$as_echo "not set" >&6; }
16697 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16698 fi
16699 if test "${ac_cv_file__dev_ptc+set}" != set; then
16700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16701$as_echo_n "checking for /dev/ptc... " >&6; }
16702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16703$as_echo "not set" >&6; }
16704 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16705 fi
16706fi
16707
Matthias Kloseb9621712010-04-24 17:59:49 +000016708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16709$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016710if ${ac_cv_file__dev_ptmx+:} false; then :
16711 $as_echo_n "(cached) " >&6
16712else
16713 test "$cross_compiling" = yes &&
16714 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16715if test -r "/dev/ptmx"; then
16716 ac_cv_file__dev_ptmx=yes
16717else
16718 ac_cv_file__dev_ptmx=no
16719fi
16720fi
16721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16722$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16723if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016724
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016725fi
16726
16727if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016728
Matthias Kloseb9621712010-04-24 17:59:49 +000016729$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016730
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16733$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016734if ${ac_cv_file__dev_ptc+:} false; then :
16735 $as_echo_n "(cached) " >&6
16736else
16737 test "$cross_compiling" = yes &&
16738 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16739if test -r "/dev/ptc"; then
16740 ac_cv_file__dev_ptc=yes
16741else
16742 ac_cv_file__dev_ptc=no
16743fi
16744fi
16745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16746$as_echo "$ac_cv_file__dev_ptc" >&6; }
16747if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016748
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016749fi
16750
16751if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016752
Matthias Kloseb9621712010-04-24 17:59:49 +000016753$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016754
Neal Norwitz865400f2003-03-21 01:42:58 +000016755fi
16756
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016757if test $ac_sys_system = Darwin
16758then
16759 LIBS="$LIBS -framework CoreFoundation"
16760fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016761
Matthias Kloseb9621712010-04-24 17:59:49 +000016762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16763$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016764if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016765 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016766else
Matthias Kloseb9621712010-04-24 17:59:49 +000016767 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016768 ac_cv_have_size_t_format="cross -- assuming yes"
16769
Thomas Wouters477c8d52006-05-27 19:21:47 +000016770else
Matthias Kloseb9621712010-04-24 17:59:49 +000016771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016772/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016773
Thomas Wouters477c8d52006-05-27 19:21:47 +000016774#include <stdio.h>
16775#include <stddef.h>
16776#include <string.h>
16777
Christian Heimes2c181612007-12-17 20:04:13 +000016778#ifdef HAVE_SYS_TYPES_H
16779#include <sys/types.h>
16780#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016781
16782#ifdef HAVE_SSIZE_T
16783typedef ssize_t Py_ssize_t;
16784#elif SIZEOF_VOID_P == SIZEOF_LONG
16785typedef long Py_ssize_t;
16786#else
16787typedef int Py_ssize_t;
16788#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016789
Christian Heimes2c181612007-12-17 20:04:13 +000016790int main()
16791{
16792 char buffer[256];
16793
Thomas Wouters477c8d52006-05-27 19:21:47 +000016794 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16795 return 1;
16796
Thomas Wouters89f507f2006-12-13 04:49:30 +000016797 if (strcmp(buffer, "123"))
16798 return 1;
16799
16800 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16801 return 1;
16802
16803 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016804 return 1;
16805
16806 return 0;
16807}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016808
Thomas Wouters477c8d52006-05-27 19:21:47 +000016809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016810if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016811 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016812else
Matthias Kloseb9621712010-04-24 17:59:49 +000016813 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016817fi
16818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16821$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016822if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016823
Matthias Kloseb9621712010-04-24 17:59:49 +000016824$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016825
16826fi
16827
Matthias Kloseb9621712010-04-24 17:59:49 +000016828ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016829#ifdef HAVE_SYS_TYPES_H
16830#include <sys/types.h>
16831#endif
16832#ifdef HAVE_SYS_SOCKET_H
16833#include <sys/socket.h>
16834#endif
16835
Matthias Kloseb9621712010-04-24 17:59:49 +000016836"
Victor Stinnere0be4232011-10-25 13:06:09 +020016837if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016838
Martin v. Löwis11437992002-04-12 09:54:03 +000016839else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016840
Matthias Kloseb9621712010-04-24 17:59:49 +000016841$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016842
16843fi
16844
Michael W. Hudson54241132001-12-07 15:38:26 +000016845
Matthias Kloseb9621712010-04-24 17:59:49 +000016846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16847$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016848if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016849 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016850else
Matthias Kloseb9621712010-04-24 17:59:49 +000016851 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016852 ac_cv_broken_mbstowcs=no
16853else
Matthias Kloseb9621712010-04-24 17:59:49 +000016854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016855/* end confdefs.h. */
16856
Stefan Krah19c21392012-11-22 23:47:32 +010016857#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016858#include<stdlib.h>
16859int main() {
16860 size_t len = -1;
16861 const char *str = "text";
16862 len = mbstowcs(NULL, str, 0);
16863 return (len != 4);
16864}
16865
16866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016867if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016868 ac_cv_broken_mbstowcs=no
16869else
Matthias Kloseb9621712010-04-24 17:59:49 +000016870 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016874fi
16875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016876fi
16877
Matthias Kloseb9621712010-04-24 17:59:49 +000016878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16879$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016880if test "$ac_cv_broken_mbstowcs" = yes
16881then
16882
Matthias Kloseb9621712010-04-24 17:59:49 +000016883$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016884
16885fi
16886
Antoine Pitroub52ec782009-01-25 16:34:23 +000016887# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16889$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016890
16891# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016892if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016893 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016894if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016895then
16896
Matthias Kloseb9621712010-04-24 17:59:49 +000016897$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016898
Matthias Kloseb9621712010-04-24 17:59:49 +000016899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16900$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016901fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016902if test "$withval" = no
16903then
16904
16905$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16906
Matthias Kloseb9621712010-04-24 17:59:49 +000016907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16908$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016909fi
16910
Antoine Pitrou042b1282010-08-13 21:15:58 +000016911else
16912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16913$as_echo "no value specified" >&6; }
16914fi
16915
Antoine Pitroub52ec782009-01-25 16:34:23 +000016916
Matthias Kloseb17289e2012-03-15 19:51:34 +010016917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16918$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16919if ${ac_cv_computed_gotos+:} false; then :
16920 $as_echo_n "(cached) " >&6
16921else
16922 if test "$cross_compiling" = yes; then :
16923 if test "${with_computed_gotos+set}" = set; then
16924 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16925 else
16926 ac_cv_computed_gotos=no
16927 fi
16928else
16929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16930/* end confdefs.h. */
16931
16932int main(int argc, char **argv)
16933{
16934 static void *targets[1] = { &&LABEL1 };
16935 goto LABEL2;
16936LABEL1:
16937 return 0;
16938LABEL2:
16939 goto *targets[0];
16940 return 1;
16941}
16942
16943_ACEOF
16944if ac_fn_c_try_run "$LINENO"; then :
16945 ac_cv_computed_gotos=yes
16946else
16947 ac_cv_computed_gotos=no
16948fi
16949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16950 conftest.$ac_objext conftest.beam conftest.$ac_ext
16951fi
16952
16953fi
16954
16955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16956$as_echo "$ac_cv_computed_gotos" >&6; }
16957case "$ac_cv_computed_gotos" in yes*)
16958
16959$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16960
16961esac
16962
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016963case $ac_sys_system in
16964AIX*)
16965
16966$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16967 ;;
16968esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016969
Michael W. Hudson54241132001-12-07 15:38:26 +000016970
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016971
16972
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016973for h in `(cd $srcdir;echo Python/thread_*.h)`
16974do
16975 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16976done
16977
Michael W. Hudson54241132001-12-07 15:38:26 +000016978
Ned Deily8d02f912020-06-25 10:46:44 -040016979SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16981$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016982for dir in $SRCDIRS; do
16983 if test ! -d $dir; then
16984 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016985 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016986done
Matthias Kloseb9621712010-04-24 17:59:49 +000016987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16988$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016989
Stefan Krah1919b7e2012-03-21 18:25:23 +010016990# Availability of -O2:
16991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16992$as_echo_n "checking for -O2... " >&6; }
16993saved_cflags="$CFLAGS"
16994CFLAGS="-O2"
16995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16996/* end confdefs.h. */
16997
16998int
16999main ()
17000{
17001
17002
17003 ;
17004 return 0;
17005}
17006_ACEOF
17007if ac_fn_c_try_compile "$LINENO"; then :
17008 have_O2=yes
17009else
17010 have_O2=no
17011fi
17012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
17014$as_echo "$have_O2" >&6; }
17015CFLAGS="$saved_cflags"
17016
17017# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
17018# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
17019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
17020$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
17021saved_cflags="$CFLAGS"
17022CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17023if test "$have_O2" = no; then
17024 CFLAGS=""
17025fi
17026if test "$cross_compiling" = yes; then :
17027 have_glibc_memmove_bug=undefined
17028else
17029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17030/* end confdefs.h. */
17031
17032#include <stdio.h>
17033#include <stdlib.h>
17034#include <string.h>
17035void foo(void *p, void *q) { memmove(p, q, 19); }
17036int main() {
17037 char a[32] = "123456789000000000";
17038 foo(&a[9], a);
17039 if (strcmp(a, "123456789123456789000000000") != 0)
17040 return 1;
17041 foo(a, &a[9]);
17042 if (strcmp(a, "123456789000000000") != 0)
17043 return 1;
17044 return 0;
17045}
17046
17047_ACEOF
17048if ac_fn_c_try_run "$LINENO"; then :
17049 have_glibc_memmove_bug=no
17050else
17051 have_glibc_memmove_bug=yes
17052fi
17053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17054 conftest.$ac_objext conftest.beam conftest.$ac_ext
17055fi
17056
17057CFLAGS="$saved_cflags"
17058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17059$as_echo "$have_glibc_memmove_bug" >&6; }
17060if test "$have_glibc_memmove_bug" = yes; then
17061
17062$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
17063
17064fi
17065
17066if test "$have_gcc_asm_for_x87" = yes; then
17067 # Some versions of gcc miscompile inline asm:
17068 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17069 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17070 case $CC in
17071 *gcc*)
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17073$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
17074 saved_cflags="$CFLAGS"
17075 CFLAGS="-O2"
17076 if test "$cross_compiling" = yes; then :
17077 have_ipa_pure_const_bug=undefined
17078else
17079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17080/* end confdefs.h. */
17081
17082 __attribute__((noinline)) int
17083 foo(int *p) {
17084 int r;
17085 asm ( "movl \$6, (%1)\n\t"
17086 "xorl %0, %0\n\t"
17087 : "=r" (r) : "r" (p) : "memory"
17088 );
17089 return r;
17090 }
17091 int main() {
17092 int p = 8;
17093 if ((foo(&p) ? : p) != 6)
17094 return 1;
17095 return 0;
17096 }
17097
17098_ACEOF
17099if ac_fn_c_try_run "$LINENO"; then :
17100 have_ipa_pure_const_bug=no
17101else
17102 have_ipa_pure_const_bug=yes
17103fi
17104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17105 conftest.$ac_objext conftest.beam conftest.$ac_ext
17106fi
17107
17108 CFLAGS="$saved_cflags"
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17110$as_echo "$have_ipa_pure_const_bug" >&6; }
17111 if test "$have_ipa_pure_const_bug" = yes; then
17112
17113$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
17114
17115 fi
17116 ;;
17117 esac
17118fi
17119
Victor Stinner4f5366e2015-01-09 02:13:19 +010017120# Check for stdatomic.h
17121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17122$as_echo_n "checking for stdatomic.h... " >&6; }
17123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17124/* end confdefs.h. */
17125
17126
17127 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017128 atomic_int int_var;
17129 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017130 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017131 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17132 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17133 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017134 return 0;
17135 }
17136
17137
17138_ACEOF
17139if ac_fn_c_try_link "$LINENO"; then :
17140 have_stdatomic_h=yes
17141else
17142 have_stdatomic_h=no
17143fi
17144rm -f core conftest.err conftest.$ac_objext \
17145 conftest$ac_exeext conftest.$ac_ext
17146
17147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17148$as_echo "$have_stdatomic_h" >&6; }
17149
17150if test "$have_stdatomic_h" = yes; then
17151
17152$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
17153
17154fi
17155
Victor Stinner52a327c2020-12-23 03:41:08 +010017156# Check for GCC >= 4.7 and clang __atomic builtin functions
17157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17158$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17160/* end confdefs.h. */
17161
17162
Victor Stinner52a327c2020-12-23 03:41:08 +010017163 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017164 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017165 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17166 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017167 return 0;
17168 }
17169
17170
17171_ACEOF
17172if ac_fn_c_try_link "$LINENO"; then :
17173 have_builtin_atomic=yes
17174else
17175 have_builtin_atomic=no
17176fi
17177rm -f core conftest.err conftest.$ac_objext \
17178 conftest$ac_exeext conftest.$ac_ext
17179
17180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17181$as_echo "$have_builtin_atomic" >&6; }
17182
17183if test "$have_builtin_atomic" = yes; then
17184
17185$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17186
17187fi
17188
Ned Deily322f5ba2013-11-21 23:01:59 -080017189# ensurepip option
17190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17191$as_echo_n "checking for ensurepip... " >&6; }
17192
17193# Check whether --with-ensurepip was given.
17194if test "${with_ensurepip+set}" = set; then :
17195 withval=$with_ensurepip;
17196else
17197 with_ensurepip=upgrade
17198fi
17199
17200case $with_ensurepip in #(
17201 yes|upgrade) :
17202 ENSUREPIP=upgrade ;; #(
17203 install) :
17204 ENSUREPIP=install ;; #(
17205 no) :
17206 ENSUREPIP=no ;; #(
17207 *) :
17208 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17209esac
17210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17211$as_echo "$ENSUREPIP" >&6; }
17212
17213
Victor Stinner35a97c02015-03-08 02:59:09 +010017214# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17216$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17218/* end confdefs.h. */
17219
17220
17221 #include <dirent.h>
17222
17223 int main() {
17224 struct dirent entry;
17225 return entry.d_type == DT_UNKNOWN;
17226 }
17227
17228
17229_ACEOF
17230if ac_fn_c_try_link "$LINENO"; then :
17231 have_dirent_d_type=yes
17232else
17233 have_dirent_d_type=no
17234fi
17235rm -f core conftest.err conftest.$ac_objext \
17236 conftest$ac_exeext conftest.$ac_ext
17237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17238$as_echo "$have_dirent_d_type" >&6; }
17239
17240if test "$have_dirent_d_type" = yes; then
17241
17242$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17243
17244fi
17245
Victor Stinner9eb57c52015-03-19 22:21:49 +010017246# check if the Linux getrandom() syscall is available
17247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17248$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17250/* end confdefs.h. */
17251
17252
Victor Stinner1b80b242016-04-12 22:34:58 +020017253 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017254 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017255 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017256
17257 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017258 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017259 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017260 const int flags = GRND_NONBLOCK;
17261 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017262 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017263 return 0;
17264 }
17265
17266
17267_ACEOF
17268if ac_fn_c_try_link "$LINENO"; then :
17269 have_getrandom_syscall=yes
17270else
17271 have_getrandom_syscall=no
17272fi
17273rm -f core conftest.err conftest.$ac_objext \
17274 conftest$ac_exeext conftest.$ac_ext
17275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17276$as_echo "$have_getrandom_syscall" >&6; }
17277
17278if test "$have_getrandom_syscall" = yes; then
17279
17280$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17281
17282fi
17283
Victor Stinner3abf44e2015-09-18 15:38:37 +020017284# check if the getrandom() function is available
17285# the test was written for the Solaris function of <sys/random.h>
17286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17287$as_echo_n "checking for the getrandom() function... " >&6; }
17288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17289/* end confdefs.h. */
17290
17291
17292 #include <sys/random.h>
17293
17294 int main() {
17295 char buffer[1];
17296 const size_t buflen = sizeof(buffer);
17297 const int flags = 0;
17298 /* ignore the result, Python checks for ENOSYS at runtime */
17299 (void)getrandom(buffer, buflen, flags);
17300 return 0;
17301 }
17302
17303
17304_ACEOF
17305if ac_fn_c_try_link "$LINENO"; then :
17306 have_getrandom=yes
17307else
17308 have_getrandom=no
17309fi
17310rm -f core conftest.err conftest.$ac_objext \
17311 conftest$ac_exeext conftest.$ac_ext
17312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17313$as_echo "$have_getrandom" >&6; }
17314
17315if test "$have_getrandom" = yes; then
17316
17317$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17318
17319fi
17320
Neil Schemenauer5741c452019-02-08 10:48:46 -080017321# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17322# shm_* may only be available if linking against librt
17323save_LIBS="$LIBS"
17324save_includes_default="$ac_includes_default"
17325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17326$as_echo_n "checking for library containing shm_open... " >&6; }
17327if ${ac_cv_search_shm_open+:} false; then :
17328 $as_echo_n "(cached) " >&6
17329else
17330 ac_func_search_save_LIBS=$LIBS
17331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17332/* end confdefs.h. */
17333
17334/* Override any GCC internal prototype to avoid an error.
17335 Use char because int might match the return type of a GCC
17336 builtin and then its argument prototype would still apply. */
17337#ifdef __cplusplus
17338extern "C"
17339#endif
17340char shm_open ();
17341int
17342main ()
17343{
17344return shm_open ();
17345 ;
17346 return 0;
17347}
17348_ACEOF
17349for ac_lib in '' rt; do
17350 if test -z "$ac_lib"; then
17351 ac_res="none required"
17352 else
17353 ac_res=-l$ac_lib
17354 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17355 fi
17356 if ac_fn_c_try_link "$LINENO"; then :
17357 ac_cv_search_shm_open=$ac_res
17358fi
17359rm -f core conftest.err conftest.$ac_objext \
17360 conftest$ac_exeext
17361 if ${ac_cv_search_shm_open+:} false; then :
17362 break
17363fi
17364done
17365if ${ac_cv_search_shm_open+:} false; then :
17366
17367else
17368 ac_cv_search_shm_open=no
17369fi
17370rm conftest.$ac_ext
17371LIBS=$ac_func_search_save_LIBS
17372fi
17373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17374$as_echo "$ac_cv_search_shm_open" >&6; }
17375ac_res=$ac_cv_search_shm_open
17376if test "$ac_res" != no; then :
17377 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17378
17379fi
17380
17381if test "$ac_cv_search_shm_open" = "-lrt"; then
17382
17383$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17384
17385fi
17386for ac_header in sys/mman.h
17387do :
17388 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17389if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17390 cat >>confdefs.h <<_ACEOF
17391#define HAVE_SYS_MMAN_H 1
17392_ACEOF
17393
17394fi
17395
17396done
17397
17398# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17399ac_includes_default="\
17400${ac_includes_default}
17401#ifndef __cplusplus
17402# ifdef HAVE_SYS_MMAN_H
17403# include <sys/mman.h>
17404# endif
17405#endif
17406"
17407for ac_func in shm_open shm_unlink
17408do :
17409 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17410ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17411if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17412 cat >>confdefs.h <<_ACEOF
17413#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17414_ACEOF
17415
17416fi
17417done
17418
17419# we don't want to link with librt always, restore LIBS
17420LIBS="$save_LIBS"
17421ac_includes_default="$save_includes_default"
17422
Christian Heimesff5be6e2018-01-20 13:19:21 +010017423# Check for usable OpenSSL
17424
17425 found=false
17426
17427# Check whether --with-openssl was given.
17428if test "${with_openssl+set}" = set; then :
17429 withval=$with_openssl;
17430 case "$withval" in
17431 "" | y | ye | yes | n | no)
17432 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17433 ;;
17434 *) ssldirs="$withval"
17435 ;;
17436 esac
17437
17438else
17439
17440 # if pkg-config is installed and openssl has installed a .pc file,
17441 # then use that information and don't search ssldirs
17442 if test -n "$ac_tool_prefix"; then
17443 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17444set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17446$as_echo_n "checking for $ac_word... " >&6; }
17447if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17448 $as_echo_n "(cached) " >&6
17449else
17450 if test -n "$PKG_CONFIG"; then
17451 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17452else
17453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17454for as_dir in $PATH
17455do
17456 IFS=$as_save_IFS
17457 test -z "$as_dir" && as_dir=.
17458 for ac_exec_ext in '' $ac_executable_extensions; do
17459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17460 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17462 break 2
17463 fi
17464done
17465 done
17466IFS=$as_save_IFS
17467
17468fi
17469fi
17470PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17471if test -n "$PKG_CONFIG"; then
17472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17473$as_echo "$PKG_CONFIG" >&6; }
17474else
17475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17476$as_echo "no" >&6; }
17477fi
17478
17479
17480fi
17481if test -z "$ac_cv_prog_PKG_CONFIG"; then
17482 ac_ct_PKG_CONFIG=$PKG_CONFIG
17483 # Extract the first word of "pkg-config", so it can be a program name with args.
17484set dummy pkg-config; ac_word=$2
17485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17486$as_echo_n "checking for $ac_word... " >&6; }
17487if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17488 $as_echo_n "(cached) " >&6
17489else
17490 if test -n "$ac_ct_PKG_CONFIG"; then
17491 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17492else
17493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17494for as_dir in $PATH
17495do
17496 IFS=$as_save_IFS
17497 test -z "$as_dir" && as_dir=.
17498 for ac_exec_ext in '' $ac_executable_extensions; do
17499 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17500 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17502 break 2
17503 fi
17504done
17505 done
17506IFS=$as_save_IFS
17507
17508fi
17509fi
17510ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17511if test -n "$ac_ct_PKG_CONFIG"; then
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17513$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17514else
17515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17516$as_echo "no" >&6; }
17517fi
17518
17519 if test "x$ac_ct_PKG_CONFIG" = x; then
17520 PKG_CONFIG=""
17521 else
17522 case $cross_compiling:$ac_tool_warned in
17523yes:)
17524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17526ac_tool_warned=yes ;;
17527esac
17528 PKG_CONFIG=$ac_ct_PKG_CONFIG
17529 fi
17530else
17531 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17532fi
17533
17534 if test x"$PKG_CONFIG" != x""; then
17535 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17536 if test $? = 0; then
17537 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17538 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17539 found=true
17540 fi
17541 fi
17542
17543 # no such luck; use some default ssldirs
17544 if ! $found; then
17545 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17546 fi
17547
17548
17549fi
17550
17551
17552
17553 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17554 # an 'openssl' subdirectory
17555
17556 if ! $found; then
17557 OPENSSL_INCLUDES=
17558 for ssldir in $ssldirs; do
17559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17560$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17561 if test -f "$ssldir/include/openssl/ssl.h"; then
17562 OPENSSL_INCLUDES="-I$ssldir/include"
17563 OPENSSL_LDFLAGS="-L$ssldir/lib"
17564 OPENSSL_LIBS="-lssl -lcrypto"
17565 found=true
17566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17567$as_echo "yes" >&6; }
17568 break
17569 else
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17571$as_echo "no" >&6; }
17572 fi
17573 done
17574
17575 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17576 # it will just work!
17577 fi
17578
17579 # try the preprocessor and linker with our new flags,
17580 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17581
17582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17583$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17584 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17585 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17586
17587 save_LIBS="$LIBS"
17588 save_LDFLAGS="$LDFLAGS"
17589 save_CPPFLAGS="$CPPFLAGS"
17590 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17591 LIBS="$OPENSSL_LIBS $LIBS"
17592 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17594/* end confdefs.h. */
17595#include <openssl/ssl.h>
17596int
17597main ()
17598{
17599SSL_new(NULL)
17600 ;
17601 return 0;
17602}
17603_ACEOF
17604if ac_fn_c_try_link "$LINENO"; then :
17605
17606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17607$as_echo "yes" >&6; }
17608 have_openssl=yes
17609
17610else
17611
17612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17613$as_echo "no" >&6; }
17614 have_openssl=no
17615
17616fi
17617rm -f core conftest.err conftest.$ac_objext \
17618 conftest$ac_exeext conftest.$ac_ext
17619 CPPFLAGS="$save_CPPFLAGS"
17620 LDFLAGS="$save_LDFLAGS"
17621 LIBS="$save_LIBS"
17622
17623
17624
17625
17626
17627
17628if test "$have_openssl" = yes; then
17629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17630$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17631
17632 save_LIBS="$LIBS"
17633 save_LDFLAGS="$LDFLAGS"
17634 save_CPPFLAGS="$CPPFLAGS"
17635 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17636 LIBS="$OPENSSL_LIBS $LIBS"
17637 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17638
17639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17640/* end confdefs.h. */
17641
17642 #include <openssl/x509_vfy.h>
17643
17644int
17645main ()
17646{
17647
17648 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17649 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17650 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17651 X509_VERIFY_PARAM_set_hostflags(p, 0);
17652
17653 ;
17654 return 0;
17655}
17656
17657_ACEOF
17658if ac_fn_c_try_link "$LINENO"; then :
17659
17660 ac_cv_has_x509_verify_param_set1_host=yes
17661
17662else
17663
17664 ac_cv_has_x509_verify_param_set1_host=no
17665
17666fi
17667rm -f core conftest.err conftest.$ac_objext \
17668 conftest$ac_exeext conftest.$ac_ext
17669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17670$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17671 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17672
17673$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17674
17675 fi
17676
17677 CPPFLAGS="$save_CPPFLAGS"
17678 LDFLAGS="$save_LDFLAGS"
17679 LIBS="$save_LIBS"
17680fi
17681
Christian Heimes892d66e2018-01-29 14:10:18 +010017682# ssl module default cipher suite string
17683
17684
17685
17686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17687$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17688
17689# Check whether --with-ssl-default-suites was given.
17690if test "${with_ssl_default_suites+set}" = set; then :
17691 withval=$with_ssl_default_suites;
17692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17693$as_echo "$withval" >&6; }
17694case "$withval" in
17695 python)
17696 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17697
17698 ;;
17699 openssl)
17700 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17701
17702 ;;
17703 *)
17704 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17705
17706 cat >>confdefs.h <<_ACEOF
17707#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17708_ACEOF
17709
17710 ;;
17711esac
17712
17713else
17714
17715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17716$as_echo "python" >&6; }
17717$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17718
17719
17720fi
17721
17722
Christian Heimes9b60e552020-05-15 23:54:53 +020017723# builtin hash modules
17724default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17725
17726$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17727
17728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17729$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17730
17731# Check whether --with-builtin-hashlib-hashes was given.
17732if test "${with_builtin_hashlib_hashes+set}" = set; then :
17733 withval=$with_builtin_hashlib_hashes;
17734case "$withval" in
17735 yes)
17736 withval=$default_hashlib_hashes
17737 ;;
17738 no)
17739 withval=""
17740 ;;
17741esac
17742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17743$as_echo "$withval" >&6; }
17744cat >>confdefs.h <<_ACEOF
17745#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17746_ACEOF
17747
17748
17749else
17750
17751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17752$as_echo "$default_hashlib_hashes" >&6; };
17753cat >>confdefs.h <<_ACEOF
17754#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17755_ACEOF
17756
17757
17758fi
17759
17760
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017761# --with-experimental-isolated-subinterpreters
17762
17763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17764$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17765
17766# Check whether --with-experimental-isolated-subinterpreters was given.
17767if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17768 withval=$with_experimental_isolated_subinterpreters;
17769if test "$withval" != no
17770then
17771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17772$as_echo "yes" >&6; };
17773 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17774
17775else
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17777$as_echo "no" >&6; };
17778fi
17779else
17780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17781$as_echo "no" >&6; }
17782fi
17783
17784
Victor Stinner801bb0b2021-02-17 11:14:42 +010017785# --with-static-libpython
17786STATIC_LIBPYTHON=1
17787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5
17788$as_echo_n "checking for --with-static-libpython... " >&6; }
17789
17790# Check whether --with-static-libpython was given.
17791if test "${with_static_libpython+set}" = set; then :
17792 withval=$with_static_libpython;
17793if test "$withval" = no
17794then
17795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17796$as_echo "no" >&6; };
17797 STATIC_LIBPYTHON=0
17798else
17799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17800$as_echo "yes" >&6; };
17801fi
17802else
17803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17804$as_echo "yes" >&6; }
17805fi
17806
17807LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
17808if test "$PY_ENABLE_SHARED" = 1; then
17809 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
17810 if test "$STATIC_LIBPYTHON" = 1; then
17811 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17812 fi
17813else
17814 LIBRARY_DEPS="\$(LIBRARY) $LIBRARY_DEPS"
17815fi
17816
17817
17818
pxinwr277ce302020-12-30 20:50:39 +080017819# Check whether to disable test modules. Once set, setup.py will not build
17820# test extension modules and "make install" will not install test suites.
17821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17822$as_echo_n "checking for --disable-test-modules... " >&6; }
17823# Check whether --enable-test-modules was given.
17824if test "${enable_test_modules+set}" = set; then :
17825 enableval=$enable_test_modules;
17826fi
17827
17828if test "$enable_test_modules" = no; then
17829 TEST_MODULES=no
17830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17831$as_echo "yes" >&6; }
17832else
17833 TEST_MODULES=yes
17834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17835$as_echo "no" >&6; }
17836fi
17837
17838
Christian Heimes892d66e2018-01-29 14:10:18 +010017839
Guido van Rossum627b2d71993-12-24 10:39:16 +000017840# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017841ac_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 +000017842
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017843ac_config_files="$ac_config_files Modules/ld_so_aix"
17844
Martin v. Löwis11437992002-04-12 09:54:03 +000017845cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017846# This file is a shell script that caches the results of configure
17847# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017848# scripts and configure runs, see configure's option --config-cache.
17849# It is not useful on other systems. If it contains results you don't
17850# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017851#
Martin v. Löwis11437992002-04-12 09:54:03 +000017852# config.status only pays attention to the cache file if you give it
17853# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017854#
Skip Montanaro6dead952003-09-25 14:50:04 +000017855# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017856# loading this file, other *unset* `ac_cv_foo' will be assigned the
17857# following values.
17858
17859_ACEOF
17860
Guido van Rossumf78abae1997-01-21 22:02:36 +000017861# The following way of writing the cache mishandles newlines in values,
17862# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017864# Ultrix sh set writes to stderr and can't be redirected directly,
17865# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866(
17867 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17868 eval ac_val=\$$ac_var
17869 case $ac_val in #(
17870 *${as_nl}*)
17871 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017872 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17873$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 esac
17875 case $ac_var in #(
17876 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017877 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17878 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879 esac ;;
17880 esac
17881 done
17882
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17885 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 # `set' does not quote correctly, so add quotes: double-quote
17887 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017889 "s/'/'\\\\''/g;
17890 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017892 *)
17893 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 esac |
17897 sort
17898) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017903 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17904 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17906 :end' >>confcache
17907if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17908 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017909 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017910 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17911$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017912 if test ! -f "$cache_file" || test -h "$cache_file"; then
17913 cat confcache >"$cache_file"
17914 else
17915 case $cache_file in #(
17916 */* | ?:*)
17917 mv -f confcache "$cache_file"$$ &&
17918 mv -f "$cache_file"$$ "$cache_file" ;; #(
17919 *)
17920 mv -f confcache "$cache_file" ;;
17921 esac
17922 fi
17923 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017924 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017925 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17926$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017927 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017928fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017929rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017930
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017931test "x$prefix" = xNONE && prefix=$ac_default_prefix
17932# Let make expand exec_prefix.
17933test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017934
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017935DEFS=-DHAVE_CONFIG_H
17936
Skip Montanaro6dead952003-09-25 14:50:04 +000017937ac_libobjs=
17938ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017939U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017940for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17941 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017943 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017944 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17945 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017946 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17947 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017948done
17949LIBOBJS=$ac_libobjs
17950
17951LTLIBOBJS=$ac_ltlibobjs
17952
17953
Martin v. Löwis11437992002-04-12 09:54:03 +000017954
Matthias Kloseb9621712010-04-24 17:59:49 +000017955
Victor Stinnere0be4232011-10-25 13:06:09 +020017956: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017957ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017958ac_clean_files_save=$ac_clean_files
17959ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017960{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17961$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17962as_write_fail=0
17963cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017964#! $SHELL
17965# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017966# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017967# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017968# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017969
Martin v. Löwis11437992002-04-12 09:54:03 +000017970debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017971ac_cs_recheck=false
17972ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017973
Matthias Kloseb9621712010-04-24 17:59:49 +000017974SHELL=\${CONFIG_SHELL-$SHELL}
17975export SHELL
17976_ASEOF
17977cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17978## -------------------- ##
17979## M4sh Initialization. ##
17980## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982# Be more Bourne compatible
17983DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017984if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 emulate sh
17986 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017987 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017988 # is contrary to our usage. Disable this feature.
17989 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017991else
Matthias Kloseb9621712010-04-24 17:59:49 +000017992 case `(set -o) 2>/dev/null` in #(
17993 *posix*) :
17994 set -o posix ;; #(
17995 *) :
17996 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017998fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017999
18000
Matthias Kloseb9621712010-04-24 17:59:49 +000018001as_nl='
18002'
18003export as_nl
18004# Printing a long string crashes Solaris 7 /usr/bin/printf.
18005as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18006as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18007as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18008# Prefer a ksh shell builtin over an external printf program on Solaris,
18009# but without wasting forks for bash or zsh.
18010if test -z "$BASH_VERSION$ZSH_VERSION" \
18011 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18012 as_echo='print -r --'
18013 as_echo_n='print -rn --'
18014elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18015 as_echo='printf %s\n'
18016 as_echo_n='printf %s'
18017else
18018 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18019 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18020 as_echo_n='/usr/ucb/echo -n'
18021 else
18022 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18023 as_echo_n_body='eval
18024 arg=$1;
18025 case $arg in #(
18026 *"$as_nl"*)
18027 expr "X$arg" : "X\\(.*\\)$as_nl";
18028 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18029 esac;
18030 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18031 '
18032 export as_echo_n_body
18033 as_echo_n='sh -c $as_echo_n_body as_echo'
18034 fi
18035 export as_echo_body
18036 as_echo='sh -c $as_echo_body as_echo'
18037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018038
18039# The user is always right.
18040if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018041 PATH_SEPARATOR=:
18042 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18043 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18044 PATH_SEPARATOR=';'
18045 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048
18049# IFS
18050# We need space, tab and new line, in precisely that order. Quoting is
18051# there to prevent editors from complaining about space-tab.
18052# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18053# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054IFS=" "" $as_nl"
18055
18056# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018057as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018058case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059 *[\\/]* ) as_myself=$0 ;;
18060 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018061for as_dir in $PATH
18062do
18063 IFS=$as_save_IFS
18064 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000018065 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 ;;
18070esac
18071# We did not find ourselves, most probably we were run as `sh COMMAND'
18072# in which case we are not to be found in the path.
18073if test "x$as_myself" = x; then
18074 as_myself=$0
18075fi
18076if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018077 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18078 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079fi
18080
Matthias Kloseb9621712010-04-24 17:59:49 +000018081# Unset variables that we do not need and which cause bugs (e.g. in
18082# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18083# suppresses any "Segmentation fault" message there. '((' could
18084# trigger a bug in pdksh 5.2.14.
18085for as_var in BASH_ENV ENV MAIL MAILPATH
18086do eval test x\${$as_var+set} = xset \
18087 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088done
18089PS1='$ '
18090PS2='> '
18091PS4='+ '
18092
18093# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000018094LC_ALL=C
18095export LC_ALL
18096LANGUAGE=C
18097export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098
Matthias Kloseb9621712010-04-24 17:59:49 +000018099# CDPATH.
18100(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18101
18102
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018103# as_fn_error STATUS ERROR [LINENO LOG_FD]
18104# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018105# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18106# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018107# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018108as_fn_error ()
18109{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018110 as_status=$1; test $as_status -eq 0 && as_status=1
18111 if test "$4"; then
18112 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18113 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018114 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018115 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018116 as_fn_exit $as_status
18117} # as_fn_error
18118
18119
18120# as_fn_set_status STATUS
18121# -----------------------
18122# Set $? to STATUS, without forking.
18123as_fn_set_status ()
18124{
18125 return $1
18126} # as_fn_set_status
18127
18128# as_fn_exit STATUS
18129# -----------------
18130# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18131as_fn_exit ()
18132{
18133 set +e
18134 as_fn_set_status $1
18135 exit $1
18136} # as_fn_exit
18137
18138# as_fn_unset VAR
18139# ---------------
18140# Portably unset VAR.
18141as_fn_unset ()
18142{
18143 { eval $1=; unset $1;}
18144}
18145as_unset=as_fn_unset
18146# as_fn_append VAR VALUE
18147# ----------------------
18148# Append the text in VALUE to the end of the definition contained in VAR. Take
18149# advantage of any shell optimizations that allow amortized linear growth over
18150# repeated appends, instead of the typical quadratic growth present in naive
18151# implementations.
18152if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18153 eval 'as_fn_append ()
18154 {
18155 eval $1+=\$2
18156 }'
18157else
18158 as_fn_append ()
18159 {
18160 eval $1=\$$1\$2
18161 }
18162fi # as_fn_append
18163
18164# as_fn_arith ARG...
18165# ------------------
18166# Perform arithmetic evaluation on the ARGs, and store the result in the
18167# global $as_val. Take advantage of shells that can avoid forks. The arguments
18168# must be portable across $(()) and expr.
18169if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18170 eval 'as_fn_arith ()
18171 {
18172 as_val=$(( $* ))
18173 }'
18174else
18175 as_fn_arith ()
18176 {
18177 as_val=`expr "$@" || test $? -eq 1`
18178 }
18179fi # as_fn_arith
18180
18181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182if expr a : '\(a\)' >/dev/null 2>&1 &&
18183 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18184 as_expr=expr
18185else
18186 as_expr=false
18187fi
18188
18189if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18190 as_basename=basename
18191else
18192 as_basename=false
18193fi
18194
Matthias Kloseb9621712010-04-24 17:59:49 +000018195if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18196 as_dirname=dirname
18197else
18198 as_dirname=false
18199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201as_me=`$as_basename -- "$0" ||
18202$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18203 X"$0" : 'X\(//\)$' \| \
18204 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018205$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206 sed '/^.*\/\([^/][^/]*\)\/*$/{
18207 s//\1/
18208 q
18209 }
18210 /^X\/\(\/\/\)$/{
18211 s//\1/
18212 q
18213 }
18214 /^X\/\(\/\).*/{
18215 s//\1/
18216 q
18217 }
18218 s/.*/./; q'`
18219
Matthias Kloseb9621712010-04-24 17:59:49 +000018220# Avoid depending upon Character Ranges.
18221as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18222as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18223as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18224as_cr_digits='0123456789'
18225as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018226
18227ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018228case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018229-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018230 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 xy) ECHO_C='\c';;
18233 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18234 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235 esac;;
18236*)
18237 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018239
Martin v. Löwis11437992002-04-12 09:54:03 +000018240rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241if test -d conf$$.dir; then
18242 rm -f conf$$.dir/conf$$.file
18243else
18244 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018245 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018247if (echo >conf$$.file) 2>/dev/null; then
18248 if ln -s conf$$.file conf$$ 2>/dev/null; then
18249 as_ln_s='ln -s'
18250 # ... but there are two gotchas:
18251 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18252 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018253 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018254 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018255 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018256 elif ln conf$$.file conf$$ 2>/dev/null; then
18257 as_ln_s=ln
18258 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018259 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018260 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018261else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018262 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18265rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018266
Matthias Kloseb9621712010-04-24 17:59:49 +000018267
18268# as_fn_mkdir_p
18269# -------------
18270# Create "$as_dir" as a directory, including parents if necessary.
18271as_fn_mkdir_p ()
18272{
18273
18274 case $as_dir in #(
18275 -*) as_dir=./$as_dir;;
18276 esac
18277 test -d "$as_dir" || eval $as_mkdir_p || {
18278 as_dirs=
18279 while :; do
18280 case $as_dir in #(
18281 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18282 *) as_qdir=$as_dir;;
18283 esac
18284 as_dirs="'$as_qdir' $as_dirs"
18285 as_dir=`$as_dirname -- "$as_dir" ||
18286$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18287 X"$as_dir" : 'X\(//\)[^/]' \| \
18288 X"$as_dir" : 'X\(//\)$' \| \
18289 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18290$as_echo X"$as_dir" |
18291 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18292 s//\1/
18293 q
18294 }
18295 /^X\(\/\/\)[^/].*/{
18296 s//\1/
18297 q
18298 }
18299 /^X\(\/\/\)$/{
18300 s//\1/
18301 q
18302 }
18303 /^X\(\/\).*/{
18304 s//\1/
18305 q
18306 }
18307 s/.*/./; q'`
18308 test -d "$as_dir" && break
18309 done
18310 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018311 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018312
18313
18314} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018315if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018316 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018317else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018318 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018319 as_mkdir_p=false
18320fi
18321
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018322
18323# as_fn_executable_p FILE
18324# -----------------------
18325# Test if FILE is an executable regular file.
18326as_fn_executable_p ()
18327{
18328 test -f "$1" && test -x "$1"
18329} # as_fn_executable_p
18330as_test_x='test -x'
18331as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018332
18333# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018334as_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 +000018335
18336# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018337as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018338
18339
Martin v. Löwis11437992002-04-12 09:54:03 +000018340exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018341## ----------------------------------- ##
18342## Main body of $CONFIG_STATUS script. ##
18343## ----------------------------------- ##
18344_ASEOF
18345test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018346
Matthias Kloseb9621712010-04-24 17:59:49 +000018347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18348# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018349# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018350# values after options handling.
18351ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018352This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018353generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018354
18355 CONFIG_FILES = $CONFIG_FILES
18356 CONFIG_HEADERS = $CONFIG_HEADERS
18357 CONFIG_LINKS = $CONFIG_LINKS
18358 CONFIG_COMMANDS = $CONFIG_COMMANDS
18359 $ $0 $@
18360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361on `(hostname || uname -n) 2>/dev/null | sed 1q`
18362"
18363
Martin v. Löwis11437992002-04-12 09:54:03 +000018364_ACEOF
18365
Matthias Kloseb9621712010-04-24 17:59:49 +000018366case $ac_config_files in *"
18367"*) set x $ac_config_files; shift; ac_config_files=$*;;
18368esac
18369
18370case $ac_config_headers in *"
18371"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18372esac
18373
18374
18375cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018376# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018377config_files="$ac_config_files"
18378config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018381
Matthias Kloseb9621712010-04-24 17:59:49 +000018382cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018383ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018384\`$as_me' instantiates files and other configuration actions
18385from templates according to the current configuration. Unless the files
18386and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018387
Matthias Kloseb9621712010-04-24 17:59:49 +000018388Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018389
18390 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018391 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018392 --config print configuration, then exit
18393 -q, --quiet, --silent
18394 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018395 -d, --debug don't remove temporary files
18396 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018397 --file=FILE[:TEMPLATE]
18398 instantiate the configuration file FILE
18399 --header=FILE[:TEMPLATE]
18400 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018401
18402Configuration files:
18403$config_files
18404
18405Configuration headers:
18406$config_headers
18407
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018408Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18412ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018413ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018414python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018415configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018416 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018417
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018418Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018419This config.status script is free software; the Free Software Foundation
18420gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421
18422ac_pwd='$ac_pwd'
18423srcdir='$srcdir'
18424INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018425MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018426test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018427_ACEOF
18428
Matthias Kloseb9621712010-04-24 17:59:49 +000018429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18430# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018431ac_need_defaults=:
18432while test $# != 0
18433do
18434 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018435 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018436 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18437 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018438 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018439 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018440 --*=)
18441 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18442 ac_optarg=
18443 ac_shift=:
18444 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018446 ac_option=$1
18447 ac_optarg=$2
18448 ac_shift=shift
18449 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 esac
18451
Skip Montanaro6dead952003-09-25 14:50:04 +000018452 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018454 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18455 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018457 $as_echo "$ac_cs_version"; exit ;;
18458 --config | --confi | --conf | --con | --co | --c )
18459 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018461 debug=: ;;
18462 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018463 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018464 case $ac_optarg in
18465 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018466 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018467 esac
18468 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 ac_need_defaults=false;;
18470 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018471 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018472 case $ac_optarg in
18473 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18474 esac
18475 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018476 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477 --he | --h)
18478 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018479 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018480Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018482 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018483 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18484 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18485 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018486
18487 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018488 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018489Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018490
Matthias Kloseb9621712010-04-24 17:59:49 +000018491 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018493
18494 esac
18495 shift
18496done
18497
Skip Montanaro6dead952003-09-25 14:50:04 +000018498ac_configure_extra_args=
18499
18500if $ac_cs_silent; then
18501 exec 6>/dev/null
18502 ac_configure_extra_args="$ac_configure_extra_args --silent"
18503fi
18504
18505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018506cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018507if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018508 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018509 shift
18510 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18511 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018513 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018514fi
18515
Martin v. Löwis11437992002-04-12 09:54:03 +000018516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518exec 5>>config.log
18519{
18520 echo
18521 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18522## Running $as_me. ##
18523_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018524 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018530
Matthias Kloseb9621712010-04-24 17:59:49 +000018531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532
18533# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018534for ac_config_target in $ac_config_targets
18535do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536 case $ac_config_target in
18537 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18538 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18539 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018540 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18541 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018543 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018544 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018545 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018546 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547
Victor Stinnere0be4232011-10-25 13:06:09 +020018548 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018549 esac
18550done
18551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552
Martin v. Löwis11437992002-04-12 09:54:03 +000018553# If the user did not use the arguments to specify the items to instantiate,
18554# then the envvar interface is used. Set only those that are not.
18555# We use the long form for the default assignment because of an extremely
18556# bizarre bug on SunOS 4.1.3.
18557if $ac_need_defaults; then
18558 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18559 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18560fi
18561
Skip Montanaro6dead952003-09-25 14:50:04 +000018562# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018563# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018564# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565# Hook for its removal unless debugging.
18566# Note that there is a small window in which the directory will not be cleaned:
18567# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018568$debug ||
18569{
Victor Stinnere0be4232011-10-25 13:06:09 +020018570 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018572 : "${ac_tmp:=$tmp}"
18573 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018575 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018576}
Martin v. Löwis11437992002-04-12 09:54:03 +000018577# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018578
Martin v. Löwis11437992002-04-12 09:54:03 +000018579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018581 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018582} ||
18583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584 tmp=./conf$$-$RANDOM
18585 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018586} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018587ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018588
Matthias Kloseb9621712010-04-24 17:59:49 +000018589# Set up the scripts for CONFIG_FILES section.
18590# No need to generate them if there are no CONFIG_FILES.
18591# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018593
Matthias Kloseb9621712010-04-24 17:59:49 +000018594
18595ac_cr=`echo X | tr X '\015'`
18596# On cygwin, bash can eat \r inside `` if the user requested igncr.
18597# But we know of no other shell where ac_cr would be empty at this
18598# point, so we can use a bashism as a fallback.
18599if test "x$ac_cr" = x; then
18600 eval ac_cr=\$\'\\r\'
18601fi
18602ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18603if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018604 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018605else
18606 ac_cs_awk_cr=$ac_cr
18607fi
18608
Victor Stinnere0be4232011-10-25 13:06:09 +020018609echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018610_ACEOF
18611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018612
Matthias Kloseb9621712010-04-24 17:59:49 +000018613{
18614 echo "cat >conf$$subs.awk <<_ACEOF" &&
18615 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18616 echo "_ACEOF"
18617} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018618 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18619ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018620ac_delim='%!_!# '
18621for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018622 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018623 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624
Matthias Kloseb9621712010-04-24 17:59:49 +000018625 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18626 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018627 break
18628 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018629 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018630 else
18631 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018632 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633done
Matthias Kloseb9621712010-04-24 17:59:49 +000018634rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635
Matthias Kloseb9621712010-04-24 17:59:49 +000018636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018637cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018639sed -n '
18640h
18641s/^/S["/; s/!.*/"]=/
18642p
18643g
18644s/^[^!]*!//
18645:repl
18646t repl
18647s/'"$ac_delim"'$//
18648t delim
18649:nl
18650h
18651s/\(.\{148\}\)..*/\1/
18652t more1
18653s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18654p
18655n
18656b repl
18657:more1
18658s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18659p
18660g
18661s/.\{148\}//
18662t nl
18663:delim
18664h
18665s/\(.\{148\}\)..*/\1/
18666t more2
18667s/["\\]/\\&/g; s/^/"/; s/$/"/
18668p
18669b
18670:more2
18671s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18672p
18673g
18674s/.\{148\}//
18675t delim
18676' <conf$$subs.awk | sed '
18677/^[^""]/{
18678 N
18679 s/\n//
18680}
18681' >>$CONFIG_STATUS || ac_write_fail=1
18682rm -f conf$$subs.awk
18683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18684_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018685cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018686 for (key in S) S_is_set[key] = 1
18687 FS = ""
18688
18689}
18690{
18691 line = $ 0
18692 nfields = split(line, field, "@")
18693 substed = 0
18694 len = length(field[1])
18695 for (i = 2; i < nfields; i++) {
18696 key = field[i]
18697 keylen = length(key)
18698 if (S_is_set[key]) {
18699 value = S[key]
18700 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18701 len += length(value) + length(field[++i])
18702 substed = 1
18703 } else
18704 len += 1 + keylen
18705 }
18706
18707 print line
18708}
18709
18710_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18713if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18714 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18715else
18716 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018717fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018718 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018719_ACEOF
18720
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018721# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18722# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018723# trailing colons and then remove the whole line if VPATH becomes empty
18724# (actually we leave an empty line to preserve line numbers).
18725if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018726 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18727h
18728s///
18729s/^/:/
18730s/[ ]*$/:/
18731s/:\$(srcdir):/:/g
18732s/:\${srcdir}:/:/g
18733s/:@srcdir@:/:/g
18734s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018735s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018736x
18737s/\(=[ ]*\).*/\1/
18738G
18739s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018740s/^[^=]*=[ ]*$//
18741}'
18742fi
18743
Matthias Kloseb9621712010-04-24 17:59:49 +000018744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018745fi # test -n "$CONFIG_FILES"
18746
Matthias Kloseb9621712010-04-24 17:59:49 +000018747# Set up the scripts for CONFIG_HEADERS section.
18748# No need to generate them if there are no CONFIG_HEADERS.
18749# This happens for instance with `./config.status Makefile'.
18750if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018751cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018752BEGIN {
18753_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018754
Matthias Kloseb9621712010-04-24 17:59:49 +000018755# Transform confdefs.h into an awk script `defines.awk', embedded as
18756# here-document in config.status, that substitutes the proper values into
18757# config.h.in to produce config.h.
18758
18759# Create a delimiter string that does not exist in confdefs.h, to ease
18760# handling of long lines.
18761ac_delim='%!_!# '
18762for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018763 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18764 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018765 break
18766 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018767 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018768 else
18769 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18770 fi
18771done
18772
18773# For the awk script, D is an array of macro values keyed by name,
18774# likewise P contains macro parameters if any. Preserve backslash
18775# newline sequences.
18776
18777ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18778sed -n '
18779s/.\{148\}/&'"$ac_delim"'/g
18780t rset
18781:rset
18782s/^[ ]*#[ ]*define[ ][ ]*/ /
18783t def
18784d
18785:def
18786s/\\$//
18787t bsnl
18788s/["\\]/\\&/g
18789s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18790D["\1"]=" \3"/p
18791s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18792d
18793:bsnl
18794s/["\\]/\\&/g
18795s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18796D["\1"]=" \3\\\\\\n"\\/p
18797t cont
18798s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18799t cont
18800d
18801:cont
18802n
18803s/.\{148\}/&'"$ac_delim"'/g
18804t clear
18805:clear
18806s/\\$//
18807t bsnlc
18808s/["\\]/\\&/g; s/^/"/; s/$/"/p
18809d
18810:bsnlc
18811s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18812b cont
18813' <confdefs.h | sed '
18814s/'"$ac_delim"'/"\\\
18815"/g' >>$CONFIG_STATUS || ac_write_fail=1
18816
18817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18818 for (key in D) D_is_set[key] = 1
18819 FS = ""
18820}
18821/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18822 line = \$ 0
18823 split(line, arg, " ")
18824 if (arg[1] == "#") {
18825 defundef = arg[2]
18826 mac1 = arg[3]
18827 } else {
18828 defundef = substr(arg[1], 2)
18829 mac1 = arg[2]
18830 }
18831 split(mac1, mac2, "(") #)
18832 macro = mac2[1]
18833 prefix = substr(line, 1, index(line, defundef) - 1)
18834 if (D_is_set[macro]) {
18835 # Preserve the white space surrounding the "#".
18836 print prefix "define", macro P[macro] D[macro]
18837 next
18838 } else {
18839 # Replace #undef with comments. This is necessary, for example,
18840 # in the case of _POSIX_SOURCE, which is predefined and required
18841 # on some systems where configure will not decide to define it.
18842 if (defundef == "undef") {
18843 print "/*", prefix defundef, macro, "*/"
18844 next
18845 }
18846 }
18847}
18848{ print }
18849_ACAWK
18850_ACEOF
18851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018852 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018853fi # test -n "$CONFIG_HEADERS"
18854
18855
18856eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18857shift
18858for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018859do
18860 case $ac_tag in
18861 :[FHLC]) ac_mode=$ac_tag; continue;;
18862 esac
18863 case $ac_mode$ac_tag in
18864 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018865 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018866 :[FH]-) ac_tag=-:-;;
18867 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18868 esac
18869 ac_save_IFS=$IFS
18870 IFS=:
18871 set x $ac_tag
18872 IFS=$ac_save_IFS
18873 shift
18874 ac_file=$1
18875 shift
18876
18877 case $ac_mode in
18878 :L) ac_source=$1;;
18879 :[FH])
18880 ac_file_inputs=
18881 for ac_f
18882 do
18883 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018884 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018885 *) # Look for the file first in the build tree, then in the source tree
18886 # (if the path is not absolute). The absolute path cannot be DOS-style,
18887 # because $ac_f cannot contain `:'.
18888 test -f "$ac_f" ||
18889 case $ac_f in
18890 [\\/$]*) false;;
18891 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18892 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018893 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018894 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018895 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18896 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018897 done
18898
18899 # Let's still pretend it is `configure' which instantiates (i.e., don't
18900 # use $as_me), people would be surprised to read:
18901 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018902 configure_input='Generated from '`
18903 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18904 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018905 if test x"$ac_file" != x-; then
18906 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018907 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18908$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018909 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018910 # Neutralize special characters interpreted by sed in replacement strings.
18911 case $configure_input in #(
18912 *\&* | *\|* | *\\* )
18913 ac_sed_conf_input=`$as_echo "$configure_input" |
18914 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18915 *) ac_sed_conf_input=$configure_input;;
18916 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018917
18918 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018919 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18920 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018921 esac
18922 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018923 esac
18924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018926$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018927 X"$ac_file" : 'X\(//\)[^/]' \| \
18928 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018929 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018930$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018931 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18932 s//\1/
18933 q
18934 }
18935 /^X\(\/\/\)[^/].*/{
18936 s//\1/
18937 q
18938 }
18939 /^X\(\/\/\)$/{
18940 s//\1/
18941 q
18942 }
18943 /^X\(\/\).*/{
18944 s//\1/
18945 q
18946 }
18947 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018948 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018949 ac_builddir=.
18950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018951case "$ac_dir" in
18952.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18953*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018954 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018955 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018956 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018957 case $ac_top_builddir_sub in
18958 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18959 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18960 esac ;;
18961esac
18962ac_abs_top_builddir=$ac_pwd
18963ac_abs_builddir=$ac_pwd$ac_dir_suffix
18964# for backward compatibility:
18965ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018966
18967case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018968 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018970 ac_top_srcdir=$ac_top_builddir_sub
18971 ac_abs_top_srcdir=$ac_pwd ;;
18972 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018973 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974 ac_top_srcdir=$srcdir
18975 ac_abs_top_srcdir=$srcdir ;;
18976 *) # Relative name.
18977 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18978 ac_top_srcdir=$ac_top_build_prefix$srcdir
18979 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018980esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018981ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018982
Martin v. Löwis11437992002-04-12 09:54:03 +000018983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018984 case $ac_mode in
18985 :F)
18986 #
18987 # CONFIG_FILE
18988 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018989
18990 case $INSTALL in
18991 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018992 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018993 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018994 ac_MKDIR_P=$MKDIR_P
18995 case $MKDIR_P in
18996 [\\/$]* | ?:[\\/]* ) ;;
18997 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18998 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018999_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019000
Matthias Kloseb9621712010-04-24 17:59:49 +000019001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019002# If the template does not know about datarootdir, expand it.
19003# FIXME: This hack should be removed a few years after 2.60.
19004ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000019005ac_sed_dataroot='
19006/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019007 p
19008 q
19009}
19010/@datadir@/p
19011/@docdir@/p
19012/@infodir@/p
19013/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000019014/@mandir@/p'
19015case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019016*datarootdir*) ac_datarootdir_seen=yes;;
19017*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000019018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19019$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019022 ac_datarootdir_hack='
19023 s&@datadir@&$datadir&g
19024 s&@docdir@&$docdir&g
19025 s&@infodir@&$infodir&g
19026 s&@localedir@&$localedir&g
19027 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000019028 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019029esac
19030_ACEOF
19031
19032# Neutralize VPATH when `$srcdir' = `.'.
19033# Shell code in configure.ac might set extrasub.
19034# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000019035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19036ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000019037$extrasub
19038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000019039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000019040:t
19041/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000019042s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019043s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000019044s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019045s&@srcdir@&$ac_srcdir&;t t
19046s&@abs_srcdir@&$ac_abs_srcdir&;t t
19047s&@top_srcdir@&$ac_top_srcdir&;t t
19048s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19049s&@builddir@&$ac_builddir&;t t
19050s&@abs_builddir@&$ac_abs_builddir&;t t
19051s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19052s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019053s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019054$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019055"
Victor Stinnere0be4232011-10-25 13:06:09 +020019056eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19057 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019060 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19061 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19062 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000019063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019064which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000019065$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019066which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019067
Victor Stinnere0be4232011-10-25 13:06:09 +020019068 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019069 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019070 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19071 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019072 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019073 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074 ;;
19075 :H)
19076 #
19077 # CONFIG_HEADER
19078 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019079 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019080 {
19081 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019082 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19083 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019084 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019085 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019086 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19087$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019088 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019089 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019090 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019091 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019092 fi
19093 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019094 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019095 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019096 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019100
19101 esac
19102
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019103
19104 case $ac_file$ac_mode in
19105 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19106
19107 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108done # for ac_tag
19109
Guido van Rossum627b2d71993-12-24 10:39:16 +000019110
Matthias Kloseb9621712010-04-24 17:59:49 +000019111as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019112_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019113ac_clean_files=$ac_clean_files_save
19114
Matthias Kloseb9621712010-04-24 17:59:49 +000019115test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019116 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019117
Martin v. Löwis11437992002-04-12 09:54:03 +000019118
19119# configure is writing to config.log, and then calls config.status.
19120# config.status does its own redirection, appending to config.log.
19121# Unfortunately, on DOS this fails, as config.log is still kept open
19122# by configure, so config.status won't be able to write to it; its
19123# output is simply discarded. So we exec the FD to /dev/null,
19124# effectively closing config.log, so it can be properly (re)opened and
19125# appended to by config.status. When coming back to configure, we
19126# need to make the FD available again.
19127if test "$no_create" != yes; then
19128 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019129 ac_config_status_args=
19130 test "$silent" = yes &&
19131 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019132 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019133 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 exec 5>>config.log
19135 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19136 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019137 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019138fi
19139if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19140 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19141$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019142fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019143
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019144
Christian Heimes75ed8902013-11-20 01:11:18 +010019145echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019146if test ! -f Modules/Setup.local
19147then
19148 echo "# Edit this file for local setup changes" >Modules/Setup.local
19149fi
19150
Christian Heimes75ed8902013-11-20 01:11:18 +010019151echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019152$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019153 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019154 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019155mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019156
19157if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19158 echo "" >&6
19159 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019160 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 +000019161 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019162 echo "" >&6
19163 echo "" >&6
19164fi